fix some enum conversions
This commit is contained in:
parent
5cdd7f84af
commit
64945da580
12 changed files with 15 additions and 15 deletions
|
@ -3,7 +3,7 @@ from direct.interval.IntervalGlobal import *
|
||||||
from toontown.battle.BattleProps import globalPropPool
|
from toontown.battle.BattleProps import globalPropPool
|
||||||
from direct.directnotify import DirectNotifyGlobal
|
from direct.directnotify import DirectNotifyGlobal
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
SFX = IntEnum('SFX', ('poof, magic'))
|
SFX = IntEnum('SFX', ('poof', 'magic'))
|
||||||
SFXPATHS = {SFX.poof: 'phase_4/audio/sfx/firework_distance_02.ogg',
|
SFXPATHS = {SFX.poof: 'phase_4/audio/sfx/firework_distance_02.ogg',
|
||||||
SFX.magic: 'phase_4/audio/sfx/SZ_DD_treasure.ogg'}
|
SFX.magic: 'phase_4/audio/sfx/SZ_DD_treasure.ogg'}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ Component2IconDict = {'boredom': 'Bored',
|
||||||
class Pet(Avatar.Avatar):
|
class Pet(Avatar.Avatar):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('Pet')
|
notify = DirectNotifyGlobal.directNotify.newCategory('Pet')
|
||||||
SerialNum = 0
|
SerialNum = 0
|
||||||
Interactions = IntEnum('Interactions', ('SCRATCH, BEG, EAT, NEUTRAL'))
|
Interactions = IntEnum('Interactions', ('SCRATCH', 'BEG', 'EAT', 'NEUTRAL'))
|
||||||
InteractAnims = {Interactions.SCRATCH: ('toPet', 'pet', 'fromPet'),
|
InteractAnims = {Interactions.SCRATCH: ('toPet', 'pet', 'fromPet'),
|
||||||
Interactions.BEG: ('toBeg', 'beg', 'fromBeg'),
|
Interactions.BEG: ('toBeg', 'beg', 'fromBeg'),
|
||||||
Interactions.EAT: ('eat', 'swallow', 'neutral'),
|
Interactions.EAT: ('eat', 'swallow', 'neutral'),
|
||||||
|
|
|
@ -24,7 +24,7 @@ HungerChaseToonScale = 1.2
|
||||||
FleeFromOwnerScale = 0.5
|
FleeFromOwnerScale = 0.5
|
||||||
GettingAttentionGoalScale = 1.2
|
GettingAttentionGoalScale = 1.2
|
||||||
GettingAttentionGoalScaleDur = 7.0
|
GettingAttentionGoalScaleDur = 7.0
|
||||||
AnimMoods = IntEnum('AnimMoods', ('EXCITED, SAD, NEUTRAL'))
|
AnimMoods = IntEnum('AnimMoods', ('EXCITED', 'SAD', 'NEUTRAL'))
|
||||||
FwdSpeed = 12.0
|
FwdSpeed = 12.0
|
||||||
RotSpeed = 360.0
|
RotSpeed = 360.0
|
||||||
_HappyMult = 1.0
|
_HappyMult = 1.0
|
||||||
|
|
|
@ -24,8 +24,8 @@ def gaussian(min, max, rng):
|
||||||
|
|
||||||
|
|
||||||
class TraitDistribution:
|
class TraitDistribution:
|
||||||
TraitQuality = IntEnum('TraitQuality', ('VERY_BAD, BAD, AVERAGE, GOOD, VERY_GOOD'))
|
TraitQuality = IntEnum('TraitQuality', ('VERY_BAD', 'BAD', 'AVERAGE', 'GOOD', 'VERY_GOOD'))
|
||||||
TraitTypes = IntEnum('TraitTypes', ('INCREASING, DECREASING'))
|
TraitTypes = IntEnum('TraitTypes', ('INCREASING', 'DECREASING'))
|
||||||
Sz2MinMax = None
|
Sz2MinMax = None
|
||||||
TraitType = None
|
TraitType = None
|
||||||
TraitCutoffs = {TraitTypes.INCREASING: {TraitQuality.VERY_BAD: 0.1,
|
TraitCutoffs = {TraitTypes.INCREASING: {TraitQuality.VERY_BAD: 0.1,
|
||||||
|
|
|
@ -2,7 +2,7 @@ from direct.showbase.PythonUtil import invertDictLossless
|
||||||
from direct.interval.IntervalGlobal import *
|
from direct.interval.IntervalGlobal import *
|
||||||
import random
|
import random
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
Tricks = IntEnum('Tricks', ('JUMP, BEG, PLAYDEAD, ROLLOVER, BACKFLIP, DANCE, SPEAK, BALK,'))
|
Tricks = IntEnum('Tricks', ('JUMP', 'BEG', 'PLAYDEAD', 'ROLLOVER', 'BACKFLIP', 'DANCE', 'SPEAK', 'BALK'))
|
||||||
NonHappyMinActualTrickAptitude = 0.1
|
NonHappyMinActualTrickAptitude = 0.1
|
||||||
NonHappyMaxActualTrickAptitude = 0.6
|
NonHappyMaxActualTrickAptitude = 0.6
|
||||||
MinActualTrickAptitude = 0.5
|
MinActualTrickAptitude = 0.5
|
||||||
|
|
|
@ -6,10 +6,10 @@ from enum import IntEnum
|
||||||
if (__debug__):
|
if (__debug__):
|
||||||
import pdb
|
import pdb
|
||||||
import copy
|
import copy
|
||||||
KartDNA = IntEnum('KartDNA', ('bodyType, bodyColor, accColor, ebType, spType, fwwType, bwwType, rimsType, decalType'))
|
KartDNA = IntEnum('KartDNA', ('bodyType', 'bodyColor', 'accColor', 'ebType', 'spType', 'fwwType', 'bwwType', 'rimsType', 'decalType'))
|
||||||
InvalidEntry = -1
|
InvalidEntry = -1
|
||||||
KartInfo = IntEnum('KartInfo', ('name, model, cost, viewDist, decalId, LODmodel1, LODmodel2'))
|
KartInfo = IntEnum('KartInfo', ('name', 'model', 'cost', 'viewDist', 'decalId', 'LODmodel1', 'LODmodel2'))
|
||||||
AccInfo = IntEnum('KartInfo', ('name, model, cost, texCard, attach'))
|
AccInfo = IntEnum('AccInfo', ('name', 'model', 'cost', 'texCard', 'attach'))
|
||||||
kNames = TTLocalizer.KartDNA_KartNames
|
kNames = TTLocalizer.KartDNA_KartNames
|
||||||
KartDict = {0: (kNames[0],
|
KartDict = {0: (kNames[0],
|
||||||
'phase_6/models/karting/Kart1_Final',
|
'phase_6/models/karting/Kart1_Final',
|
||||||
|
|
|
@ -15,7 +15,7 @@ class KartGlobals:
|
||||||
COUNTDOWN_TIME = 30
|
COUNTDOWN_TIME = 30
|
||||||
BOARDING_TIME = 10.0
|
BOARDING_TIME = 10.0
|
||||||
ENTER_RACE_TIME = 6.0
|
ENTER_RACE_TIME = 6.0
|
||||||
ERROR_CODE = IntEnum('ERROR_CODE', ('success, eGeneric, eTickets, eBoardOver, eNoKart, eOccupied, eTrackClosed, eTooLate, eUnpaid'))
|
ERROR_CODE = IntEnum('ERROR_CODE', ('success', 'eGeneric', 'eTickets', 'eBoardOver', 'eNoKart', 'eOccupied', 'eTrackClosed', 'eTooLate', 'eUnpaid'))
|
||||||
FRONT_LEFT_SPOT = 0
|
FRONT_LEFT_SPOT = 0
|
||||||
FRONT_RIGHT_SPOT = 1
|
FRONT_RIGHT_SPOT = 1
|
||||||
REAR_LEFT_SPOT = 2
|
REAR_LEFT_SPOT = 2
|
||||||
|
|
|
@ -19,7 +19,7 @@ from toontown.battle.BattleSounds import *
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
|
|
||||||
class DistributedPicnicBasket(DistributedObject.DistributedObject):
|
class DistributedPicnicBasket(DistributedObject.DistributedObject):
|
||||||
seatState = IntEnum('seatState', ('Empty, Full, Eating'))
|
seatState = IntEnum('seatState', ('Empty', 'Full', 'Eating'))
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPicnicBasket')
|
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedPicnicBasket')
|
||||||
|
|
||||||
def __init__(self, cr):
|
def __init__(self, cr):
|
||||||
|
|
|
@ -10,7 +10,7 @@ from toontown.golf import GolfGlobals
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
if (__debug__):
|
if (__debug__):
|
||||||
import pdb
|
import pdb
|
||||||
PageMode = IntEnum('PageMode', ('Records, Trophy'))
|
PageMode = IntEnum('PageMode', ('Records', 'Trophy'))
|
||||||
|
|
||||||
class GolfPage(ShtikerPage):
|
class GolfPage(ShtikerPage):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('GolfPage')
|
notify = DirectNotifyGlobal.directNotify.newCategory('GolfPage')
|
||||||
|
|
|
@ -12,7 +12,7 @@ from .FishPage import FishingTrophy
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
if (__debug__):
|
if (__debug__):
|
||||||
import pdb
|
import pdb
|
||||||
PageMode = IntEnum('PageMode', ('Customize, Records, Trophy'))
|
PageMode = IntEnum('PageMode', ('Customize', 'Records', 'Trophy'))
|
||||||
|
|
||||||
class KartPage(ShtikerPage):
|
class KartPage(ShtikerPage):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('KartPage')
|
notify = DirectNotifyGlobal.directNotify.newCategory('KartPage')
|
||||||
|
|
|
@ -50,7 +50,7 @@ speedChatStyles = ((2000,
|
||||||
(170 / 255.0, 120 / 255.0, 20 / 255.0),
|
(170 / 255.0, 120 / 255.0, 20 / 255.0),
|
||||||
(165 / 255.0, 120 / 255.0, 50 / 255.0),
|
(165 / 255.0, 120 / 255.0, 50 / 255.0),
|
||||||
(210 / 255.0, 200 / 255.0, 180 / 255.0)))
|
(210 / 255.0, 200 / 255.0, 180 / 255.0)))
|
||||||
PageMode = IntEnum('PageMode', ('Options, Codes'))
|
PageMode = IntEnum('PageMode', ('Options', 'Codes'))
|
||||||
|
|
||||||
class OptionsPage(ShtikerPage.ShtikerPage):
|
class OptionsPage(ShtikerPage.ShtikerPage):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('OptionsPage')
|
notify = DirectNotifyGlobal.directNotify.newCategory('OptionsPage')
|
||||||
|
|
|
@ -13,7 +13,7 @@ JellybeanJamMenu = [(OTPLocalizer.JellybeanJamMenuSections[0], [30180,
|
||||||
30188,
|
30188,
|
||||||
30189,
|
30189,
|
||||||
30190])]
|
30190])]
|
||||||
JellybeanJamPhases = IntEnum('JellybeanJamPhases', ('TROLLEY, FISHING, PARTIES'))
|
JellybeanJamPhases = IntEnum('JellybeanJamPhases', ('TROLLEY', 'FISHING', 'PARTIES'))
|
||||||
PhaseSpecifPhrases = [30180, 30181, 30182]
|
PhaseSpecifPhrases = [30180, 30181, 30182]
|
||||||
|
|
||||||
class TTSCJellybeanJamMenu(SCMenu):
|
class TTSCJellybeanJamMenu(SCMenu):
|
||||||
|
|
Loading…
Reference in a new issue