mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
ButterflyAI cleanup
gg Disney and their unneeded imports
This commit is contained in:
parent
a380e1e6d9
commit
443233ad1d
1 changed files with 6 additions and 14 deletions
|
@ -1,13 +1,9 @@
|
||||||
from direct.directnotify import DirectNotifyGlobal
|
from direct.directnotify import DirectNotifyGlobal
|
||||||
from direct.distributed.DistributedObjectAI import DistributedObjectAI
|
from direct.distributed.DistributedObjectAI import DistributedObjectAI
|
||||||
from otp.ai.AIBase import *
|
|
||||||
from toontown.toonbase.ToontownGlobals import *
|
|
||||||
from direct.distributed.ClockDelta import *
|
from direct.distributed.ClockDelta import *
|
||||||
from direct.fsm import ClassicFSM, State
|
from direct.fsm import ClassicFSM, State
|
||||||
from direct.fsm import State
|
|
||||||
from direct.task import Task
|
from direct.task import Task
|
||||||
import ButterflyGlobals
|
import ButterflyGlobals, random
|
||||||
import random
|
|
||||||
|
|
||||||
class DistributedButterflyAI(DistributedObjectAI):
|
class DistributedButterflyAI(DistributedObjectAI):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedButterflyAI")
|
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedButterflyAI")
|
||||||
|
@ -23,15 +19,11 @@ class DistributedButterflyAI(DistributedObjectAI):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def delete(self):
|
def delete(self):
|
||||||
try:
|
ButterflyGlobals.recycleIndex(self.curIndex, self.playground, self.area, self.ownerId)
|
||||||
self.butterfly_deleted
|
ButterflyGlobals.recycleIndex(self.destIndex, self.playground, self.area, self.ownerId)
|
||||||
except:
|
self.fsm.request('off')
|
||||||
self.butterfly_deleted = 1
|
del self.fsm
|
||||||
ButterflyGlobals.recycleIndex(self.curIndex, self.playground, self.area, self.ownerId)
|
DistributedObjectAI.delete(self)
|
||||||
ButterflyGlobals.recycleIndex(self.destIndex, self.playground, self.area, self.ownerId)
|
|
||||||
self.fsm.request('off')
|
|
||||||
del self.fsm
|
|
||||||
DistributedObjectAI.delete(self)
|
|
||||||
|
|
||||||
def d_setState(self, stateIndex, curIndex, destIndex, time):
|
def d_setState(self, stateIndex, curIndex, destIndex, time):
|
||||||
self.sendUpdate('setState', [stateIndex,
|
self.sendUpdate('setState', [stateIndex,
|
||||||
|
|
Loading…
Reference in a new issue