diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/builtin.lua | 7 | ||||
-rw-r--r-- | data/mods/default/init.lua | 9 | ||||
-rw-r--r-- | data/mods/experimental/init.lua | 1 |
3 files changed, 15 insertions, 2 deletions
diff --git a/data/builtin.lua b/data/builtin.lua index 2e31c43b8..eba5b429e 100644 --- a/data/builtin.lua +++ b/data/builtin.lua @@ -106,7 +106,7 @@ function minetest.get_pointed_thing_position(pointed_thing, above) return pointed_thing.under end elseif pointed_thing.type == "object" then - obj = pointed.thing.ref + obj = pointed_thing.ref if obj ~= nil then return obj:getpos() else @@ -159,7 +159,6 @@ function minetest.get_node_drops(nodename, toolname) local drop = ItemStack({name=nodename}):get_definition().drop if drop == nil then -- default drop - print("default drop: " .. nodename) return {ItemStack({name=nodename})} elseif type(drop) == "string" then -- itemstring drop @@ -360,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}, @@ -419,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}, @@ -436,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}, @@ -453,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 f0e6b6dc2..3f4a8175e 100644 --- a/data/mods/default/init.lua +++ b/data/mods/default/init.lua @@ -118,6 +118,9 @@ -- {type="node", pos={x=, y=, z=}} -- minetest.get_current_modname() -> string -- minetest.get_modpath(modname) -> eg. "/home/user/.minetest/usermods/modname" +-- ^ Useful for loading additional .lua modules or static data from mod +-- minetest.get_worldpath(modname) -> eg. "/home/user/.minetest/world" +-- ^ Useful for storing custom data -- -- minetest.debug(line) -- ^ Goes to dstream @@ -308,6 +311,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}, diff --git a/data/mods/experimental/init.lua b/data/mods/experimental/init.lua index 9a8f8868d..ddc89f92c 100644 --- a/data/mods/experimental/init.lua +++ b/data/mods/experimental/init.lua @@ -540,5 +540,6 @@ minetest.register_abm({ print("experimental modname="..dump(minetest.get_current_modname())) print("experimental modpath="..dump(minetest.get_modpath("experimental"))) +print("experimental worldpath="..dump(minetest.get_worldpath())) -- END |