mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
~satanGrowFlowers grows trees now, treasures are now every 30 seconds instead of 10, TTC heals 1 -> DDL heals 6, and treasures are incremented by 3
This commit is contained in:
parent
1c5a9ebbbe
commit
0686115b24
5 changed files with 21 additions and 16 deletions
|
@ -115,13 +115,13 @@ def satanGrowFlowers():
|
|||
|
||||
now = int(time.time())
|
||||
i = 0
|
||||
for flower in garden.flowers:
|
||||
for flower in garden.flowers.union(garden.trees):
|
||||
flower.b_setWaterLevel(5)
|
||||
flower.b_setGrowthLevel(2)
|
||||
flower.update()
|
||||
i += 1
|
||||
|
||||
return '%d disgusting flowers grown' % i
|
||||
return '%d disgusting flowers and trees grown' % i
|
||||
|
||||
@magicWord(category=CATEGORY_PROGRAMMER)
|
||||
def satanPickAll():
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
from direct.directnotify.DirectNotifyGlobal import *
|
||||
from direct.distributed import DistributedObjectAI
|
||||
|
||||
|
||||
HealFrequency = 10.0 # The time in seconds between each Toon-up pulse.
|
||||
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
|
||||
class SafeZoneManagerAI(DistributedObjectAI.DistributedObjectAI):
|
||||
notify = directNotify.newCategory('SafeZoneManagerAI')
|
||||
|
@ -13,7 +10,7 @@ class SafeZoneManagerAI(DistributedObjectAI.DistributedObjectAI):
|
|||
av = self.air.doId2do.get(avId)
|
||||
if not av:
|
||||
return
|
||||
av.startToonUp(HealFrequency)
|
||||
av.startToonUp(ToontownGlobals.TOONUP_FREQUENCY)
|
||||
|
||||
def exitSafeZone(self):
|
||||
avId = self.air.getAvatarIdFromSender()
|
||||
|
|
|
@ -76,7 +76,7 @@ SafeZoneTreasureSpawns = {
|
|||
5 # Maximum
|
||||
),
|
||||
ToontownGlobals.DonaldsDock: (
|
||||
TreasureDD, 10, # DDTreasure heals 10 each...
|
||||
TreasureDD, 6, # DDTreasure heals 6 each...
|
||||
[
|
||||
(52.9072, -23.4768, -12.308),
|
||||
(35.3827, -51.9196, -12.308),
|
||||
|
@ -109,7 +109,7 @@ SafeZoneTreasureSpawns = {
|
|||
2 # Maximum
|
||||
),
|
||||
ToontownGlobals.DaisyGardens: (
|
||||
TreasureDG, 10, # DGTreasure heals 10 each...
|
||||
TreasureDG, 9, # DGTreasure heals 9 each...
|
||||
[
|
||||
(-49, 156, 0.0),
|
||||
(-59, 50, 0.0),
|
||||
|
@ -136,7 +136,7 @@ SafeZoneTreasureSpawns = {
|
|||
2 # Maximum
|
||||
),
|
||||
ToontownGlobals.TheBrrrgh: (
|
||||
TreasureBR, 12, # +12 laff
|
||||
TreasureBR, 15, # +15 laff
|
||||
[
|
||||
(-108, 46, 6.2),
|
||||
(-111, 74, 6.2),
|
||||
|
@ -161,7 +161,7 @@ SafeZoneTreasureSpawns = {
|
|||
2 # Maximum
|
||||
),
|
||||
ToontownGlobals.MinniesMelodyland: (
|
||||
TreasureMM, 10, # +10 laff
|
||||
TreasureMM, 12, # +12 laff
|
||||
[
|
||||
(118, -39, 3.3),
|
||||
(118, 1, 3.3),
|
||||
|
@ -187,7 +187,7 @@ SafeZoneTreasureSpawns = {
|
|||
2 # Maximum
|
||||
),
|
||||
ToontownGlobals.DonaldsDreamland: (
|
||||
TreasureDL, 12, # +12 laff
|
||||
TreasureDL, 18, # +18 laff
|
||||
[
|
||||
(86, 69, -17.4),
|
||||
(34, -48, -16.4),
|
||||
|
|
|
@ -2442,14 +2442,20 @@ class DistributedToonAI(DistributedPlayerAI.DistributedPlayerAI, DistributedSmoo
|
|||
|
||||
def startToonUp(self, healFrequency):
|
||||
self.stopToonUp()
|
||||
self.healFrequency = healFrequency
|
||||
self.nextToonup = (healFrequency, self.indexOf(ToontownGlobals.TOONUP_PULSE_ZONES, ZoneUtil.getCanonicalHoodId(self.zoneId), 0) + 1)
|
||||
self.__waitForNextToonUp()
|
||||
|
||||
def indexOf(self, list, element, default):
|
||||
try:
|
||||
return list.index(element)
|
||||
except:
|
||||
return default
|
||||
|
||||
def __waitForNextToonUp(self):
|
||||
taskMgr.doMethodLater(self.healFrequency, self.toonUpTask, self.uniqueName('safeZoneToonUp'))
|
||||
taskMgr.doMethodLater(self.nextToonup[0], self.toonUpTask, self.uniqueName('safeZoneToonUp'))
|
||||
|
||||
def toonUpTask(self, task):
|
||||
self.toonUp(1)
|
||||
self.toonUp(self.nextToonup[1])
|
||||
self.__waitForNextToonUp()
|
||||
return Task.done
|
||||
|
||||
|
|
|
@ -1686,4 +1686,6 @@ TF_ALREADY_FRIENDS = 6
|
|||
TF_ALREADY_FRIENDS_NAME = 7
|
||||
TF_SUCCESS = 8
|
||||
|
||||
GROUP_ZONES = [11000, 11100, 11200, 12000, 12100, 13000, 13100, 13200, 10000, 10100]
|
||||
GROUP_ZONES = [11000, 11100, 11200, 12000, 12100, 13000, 13100, 13200, 10000, 10100]
|
||||
TOONUP_PULSE_ZONES = [ToontownCentral, DonaldsDock, DaisyGardens, MinniesMelodyland, TheBrrrgh, DonaldsDreamland]
|
||||
TOONUP_FREQUENCY = 30
|
Loading…
Reference in a new issue