spellbook: Teleport to factories.
This commit is contained in:
parent
5feda0df4f
commit
97cc920a9f
2 changed files with 14 additions and 1 deletions
|
@ -18,7 +18,7 @@ class CogHQLoader(StateData.StateData):
|
||||||
self.parentFSMState = parentFSMState
|
self.parentFSMState = parentFSMState
|
||||||
self.placeDoneEvent = 'cogHQLoaderPlaceDone'
|
self.placeDoneEvent = 'cogHQLoaderPlaceDone'
|
||||||
self.townBattleDoneEvent = 'town-battle-done'
|
self.townBattleDoneEvent = 'town-battle-done'
|
||||||
self.fsm = ClassicFSM.ClassicFSM('CogHQLoader', [State.State('start', None, None, ['quietZone', 'cogHQExterior', 'cogHQBossBattle']),
|
self.fsm = ClassicFSM.ClassicFSM('CogHQLoader', [State.State('start', None, None, ['quietZone', 'cogHQExterior', 'factoryInterior', 'cogHQBossBattle']),
|
||||||
State.State('cogHQExterior', self.enterCogHQExterior, self.exitCogHQExterior, ['quietZone', 'cogHQLobby']),
|
State.State('cogHQExterior', self.enterCogHQExterior, self.exitCogHQExterior, ['quietZone', 'cogHQLobby']),
|
||||||
State.State('cogHQLobby', self.enterCogHQLobby, self.exitCogHQLobby, ['quietZone', 'cogHQExterior', 'cogHQBossBattle']),
|
State.State('cogHQLobby', self.enterCogHQLobby, self.exitCogHQLobby, ['quietZone', 'cogHQExterior', 'cogHQBossBattle']),
|
||||||
State.State('cogHQBossBattle', self.enterCogHQBossBattle, self.exitCogHQBossBattle, ['quietZone']),
|
State.State('cogHQBossBattle', self.enterCogHQBossBattle, self.exitCogHQBossBattle, ['quietZone']),
|
||||||
|
|
|
@ -397,6 +397,19 @@ class Quests(MagicWord):
|
||||||
else:
|
else:
|
||||||
return "Valid commands: \"finish\""
|
return "Valid commands: \"finish\""
|
||||||
|
|
||||||
|
class Factory(MagicWord):
|
||||||
|
desc = "Quickly start a Sellbot Factory."
|
||||||
|
execLocation = MagicWordConfig.EXEC_LOC_SERVER
|
||||||
|
arguments = [('sideEnterace', int, False, 0)]
|
||||||
|
|
||||||
|
def handleWord(self, invoker, avId, toon, *args):
|
||||||
|
if not hasattr(self.air, "factoryMgr"):
|
||||||
|
return "No factory manager."
|
||||||
|
|
||||||
|
from toontown.toonbase import ToontownGlobals
|
||||||
|
zoneId = self.air.factoryMgr.createFactory(ToontownGlobals.SellbotFactoryInt, 1 if args[0] > 0 else 0, [avId])
|
||||||
|
return "Created factory, teleporting...", avId, ["cogHQLoader", "factoryInterior", "", ToontownGlobals.SellbotHQ, zoneId, 0]
|
||||||
|
|
||||||
class BossBattle(MagicWord):
|
class BossBattle(MagicWord):
|
||||||
aliases = ["boss"]
|
aliases = ["boss"]
|
||||||
desc = "Create a new or manupliate the current boss battle."
|
desc = "Create a new or manupliate the current boss battle."
|
||||||
|
|
Loading…
Reference in a new issue