mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
jukebox at estate
This commit is contained in:
parent
aa51d3d448
commit
023cbc6acb
8 changed files with 49 additions and 29 deletions
19
README.md
19
README.md
|
@ -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!!! ##
|
|
|
@ -1389,10 +1389,11 @@ dclass DistributedParty : DistributedObject {
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedPartyActivity : DistributedObject {
|
dclass DistributedPartyActivity : DistributedObject {
|
||||||
setX(int16/10) broadcast required;
|
setX(int16/10) required broadcast ram;
|
||||||
setY(int16/10) broadcast required;
|
setY(int16/10) required broadcast ram;
|
||||||
setH(uint16%360/100) broadcast required;
|
setH(uint16%360/100) required broadcast ram;
|
||||||
setPartyDoId(uint32) broadcast required;
|
setPartyDoId(uint32) required broadcast;
|
||||||
|
unloadSign() broadcast ram;
|
||||||
toonJoinRequest() airecv clsend;
|
toonJoinRequest() airecv clsend;
|
||||||
toonExitRequest() airecv clsend;
|
toonExitRequest() airecv clsend;
|
||||||
toonExitDemand() airecv clsend;
|
toonExitDemand() airecv clsend;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
from pandac.PandaModules import *
|
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
|
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
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
set /P PPYTHON_PATH=<../PPYTHON_PATH
|
|
||||||
|
|
||||||
cd..
|
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
|
pause
|
|
@ -66,6 +66,8 @@ class DistributedEstate(DistributedObject.DistributedObject):
|
||||||
DistributedObject.DistributedObject.delete(self)
|
DistributedObject.DistributedObject.delete(self)
|
||||||
|
|
||||||
def load(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
|
self.lt = base.localAvatar
|
||||||
newsManager = base.cr.newsManager
|
newsManager = base.cr.newsManager
|
||||||
if newsManager:
|
if newsManager:
|
||||||
|
|
|
@ -24,6 +24,7 @@ from DistributedToonStatuaryAI import DistributedToonStatuaryAI
|
||||||
import time
|
import time
|
||||||
import random
|
import random
|
||||||
from toontown.fishing import FishGlobals
|
from toontown.fishing import FishGlobals
|
||||||
|
from toontown.parties.DistributedPartyJukeboxActivityAI import DistributedPartyJukeboxActivityAI
|
||||||
|
|
||||||
class Rental:
|
class Rental:
|
||||||
|
|
||||||
|
@ -142,8 +143,13 @@ class DistributedEstateAI(DistributedObjectAI):
|
||||||
self.pond = None
|
self.pond = None
|
||||||
self.spots = []
|
self.spots = []
|
||||||
self.targets = []
|
self.targets = []
|
||||||
|
self.jukebox = None
|
||||||
self.owner = None
|
self.owner = None
|
||||||
|
|
||||||
|
@property
|
||||||
|
def hostId(self):
|
||||||
|
return 1000000001
|
||||||
|
|
||||||
def generate(self):
|
def generate(self):
|
||||||
DistributedObjectAI.generate(self)
|
DistributedObjectAI.generate(self)
|
||||||
|
|
||||||
|
@ -181,6 +187,17 @@ class DistributedEstateAI(DistributedObjectAI):
|
||||||
spot.generateWithRequired(self.zoneId)
|
spot.generateWithRequired(self.zoneId)
|
||||||
self.spots.append(spot)
|
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()
|
self.createTreasurePlanner()
|
||||||
|
|
||||||
def generateRegisteredObjects(self, slot):
|
def generateRegisteredObjects(self, slot):
|
||||||
|
@ -254,6 +271,9 @@ class DistributedEstateAI(DistributedObjectAI):
|
||||||
for target in self.targets:
|
for target in self.targets:
|
||||||
target.requestDelete()
|
target.requestDelete()
|
||||||
|
|
||||||
|
if self.jukebox:
|
||||||
|
self.jukebox.requestDelete()
|
||||||
|
|
||||||
if self.treasurePlanner:
|
if self.treasurePlanner:
|
||||||
self.treasurePlanner.stop()
|
self.treasurePlanner.stop()
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,7 @@ class Estate(Place.Place):
|
||||||
State.State('doorOut', self.enterDoorOut, self.exitDoorOut, ['final', 'walk']),
|
State.State('doorOut', self.enterDoorOut, self.exitDoorOut, ['final', 'walk']),
|
||||||
State.State('final', self.enterFinal, self.exitFinal, ['teleportIn']),
|
State.State('final', self.enterFinal, self.exitFinal, ['teleportIn']),
|
||||||
State.State('quest', self.enterQuest, self.exitQuest, ['walk']),
|
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('fishing', self.enterFishing, self.exitFishing, ['walk', 'stopped']),
|
||||||
State.State('mailbox', self.enterMailbox, self.exitMailbox, ['walk', 'stopped']),
|
State.State('mailbox', self.enterMailbox, self.exitMailbox, ['walk', 'stopped']),
|
||||||
State.State('stopped', self.enterStopped, self.exitStopped, ['walk']),
|
State.State('stopped', self.enterStopped, self.exitStopped, ['walk']),
|
||||||
|
@ -177,6 +178,18 @@ class Estate(Place.Place):
|
||||||
def exitInit(self):
|
def exitInit(self):
|
||||||
pass
|
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):
|
def enterPetTutorial(self, bDummy = True):
|
||||||
self.notify.info('remove estate-check-toon-underwater to TaskMgr in enterPetTutorial()')
|
self.notify.info('remove estate-check-toon-underwater to TaskMgr in enterPetTutorial()')
|
||||||
taskMgr.remove('estate-check-toon-underwater')
|
taskMgr.remove('estate-check-toon-underwater')
|
||||||
|
|
|
@ -258,6 +258,10 @@ class DistributedPartyActivity(DistributedObject.DistributedObject):
|
||||||
self.signFlatWithNote.stash()
|
self.signFlatWithNote.stash()
|
||||||
self.signTextLocator.stash()
|
self.signTextLocator.stash()
|
||||||
|
|
||||||
|
def unloadSign(self):
|
||||||
|
self.sign.removeNode()
|
||||||
|
del self.sign
|
||||||
|
|
||||||
def loadLever(self):
|
def loadLever(self):
|
||||||
self.lever = self.root.attachNewNode('%sLever' % self.activityName)
|
self.lever = self.root.attachNewNode('%sLever' % self.activityName)
|
||||||
self.leverModel = self.party.defaultLeverModel.copyTo(self.lever)
|
self.leverModel = self.party.defaultLeverModel.copyTo(self.lever)
|
||||||
|
@ -409,8 +413,9 @@ class DistributedPartyActivity(DistributedObject.DistributedObject):
|
||||||
self._disableCollisions()
|
self._disableCollisions()
|
||||||
self.signModel.removeNode()
|
self.signModel.removeNode()
|
||||||
del self.signModel
|
del self.signModel
|
||||||
self.sign.removeNode()
|
if hasattr(self, 'sign'):
|
||||||
del self.sign
|
self.sign.removeNode()
|
||||||
|
del self.sign
|
||||||
self.ignoreAll()
|
self.ignoreAll()
|
||||||
if self.wantLever:
|
if self.wantLever:
|
||||||
self.unloadLever()
|
self.unloadLever()
|
||||||
|
|
Loading…
Reference in a new issue