Ejemplo n.º 1
0
	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))
Ejemplo n.º 2
0
	def revert(self):
		store.remove_object('garrison_queue_unit', {'unit_id':self.fleet_id})
		self.fleet_id = None
Ejemplo n.º 3
0
	def perform(self):
		store.remove_object('garrison_queue_unit', {'unit_id':self.unit_id})
Ejemplo n.º 4
0
	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})
Ejemplo n.º 5
0
	def perform(self):
		store.remove_object('action', {'cancel_id':self.action_id})
Ejemplo n.º 6
0
	def revert(self):
		store.remove_object('action', {'unit_id':self.unit_id})