diff options
author | pyrollo <dev@pyrollo.com> | 2017-12-10 10:46:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-10 10:46:48 +0100 |
commit | d07e0c5c134eb9a6e8b5dc097a86d642d67fa04d (patch) | |
tree | 71a53f16da091e399d40239541711a54a7e47cfe /signs | |
parent | 2e4d8f529c85b5de0cbc0399ca453783fd4888d6 (diff) | |
parent | 63317776bda02f413729e655b0f1e0e8c0973ccb (diff) |
Merge pull request #8 from gpcf/master
Compatibility with signs_lib and advtrains, new large banner signs.
Diffstat (limited to 'signs')
-rw-r--r-- | signs/common.lua | 10 | ||||
-rw-r--r-- | signs/nodes.lua | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/signs/common.lua b/signs/common.lua index 63f21dc..559f7f7 100644 --- a/signs/common.lua +++ b/signs/common.lua @@ -24,8 +24,8 @@ local F = function(...) return minetest.formspec_escape(S(...)) end function signs.set_formspec(pos) local meta = minetest.get_meta(pos) local ndef = minetest.registered_nodes[minetest.get_node(pos).name] - if ndef and ndef.display_entities and ndef.display_entities["signs:text"] then - local maxlines = ndef.display_entities["signs:text"].maxlines + if ndef and ndef.display_entities and ndef.display_entities["signs:display_text"] then + local maxlines = ndef.display_entities["signs:display_text"].maxlines local formspec if maxlines == 1 then @@ -149,10 +149,10 @@ function signs.register_sign(mod, name, model) fixed = {-model.width/2, -model.height/2, 0.5, model.width/2, model.height/2, 0.5 - model.depth}, }, - groups = {choppy=2, dig_immediate=2}, + groups = {choppy=2, dig_immediate=2, not_blocking_trains = 1}, sounds = default.node_sound_defaults(), display_entities = { - ["signs:text"] = { + ["signs:display_text"] = { on_display_update = font_lib.on_display_update, depth = 0.499 - model.depth, size = { x = model.width, y = model.height }, @@ -187,7 +187,7 @@ function signs.register_sign(mod, name, model) -- Entity fields override for key, value in pairs(model.entity_fields) do - fields.display_entities["signs:text"][key] = value + fields.display_entities["signs:display_text"][key] = value end minetest.register_node(mod..":"..name, fields) diff --git a/signs/nodes.lua b/signs/nodes.lua index 6146d50..204a2a9 100644 --- a/signs/nodes.lua +++ b/signs/nodes.lua @@ -66,7 +66,7 @@ local function on_receive_fields_poster(pos, formname, fields, player) end -- Text entity for all signs -display_lib.register_display_entity("signs:text") +display_lib.register_display_entity("signs:display_text") -- Sign models and registration local models = { |