INTENT_DEFS = {
	pickup = {
		set = function(self)
			self:set_desired_pickup(self.hovered_pickup)
		end,
		step = function(self)
			if self.hovered_pickup then
				self:set_desired_pickup(self.hovered_pickup)
			end
		end,
		remove = function(self)
			self:clear_desired_pickups_out_of_range()
		end,
		release_removes = true,
	},
	melee = {
		set = function(self)
			self:set_attack_intent("primary", true)			
		end,
		step = function(self)
			self.hover_delay = 0.5
		end,
		remove = function(self)
			self:set_attack_intent("primary", false)
		end,
		release_removes = true,
	},
	ranged = {
		set = function(self)
			self:set_attack_intent("secondary", true)
		end,
		step = function(self)
			self.hover_delay = 0.5
		end,
		remove = function(self)
			self:set_attack_intent("secondary", false)
		end,
		release_removes = true,
	},
	browse_keeper = {
		set = function(self)			
			local hovered_keeper = self.hovered_keeper
			local player = self.player
			player:set_shop_keeper_gui(hovered_keeper)
		end,
		step = function(self)

		end,
		remove = function(self)
			local player = self.player
			player:set_shop_keeper_gui(nil)
		end,
	},
	hovered_element = {
		set = function(self)
			local player = self.player
			local hovered_element = player:get_hovered_element()
			player:set_pressed_element(hovered_element)
			local action_target, action = hovered_element:get_pressed_action()
			--print(action_target, action)
			if action then
				self:set_action_intent("action", action, action_target)
			end
		end,
		step = function(self)

		end,
		remove = function(self)
			local player = self.player
			player:set_pressed_element(nil)
			self:set_action_intent("action",nil)
		end,
		release_removes = true,
	},
	drop = {
		set = function(self, slot)
			self:set_drop_slot_intent(slot)
		end,
		step = function(self)

		end,
		remove = function(self)
		end,
		release_removes = true,
	},
	use = {
		set = function(self, slot)
			self:set_use_slot_intent(slot)
		end,
		step = function(self)

		end,
		remove = function(self)
		end,
		release_removes = true,
	},
	buy = {
		set = function(self, slot)
			self:set_buy_slot_intent(slot)
		end,
		step = function(self)

		end,
		remove = function(self)
		end,
		release_removes = true,
	},
	craft = {
		set = function(self, slot)
			self:set_craft_slot_intent(slot)
		end,
		step = function(self)

		end,
		remove = function(self)
		end,
		release_removes = true,
	},
}
