2019-11-02 17:27:54 -05:00
|
|
|
from direct.showbase.ShowBaseGlobal import *
|
2019-12-30 00:07:56 -06:00
|
|
|
from . import DistributedCCharBase
|
2019-11-02 17:27:54 -05:00
|
|
|
from direct.directnotify import DirectNotifyGlobal
|
|
|
|
from direct.fsm import ClassicFSM
|
|
|
|
from direct.fsm import State
|
2019-12-30 00:07:56 -06:00
|
|
|
from . import CharStateDatas
|
2019-11-02 17:27:54 -05:00
|
|
|
from toontown.toonbase import ToontownGlobals
|
|
|
|
from toontown.toonbase import TTLocalizer
|
2019-12-30 00:07:56 -06:00
|
|
|
from . import DistributedChip
|
2019-11-02 17:27:54 -05:00
|
|
|
|
|
|
|
class DistributedPoliceChip(DistributedChip.DistributedChip):
|
|
|
|
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPoliceChip')
|
|
|
|
|
|
|
|
def __init__(self, cr):
|
|
|
|
try:
|
|
|
|
self.DistributedChip_initialized
|
|
|
|
except:
|
|
|
|
self.DistributedChip_initialized = 1
|
|
|
|
DistributedCCharBase.DistributedCCharBase.__init__(self, cr, TTLocalizer.PoliceChip, 'pch')
|
|
|
|
self.fsm = ClassicFSM.ClassicFSM(self.getName(), [State.State('Off', self.enterOff, self.exitOff, ['Neutral']), State.State('Neutral', self.enterNeutral, self.exitNeutral, ['Walk']), State.State('Walk', self.enterWalk, self.exitWalk, ['Neutral'])], 'Off', 'Off')
|
|
|
|
self.fsm.enterInitialState()
|
|
|
|
self.handleHolidays()
|
|
|
|
self.nametag.setName(TTLocalizer.Chip)
|