mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
NPC fix!!
This commit is contained in:
parent
c7011bc757
commit
1dcba024d5
4 changed files with 14 additions and 18 deletions
|
@ -301,6 +301,6 @@ class DistributedStage(DistributedObject.DistributedObject):
|
|||
self.titleText.setText('')
|
||||
|
||||
def elevatorAlert(self, avId):
|
||||
if base.localAvatar.doId != avId:
|
||||
if base.localAvatar.doId != avId and avId in base.cr.doId2do:
|
||||
name = base.cr.doId2do[avId].getName()
|
||||
self.showInfoText(TTLocalizer.stageToonEnterElevator % name)
|
||||
self.showInfoText(TTLocalizer.StageToonEnterElevator % name)
|
||||
|
|
|
@ -61,3 +61,6 @@ class DistributedNPCToonBaseAI(DistributedToonAI.DistributedToonAI):
|
|||
|
||||
def getPositionIndex(self):
|
||||
return self.posIndex
|
||||
|
||||
def getStartAnimState(self):
|
||||
return 'neutral'
|
||||
|
|
|
@ -134,10 +134,7 @@ def createNPC(air, npcId, desc, zoneId, posIndex = 0, questCallback = None):
|
|||
npc.setMaxHp(15)
|
||||
npc.setPositionIndex(posIndex)
|
||||
npc.generateWithRequired(zoneId)
|
||||
if hasattr(npc, 'getStartAnimState'):
|
||||
npc.d_setAnimState(npc.getStartAnimState(), 1.0)
|
||||
else:
|
||||
npc.d_setAnimState('neutral', 1.0)
|
||||
return npc
|
||||
|
||||
|
||||
|
@ -148,6 +145,7 @@ def createNpcsInZone(air, zoneId):
|
|||
for npcId in npcIdList:
|
||||
while npcIdList.count(npcId) > 1:
|
||||
npcIdList.remove(npcId)
|
||||
npcIdList.sort()
|
||||
for i in xrange(len(npcIdList)):
|
||||
npcId = npcIdList[i]
|
||||
npcDesc = NPCToonDict.get(npcId)
|
||||
|
@ -11927,6 +11925,9 @@ del lnames
|
|||
zone2NpcDict = {}
|
||||
|
||||
def generateZone2NpcDict():
|
||||
if zone2NpcDict:
|
||||
return
|
||||
|
||||
for id, npcDesc in NPCToonDict.items():
|
||||
zoneId = npcDesc[0]
|
||||
if zoneId in zone2NpcDict:
|
||||
|
@ -11937,20 +11938,12 @@ def generateZone2NpcDict():
|
|||
|
||||
def getNPCName(npcId):
|
||||
npc = NPCToonDict.get(npcId)
|
||||
if npc:
|
||||
return npc[1]
|
||||
else:
|
||||
return None
|
||||
return None
|
||||
return npc[1] if npc else None
|
||||
|
||||
|
||||
def getNPCZone(npcId):
|
||||
npc = NPCToonDict.get(npcId)
|
||||
if npc:
|
||||
return npc[0]
|
||||
else:
|
||||
return None
|
||||
return None
|
||||
return npc[0] if npc else None
|
||||
|
||||
|
||||
def getBuildingArticle(zoneId):
|
||||
|
|
|
@ -4288,7 +4288,7 @@ HeadingToFactoryTitle = '%s'
|
|||
ForemanConfrontedMsg = '%s is battling the ' + Foreman + '!'
|
||||
MintBossConfrontedMsg = '%s is battling the Supervisor!'
|
||||
StageBossConfrontedMsg = '%s is battling the District Attorney!'
|
||||
stageToonEnterElevator = '%s \nhas entered the elevator'
|
||||
StageToonEnterElevator = '%s\nhas entered the elevator!'
|
||||
ForcedLeaveStageAckMsg = 'The Law Clerk was defeated before you could reach him. You did not recover any Jury Notices.'
|
||||
MinigameWaitingForOtherToons = 'Waiting for other toons to join...'
|
||||
MinigamePleaseWait = 'Please wait...'
|
||||
|
|
Loading…
Reference in a new issue