def on_cancel_action(self, evt): user_id, unit_id, cancel_action_id = evt.attr1 if not cancel_action_id: # action is not send to server yet store.remove_object('action', {'unit_id':unit_id}) else: self.actions.add_action(action.ActionCancel(user_id, cancel_action_id))
def revert(self): store.remove_object('garrison_queue_unit', {'unit_id':self.fleet_id}) self.fleet_id = None
def perform(self): store.remove_object('garrison_queue_unit', {'unit_id':self.unit_id})
def revert(self): store.remove_object('fleet', {'fleet_id':self.fleet_id}) # maybe it already left the planet store.remove_object('flying_fleet', {'fleet_id':self.fleet_id})
def perform(self): store.remove_object('action', {'cancel_id':self.action_id})
def revert(self): store.remove_object('action', {'unit_id':self.unit_id})