def add(self,o): self.checkHold(o) if o.location(): o.location().remove(o) o.location = getP(self) p = getP(o) if o not in self.contains: self.contains.append(p)
def add(self, o): self.checkHold(o) if o.location(): o.location().remove(o) o.location = getP(self) p = getP(o) if o not in self.contains: self.contains.append(p)
def add(self,o,slot=None): if not slot: Container.add(self,o) return self.checkHoldSlot(o,slot) if slot in self.slots: other = self.slots[slot]() self.add(other) if o.location: o.location().remove(o) self.slots[slot] = getP(o) o.location = getP(self) o.locationSlot = slot
def add(self, o, slot=None): if not slot: Container.add(self, o) return self.checkHoldSlot(o, slot) if slot in self.slots: other = self.slots[slot]() self.add(other) if o.location: o.location().remove(o) self.slots[slot] = getP(o) o.location = getP(self) o.locationSlot = slot
def addEvent(self, time, o, name, *args, **kwargs): eventId = self.nextEventId self.nextEventId += 1 self.events[eventId] = (self.time, self.time + time, getP(o), name, args, kwargs) self.callLater(time, self.callEvent, eventId) return eventId
def addEvent(self,time,o,name,*args,**kwargs): eventId = self.nextEventId self.nextEventId+=1 self.events[eventId] = (self.time,self.time+time,getP(o),name,args,kwargs) self.callLater(time,self.callEvent,eventId) return eventId
def addListener(self,listener): self.listeners[listener.id] = getP(listener)
def addListener(self, listener): self.listeners[listener.id] = getP(listener)