2019-11-02 17:27:54 -05:00
|
|
|
from otp.ai.AIBaseGlobal import *
|
2022-12-16 18:40:57 -06:00
|
|
|
from panda3d.core import *
|
2019-12-30 00:07:56 -06:00
|
|
|
from . import DistributedToonAI
|
2019-11-02 17:27:54 -05:00
|
|
|
from direct.fsm import ClassicFSM
|
|
|
|
from direct.fsm import State
|
|
|
|
from direct.distributed import ClockDelta
|
|
|
|
from toontown.toonbase import ToontownGlobals
|
2019-12-30 00:07:56 -06:00
|
|
|
from . import NPCToons
|
2019-11-02 17:27:54 -05:00
|
|
|
from direct.task import Task
|
|
|
|
from toontown.quest import Quests
|
|
|
|
|
|
|
|
class DistributedNPCToonBaseAI(DistributedToonAI.DistributedToonAI):
|
|
|
|
|
|
|
|
def __init__(self, air, npcId, questCallback = None):
|
|
|
|
DistributedToonAI.DistributedToonAI.__init__(self, air)
|
|
|
|
self.air = air
|
|
|
|
self.npcId = npcId
|
|
|
|
self.busy = 0
|
|
|
|
self.questCallback = questCallback
|
|
|
|
self.givesQuests = 1
|
|
|
|
|
|
|
|
def delete(self):
|
|
|
|
taskMgr.remove(self.uniqueName('clearMovie'))
|
|
|
|
DistributedToonAI.DistributedToonAI.delete(self)
|
|
|
|
|
|
|
|
def _doPlayerEnter(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def _doPlayerExit(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def _announceArrival(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def isPlayerControlled(self):
|
|
|
|
return False
|
|
|
|
|
|
|
|
def getHq(self):
|
|
|
|
return 0
|
|
|
|
|
|
|
|
def getTailor(self):
|
|
|
|
return 0
|
|
|
|
|
|
|
|
def getGivesQuests(self):
|
|
|
|
return self.givesQuests
|
|
|
|
|
|
|
|
def avatarEnter(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def isBusy(self):
|
|
|
|
return self.busy > 0
|
|
|
|
|
|
|
|
def getNpcId(self):
|
|
|
|
return self.npcId
|
|
|
|
|
|
|
|
def freeAvatar(self, avId):
|
|
|
|
self.sendUpdateToAvatarId(avId, 'freeAvatar', [])
|
|
|
|
|
|
|
|
def setPositionIndex(self, posIndex):
|
|
|
|
self.posIndex = posIndex
|
|
|
|
|
|
|
|
def getPositionIndex(self):
|
|
|
|
return self.posIndex
|