Skip to content

Commit

Permalink
adds [jumpdrive] compat
Browse files Browse the repository at this point in the history
github.com/mt-mods/jumpdrive

closes mt-mods/jumpdrive#90
  • Loading branch information
SwissalpS committed Nov 30, 2024
1 parent cb6bfaf commit f448d73
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local MP = core.get_modpath("banners") .. "/"
dofile(MP .. "smartfs.lua")

banners = {
version = 20241129.1232
version = 20241130.1920
}

banners.masks = {
Expand Down Expand Up @@ -305,6 +305,12 @@ function banners.banner_after_place(pos, _, itemstack, pointed_thing)
core.add_entity(pos, "banners:banner_ent")
end

-- [jumpdrive] compat
-- (from_pos, to_pos, additional_info)
function banners.banner_on_movenode(_, to_pos)
core.add_entity(to_pos, "banners:banner_ent")
end

-- banner entity

function banners:banner_on_activate()
Expand Down
2 changes: 2 additions & 0 deletions nodes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ core.register_node("banners:wooden_banner", {
on_destruct = banners.banner_on_destruct,
on_use = banners.banner_on_use,
on_dig = banners.banner_on_dig,
on_movenode = banners.banner_on_movenode,
})

-- steel banner
Expand All @@ -32,5 +33,6 @@ core.register_node("banners:steel_banner", {
on_destruct = banners.banner_on_destruct,
on_use = banners.banner_on_use,
on_dig = banners.banner_on_dig,
on_movenode = banners.banner_on_movenode,
})

0 comments on commit f448d73

Please sign in to comment.