general: rest of tonight's progress
changes include: - update .gitignore to ignore cog building backups - set text minfilter to more closely resemble TTO - fix more issues with cog battles - additionally, setup server code that cog battles require (mostly stubs) - begin work on cog buildings - can interact with gag shop clerks now - can also interact with other NPCs, they will always reject you for now
This commit is contained in:
parent
827445d8fa
commit
5d4bb8c5a0
11 changed files with 72 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -10,3 +10,4 @@ whitelist/
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
*.jpg
|
*.jpg
|
||||||
.idea
|
.idea
|
||||||
|
*.buildings
|
||||||
|
|
|
@ -96,6 +96,7 @@ audio-master-sfx-volume 1
|
||||||
audio-master-music-volume 1
|
audio-master-music-volume 1
|
||||||
server-type prod
|
server-type prod
|
||||||
want-dev 0
|
want-dev 0
|
||||||
|
text-minfilter linear_mipmap_linear
|
||||||
|
|
||||||
# TEMP
|
# TEMP
|
||||||
fake-playtoken dev
|
fake-playtoken dev
|
||||||
|
|
|
@ -3,6 +3,7 @@ import string
|
||||||
from pandac.PandaModules import *
|
from pandac.PandaModules import *
|
||||||
from direct.distributed import DistributedNode
|
from direct.distributed import DistributedNode
|
||||||
from direct.actor.DistributedActor import DistributedActor
|
from direct.actor.DistributedActor import DistributedActor
|
||||||
|
from direct.interval.IntervalGlobal import *
|
||||||
from direct.task import Task
|
from direct.task import Task
|
||||||
from direct.showbase import PythonUtil
|
from direct.showbase import PythonUtil
|
||||||
from libotp import Nametag
|
from libotp import Nametag
|
||||||
|
|
|
@ -8,6 +8,7 @@ from toontown.ai.HolidayManagerAI import HolidayManagerAI
|
||||||
from toontown.ai.NewsManagerAI import NewsManagerAI
|
from toontown.ai.NewsManagerAI import NewsManagerAI
|
||||||
from toontown.building.DistributedTrophyMgrAI import DistributedTrophyMgrAI
|
from toontown.building.DistributedTrophyMgrAI import DistributedTrophyMgrAI
|
||||||
from toontown.catalog.CatalogManagerAI import CatalogManagerAI
|
from toontown.catalog.CatalogManagerAI import CatalogManagerAI
|
||||||
|
from toontown.coghq.PromotionManagerAI import PromotionManagerAI
|
||||||
from toontown.distributed.ToontownDistrictAI import ToontownDistrictAI
|
from toontown.distributed.ToontownDistrictAI import ToontownDistrictAI
|
||||||
from toontown.distributed.ToontownDistrictStatsAI import ToontownDistrictStatsAI
|
from toontown.distributed.ToontownDistrictStatsAI import ToontownDistrictStatsAI
|
||||||
from toontown.distributed.ToontownInternalRepository import ToontownInternalRepository
|
from toontown.distributed.ToontownInternalRepository import ToontownInternalRepository
|
||||||
|
@ -19,6 +20,8 @@ from toontown.hood.DLHoodDataAI import DLHoodDataAI
|
||||||
from toontown.hood.MMHoodDataAI import MMHoodDataAI
|
from toontown.hood.MMHoodDataAI import MMHoodDataAI
|
||||||
from toontown.hood.TTHoodDataAI import TTHoodDataAI
|
from toontown.hood.TTHoodDataAI import TTHoodDataAI
|
||||||
from toontown.pets.PetManagerAI import PetManagerAI
|
from toontown.pets.PetManagerAI import PetManagerAI
|
||||||
|
from toontown.quest.QuestManagerAI import QuestManagerAI
|
||||||
|
from toontown.shtiker.CogPageManagerAI import CogPageManagerAI
|
||||||
from toontown.suit.SuitInvasionManagerAI import SuitInvasionManagerAI
|
from toontown.suit.SuitInvasionManagerAI import SuitInvasionManagerAI
|
||||||
from toontown.toon import NPCToons
|
from toontown.toon import NPCToons
|
||||||
from toontown.toonbase import ToontownGlobals
|
from toontown.toonbase import ToontownGlobals
|
||||||
|
@ -40,6 +43,9 @@ class ToontownAIRepository(ToontownInternalRepository):
|
||||||
self.zoneDataStore = None
|
self.zoneDataStore = None
|
||||||
self.petMgr = None
|
self.petMgr = None
|
||||||
self.suitInvasionManager = None
|
self.suitInvasionManager = None
|
||||||
|
self.questManager = None
|
||||||
|
self.promotionMgr = None
|
||||||
|
self.cogPageManager = None
|
||||||
self.timeManager = None
|
self.timeManager = None
|
||||||
self.newsManager = None
|
self.newsManager = None
|
||||||
self.inGameNewsMgr = None
|
self.inGameNewsMgr = None
|
||||||
|
@ -94,6 +100,15 @@ class ToontownAIRepository(ToontownInternalRepository):
|
||||||
# Create our suit invasion manager...
|
# Create our suit invasion manager...
|
||||||
self.suitInvasionManager = SuitInvasionManagerAI(self)
|
self.suitInvasionManager = SuitInvasionManagerAI(self)
|
||||||
|
|
||||||
|
# Create our quest manager...
|
||||||
|
self.questManager = QuestManagerAI(self)
|
||||||
|
|
||||||
|
# Create our promotion manager...
|
||||||
|
self.promotionMgr = PromotionManagerAI(self)
|
||||||
|
|
||||||
|
# Create our Cog page manager...
|
||||||
|
self.cogPageManager = CogPageManagerAI(self)
|
||||||
|
|
||||||
def createGlobals(self):
|
def createGlobals(self):
|
||||||
"""
|
"""
|
||||||
Creates "global" (distributed) objects.
|
Creates "global" (distributed) objects.
|
||||||
|
@ -185,6 +200,10 @@ class ToontownAIRepository(ToontownInternalRepository):
|
||||||
)
|
)
|
||||||
self.generateHood(DLHoodDataAI, ToontownGlobals.DonaldsDreamland)
|
self.generateHood(DLHoodDataAI, ToontownGlobals.DonaldsDreamland)
|
||||||
|
|
||||||
|
# Assign the initial suit buildings.
|
||||||
|
for suitPlanner in self.suitPlanners.values():
|
||||||
|
suitPlanner.assignInitialSuitBuildings()
|
||||||
|
|
||||||
def genDNAFileName(self, zoneId):
|
def genDNAFileName(self, zoneId):
|
||||||
canonicalZoneId = ZoneUtil.getCanonicalZoneId(zoneId)
|
canonicalZoneId = ZoneUtil.getCanonicalZoneId(zoneId)
|
||||||
canonicalHoodId = ZoneUtil.getCanonicalHoodId(canonicalZoneId)
|
canonicalHoodId = ZoneUtil.getCanonicalHoodId(canonicalZoneId)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
from libotp import *
|
||||||
from direct.interval.IntervalGlobal import *
|
from direct.interval.IntervalGlobal import *
|
||||||
from direct.showbase.DirectObject import DirectObject
|
from direct.showbase.DirectObject import DirectObject
|
||||||
from RewardPanel import *
|
from RewardPanel import *
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
from pandac.PandaModules import *
|
from pandac.PandaModules import *
|
||||||
|
from libotp import *
|
||||||
from direct.distributed.ClockDelta import *
|
from direct.distributed.ClockDelta import *
|
||||||
from direct.interval.IntervalGlobal import *
|
from direct.interval.IntervalGlobal import *
|
||||||
from ElevatorConstants import *
|
from ElevatorConstants import *
|
||||||
|
|
|
@ -4,6 +4,7 @@ from direct.fsm import ClassicFSM, State
|
||||||
from direct.fsm import State
|
from direct.fsm import State
|
||||||
from toontown.toonbase import ToontownGlobals
|
from toontown.toonbase import ToontownGlobals
|
||||||
from pandac.PandaModules import *
|
from pandac.PandaModules import *
|
||||||
|
from libotp import *
|
||||||
from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs
|
from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs
|
||||||
|
|
||||||
class CogHQExterior(BattlePlace.BattlePlace):
|
class CogHQExterior(BattlePlace.BattlePlace):
|
||||||
|
|
20
toontown/quest/QuestManagerAI.py
Normal file
20
toontown/quest/QuestManagerAI.py
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
from direct.directnotify import DirectNotifyGlobal
|
||||||
|
|
||||||
|
|
||||||
|
class QuestManagerAI:
|
||||||
|
notify = DirectNotifyGlobal.directNotify.newCategory('QuestManagerAI')
|
||||||
|
|
||||||
|
def __init__(self, air):
|
||||||
|
self.air = air
|
||||||
|
|
||||||
|
def recoverItems(self, toon, suitsKilled, zoneId):
|
||||||
|
return [], [] # TODO
|
||||||
|
|
||||||
|
def toonKilledCogs(self, toon, suitsKilled, zoneId, activeToonList):
|
||||||
|
pass # TODO
|
||||||
|
|
||||||
|
def requestInteract(self, avId, npc):
|
||||||
|
npc.rejectAvatar(avId) # TODO
|
||||||
|
|
||||||
|
def hasTailorClothingTicket(self, toon, npc):
|
||||||
|
return 0 # TODO
|
14
toontown/shtiker/CogPageManagerAI.py
Normal file
14
toontown/shtiker/CogPageManagerAI.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
from direct.directnotify import DirectNotifyGlobal
|
||||||
|
|
||||||
|
|
||||||
|
class CogPageManagerAI:
|
||||||
|
notify = DirectNotifyGlobal.directNotify.newCategory('CogPageManagerAI')
|
||||||
|
|
||||||
|
def __init__(self, air):
|
||||||
|
self.air = air
|
||||||
|
|
||||||
|
def toonKilledCogs(self, toon, suitsKilled, zoneId):
|
||||||
|
pass # TODO
|
||||||
|
|
||||||
|
def toonEncounteredCogs(self, toon, suitsEncountered, zoneId):
|
||||||
|
pass # TODO
|
|
@ -1,4 +1,5 @@
|
||||||
from pandac.PandaModules import *
|
from pandac.PandaModules import *
|
||||||
|
from libotp import *
|
||||||
from direct.interval.IntervalGlobal import *
|
from direct.interval.IntervalGlobal import *
|
||||||
from direct.distributed.ClockDelta import *
|
from direct.distributed.ClockDelta import *
|
||||||
from direct.directtools.DirectGeometry import CLAMP
|
from direct.directtools.DirectGeometry import CLAMP
|
||||||
|
|
|
@ -16,12 +16,15 @@ class DistributedNPCClerk(DistributedNPCToonBase):
|
||||||
self.isLocalToon = 0
|
self.isLocalToon = 0
|
||||||
self.av = None
|
self.av = None
|
||||||
self.purchaseDoneEvent = 'purchaseDone'
|
self.purchaseDoneEvent = 'purchaseDone'
|
||||||
|
self.lerpCameraSeq = None
|
||||||
return
|
return
|
||||||
|
|
||||||
def disable(self):
|
def disable(self):
|
||||||
self.ignoreAll()
|
self.ignoreAll()
|
||||||
taskMgr.remove(self.uniqueName('popupPurchaseGUI'))
|
taskMgr.remove(self.uniqueName('popupPurchaseGUI'))
|
||||||
taskMgr.remove(self.uniqueName('lerpCamera'))
|
if self.lerpCameraSeq:
|
||||||
|
self.lerpCameraSeq.finish()
|
||||||
|
self.lerpCameraSeq = None
|
||||||
if self.purchase:
|
if self.purchase:
|
||||||
self.purchase.exit()
|
self.purchase.exit()
|
||||||
self.purchase.unload()
|
self.purchase.unload()
|
||||||
|
@ -61,7 +64,9 @@ class DistributedNPCClerk(DistributedNPCToonBase):
|
||||||
def resetClerk(self):
|
def resetClerk(self):
|
||||||
self.ignoreAll()
|
self.ignoreAll()
|
||||||
taskMgr.remove(self.uniqueName('popupPurchaseGUI'))
|
taskMgr.remove(self.uniqueName('popupPurchaseGUI'))
|
||||||
taskMgr.remove(self.uniqueName('lerpCamera'))
|
if self.lerpCameraSeq:
|
||||||
|
self.lerpCameraSeq.finish()
|
||||||
|
self.lerpCameraSeq = None
|
||||||
if self.purchase:
|
if self.purchase:
|
||||||
self.purchase.exit()
|
self.purchase.exit()
|
||||||
self.purchase.unload()
|
self.purchase.unload()
|
||||||
|
@ -81,7 +86,9 @@ class DistributedNPCClerk(DistributedNPCToonBase):
|
||||||
return
|
return
|
||||||
if mode == NPCToons.PURCHASE_MOVIE_TIMEOUT:
|
if mode == NPCToons.PURCHASE_MOVIE_TIMEOUT:
|
||||||
taskMgr.remove(self.uniqueName('popupPurchaseGUI'))
|
taskMgr.remove(self.uniqueName('popupPurchaseGUI'))
|
||||||
taskMgr.remove(self.uniqueName('lerpCamera'))
|
if self.lerpCameraSeq:
|
||||||
|
self.lerpCameraSeq.finish()
|
||||||
|
self.lerpCameraSeq = None
|
||||||
if self.isLocalToon:
|
if self.isLocalToon:
|
||||||
self.ignore(self.purchaseDoneEvent)
|
self.ignore(self.purchaseDoneEvent)
|
||||||
if self.purchase:
|
if self.purchase:
|
||||||
|
@ -98,7 +105,8 @@ class DistributedNPCClerk(DistributedNPCToonBase):
|
||||||
self.setupAvatars(self.av)
|
self.setupAvatars(self.av)
|
||||||
if self.isLocalToon:
|
if self.isLocalToon:
|
||||||
camera.wrtReparentTo(render)
|
camera.wrtReparentTo(render)
|
||||||
camera.lerpPosHpr(-5, 9, self.getHeight() - 0.5, -150, -2, 0, 1, other=self, blendType='easeOut', task=self.uniqueName('lerpCamera'))
|
self.lerpCameraSeq = LerpPosQuatInterval(camera, 1, Point3(-5, 9, self.getHeight() - 0.5), Point3(-150, -2, 0), other=self, blendType='easeOut', name=self.uniqueName('lerpCamera'))
|
||||||
|
self.lerpCameraSeq.start()
|
||||||
self.setChatAbsolute(TTLocalizer.STOREOWNER_GREETING, CFSpeech | CFTimeout)
|
self.setChatAbsolute(TTLocalizer.STOREOWNER_GREETING, CFSpeech | CFTimeout)
|
||||||
if self.isLocalToon:
|
if self.isLocalToon:
|
||||||
taskMgr.doMethodLater(1.0, self.popupPurchaseGUI, self.uniqueName('popupPurchaseGUI'))
|
taskMgr.doMethodLater(1.0, self.popupPurchaseGUI, self.uniqueName('popupPurchaseGUI'))
|
||||||
|
|
Loading…
Reference in a new issue