Fix deprecation warnings (#42)
This commit is contained in:
parent
fce5cac8a9
commit
4493f2020f
18
init.lua
18
init.lua
@ -92,12 +92,14 @@ minetest.register_tool("anvil:hammer", hammer_def)
|
|||||||
local tmp = {}
|
local tmp = {}
|
||||||
|
|
||||||
minetest.register_entity("anvil:item", {
|
minetest.register_entity("anvil:item", {
|
||||||
hp_max = 1,
|
initial_properties = {
|
||||||
visual = "wielditem",
|
hp_max = 1,
|
||||||
visual_size = {x = .33, y = .33},
|
visual = "wielditem",
|
||||||
collisionbox = {0, 0, 0, 0, 0, 0},
|
visual_size = {x = .33, y = .33},
|
||||||
physical = false,
|
collisionbox = {0, 0, 0, 0, 0, 0},
|
||||||
textures = {"air"},
|
physical = false,
|
||||||
|
textures = {"air"},
|
||||||
|
},
|
||||||
on_activate = function(self, staticdata)
|
on_activate = function(self, staticdata)
|
||||||
if tmp.nodename ~= nil and tmp.texture ~= nil then
|
if tmp.nodename ~= nil and tmp.texture ~= nil then
|
||||||
self.nodename = tmp.nodename
|
self.nodename = tmp.nodename
|
||||||
@ -451,7 +453,7 @@ minetest.register_node("anvil:anvil", {
|
|||||||
else
|
else
|
||||||
hud2 = puncher:hud_add({
|
hud2 = puncher:hud_add({
|
||||||
name = "anvil_background",
|
name = "anvil_background",
|
||||||
hud_elem_type = "statbar",
|
[minetest.features.hud_def_type_field and "type" or "hud_elem_type"] = "statbar",
|
||||||
text = "default_cloud.png^[colorize:#ff0000:256",
|
text = "default_cloud.png^[colorize:#ff0000:256",
|
||||||
number = 40,
|
number = 40,
|
||||||
direction = 0, -- left to right
|
direction = 0, -- left to right
|
||||||
@ -462,7 +464,7 @@ minetest.register_node("anvil:anvil", {
|
|||||||
})
|
})
|
||||||
hud3 = puncher:hud_add({
|
hud3 = puncher:hud_add({
|
||||||
name = "anvil_foreground",
|
name = "anvil_foreground",
|
||||||
hud_elem_type = "statbar",
|
[minetest.features.hud_def_type_field and "type" or "hud_elem_type"] = "statbar",
|
||||||
text = "default_cloud.png^[colorize:#00ff00:256",
|
text = "default_cloud.png^[colorize:#00ff00:256",
|
||||||
number = damage_state,
|
number = damage_state,
|
||||||
direction = 0, -- left to right
|
direction = 0, -- left to right
|
||||||
|
Loading…
x
Reference in New Issue
Block a user