Skip to content

Commit

Permalink
signs aren't ground content
Browse files Browse the repository at this point in the history
and some whitespace indentation fixes
  • Loading branch information
SwissalpS authored Mar 1, 2024
1 parent 4883cbd commit 6f65cb6
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions signs_api/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ function signs_api.register_sign(mod, name, model)
model.width/2, model.height/2, 0.5 - model.depth},
},
groups = {choppy=2, dig_immediate=2, not_blocking_trains=1, display_api=1,signs_api_formspec_lbm=1},
is_ground_content = false,
sounds = default.node_sound_defaults(),
display_entities = {
["signs:display_text"] = {
Expand All @@ -183,21 +184,21 @@ function signs_api.register_sign(mod, name, model)
},
on_place = display_api.on_place,
on_construct = function(pos)
local ndef = minetest.registered_nodes[minetest.get_node(pos).name]
local meta = minetest.get_meta(pos)
meta:set_string("font", ndef and ndef.display_entities.font_name or
font_api.get_default_font_name())
signs_api.set_formspec(pos)
display_api.on_construct(pos)
end,
local ndef = minetest.registered_nodes[minetest.get_node(pos).name]
local meta = minetest.get_meta(pos)
meta:set_string("font", ndef and ndef.display_entities.font_name or
font_api.get_default_font_name())
signs_api.set_formspec(pos)
display_api.on_construct(pos)
end,
on_destruct = display_api.on_destruct,
on_blast = display_api.on_blast,
on_rotate = signs_api.on_rotate,
on_receive_fields = signs_api.on_receive_fields,
on_punch = function(pos, node, player, pointed_thing)
signs_api.set_formspec(pos)
display_api.update_entities(pos)
end,
signs_api.set_formspec(pos)
display_api.update_entities(pos)
end,
}

-- Node fields override
Expand Down

0 comments on commit 6f65cb6

Please sign in to comment.