Skip to content

Commit

Permalink
Fix all deprecation warnings (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklp09 authored Jul 8, 2024
1 parent cc36ed6 commit 283b5be
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ banners.creation_form_func = function(state)
state.update_player_inv = function(self)
local player = minetest.get_player_by_name(self.player)
local newbanner = player:get_wielded_item()
newbanner:set_metadata(state.banner:get_transform_string())
newbanner:get_meta():set_string("", state.banner:get_transform_string())
player:set_wielded_item(newbanner)
end
state.update_preview = function(self)
Expand Down Expand Up @@ -180,7 +180,7 @@ end

banners.banner_after_place = function (pos, player, itemstack, pointed_thing)
minetest.get_node(pos).param2 = banners.determine_flag_direction(pos, pointed_thing)
minetest.get_meta(pos):set_string("banner", itemstack:get_metadata())
minetest.get_meta(pos):set_string("banner", itemstack:get_meta():get_string(""))
minetest.add_entity(pos, "banners:banner_ent")
end

Expand Down Expand Up @@ -211,15 +211,15 @@ banners.banner_on_activate = function(self)
end
end

minetest.register_entity("banners:banner_ent",
{
minetest.register_entity("banners:banner_ent", {
initial_properties = {
collisionbox = {0,0,0,0,0,0},
visual = "mesh",
textures = {"banner_uv_text"},
mesh = "banner_pole.x",
on_activate = banners.banner_on_activate,
}
)
},
on_activate = banners.banner_on_activate,
})

if minetest.get_modpath("factions") then
dofile(minetest.get_modpath("banners").."/factions.lua")
Expand Down

0 comments on commit 283b5be

Please sign in to comment.