mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
Some Cogdo edits
This commit is contained in:
parent
00f38dc1b0
commit
b870c27184
19 changed files with 34 additions and 21 deletions
|
@ -22,4 +22,4 @@ class TTCodeRedemptionMgr(DistributedObject):
|
|||
self.sendUpdate('redeemCode', [code])
|
||||
|
||||
def redeemCodeResult(self, result):
|
||||
self.callback(result)
|
||||
self.callback(result)
|
||||
|
|
|
@ -38,6 +38,7 @@ Expiration date, month and day are optional fields.
|
|||
If you for some reason are not familiar with arrays or lists, you
|
||||
only include the comma if there are multiple arguments.
|
||||
"""
|
||||
|
||||
class TTCodeRedemptionMgrAI(DistributedObjectAI):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory("TTCodeRedemptionMgrAI")
|
||||
codes = {
|
||||
|
@ -90,7 +91,7 @@ class TTCodeRedemptionMgrAI(DistributedObjectAI):
|
|||
self.requestCodeRedeem(avId, av, codeInfo['items'])
|
||||
else:
|
||||
self.sendUpdateToAvatarId(avId, 'redeemCodeResult', [1])
|
||||
|
||||
|
||||
def requestCodeRedeem(self, avId, av, items):
|
||||
count = self.getMailboxCount(items)
|
||||
|
||||
|
@ -101,7 +102,7 @@ class TTCodeRedemptionMgrAI(DistributedObjectAI):
|
|||
for item in items:
|
||||
if item in av.onOrder:
|
||||
continue
|
||||
|
||||
|
||||
item.deliveryDate = int(time.time() / 60) + 0.01
|
||||
av.onOrder.append(item)
|
||||
|
||||
|
|
|
@ -82,15 +82,16 @@ class CogdoBarrelRoom:
|
|||
if not self.cogdoBarrelsNode.isEmpty():
|
||||
self.cogdoBarrelsNode.reparentTo(self.model)
|
||||
self.cogdoBarrelsNode.unstash()
|
||||
base.localAvatar.b_setAnimState('neutral')
|
||||
self.defaultFar = base.camLens.getFar()
|
||||
base.camLens.setFar(CogdoBarrelRoomConsts.BarrelRoomCameraFar)
|
||||
base.camLens.setMinFov(ToontownGlobals.DefaultCameraFov/(4./3.))
|
||||
self.showBattleAreaLight(True)
|
||||
render.setFog(self.fog)
|
||||
self.model.unstash()
|
||||
|
||||
def hide(self):
|
||||
self.model.stash()
|
||||
#render.setFogOff()
|
||||
if self.defaultFar is not None:
|
||||
base.camLens.setFar(self.defaultFar)
|
||||
return
|
||||
|
|
|
@ -4,7 +4,7 @@ from direct.showbase.RandomNumGen import RandomNumGen
|
|||
from direct.interval.FunctionInterval import Wait
|
||||
from direct.interval.IntervalGlobal import Func
|
||||
from direct.interval.MetaInterval import Sequence, Parallel
|
||||
from toontown.toonbase import TTLocalizer
|
||||
from toontown.toonbase import TTLocalizer, ToontownGlobals
|
||||
import CogdoFlyingGameGlobals as Globals
|
||||
from CogdoFlyingLocalPlayer import CogdoFlyingLocalPlayer
|
||||
from CogdoGameAudioManager import CogdoGameAudioManager
|
||||
|
@ -123,6 +123,7 @@ class CogdoFlyingGame(DirectObject):
|
|||
self._movie.end()
|
||||
self._movie.unload()
|
||||
del self._movie
|
||||
base.camLens.setMinFov(ToontownGlobals.CogdoFov/(4./3.))
|
||||
self.localPlayer.ready()
|
||||
self.level.update(0.0)
|
||||
|
||||
|
|
|
@ -236,8 +236,8 @@ Level.DifficultyOrder = {2000: (1, 1, 1, 2, 1),
|
|||
7000: (2, 3, 2, 3, 2, 3, 2)}
|
||||
Dev.WantTempLevel = True
|
||||
Dev.DevQuadsOrder = (1, 2, 3, 4, 5, 6, 7, 8)
|
||||
Level.AddSparkleToPowerups = True
|
||||
Level.AddParticlesToStreamers = True
|
||||
Level.AddSparkleToPowerups = False
|
||||
Level.AddParticlesToStreamers = False
|
||||
Level.IgnoreLaffPowerups = False
|
||||
Level.SpawnLaffPowerupsInNests = True
|
||||
Level.LaffPowerupNestOffset = Point3(0.0, 2.0, 3.0)
|
||||
|
|
|
@ -33,7 +33,7 @@ class CogdoFlyingGuiManager:
|
|||
|
||||
def _initTimer(self):
|
||||
self._timer = ToontownTimer()
|
||||
self._timer.reparentTo(self.root)
|
||||
self._timer.hide()
|
||||
self._timer.posInTopRightCorner()
|
||||
|
||||
def _initMessageDisplay(self):
|
||||
|
|
|
@ -1106,4 +1106,4 @@ class CogdoFlyingLocalPlayer(CogdoFlyingPlayer):
|
|||
|
||||
def handleEnterInvulPowerup(self, gatherable):
|
||||
messenger.send(CogdoFlyingGuiManager.InvulnerableEventName)
|
||||
self._getRedTapeSfx.play()
|
||||
self._getRedTapeSfx.play()
|
||||
|
|
|
@ -32,14 +32,15 @@ class CogdoGameRulesPanel(StateData.StateData):
|
|||
self.playButton = DirectButton(parent=self.frame, relief=None, geom=(minigameGui.find('**/buttonUp'), minigameGui.find('**/buttonDown'), minigameGui.find('**/buttonHover')), pos=(0.74, 0, 0.1), scale=(4.2, 5, 5), command=self.playCallback)
|
||||
minigameGui.removeNode()
|
||||
self.timer = ToontownTimer.ToontownTimer()
|
||||
self.timer.reparentTo(self.frame)
|
||||
self.timer.reparentTo(base.a2dTopRight)
|
||||
self.timer.setScale(0.4)
|
||||
self.timer.setPos(0.997, 0, 1.5)
|
||||
self.timer.setPos(-0.155, 0, -0.155)
|
||||
self.frame.hide()
|
||||
return
|
||||
|
||||
def unload(self):
|
||||
self.frame.destroy()
|
||||
self.timer.destroy()
|
||||
del self.frame
|
||||
del self.gameTitleText
|
||||
del self.instructionsText
|
||||
|
|
|
@ -4,6 +4,7 @@ from direct.showbase.PythonUtil import Functor
|
|||
from direct.showbase.RandomNumGen import RandomNumGen
|
||||
from direct.task.Task import Task
|
||||
from toontown.minigame.MazeSuit import MazeSuit
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
from CogdoGameGatherable import CogdoMemo
|
||||
from CogdoMazePlayer import CogdoMazePlayer
|
||||
from CogdoMazeLocalPlayer import CogdoMazeLocalPlayer
|
||||
|
@ -169,6 +170,7 @@ class CogdoMazeGame(DirectObject):
|
|||
self._movie.end()
|
||||
self._movie.unload()
|
||||
del self._movie
|
||||
base.camLens.setMinFov(ToontownGlobals.CogdoFov/(4./3.))
|
||||
for player in self.players:
|
||||
self.placePlayer(player)
|
||||
if player.toon is localAvatar:
|
||||
|
|
|
@ -87,6 +87,8 @@ class CogdoMazeGameIntro(CogdoGameMovie):
|
|||
d = SuitDNA.SuitDNA()
|
||||
d.newSuit(suitData['dnaName'])
|
||||
bossSuit.setDNA(d)
|
||||
bossSuit.nametag.setNametag2d(None)
|
||||
bossSuit.nametag.setNametag3d(None)
|
||||
bossSuit.setScale(suitData['scale'])
|
||||
bossSuit.loop('neutral')
|
||||
bossSuit.reparentTo(render)
|
||||
|
|
|
@ -24,7 +24,8 @@ class CogdoMemoGui(DirectFrame):
|
|||
DirectFrame.destroy(self)
|
||||
|
||||
def posNextToLaffMeter(self):
|
||||
self.setPos(-0.975, 0, -0.875)
|
||||
self.reparentTo(base.a2dBottomLeft)
|
||||
self.setPos(0.358, 0, 0.125)
|
||||
|
||||
def _initModel(self, type='joke_card'):
|
||||
self._countLabel = DirectLabel(parent=self, relief=None, pos=(0.0625, 0, -0.025), scale=CogdoGameConsts.MemoGuiTextScale, text=str(0), text_fg=CogdoGameConsts.MemoGuiTextColor, text_shadow=(0.2, 0.2, 0.2, 1), text_align=TextNode.ALeft, text_font=ToontownGlobals.getToonFont())
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed.ClockDelta import *
|
||||
from toontown.battle import BattleBase
|
||||
from toontown.building.ElevatorConstants import *
|
||||
from toontown.cogdominium.DistCogdoGameAI import DistCogdoGameAI
|
||||
import CogdoFlyingGameGlobals as Globals
|
||||
|
||||
class DistCogdoFlyingGameAI(DistCogdoGameAI):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory("DistCogdoFlyingGameAI")
|
||||
delayIntro = BattleBase.ELEVATOR_T + ElevatorData[ELEVATOR_FIELD]['openTime']
|
||||
|
||||
def __init__(self, air):
|
||||
DistCogdoGameAI.__init__(self, air)
|
||||
|
|
|
@ -20,7 +20,7 @@ class DistCogdoGame(DistCogdoGameBase, DistributedObject):
|
|||
DistributedObject.__init__(self, cr)
|
||||
base.cogdoGame = self
|
||||
cr.cogdoGame = self
|
||||
self._waitingStartLabel = DirectLabel(text=TTL.MinigameWaitingForOtherPlayers, text_fg=VBase4(1, 1, 1, 1), relief=None, pos=(-0.6, 0, -0.75), scale=0.075)
|
||||
self._waitingStartLabel = DirectLabel(text=TTL.MinigameWaitingForOtherToons, text_fg=VBase4(1, 1, 1, 1), relief=None, pos=(-0.6, 0, -0.75), scale=0.075)
|
||||
self._waitingStartLabel.hide()
|
||||
self.loadFSM = ClassicFSM.ClassicFSM('DistCogdoGame.loaded', [State.State('NotLoaded', self.enterNotLoaded, self.exitNotLoaded, ['Loaded']), State.State('Loaded', self.enterLoaded, self.exitLoaded, ['NotLoaded'])], 'NotLoaded', 'NotLoaded')
|
||||
self.loadFSM.enterInitialState()
|
||||
|
@ -214,7 +214,7 @@ class DistCogdoGame(DistCogdoGameBase, DistributedObject):
|
|||
if interior:
|
||||
numToons = len(interior.getToonIds())
|
||||
if numToons > 1:
|
||||
msg = TTL.MinigameWaitingForOtherPlayers
|
||||
msg = TTL.MinigameWaitingForOtherToons
|
||||
else:
|
||||
msg = TTL.MinigamePleaseWait
|
||||
self._waitingStartLabel['text'] = msg
|
||||
|
|
|
@ -13,7 +13,7 @@ JOKE_TOON_UP = 5
|
|||
|
||||
class DistCogdoMazeGameAI(DistCogdoGameAI):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory("DistCogdoMazeGameAI")
|
||||
delayIntro = BattleBase.ELEVATOR_T + ElevatorData[ELEVATOR_NORMAL]['openTime'] + BattleBase.SERVER_BUFFER_TIME
|
||||
delayIntro = BattleBase.ELEVATOR_T + ElevatorData[ELEVATOR_FIELD]['openTime']
|
||||
|
||||
def __init__(self, air):
|
||||
DistCogdoGameAI.__init__(self, air)
|
||||
|
|
|
@ -222,7 +222,7 @@ class DistributedCogdoInteriorAI(DistributedObjectAI, FSM.FSM):
|
|||
|
||||
self.d_setState('Elevator')
|
||||
self.timer.stop()
|
||||
self.timer.startCallback(BattleBase.ELEVATOR_T + ElevatorData[ELEVATOR_NORMAL]['openTime'] + BattleBase.SERVER_BUFFER_TIME, self.serverElevatorDone)
|
||||
self.timer.startCallback(BattleBase.ELEVATOR_T + ElevatorData[ELEVATOR_FIELD]['openTime'], self.serverElevatorDone)
|
||||
|
||||
if self.curFloor == self.battleFloor:
|
||||
self.planner.myPrint()
|
||||
|
@ -420,7 +420,7 @@ class DistributedCogdoInteriorAI(DistributedObjectAI, FSM.FSM):
|
|||
|
||||
def enterReservesJoining(self):
|
||||
self.resetResponses()
|
||||
self.timer.startCallback(ElevatorData[ELEVATOR_NORMAL]['openTime'] + SUIT_HOLD_ELEVATOR_TIME + BattleBase.SERVER_BUFFER_TIME, self.serverReserveJoinDone)
|
||||
self.timer.startCallback(ElevatorData[ELEVATOR_FIELD]['openTime'] + SUIT_HOLD_ELEVATOR_TIME + BattleBase.SERVER_BUFFER_TIME, self.serverReserveJoinDone)
|
||||
|
||||
def exitReservesJoining(self):
|
||||
self.timer.stop()
|
||||
|
|
|
@ -33,7 +33,7 @@ class DistributedGolfCourse(DistributedObject.DistributedObject, FSM, DelayDelet
|
|||
def __init__(self, cr):
|
||||
DistributedObject.DistributedObject.__init__(self, base.cr)
|
||||
FSM.__init__(self, 'Golf_%s_FSM' % self.id)
|
||||
self.waitingStartLabel = DirectLabel(text=TTLocalizer.MinigameWaitingForOtherPlayers, text_fg=VBase4(1, 1, 1, 1), relief=None, pos=(-0.6, 0, -0.75), scale=0.075)
|
||||
self.waitingStartLabel = DirectLabel(text=TTLocalizer.MinigameWaitingForOtherToons, text_fg=VBase4(1, 1, 1, 1), relief=None, pos=(-0.6, 0, -0.75), scale=0.075)
|
||||
self.waitingStartLabel.hide()
|
||||
self.avIdList = []
|
||||
self.remoteAvIdList = []
|
||||
|
|
|
@ -58,4 +58,4 @@ class TTULauncher:
|
|||
self.disconnectMsg = disconnectMsg
|
||||
|
||||
def setDisconnectDetailsNormal(self):
|
||||
self.setDisconnectDetails(0, 'normal')
|
||||
self.setDisconnectDetails(0, 'normal')
|
||||
|
|
|
@ -26,7 +26,7 @@ class DistributedMinigame(DistributedObject.DistributedObject):
|
|||
|
||||
def __init__(self, cr):
|
||||
DistributedObject.DistributedObject.__init__(self, cr)
|
||||
self.waitingStartLabel = DirectLabel(text=TTLocalizer.MinigameWaitingForOtherPlayers, text_fg=VBase4(1, 1, 1, 1), relief=None, pos=(-0.6, 0, -0.75), scale=0.075)
|
||||
self.waitingStartLabel = DirectLabel(text=TTLocalizer.MinigameWaitingForOtherToons, text_fg=VBase4(1, 1, 1, 1), relief=None, pos=(-0.6, 0, -0.75), scale=0.075)
|
||||
self.waitingStartLabel.hide()
|
||||
self.avIdList = []
|
||||
self.remoteAvIdList = []
|
||||
|
@ -348,7 +348,7 @@ class DistributedMinigame(DistributedObject.DistributedObject):
|
|||
def enterFrameworkWaitServerStart(self):
|
||||
self.notify.debug('BASE: enterFrameworkWaitServerStart')
|
||||
if self.numPlayers > 1:
|
||||
msg = TTLocalizer.MinigameWaitingForOtherPlayers
|
||||
msg = TTLocalizer.MinigameWaitingForOtherToons
|
||||
else:
|
||||
msg = TTLocalizer.MinigamePleaseWait
|
||||
self.waitingStartLabel['text'] = msg
|
||||
|
|
|
@ -8,6 +8,7 @@ MapHotkey = 'alt'
|
|||
CogHQCameraFov = 60.0
|
||||
BossBattleCameraFov = 72.0
|
||||
MakeAToonCameraFov = 48.0
|
||||
CogdoFov = 56.9
|
||||
VPElevatorFov = 53.0
|
||||
CFOElevatorFov = 43.0
|
||||
CJElevatorFov = 59.0
|
||||
|
|
Loading…
Reference in a new issue