mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 19:52:37 -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)
|
||||
|
||||
def setBoxDoId(self, boxId, index):
|
||||
box = base.cr.doId2do[boxId]
|
||||
x = GardenGlobals.FLOWER_POS[box.typeIndex][index]
|
||||
self.index = 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.reparentTo(box)
|
||||
|
@ -370,4 +376,3 @@ class DistributedGardenPlot(DistributedLawnDecor.DistributedLawnDecor):
|
|||
return
|
||||
|
||||
return DistributedLawnDecor.DistributedLawnDecor.stick2Ground(self, *args, **kwargs)
|
||||
|
Loading…
Reference in a new issue