bool for garden game k

This commit is contained in:
John Cote 2015-05-25 15:27:34 -04:00
parent b9244aea2a
commit bf006b5617
2 changed files with 9 additions and 1 deletions

View file

@ -105,6 +105,7 @@ show-total-population #t
want-mat-all-tailors #t want-mat-all-tailors #t
want-talkative-tyler #f want-talkative-tyler #f
estate-day-night #t estate-day-night #t
want-garden-game #f
want-language-selection #t want-language-selection #t
active-holidays 64, 65, 66 active-holidays 64, 65, 66

View file

@ -80,6 +80,8 @@ class DistributedEstate(DistributedObject.DistributedObject):
self.loadFishSellBox() self.loadFishSellBox()
self.oldClear = base.win.getClearColor() self.oldClear = base.win.getClearColor()
base.win.setClearColor(Vec4(0.09, 0.55, 0.21, 1.0)) base.win.setClearColor(Vec4(0.09, 0.55, 0.21, 1.0))
if config.GetBool('want-garden-game', False):
self.startGame()
def unload(self): def unload(self):
self.ignoreAll() self.ignoreAll()
@ -110,6 +112,8 @@ class DistributedEstate(DistributedObject.DistributedObject):
self.fishSellBox.removeNode() self.fishSellBox.removeNode()
del self.fishSellBox del self.fishSellBox
self.fishSellBox = None self.fishSellBox = None
if config.GetBool('want-garden-game', False):
GardenDropGame.GardenDropGame().endGame()
return return
def announceGenerate(self): def announceGenerate(self):
@ -117,7 +121,10 @@ class DistributedEstate(DistributedObject.DistributedObject):
self.accept('gardenGame', self.startGame) self.accept('gardenGame', self.startGame)
def startGame(self): def startGame(self):
self.game = GardenDropGame.GardenDropGame() if config.GetBool('want-garden-game', False):
self.game = GardenDropGame.GardenDropGame().playGardenDrop()
else:
self.game = GardenDropGame.GardenDropGame()
def loadAirplane(self): def loadAirplane(self):
self.airplane = loader.loadModel('phase_4/models/props/airplane.bam') self.airplane = loader.loadModel('phase_4/models/props/airplane.bam')