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:
John Cote 2019-11-27 21:10:20 -05:00
parent 827445d8fa
commit 5d4bb8c5a0
No known key found for this signature in database
GPG key ID: 56236C6A25456549
11 changed files with 72 additions and 4 deletions

1
.gitignore vendored
View file

@ -10,3 +10,4 @@ whitelist/
*.DS_Store
*.jpg
.idea
*.buildings

View file

@ -96,6 +96,7 @@ audio-master-sfx-volume 1
audio-master-music-volume 1
server-type prod
want-dev 0
text-minfilter linear_mipmap_linear
# TEMP
fake-playtoken dev

View file

@ -3,6 +3,7 @@ import string
from pandac.PandaModules import *
from direct.distributed import DistributedNode
from direct.actor.DistributedActor import DistributedActor
from direct.interval.IntervalGlobal import *
from direct.task import Task
from direct.showbase import PythonUtil
from libotp import Nametag

View file

@ -8,6 +8,7 @@ from toontown.ai.HolidayManagerAI import HolidayManagerAI
from toontown.ai.NewsManagerAI import NewsManagerAI
from toontown.building.DistributedTrophyMgrAI import DistributedTrophyMgrAI
from toontown.catalog.CatalogManagerAI import CatalogManagerAI
from toontown.coghq.PromotionManagerAI import PromotionManagerAI
from toontown.distributed.ToontownDistrictAI import ToontownDistrictAI
from toontown.distributed.ToontownDistrictStatsAI import ToontownDistrictStatsAI
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.TTHoodDataAI import TTHoodDataAI
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.toon import NPCToons
from toontown.toonbase import ToontownGlobals
@ -40,6 +43,9 @@ class ToontownAIRepository(ToontownInternalRepository):
self.zoneDataStore = None
self.petMgr = None
self.suitInvasionManager = None
self.questManager = None
self.promotionMgr = None
self.cogPageManager = None
self.timeManager = None
self.newsManager = None
self.inGameNewsMgr = None
@ -94,6 +100,15 @@ class ToontownAIRepository(ToontownInternalRepository):
# Create our suit invasion manager...
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):
"""
Creates "global" (distributed) objects.
@ -185,6 +200,10 @@ class ToontownAIRepository(ToontownInternalRepository):
)
self.generateHood(DLHoodDataAI, ToontownGlobals.DonaldsDreamland)
# Assign the initial suit buildings.
for suitPlanner in self.suitPlanners.values():
suitPlanner.assignInitialSuitBuildings()
def genDNAFileName(self, zoneId):
canonicalZoneId = ZoneUtil.getCanonicalZoneId(zoneId)
canonicalHoodId = ZoneUtil.getCanonicalHoodId(canonicalZoneId)

View file

@ -1,3 +1,4 @@
from libotp import *
from direct.interval.IntervalGlobal import *
from direct.showbase.DirectObject import DirectObject
from RewardPanel import *

View file

@ -1,4 +1,5 @@
from pandac.PandaModules import *
from libotp import *
from direct.distributed.ClockDelta import *
from direct.interval.IntervalGlobal import *
from ElevatorConstants import *

View file

@ -4,6 +4,7 @@ from direct.fsm import ClassicFSM, State
from direct.fsm import State
from toontown.toonbase import ToontownGlobals
from pandac.PandaModules import *
from libotp import *
from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAvs
class CogHQExterior(BattlePlace.BattlePlace):

View 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

View 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

View file

@ -1,4 +1,5 @@
from pandac.PandaModules import *
from libotp import *
from direct.interval.IntervalGlobal import *
from direct.distributed.ClockDelta import *
from direct.directtools.DirectGeometry import CLAMP

View file

@ -16,12 +16,15 @@ class DistributedNPCClerk(DistributedNPCToonBase):
self.isLocalToon = 0
self.av = None
self.purchaseDoneEvent = 'purchaseDone'
self.lerpCameraSeq = None
return
def disable(self):
self.ignoreAll()
taskMgr.remove(self.uniqueName('popupPurchaseGUI'))
taskMgr.remove(self.uniqueName('lerpCamera'))
if self.lerpCameraSeq:
self.lerpCameraSeq.finish()
self.lerpCameraSeq = None
if self.purchase:
self.purchase.exit()
self.purchase.unload()
@ -61,7 +64,9 @@ class DistributedNPCClerk(DistributedNPCToonBase):
def resetClerk(self):
self.ignoreAll()
taskMgr.remove(self.uniqueName('popupPurchaseGUI'))
taskMgr.remove(self.uniqueName('lerpCamera'))
if self.lerpCameraSeq:
self.lerpCameraSeq.finish()
self.lerpCameraSeq = None
if self.purchase:
self.purchase.exit()
self.purchase.unload()
@ -81,7 +86,9 @@ class DistributedNPCClerk(DistributedNPCToonBase):
return
if mode == NPCToons.PURCHASE_MOVIE_TIMEOUT:
taskMgr.remove(self.uniqueName('popupPurchaseGUI'))
taskMgr.remove(self.uniqueName('lerpCamera'))
if self.lerpCameraSeq:
self.lerpCameraSeq.finish()
self.lerpCameraSeq = None
if self.isLocalToon:
self.ignore(self.purchaseDoneEvent)
if self.purchase:
@ -98,7 +105,8 @@ class DistributedNPCClerk(DistributedNPCToonBase):
self.setupAvatars(self.av)
if self.isLocalToon:
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)
if self.isLocalToon:
taskMgr.doMethodLater(1.0, self.popupPurchaseGUI, self.uniqueName('popupPurchaseGUI'))