indexing description: "Pickup Action" author: "Adrian Rabenseifner, radrian@student.ethz.ch" date: "$Date$" revision: "$Revision$" class PICKUP inherit ACTION redefine perform end create make feature {NONE} -- Initialization make(pitem: ITEM) is -- Initialize `Current'. do init_condition_lists item := pitem end feature -- Access item: ITEM perform(e: EVENT; g: GAME) is -- perform action on given game Object do -- add item to repository if not g.repository.full then g.repository.add_item(item) else -- display message g.set_message("Repository full, drop some items.") end -- only need to force redraw of items in scene (no need to repaint whole scene) g.items_have_been_changed -- debug output -- io.put_string("action performed: pickup") -- io.put_new_line end set_item(pitem: ITEM) is -- set item do item := pitem end end -- class PICKUP