mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-24 12:12:36 -06:00
hot keyerror fix
This commit is contained in:
parent
41d8b63ec2
commit
3d8d023af9
1 changed files with 12 additions and 7 deletions
|
@ -356,8 +356,14 @@ class DistributedGardenPlot(DistributedLawnDecor.DistributedLawnDecor):
|
||||||
DistributedLawnDecor.DistributedLawnDecor.makeMovieNode(self)
|
DistributedLawnDecor.DistributedLawnDecor.makeMovieNode(self)
|
||||||
|
|
||||||
def setBoxDoId(self, boxId, index):
|
def setBoxDoId(self, boxId, index):
|
||||||
box = base.cr.doId2do[boxId]
|
self.index = index
|
||||||
x = GardenGlobals.FLOWER_POS[box.typeIndex][index]
|
if boxId in base.cr.doId2do:
|
||||||
|
self.setBox(base.cr.doId2do[boxId])
|
||||||
|
else:
|
||||||
|
self.acceptOnce('generate-%d' % boxId, self.setBox)
|
||||||
|
|
||||||
|
def setBox(self, box):
|
||||||
|
x = GardenGlobals.FLOWER_POS[box.typeIndex][self.index]
|
||||||
|
|
||||||
self.setPos(0, 0, 0)
|
self.setPos(0, 0, 0)
|
||||||
self.reparentTo(box)
|
self.reparentTo(box)
|
||||||
|
@ -370,4 +376,3 @@ class DistributedGardenPlot(DistributedLawnDecor.DistributedLawnDecor):
|
||||||
return
|
return
|
||||||
|
|
||||||
return DistributedLawnDecor.DistributedLawnDecor.stick2Ground(self, *args, **kwargs)
|
return DistributedLawnDecor.DistributedLawnDecor.stick2Ground(self, *args, **kwargs)
|
||||||
|
|
Loading…
Reference in a new issue