mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 19:52:37 -06:00
47 lines
1.7 KiB
Python
Executable file
47 lines
1.7 KiB
Python
Executable file
from direct.directnotify.DirectNotifyGlobal import directNotify
|
|
from toontown.cogdominium.DistCogdoLevelGame import DistCogdoLevelGame
|
|
from toontown.cogdominium.CogdoBoardroomGameBase import CogdoBoardroomGameBase
|
|
from toontown.cogdominium import CogdoBoardroomGameConsts as Consts
|
|
from toontown.toonbase import ToontownTimer
|
|
from toontown.toonbase import TTLocalizer as TTL
|
|
|
|
class DistCogdoBoardroomGame(CogdoBoardroomGameBase, DistCogdoLevelGame):
|
|
notify = directNotify.newCategory('DistCogdoBoardroomGame')
|
|
|
|
def __init__(self, cr):
|
|
DistCogdoLevelGame.__init__(self, cr)
|
|
|
|
def getTitle(self):
|
|
return TTL.BoardroomGameTitle
|
|
|
|
def getInstructions(self):
|
|
return TTL.BoardroomGameInstructions
|
|
|
|
def announceGenerate(self):
|
|
DistCogdoLevelGame.announceGenerate(self)
|
|
self.timer = ToontownTimer.ToontownTimer()
|
|
self.timer.setScale(Consts.Settings.TimerScale.get())
|
|
self.timer.stash()
|
|
|
|
def disable(self):
|
|
self.timer.destroy()
|
|
self.timer = None
|
|
DistCogdoLevelGame.disable(self)
|
|
return
|
|
|
|
def enterGame(self):
|
|
DistCogdoLevelGame.enterGame(self)
|
|
timeLeft = Consts.GameDuration.get() - (globalClock.getRealTime() - self.getStartTime())
|
|
self.timer.setTime(timeLeft)
|
|
self.timer.countdown(timeLeft, self.timerExpired)
|
|
self.timer.unstash()
|
|
|
|
def enterFinish(self):
|
|
DistCogdoLevelGame.enterFinish(self)
|
|
timeLeft = Consts.FinishDuration.get() - (globalClock.getRealTime() - self.getFinishTime())
|
|
self.timer.setTime(timeLeft)
|
|
self.timer.countdown(timeLeft, self.timerExpired)
|
|
self.timer.unstash()
|
|
|
|
def timerExpired(self):
|
|
pass
|