mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-10-31 00:37:54 +00:00
ARGManager for future purposes.
This commit is contained in:
parent
21f2fa68ff
commit
1e248a081a
7 changed files with 85 additions and 2 deletions
|
@ -521,6 +521,7 @@ from toontown.cogdominium import DistCogdoCrane/AI
|
|||
from toontown.cogdominium import DistCogdoCraneMoneyBag/AI
|
||||
from toontown.cogdominium import DistCogdoCraneCog/AI
|
||||
from toontown.parties.GlobalPartyManager/AI/UD import GlobalPartyManager/AI/UD
|
||||
from toontown.uberdog.ARGManager/AI/UD import ARGManager/AI/UD
|
||||
|
||||
struct GiftItem {
|
||||
blob Item;
|
||||
|
@ -3379,3 +3380,6 @@ dclass DistributedSillyMeterMgr : DistributedObject {
|
|||
setCurPhase(int8) required broadcast ram;
|
||||
setIsRunning(bool) required broadcast ram;
|
||||
};
|
||||
|
||||
dclass ARGManager : DistributedObjectGlobal {
|
||||
};
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
from pandac.PandaModules import *
|
||||
|
||||
|
||||
hashVal = 1046852636
|
||||
hashVal = 1067289706
|
||||
|
||||
|
||||
from toontown.coghq import DistributedCashbotBossSafe, DistributedCashbotBossCrane, DistributedBattleFactory, DistributedCashbotBossTreasure, DistributedCogHQDoor, DistributedSellbotHQDoor, DistributedFactoryElevatorExt, DistributedMintElevatorExt, DistributedLawOfficeElevatorExt, DistributedLawOfficeElevatorInt, LobbyManager, DistributedMegaCorp, DistributedFactory, DistributedLawOffice, DistributedLawOfficeFloor, DistributedLift, DistributedDoorEntity, DistributedSwitch, DistributedButton, DistributedTrigger, DistributedCrushableEntity, DistributedCrusherEntity, DistributedStomper, DistributedStomperPair, DistributedLaserField, DistributedGolfGreenGame, DistributedSecurityCamera, DistributedMover, DistributedElevatorMarker, DistributedBarrelBase, DistributedGagBarrel, DistributedBeanBarrel, DistributedHealBarrel, DistributedGrid, ActiveCell, DirectionalCell, CrusherCell, DistributedCrate, DistributedSinkingPlatform, BattleBlocker, DistributedMint, DistributedMintRoom, DistributedMintBattle, DistributedStage, DistributedStageRoom, DistributedStageBattle, DistributedLawbotBossGavel, DistributedLawbotCannon, DistributedLawbotChair, DistributedCogKart, DistributedCountryClub, DistributedCountryClubRoom, DistributedMoleField, DistributedCountryClubBattle, DistributedMaze, DistributedFoodBelt, DistributedBanquetTable, DistributedGolfSpot
|
||||
|
@ -32,6 +32,7 @@ from toontown.parties import DistributedParty, DistributedPartyActivity, Distrib
|
|||
from toontown.friends.TrueFriendsMgr import TrueFriendsMgr
|
||||
from toontown.friends import TTUFriendsManager
|
||||
from toontown.cogdominium import DistributedCogdoInterior, DistributedCogdoBattleBldg, DistributedCogdoElevatorExt, DistributedCogdoElevatorInt, DistributedCogdoBarrel, DistCogdoGame, DistCogdoLevelGame, DistCogdoBoardroomGame, DistCogdoCraneGame, DistCogdoMazeGame, DistCogdoFlyingGame, DistCogdoCrane, DistCogdoCraneMoneyBag, DistCogdoCraneCog
|
||||
from toontown.uberdog.ARGManager import ARGManager
|
||||
from otp.distributed import Account, DistributedDistrict, DistributedDirectory
|
||||
from toontown.estate import DistributedCannon, DistributedTarget, EstateManager, DistributedEstate, DistributedHouse, DistributedHouseInterior, DistributedGarden, DistributedHouseDoor, DistributedMailbox, DistributedFurnitureManager, DistributedFurnitureItem, DistributedBank, DistributedCloset, DistributedTrunk, DistributedPhone, DistributedFireworksCannon, DistributedLawnDecor, DistributedGardenPlot, DistributedGardenBox, DistributedFlower, DistributedGagTree, DistributedStatuary, DistributedToonStatuary, DistributedChangingStatuary, DistributedAnimatedStatuary, DistributedPlantBase, DistributedLawnDecor
|
||||
from toontown.toon import DistributedToon, DistributedNPCToonBase, DistributedNPCToon, DistributedSmartNPC, DistributedNPCSpecialQuestGiver, DistributedNPCFlippyInToonHall, DistributedNPCScientist, DistributedNPCClerk, DistributedNPCTailor, DistributedNPCBlocker, DistributedNPCFisherman, DistributedNPCPartyPerson, DistributedNPCPetclerk, DistributedNPCKartClerk, DistributedNPCGlove
|
||||
|
|
|
@ -4,6 +4,7 @@ OTP_DO_ID_TOONTOWN = 1337
|
|||
OTP_DO_ID_CLIENT_SERVICES_MANAGER = 4665
|
||||
OTP_DO_ID_TTU_FRIENDS_MANAGER = 4666
|
||||
OPT_DO_ID_GROUP_MANAGER = 4667
|
||||
OTP_DO_ID_TTU_ARG_MANAGER = 4668
|
||||
OTP_DO_ID_GLOBAL_PARTY_MANAGER = 4477
|
||||
OTP_DO_ID_CHAT_MANAGER = 4681
|
||||
OTP_ZONE_ID_MANAGEMENT = 2
|
||||
|
@ -11,4 +12,4 @@ OTP_ZONE_ID_DISTRICTS = 3
|
|||
OTP_ZONE_ID_DISTRICTS_STATS = 4
|
||||
OTP_MOD_CHANNEL = 6200
|
||||
OTP_ADMIN_CHANNEL = 6400
|
||||
OTP_SYSADMIN_CHANNEL = 6500
|
||||
OTP_SYSADMIN_CHANNEL = 6500
|
||||
|
|
|
@ -78,6 +78,8 @@ class ToontownClientRepository(OTPClientRepository.OTPClientRepository):
|
|||
self.csm = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_CLIENT_SERVICES_MANAGER, 'ClientServicesManager')
|
||||
self.ttuFriendsManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_TTU_FRIENDS_MANAGER, 'TTUFriendsManager')
|
||||
|
||||
self.argManager = self.generateGlobalObject(OtpDoGlobals.OTP_DO_ID_TTU_ARG_MANAGER, 'ARGManager')
|
||||
|
||||
self.furnitureManager = None
|
||||
self.objectManager = None
|
||||
self.openAvatarPanels = set()
|
||||
|
|
67
toontown/uberdog/ARGManager.py
Normal file
67
toontown/uberdog/ARGManager.py
Normal file
|
@ -0,0 +1,67 @@
|
|||
from direct.distributed.DistributedObjectGlobal import DistributedObjectGlobal
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
from otp.speedchat import SpeedChatGlobals
|
||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||
from toontown.hood import ZoneUtil
|
||||
from pandac.PandaModules import Vec3
|
||||
|
||||
# Portable Hole settings
|
||||
Hood2Details = {
|
||||
# hood : [pos, speedchatIndex, destination]
|
||||
2665: [(6, 7, 9), 103, 2665], # TTC, Howdy!
|
||||
1832: [(6, 7, 9), 103, 1832], # Howdy!
|
||||
5502: [(6, 7, 9), 103, 5502], # Howdy!
|
||||
4612: [(6, 7, 9), 103, 4612], # Howdy!
|
||||
3636: [(6, 7, 9), 103, 3636], # Howdy!
|
||||
9705: [(6, 7, 9), 103, 9705], # Howdy!
|
||||
3823: [(6, 7, 9), 103, 3823], # Howdy!
|
||||
}
|
||||
Interior2Messages = {
|
||||
2665: ["Mary: Oh, Hello! Oh, Hello! Say, that's the keyword that Doctor Surlee told myself and other shopkeepers just like me to remember. I take it he sent you?", "Mary: The word I'm supposed to remember is 'Sillyness'"], # DD to TTC
|
||||
1832: ["Melville: Say, you don't look like Doctor Surlee. That is the trigger phrase, though...", "Melville: He told me to remember 'Lafter'"], # TTC to TB
|
||||
5502: ["HQ Officer: Oh, Surlee sent you? Keep this key safe, he said it's going to be important later on.", "HQ Officer: The word is 'Springy Partlicles' -- Whatever that means."], # TB to MML
|
||||
4612: ["Dr. Fret: Aahhh, brilliant. Surlee is up to something again, I'm sure.", "Dr. Fret: He told me to remember 'Creating Equiment'"], # MML to DG
|
||||
3636: ["Gus Gooseburger: Keep it down! Surlee didn't give me these gloves to just give the word away.", "Gus Gooseburger: Just kidding! I have no idea why he wanted me to remember this word. It's 'Portil'"], # DG to DDL
|
||||
9705: ["Drowsy Dave: Huh? Oh, oh! Hi. Surlee's word, right. Uhh...", "Drowsy Dave: I seem to have dozed off... Professor Flake is a good friend of the Doc, though. I bet he knows."], # DDL to AA
|
||||
3823: ["Professor Flake: Hmm? So soon? Surlee told me that something big would be happening whenever he needed this...", "Professor Flake: I hope that you have a photographic memory like myself, because this is a long one."], # DDL to AA
|
||||
}
|
||||
|
||||
class ARGManager(DistributedObjectGlobal):
|
||||
"""
|
||||
This is a client-view of the manager that handles everything to do
|
||||
with the portable hole ARG event.
|
||||
"""
|
||||
|
||||
notify = directNotify.newCategory('ARGManager')
|
||||
|
||||
def __init__(self, cr):
|
||||
DistributedObjectGlobal.__init__(self, cr)
|
||||
self.setupPortableHoleEvent()
|
||||
|
||||
def disable(self):
|
||||
self.cleanupPortableHoleEvent()
|
||||
DistributedObjectGlobal.disable(self)
|
||||
|
||||
def delete(self):
|
||||
self.cleanupPortableHoleEvent()
|
||||
DistributedObjectGlobal.delete(self)
|
||||
|
||||
def setupPortableHoleEvent(self):
|
||||
def phraseSaid(phraseId):
|
||||
position, speedchatIndex, destination = Hood2Details.get(base.cr.playGame.getPlace().getZoneId(), [None, None, None])
|
||||
if not position or not speedchatIndex or not destination:
|
||||
return
|
||||
if speedchatIndex != phraseId:
|
||||
return
|
||||
msgBefore, msgAfter = Interior2Messages.get(destination, [None, None])
|
||||
if not msgBefore:
|
||||
self.notify.warning("Interior %d has no message definitions!" % destination)
|
||||
return
|
||||
taskMgr.doMethodLater(2, base.localAvatar.setSystemMessage, self.uniqueName("arg-before-msg"), extraArgs=[0, msgBefore])
|
||||
taskMgr.doMethodLater(7, base.localAvatar.setSystemMessage, self.uniqueName("arg-after-msg"), extraArgs=[0, msgAfter])
|
||||
if destination == 3823:
|
||||
taskMgr.doMethodLater(15, base.localAvatar.setSystemMessage, self.uniqueName("arg-after-after-msg"), extraArgs=[0, "'ttr://assets/LL-memo-607630003555.txt'. Keep it safe. I have no idea what it means, but Surlee certainly will."])
|
||||
self.accept(SpeedChatGlobals.SCStaticTextMsgEvent, phraseSaid)
|
||||
|
||||
def cleanupPortableHoleEvent(self):
|
||||
self.ignore(SpeedChatGlobals.SCStaticTextMsgEvent)
|
4
toontown/uberdog/ARGManagerAI.py
Normal file
4
toontown/uberdog/ARGManagerAI.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
from direct.distributed.DistributedObjectGlobalAI import DistributedObjectGlobalAI
|
||||
|
||||
class ARGManagerAI(DistributedObjectGlobalAI):
|
||||
pass
|
4
toontown/uberdog/ARGManagerUD.py
Normal file
4
toontown/uberdog/ARGManagerUD.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
from direct.distributed.DistributedObjectGlobalUD import DistributedObjectGlobalUD
|
||||
|
||||
class ARGManagerUD(DistributedObjectGlobalUD):
|
||||
pass
|
Loading…
Reference in a new issue