spellbook: Teleport to factories.

This commit is contained in:
Little Cat 2023-01-10 20:16:08 -04:00
parent 5feda0df4f
commit 97cc920a9f
No known key found for this signature in database
GPG key ID: 96455BD9C4399BE8
2 changed files with 14 additions and 1 deletions

View file

@ -18,7 +18,7 @@ class CogHQLoader(StateData.StateData):
self.parentFSMState = parentFSMState
self.placeDoneEvent = 'cogHQLoaderPlaceDone'
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('cogHQLobby', self.enterCogHQLobby, self.exitCogHQLobby, ['quietZone', 'cogHQExterior', 'cogHQBossBattle']),
State.State('cogHQBossBattle', self.enterCogHQBossBattle, self.exitCogHQBossBattle, ['quietZone']),

View file

@ -397,6 +397,19 @@ class Quests(MagicWord):
else:
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):
aliases = ["boss"]
desc = "Create a new or manupliate the current boss battle."