mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
Add config option to give SOS cards
This commit is contained in:
parent
d0daa44f93
commit
fa78289835
4 changed files with 8 additions and 3 deletions
|
@ -96,6 +96,9 @@ want-resistance-dance #f
|
|||
# Cog battles:
|
||||
base-xp-multiplier 1.0
|
||||
|
||||
# SOS toons:
|
||||
sos-card-reward 2
|
||||
|
||||
# Cog Dominiums
|
||||
want-emblems #t
|
||||
cogdo-want-barrel-room #t
|
||||
|
|
|
@ -487,7 +487,7 @@ class DistributedCogdoInteriorAI(DistributedObjectAI, FSM.FSM):
|
|||
toon = self.air.doId2do.get(v)
|
||||
if toon:
|
||||
if self.FOType == 's':
|
||||
if not toon.attemptAddNPCFriend(self.sosNPC, numCalls=1):
|
||||
if not toon.attemptAddNPCFriend(self.sosNPC):
|
||||
self.notify.info('%s unable to add NPCFriend %s to %s.' % (self.doId, self.sosNPC, v))
|
||||
|
||||
elif self.FOType == 'l':
|
||||
|
|
|
@ -349,7 +349,7 @@ class DistributedSellbotBossAI(DistributedBossCogAI.DistributedBossCogAI, FSM.FS
|
|||
for toonId in self.involvedToons:
|
||||
toon = self.air.doId2do.get(toonId)
|
||||
if toon:
|
||||
if not toon.attemptAddNPCFriend(self.cagedToonNpcId, numCalls=1):
|
||||
if not toon.attemptAddNPCFriend(self.cagedToonNpcId):
|
||||
self.notify.info('%s.unable to add NPCFriend %s to %s.' % (self.doId, self.cagedToonNpcId, toonId))
|
||||
toon.b_promote(self.deptIndex)
|
||||
|
||||
|
|
|
@ -648,7 +648,9 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
|
|||
def resetNPCFriendsDict(self):
|
||||
self.b_setNPCFriendsDict([])
|
||||
|
||||
def attemptAddNPCFriend(self, npcFriend, numCalls = 1):
|
||||
def attemptAddNPCFriend(self, npcFriend):
|
||||
numCalls = simbase.air.config.GetInt('sos-card-reward', 1)
|
||||
|
||||
if numCalls <= 0:
|
||||
self.notify.warning('invalid numCalls: %d' % numCalls)
|
||||
return 0
|
||||
|
|
Loading…
Reference in a new issue