mirror of
https://github.com/pyrollo/display_modpack.git
synced 2024-09-27 23:00:27 +02:00
fix crash when a sign gets placed on unknown node
This commit is contained in:
parent
e0e0305836
commit
7dadf203bf
|
@ -212,7 +212,7 @@ function signs_api.register_sign(mod, name, model)
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local ndef = minetest.registered_nodes[minetest.get_node(pos).name]
|
local ndef = minetest.registered_nodes[minetest.get_node(pos).name]
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("font", ndef.display_entities.font_name or
|
meta:set_string("font", ndef and ndef.display_entities.font_name or
|
||||||
font_api.get_default_font_name())
|
font_api.get_default_font_name())
|
||||||
signs_api.set_formspec(pos)
|
signs_api.set_formspec(pos)
|
||||||
display_api.on_construct(pos)
|
display_api.on_construct(pos)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user