oldschool-toontown/toontown/cogdominium/CogdoEntityCreator.py

21 lines
991 B
Python
Raw Normal View History

2019-11-02 17:27:54 -05:00
from otp.level import EntityCreator
from toontown.cogdominium import CogdoCraneGameConsts
from toontown.cogdominium.CogdoLevelMgr import CogdoLevelMgr
from toontown.cogdominium import CogdoBoardroomGameConsts
from toontown.cogdominium import CogdoCraneGameConsts
class CogdoEntityCreator(EntityCreator.EntityCreator):
def __init__(self, level):
EntityCreator.EntityCreator.__init__(self, level)
nothing = EntityCreator.nothing
2019-12-29 23:48:40 -06:00
nonlocalEnt = EntityCreator.nonlocalEnt
2019-11-02 17:27:54 -05:00
self.privRegisterTypes({'levelMgr': CogdoLevelMgr,
'cogdoBoardroomGameSettings': Functor(self._createCogdoSettings, CogdoBoardroomGameConsts.Settings),
'cogdoCraneGameSettings': Functor(self._createCogdoSettings, CogdoCraneGameConsts.Settings),
'cogdoCraneCogSettings': Functor(self._createCogdoSettings, CogdoCraneGameConsts.CogSettings)})
def _createCogdoSettings(self, ent, level, entId):
ent.initializeEntity(level, entId)
return ent