forked from mtcontrib/spears
Corrige avertissement sur variable globale
This commit is contained in:
parent
00d86908d8
commit
63d339a686
4
init.lua
4
init.lua
@ -12,6 +12,4 @@ dofile(minetest.get_modpath("spears").."/functions.lua")
|
|||||||
dofile(minetest.get_modpath("spears").."/tools.lua")
|
dofile(minetest.get_modpath("spears").."/tools.lua")
|
||||||
|
|
||||||
|
|
||||||
if minetest.setting_get("log_mods") then
|
minetest.log("action", "[spears] loaded.")
|
||||||
minetest.log("action", "spears loaded")
|
|
||||||
end
|
|
||||||
|
@ -2,7 +2,7 @@ function spears_register_spear(kind, desc, eq, toughness, material)
|
|||||||
|
|
||||||
minetest.register_tool("spears:spear_" .. kind, {
|
minetest.register_tool("spears:spear_" .. kind, {
|
||||||
description = desc .. " spear",
|
description = desc .. " spear",
|
||||||
wield_image = "spears_spear_" .. kind .. ".png",
|
wield_image = "spears_spear_" .. kind .. ".png",
|
||||||
inventory_image = "spears_spear_" .. kind .. ".png^[transform4",
|
inventory_image = "spears_spear_" .. kind .. ".png^[transform4",
|
||||||
wield_scale= {x=2,y=1,z=1},
|
wield_scale= {x=2,y=1,z=1},
|
||||||
on_drop = function(itemstack, user, pointed_thing)
|
on_drop = function(itemstack, user, pointed_thing)
|
||||||
@ -29,9 +29,10 @@ function spears_register_spear(kind, desc, eq, toughness, material)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
SPEAR_ENTITY=spears_set_entity(kind, eq, toughness)
|
minetest.register_entity(
|
||||||
|
"spears:spear_" .. kind .. "_entity",
|
||||||
minetest.register_entity("spears:spear_" .. kind .. "_entity", SPEAR_ENTITY)
|
spears_set_entity(kind, eq, toughness)
|
||||||
|
)
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'spears:spear_' .. kind,
|
output = 'spears:spear_' .. kind,
|
||||||
|
Loading…
Reference in New Issue
Block a user