uberdog: python 3.x progress

This commit is contained in:
John Cote 2019-12-30 13:03:23 -05:00
parent d73c9c1a91
commit 7c27d594bb
19 changed files with 30 additions and 21 deletions

View file

@ -2,7 +2,8 @@ from otp.ai.AIBase import *
from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownGlobals
from direct.distributed.ClockDelta import * from direct.distributed.ClockDelta import *
from .ElevatorConstants import * from .ElevatorConstants import *
import copy, DistributedElevatorAI import copy
from . import DistributedElevatorAI
from direct.fsm import ClassicFSM from direct.fsm import ClassicFSM
from direct.fsm import State from direct.fsm import State
from direct.task import Task from direct.task import Task

View file

@ -9,7 +9,8 @@ from direct.fsm import State
from toontown.battle import DistributedBattleBldgAI from toontown.battle import DistributedBattleBldgAI
from toontown.battle import BattleBase from toontown.battle import BattleBase
from direct.task import Timer from direct.task import Timer
import DistributedElevatorIntAI, copy from . import DistributedElevatorIntAI
import copy
class DistributedSuitInteriorAI(DistributedObjectAI.DistributedObjectAI): class DistributedSuitInteriorAI(DistributedObjectAI.DistributedObjectAI):

View file

@ -3,7 +3,7 @@ import random
from toontown.suit import SuitDNA from toontown.suit import SuitDNA
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from toontown.suit import DistributedSuitAI from toontown.suit import DistributedSuitAI
import SuitBuildingGlobals, types from . import SuitBuildingGlobals
class SuitPlannerInteriorAI: class SuitPlannerInteriorAI:
notify = DirectNotifyGlobal.directNotify.newCategory('SuitPlannerInteriorAI') notify = DirectNotifyGlobal.directNotify.newCategory('SuitPlannerInteriorAI')

View file

@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State from direct.fsm import ClassicFSM, State
from direct.fsm import State from direct.fsm import State
from direct.task import Task from direct.task import Task
import random, CharStateDatasAI from . import CharStateDatasAI
from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer

View file

@ -4,7 +4,7 @@ from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State from direct.fsm import ClassicFSM, State
from direct.fsm import State from direct.fsm import State
from direct.task import Task from direct.task import Task
import random, CharStateDatasAI, CCharChatter from . import CharStateDatasAI, CCharChatter
from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer from toontown.toonbase import TTLocalizer

View file

@ -1,5 +1,4 @@
import random import random
from sets import Set
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from direct.distributed import DistributedObjectAI from direct.distributed import DistributedObjectAI
from direct.showbase import PythonUtil from direct.showbase import PythonUtil
@ -111,9 +110,9 @@ class CogdoBarrelRoomAI:
return not toon.isToonedUp() return not toon.isToonedUp()
def __allBarrelsCollected(self): def __allBarrelsCollected(self):
toonsNeedingLaff = Set([toon for toon in self.cogdoInteriorAI.toons if self.__toonIdNeedsLaff(toon)]) toonsNeedingLaff = set([toon for toon in self.cogdoInteriorAI.toons if self.__toonIdNeedsLaff(toon)])
for barrel in self.spawnedBarrels: for barrel in self.spawnedBarrels:
if not toonsNeedingLaff.issubset(Set(barrel.grabbedBy)): if not toonsNeedingLaff.issubset(set(barrel.grabbedBy)):
return False return False
return True return True

View file

@ -1,4 +1,3 @@
import new
from direct.directnotify.DirectNotifyGlobal import directNotify from direct.directnotify.DirectNotifyGlobal import directNotify
from direct.distributed.ClockDelta import globalClockDelta from direct.distributed.ClockDelta import globalClockDelta
from direct.distributed.DistributedObjectAI import DistributedObjectAI from direct.distributed.DistributedObjectAI import DistributedObjectAI

View file

@ -1,6 +1,6 @@
from otp.level import DistributedLevelAI from otp.level import DistributedLevelAI
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
import pickle, LevelSuitPlannerAI, FactoryBase from . import LevelSuitPlannerAI, FactoryBase
from direct.task import Task from direct.task import Task
from . import FactoryEntityCreatorAI, FactorySpecs from . import FactoryEntityCreatorAI, FactorySpecs
from otp.level import LevelSpec from otp.level import LevelSpec

View file

@ -1,6 +1,6 @@
from otp.level import DistributedLevelAI from otp.level import DistributedLevelAI
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
import pickle, LevelSuitPlannerAI, LawOfficeBase from . import LevelSuitPlannerAI, LawOfficeBase
from direct.task import Task from direct.task import Task
from . import FactoryEntityCreatorAI, FactorySpecs from . import FactoryEntityCreatorAI, FactorySpecs
from otp.level import LevelSpec from otp.level import LevelSpec

View file

@ -1,6 +1,6 @@
from otp.level import DistributedLevelAI from otp.level import DistributedLevelAI
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
import pickle, LevelSuitPlannerAI, LawOfficeBase from . import LevelSuitPlannerAI, LawOfficeBase
from direct.task import Task from direct.task import Task
from . import FactoryEntityCreatorAI, FactorySpecs from . import FactoryEntityCreatorAI, FactorySpecs
from otp.level import LevelSpec from otp.level import LevelSpec

View file

@ -2,7 +2,8 @@ from pandac.PandaModules import *
from direct.showbase import DirectObject from direct.showbase import DirectObject
from toontown.suit import SuitDNA from toontown.suit import SuitDNA
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
import LevelBattleManagerAI, types, random from . import LevelBattleManagerAI
import random
class LevelSuitPlannerAI(DirectObject.DirectObject): class LevelSuitPlannerAI(DirectObject.DirectObject):
notify = DirectNotifyGlobal.directNotify.newCategory('LevelSuitPlannerAI') notify = DirectNotifyGlobal.directNotify.newCategory('LevelSuitPlannerAI')

View file

@ -4,7 +4,8 @@ from toontown.toonbase import ToontownGlobals
from otp.otpbase.PythonUtil import nonRepeatingRandomList from otp.otpbase.PythonUtil import nonRepeatingRandomList
from . import DistributedGagAI, DistributedProjectileAI from . import DistributedGagAI, DistributedProjectileAI
from direct.task import Task from direct.task import Task
import random, time, Racer, RaceGlobals import random
from . import Racer, RaceGlobals
from direct.distributed.ClockDelta import * from direct.distributed.ClockDelta import *
class DistributedRaceAI(DistributedObjectAI.DistributedObjectAI): class DistributedRaceAI(DistributedObjectAI.DistributedObjectAI):

View file

@ -5,7 +5,8 @@ from direct.distributed import DistributedObjectAI
from direct.fsm import ClassicFSM, State from direct.fsm import ClassicFSM, State
from direct.fsm import State from direct.fsm import State
from direct.task import Task from direct.task import Task
import ButterflyGlobals, random from . import ButterflyGlobals
import random
class DistributedButterflyAI(DistributedObjectAI.DistributedObjectAI): class DistributedButterflyAI(DistributedObjectAI.DistributedObjectAI):

View file

@ -9,7 +9,8 @@ from toontown.building import SuitPlannerInteriorAI
from toontown.battle import BattleBase from toontown.battle import BattleBase
from toontown.coghq import CogDisguiseGlobals from toontown.coghq import CogDisguiseGlobals
from pandac.PandaModules import * from pandac.PandaModules import *
import SuitDNA, random from . import SuitDNA
import random
AllBossCogs = [] AllBossCogs = []
class DistributedBossCogAI(DistributedAvatarAI.DistributedAvatarAI): class DistributedBossCogAI(DistributedAvatarAI.DistributedAvatarAI):

View file

@ -8,7 +8,8 @@ from toontown.coghq import DistributedCashbotBossTreasureAI
from toontown.battle import BattleExperienceAI from toontown.battle import BattleExperienceAI
from toontown.chat import ResistanceChat from toontown.chat import ResistanceChat
from direct.fsm import FSM from direct.fsm import FSM
import DistributedBossCogAI, SuitDNA, random, math from . import DistributedBossCogAI
import random, math
class DistributedCashbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM): class DistributedCashbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCashbotBossAI') notify = DirectNotifyGlobal.directNotify.newCategory('DistributedCashbotBossAI')

View file

@ -8,7 +8,8 @@ from toontown.toonbase import ToontownGlobals
from otp.otpbase import OTPGlobals from otp.otpbase import OTPGlobals
from toontown.coghq import DistributedCashbotBossObjectAI from toontown.coghq import DistributedCashbotBossObjectAI
from direct.showbase import PythonUtil from direct.showbase import PythonUtil
import DistributedGoonAI, math, random from . import DistributedGoonAI
import math, random
class DistributedCashbotBossGoonAI(DistributedGoonAI.DistributedGoonAI, DistributedCashbotBossObjectAI.DistributedCashbotBossObjectAI): class DistributedCashbotBossGoonAI(DistributedGoonAI.DistributedGoonAI, DistributedCashbotBossObjectAI.DistributedCashbotBossObjectAI):
legLength = 10 legLength = 10

View file

@ -12,7 +12,8 @@ from toontown.toonbase import TTLocalizer
from toontown.battle import BattleBase from toontown.battle import BattleBase
from toontown.toon import NPCToons from toontown.toon import NPCToons
from toontown.building import SuitBuildingGlobals from toontown.building import SuitBuildingGlobals
import SuitDNA, random from . import SuitDNA
import random
from toontown.coghq import DistributedLawbotBossGavelAI from toontown.coghq import DistributedLawbotBossGavelAI
from toontown.suit import DistributedLawbotBossSuitAI from toontown.suit import DistributedLawbotBossSuitAI
from toontown.coghq import DistributedLawbotCannonAI from toontown.coghq import DistributedLawbotCannonAI

View file

@ -3,7 +3,8 @@ from direct.distributed.ClockDelta import *
from direct.directnotify import DirectNotifyGlobal from direct.directnotify import DirectNotifyGlobal
from toontown.battle import SuitBattleGlobals from toontown.battle import SuitBattleGlobals
from toontown.toonbase import ToontownGlobals from toontown.toonbase import ToontownGlobals
import DistributedSuitBaseAI, random from . import DistributedSuitBaseAI
import random
from direct.fsm import ClassicFSM, State from direct.fsm import ClassicFSM, State
from direct.fsm import State from direct.fsm import State

View file

@ -12,7 +12,8 @@ from toontown.toonbase import TTLocalizer
from toontown.battle import BattleBase from toontown.battle import BattleBase
from toontown.toon import NPCToons from toontown.toon import NPCToons
from toontown.suit import SellbotBossGlobals from toontown.suit import SellbotBossGlobals
import SuitDNA, random from . import SuitDNA
import random
class DistributedSellbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM): class DistributedSellbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FSM):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSellbotBossAI') notify = DirectNotifyGlobal.directNotify.newCategory('DistributedSellbotBossAI')