From: Perttu Ahola Date: Sat, 4 Feb 2012 00:20:05 +0000 (+0200) Subject: Add groups = {} to item definition X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=61016962ee147636800e9c9375131b5087801b0c;p=zefram%2Fminetest%2Fminetest_engine.git Add groups = {} to item definition --- diff --git a/data/builtin.lua b/data/builtin.lua index 3a38b60a..b8891c06 100644 --- a/data/builtin.lua +++ b/data/builtin.lua @@ -359,6 +359,7 @@ minetest.nodedef_default = { type="node", -- name intentionally not defined here description = "", + groups = {}, inventory_image = "", wield_image = "", wield_scale = {x=1,y=1,z=1}, @@ -418,6 +419,7 @@ minetest.craftitemdef_default = { type="craft", -- name intentionally not defined here description = "", + groups = {}, inventory_image = "", wield_image = "", wield_scale = {x=1,y=1,z=1}, @@ -435,6 +437,7 @@ minetest.tooldef_default = { type="tool", -- name intentionally not defined here description = "", + groups = {}, inventory_image = "", wield_image = "", wield_scale = {x=1,y=1,z=1}, @@ -452,6 +455,7 @@ minetest.noneitemdef_default = { -- This is used for the hand and unknown items type="none", -- name intentionally not defined here description = "", + groups = {}, inventory_image = "", wield_image = "", wield_scale = {x=1,y=1,z=1}, diff --git a/data/mods/default/init.lua b/data/mods/default/init.lua index f0e6b6dc..d0733737 100644 --- a/data/mods/default/init.lua +++ b/data/mods/default/init.lua @@ -308,6 +308,12 @@ -- Item definition options (register_node, register_craftitem, register_tool) -- { -- description = "Steel Axe", +-- groups = {}, -- key=name, value=rating; rating=1..3. +-- if rating not applicable, use 1. +-- eg. {wool=1, fluffy=3} +-- {soil=2, outerspace=1, crumbly=1} +-- {hard=3, brittle=3, spikes=2 +-- {hard=1, metal=1, spikes=1} -- inventory_image = "default_tool_steelaxe.png", -- wield_image = "", -- wield_scale = {x=1,y=1,z=1},