general: the rest of the work from the livestream
This commit is contained in:
parent
d500673550
commit
3f49cfcab5
6 changed files with 28 additions and 2 deletions
|
@ -95,6 +95,7 @@ audio-music-active #t
|
|||
audio-master-sfx-volume 1
|
||||
audio-master-music-volume 1
|
||||
server-type prod
|
||||
want-dev 0
|
||||
|
||||
# TEMP
|
||||
fake-playtoken dev
|
||||
|
|
|
@ -106,7 +106,7 @@ dclass TimeManager : DistributedObject {
|
|||
serverTime(uint8, int32, uint32);
|
||||
setDisconnectReason(uint8) airecv clsend;
|
||||
setExceptionInfo(string(0-1024)) airecv clsend;
|
||||
setSignature(string(0-1024), char [16], char [16]) airecv clsend;
|
||||
setSignature(string(0-1024), blob, blob) airecv clsend;
|
||||
setFrameRate(uint16/10, uint16/1000, uint16, string(0-256), uint32/10, uint32/10, string(0-256), uint16, uint16, uint32/10, uint32/10, uint32/10, uint32, OSInfo, CPUSpeed, uint16, uint16, string(0-256)) airecv clsend;
|
||||
setCpuInfo(string(0-1024), string) airecv clsend;
|
||||
checkForGarbageLeaks(bool) airecv clsend;
|
||||
|
@ -545,4 +545,3 @@ dclass AstronLoginManager : DistributedObject {
|
|||
requestRemoveAvatar(uint32) clsend;
|
||||
requestPlayAvatar(uint32) clsend;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.distributed.DistributedObjectAI import DistributedObjectAI
|
||||
from direct.distributed.ClockDelta import globalClockDelta
|
||||
import time
|
||||
|
||||
class TimeManagerAI(DistributedObjectAI):
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('TimeManagerAI')
|
||||
|
||||
def requestServerTime(self, context):
|
||||
avId = self.air.getAvatarIdFromSender()
|
||||
if not avId:
|
||||
return
|
||||
|
||||
self.sendUpdateToAvatarId(avId, 'serverTime', [context, globalClockDelta.getRealNetworkTime(bits=32), int(time.time())])
|
||||
|
||||
def setSignature(self, todo0, todo1, todo2):
|
||||
pass
|
||||
|
|
|
@ -2,3 +2,6 @@ class HolidayManagerAI:
|
|||
def __init__(self, air):
|
||||
self.air = air
|
||||
self.currentHolidays = {}
|
||||
|
||||
def isHolidayRunning(self, holidayId):
|
||||
return False # NO
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from libtoontown import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from otp.ai.AIZoneData import AIZoneDataStore
|
||||
from otp.ai.TimeManagerAI import TimeManagerAI
|
||||
from otp.distributed.OtpDoGlobals import *
|
||||
from toontown.distributed.ToontownInternalRepository import ToontownInternalRepository
|
||||
from toontown.distributed.ToontownDistrictAI import ToontownDistrictAI
|
||||
|
@ -13,6 +14,7 @@ from toontown.hood.TTHoodDataAI import TTHoodDataAI
|
|||
from toontown.hood import ZoneUtil
|
||||
from toontown.pets.PetManagerAI import PetManagerAI
|
||||
from toontown.suit.SuitInvasionManagerAI import SuitInvasionManagerAI
|
||||
from toontown.toon import NPCToons
|
||||
from toontown.uberdog.DistributedInGameNewsMgrAI import DistributedInGameNewsMgrAI
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
|
||||
|
@ -31,6 +33,7 @@ class ToontownAIRepository(ToontownInternalRepository):
|
|||
self.zoneDataStore = None
|
||||
self.petMgr = None
|
||||
self.suitInvasionManager = None
|
||||
self.timeManager = None
|
||||
self.newsManager = None
|
||||
self.inGameNewsMgr = None
|
||||
self.catalogManager = None
|
||||
|
@ -95,6 +98,10 @@ class ToontownAIRepository(ToontownInternalRepository):
|
|||
self.districtStats.generateWithRequiredAndId(self.allocateChannel(), self.district.getDoId(),
|
||||
OTP_ZONE_ID_DISTRICTS_STATS)
|
||||
|
||||
# Generate our time manager...
|
||||
self.timeManager = TimeManagerAI(self)
|
||||
self.timeManager.generateWithRequired(OTP_ZONE_ID_MANAGEMENT)
|
||||
|
||||
# Generate our news manager...
|
||||
self.newsManager = NewsManagerAI(self)
|
||||
self.newsManager.generateWithRequired(OTP_ZONE_ID_MANAGEMENT)
|
||||
|
@ -126,6 +133,9 @@ class ToontownAIRepository(ToontownInternalRepository):
|
|||
self.hoods.append(hood)
|
||||
|
||||
def createZones(self):
|
||||
# First, generate our zone2NpcDict...
|
||||
NPCToons.generateZone2NpcDict()
|
||||
|
||||
# Toontown Central
|
||||
self.zoneTable[ToontownGlobals.ToontownCentral] = (
|
||||
(ToontownGlobals.ToontownCentral, 1, 0), (ToontownGlobals.SillyStreet, 1, 1),
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
from pandac.PandaModules import *
|
||||
from libotp import *
|
||||
from direct.directnotify import DirectNotifyGlobal
|
||||
from direct.fsm import ClassicFSM
|
||||
from direct.fsm import State
|
||||
|
|
Loading…
Reference in a new issue