Skip to content

Instantly share code, notes, and snippets.

@danhp
Last active December 20, 2015 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danhp/6093771 to your computer and use it in GitHub Desktop.
Save danhp/6093771 to your computer and use it in GitHub Desktop.
create Item
local Item = require 'items/item'
return{
name = "note",
image = "note",
type = "consumable",
MAX_ITEMS = 1,
use = function( consumable, player )
locl itemNode = require('items/consumables/note')
local item = Item.new(itemNode)
player.inventory:addItem(item)
end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment