mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
hot keyerror fix
This commit is contained in:
parent
41d8b63ec2
commit
3d8d023af9
1 changed files with 12 additions and 7 deletions
|
@ -354,20 +354,25 @@ class DistributedGardenPlot(DistributedLawnDecor.DistributedLawnDecor):
|
|||
self.stick2Ground()
|
||||
else:
|
||||
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)
|
||||
self.setZ(1.2)
|
||||
self.setX(x)
|
||||
|
||||
|
||||
def stick2Ground(self, *args, **kwargs):
|
||||
plotType = GardenGlobals.whatCanBePlanted(self.ownerIndex, self.plot)
|
||||
if plotType == GardenGlobals.FLOWER_TYPE:
|
||||
return
|
||||
|
||||
|
||||
return DistributedLawnDecor.DistributedLawnDecor.stick2Ground(self, *args, **kwargs)
|
||||
|
Loading…
Reference in a new issue