mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
Pet file cleanup
This commit is contained in:
parent
227595fc64
commit
985b2a345b
3 changed files with 74 additions and 84 deletions
|
@ -51,5 +51,3 @@ class DistributedPetUD(DistributedObjectUD):
|
|||
|
||||
def setLastSeenTimestamp(self, timestamp):
|
||||
pass
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ def getDayId():
|
|||
return int(time.time() // DAY)
|
||||
|
||||
class PetManagerAI:
|
||||
NUM_DAILY_PETS = 5 # per hood
|
||||
NUM_DAILY_PETS = 5 # Per hood.
|
||||
cachePath = config.GetString('air-pet-cache', 'astron/databases/air_cache/')
|
||||
|
||||
def __init__(self, air):
|
||||
|
@ -25,7 +25,6 @@ class PetManagerAI:
|
|||
self.seeds = cPickle.loads(data)
|
||||
if self.seeds.get('day', -1) != getDayId() or len(self.seeds.get(ToontownGlobals.ToontownCentral, [])) != self.NUM_DAILY_PETS:
|
||||
self.generateSeeds()
|
||||
|
||||
else:
|
||||
self.generateSeeds()
|
||||
|
||||
|
@ -80,7 +79,4 @@ class PetManagerAI:
|
|||
if pet:
|
||||
if pet in self.air.doId2do:
|
||||
self.air.doId2do[pet].requestDelete()
|
||||
|
||||
av.b_setPetId(0)
|
||||
# XXX to do: check for current pet and destroy it if generated
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ def housePointCollision(x, y):
|
|||
for i, h in enumerate(houses):
|
||||
if inCircle(x, y, h, houseRadius):
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
def generatePos():
|
||||
|
@ -61,7 +60,6 @@ def houseCollision(pt1, pt2):
|
|||
for i, h in enumerate(houses):
|
||||
if lineInCircle(pt1, pt2, h):
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
def generatePath(start, end):
|
||||
|
@ -136,7 +134,6 @@ class PetMoverAI(FSM):
|
|||
def __stateComplete(self):
|
||||
try:
|
||||
self.request("Still")
|
||||
|
||||
except:
|
||||
pass
|
||||
|
||||
|
@ -186,4 +183,3 @@ class PetMoverAI(FSM):
|
|||
self.__chaseCallback = callback
|
||||
|
||||
self.demand("Chase", av)
|
||||
|
Loading…
Reference in a new issue