PutableEvent.py 472B

12345678910
  1. from intelligine.synergy.event.transport.TakeableEvent import TakeableEvent
  2. from xyzworld.mechanism.ArroundMechanism import ArroundMechanism
  3. from intelligine.cst import TRANSPORTER, ALIVE, CARRYING, CANT_PUT_STILL
  4. class PutableEvent(TakeableEvent):
  5. def concern(self, object_id, context):
  6. return context.metas.states.have(object_id, [TRANSPORTER, ALIVE, CARRYING]) \
  7. and not context.metas.value.get(CANT_PUT_STILL, object_id, allow_empty=True)