diff --git a/README.md b/README.md deleted file mode 100755 index a672a90f..00000000 --- a/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# src # - -The source code for Toontown Stride. - -### What is this repository for? ### - -* Game Development - -It is recommended that you make all of your changes in a fork before committing. - -Do **NOT** erase or revert another person's commit without first consulting them. - -And *only* push to **THIS** repository. - -Never **_ever_** force a git push. - -Never change the gitignore files unless you are adding something to them. - -## DON'T REPEATEDLY REVERT ANOTHER CONTRIBUTORS COMMITS!!! ## \ No newline at end of file diff --git a/astron/dclass/stride.dc b/astron/dclass/stride.dc index 0db75b73..8da1b432 100755 --- a/astron/dclass/stride.dc +++ b/astron/dclass/stride.dc @@ -1389,10 +1389,11 @@ dclass DistributedParty : DistributedObject { }; dclass DistributedPartyActivity : DistributedObject { - setX(int16/10) broadcast required; - setY(int16/10) broadcast required; - setH(uint16%360/100) broadcast required; - setPartyDoId(uint32) broadcast required; + setX(int16/10) required broadcast ram; + setY(int16/10) required broadcast ram; + setH(uint16%360/100) required broadcast ram; + setPartyDoId(uint32) required broadcast; + unloadSign() broadcast ram; toonJoinRequest() airecv clsend; toonExitRequest() airecv clsend; toonExitDemand() airecv clsend; diff --git a/otp/distributed/DCClassImports.py b/otp/distributed/DCClassImports.py index 7e45ff29..f0ade731 100644 --- a/otp/distributed/DCClassImports.py +++ b/otp/distributed/DCClassImports.py @@ -2,7 +2,7 @@ from pandac.PandaModules import * -hashVal = 3632903811L +hashVal = 1264053989 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 diff --git a/tools/parse_dcimports.bat b/tools/parse_dcimports.bat index 2d351001..65696860 100755 --- a/tools/parse_dcimports.bat +++ b/tools/parse_dcimports.bat @@ -1,7 +1,5 @@ -set /P PPYTHON_PATH=<../PPYTHON_PATH - cd.. -%PPYTHON_PATH% tools\parse_dcimports.py -o "otp/distributed/DCClassImports.py" "astron/dclass/stride.dc" +"panda/python/ppython.exe" tools\parse_dcimports.py -o "otp/distributed/DCClassImports.py" "astron/dclass/stride.dc" pause \ No newline at end of file diff --git a/toontown/estate/DistributedEstate.py b/toontown/estate/DistributedEstate.py index ffe9f5b1..c93b9036 100755 --- a/toontown/estate/DistributedEstate.py +++ b/toontown/estate/DistributedEstate.py @@ -66,6 +66,8 @@ class DistributedEstate(DistributedObject.DistributedObject): DistributedObject.DistributedObject.delete(self) def load(self): + self.defaultSignModel = loader.loadModel('phase_13/models/parties/eventSign') + self.activityIconsModel = loader.loadModel('phase_4/models/parties/eventSignIcons') self.lt = base.localAvatar newsManager = base.cr.newsManager if newsManager: diff --git a/toontown/estate/DistributedEstateAI.py b/toontown/estate/DistributedEstateAI.py index 309df07a..edcacf5e 100755 --- a/toontown/estate/DistributedEstateAI.py +++ b/toontown/estate/DistributedEstateAI.py @@ -24,6 +24,7 @@ from DistributedToonStatuaryAI import DistributedToonStatuaryAI import time import random from toontown.fishing import FishGlobals +from toontown.parties.DistributedPartyJukeboxActivityAI import DistributedPartyJukeboxActivityAI class Rental: @@ -142,8 +143,13 @@ class DistributedEstateAI(DistributedObjectAI): self.pond = None self.spots = [] self.targets = [] + self.jukebox = None self.owner = None + @property + def hostId(self): + return 1000000001 + def generate(self): DistributedObjectAI.generate(self) @@ -181,6 +187,17 @@ class DistributedEstateAI(DistributedObjectAI): spot.generateWithRequired(self.zoneId) self.spots.append(spot) + self.jukebox = DistributedPartyJukeboxActivityAI( + self.air, + self.doId, + (0, 0, 0, 0) + ) + self.jukebox.generateWithRequired(self.zoneId) + self.jukebox.sendUpdate('setX', [-21.8630]) + self.jukebox.sendUpdate('setY', [-154.669]) + self.jukebox.sendUpdate('setH', [148.7050]) + self.jukebox.sendUpdate('unloadSign') + self.createTreasurePlanner() def generateRegisteredObjects(self, slot): @@ -254,6 +271,9 @@ class DistributedEstateAI(DistributedObjectAI): for target in self.targets: target.requestDelete() + if self.jukebox: + self.jukebox.requestDelete() + if self.treasurePlanner: self.treasurePlanner.stop() diff --git a/toontown/estate/Estate.py b/toontown/estate/Estate.py index 44790eb7..32f813a2 100755 --- a/toontown/estate/Estate.py +++ b/toontown/estate/Estate.py @@ -64,6 +64,7 @@ class Estate(Place.Place): State.State('doorOut', self.enterDoorOut, self.exitDoorOut, ['final', 'walk']), State.State('final', self.enterFinal, self.exitFinal, ['teleportIn']), State.State('quest', self.enterQuest, self.exitQuest, ['walk']), + State.State('activity', self.enterActivity, self.exitActivity, ['walk', 'stopped']), State.State('fishing', self.enterFishing, self.exitFishing, ['walk', 'stopped']), State.State('mailbox', self.enterMailbox, self.exitMailbox, ['walk', 'stopped']), State.State('stopped', self.enterStopped, self.exitStopped, ['walk']), @@ -177,6 +178,18 @@ class Estate(Place.Place): def exitInit(self): pass + def enterActivity(self, setAnimState = True): + if setAnimState: + base.localAvatar.b_setAnimState('neutral', 1) + self.accept('teleportQuery', self.handleTeleportQuery) + base.localAvatar.setTeleportAvailable(False) + base.localAvatar.laffMeter.start() + + def exitActivity(self): + base.localAvatar.setTeleportAvailable(True) + self.ignore('teleportQuery') + base.localAvatar.laffMeter.stop() + def enterPetTutorial(self, bDummy = True): self.notify.info('remove estate-check-toon-underwater to TaskMgr in enterPetTutorial()') taskMgr.remove('estate-check-toon-underwater') diff --git a/toontown/parties/DistributedPartyActivity.py b/toontown/parties/DistributedPartyActivity.py index 05c9ed22..025039a5 100755 --- a/toontown/parties/DistributedPartyActivity.py +++ b/toontown/parties/DistributedPartyActivity.py @@ -258,6 +258,10 @@ class DistributedPartyActivity(DistributedObject.DistributedObject): self.signFlatWithNote.stash() self.signTextLocator.stash() + def unloadSign(self): + self.sign.removeNode() + del self.sign + def loadLever(self): self.lever = self.root.attachNewNode('%sLever' % self.activityName) self.leverModel = self.party.defaultLeverModel.copyTo(self.lever) @@ -409,8 +413,9 @@ class DistributedPartyActivity(DistributedObject.DistributedObject): self._disableCollisions() self.signModel.removeNode() del self.signModel - self.sign.removeNode() - del self.sign + if hasattr(self, 'sign'): + self.sign.removeNode() + del self.sign self.ignoreAll() if self.wantLever: self.unloadLever()