mirror of
https://github.com/pyrollo/display_modpack.git
synced 2025-10-15 16:45:35 +02:00
Is ground content (#12)
* clocks aren't ground content * signs aren't ground content and some whitespace indentation fixes * steles aren't ground content and some whitespace indentation fixes
This commit is contained in:
committed by
GitHub
parent
fce192d288
commit
394166ca56
@@ -47,6 +47,7 @@ minetest.register_node("ontime_clocks:green_digital", {
|
|||||||
},
|
},
|
||||||
tiles = {"ontime_clocks_digital.png"},
|
tiles = {"ontime_clocks_digital.png"},
|
||||||
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, display_api=1},
|
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, display_api=1},
|
||||||
|
is_ground_content = false,
|
||||||
display_entities = {
|
display_entities = {
|
||||||
["ontime_clocks:display"] = {
|
["ontime_clocks:display"] = {
|
||||||
depth = 13/32 - 0.01,
|
depth = 13/32 - 0.01,
|
||||||
@@ -81,6 +82,7 @@ minetest.register_node("ontime_clocks:red_digital", {
|
|||||||
},
|
},
|
||||||
tiles = {"ontime_clocks_digital.png"},
|
tiles = {"ontime_clocks_digital.png"},
|
||||||
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, display_api=1},
|
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, display_api=1},
|
||||||
|
is_ground_content = false,
|
||||||
display_entities = {
|
display_entities = {
|
||||||
["ontime_clocks:display"] = {
|
["ontime_clocks:display"] = {
|
||||||
depth = 13/32 - 0.01,
|
depth = 13/32 - 0.01,
|
||||||
@@ -114,6 +116,7 @@ minetest.register_node("ontime_clocks:white", {
|
|||||||
},
|
},
|
||||||
tiles = {"ontime_clocks_white.png"},
|
tiles = {"ontime_clocks_white.png"},
|
||||||
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, display_api=1},
|
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, display_api=1},
|
||||||
|
is_ground_content = false,
|
||||||
display_entities = {
|
display_entities = {
|
||||||
["ontime_clocks:display"] = {
|
["ontime_clocks:display"] = {
|
||||||
depth = 6/16 - 0.01,
|
depth = 6/16 - 0.01,
|
||||||
@@ -148,6 +151,7 @@ minetest.register_node("ontime_clocks:frameless_black", {
|
|||||||
},
|
},
|
||||||
tiles = {"ontime_clocks_frameless.png"},
|
tiles = {"ontime_clocks_frameless.png"},
|
||||||
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, display_api=1},
|
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, display_api=1},
|
||||||
|
is_ground_content = false,
|
||||||
display_entities = {
|
display_entities = {
|
||||||
["ontime_clocks:display"] = {
|
["ontime_clocks:display"] = {
|
||||||
depth = 7/16,
|
depth = 7/16,
|
||||||
@@ -182,6 +186,7 @@ minetest.register_node("ontime_clocks:frameless_gold", {
|
|||||||
},
|
},
|
||||||
tiles = {"ontime_clocks_frameless.png^[colorize:#FF0"},
|
tiles = {"ontime_clocks_frameless.png^[colorize:#FF0"},
|
||||||
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, display_api=1},
|
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, display_api=1},
|
||||||
|
is_ground_content = false,
|
||||||
display_entities = {
|
display_entities = {
|
||||||
["ontime_clocks:display"] = {
|
["ontime_clocks:display"] = {
|
||||||
depth = 7/16,
|
depth = 7/16,
|
||||||
@@ -216,6 +221,7 @@ minetest.register_node("ontime_clocks:frameless_white", {
|
|||||||
},
|
},
|
||||||
tiles = {"ontime_clocks_frameless.png^[colorize:#FFF"},
|
tiles = {"ontime_clocks_frameless.png^[colorize:#FFF"},
|
||||||
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, display_api=1},
|
groups = {oddly_breakable_by_hand=1, not_blocking_trains=1, display_api=1},
|
||||||
|
is_ground_content = false,
|
||||||
display_entities = {
|
display_entities = {
|
||||||
["ontime_clocks:display"] = {
|
["ontime_clocks:display"] = {
|
||||||
depth = 7/16,
|
depth = 7/16,
|
||||||
|
@@ -170,6 +170,7 @@ function signs_api.register_sign(mod, name, model)
|
|||||||
model.width/2, model.height/2, 0.5 - model.depth},
|
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},
|
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(),
|
sounds = default.node_sound_defaults(),
|
||||||
display_entities = {
|
display_entities = {
|
||||||
["signs:display_text"] = {
|
["signs:display_text"] = {
|
||||||
@@ -183,21 +184,21 @@ function signs_api.register_sign(mod, name, model)
|
|||||||
},
|
},
|
||||||
on_place = display_api.on_place,
|
on_place = display_api.on_place,
|
||||||
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 and 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)
|
||||||
end,
|
end,
|
||||||
on_destruct = display_api.on_destruct,
|
on_destruct = display_api.on_destruct,
|
||||||
on_blast = display_api.on_blast,
|
on_blast = display_api.on_blast,
|
||||||
on_rotate = signs_api.on_rotate,
|
on_rotate = signs_api.on_rotate,
|
||||||
on_receive_fields = signs_api.on_receive_fields,
|
on_receive_fields = signs_api.on_receive_fields,
|
||||||
on_punch = function(pos, node, player, pointed_thing)
|
on_punch = function(pos, node, player, pointed_thing)
|
||||||
signs_api.set_formspec(pos)
|
signs_api.set_formspec(pos)
|
||||||
display_api.update_entities(pos)
|
display_api.update_entities(pos)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Node fields override
|
-- Node fields override
|
||||||
|
@@ -61,6 +61,7 @@ for i, material in ipairs(steles.materials) do
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = groups,
|
groups = groups,
|
||||||
|
is_ground_content = false,
|
||||||
display_entities = {
|
display_entities = {
|
||||||
["steles:text"] = {
|
["steles:text"] = {
|
||||||
on_display_update = font_api.on_display_update,
|
on_display_update = font_api.on_display_update,
|
||||||
@@ -72,32 +73,32 @@ for i, material in ipairs(steles.materials) do
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
minetest.rotate_node(itemstack, placer, pointed_thing)
|
minetest.rotate_node(itemstack, placer, pointed_thing)
|
||||||
return display_api.on_place(itemstack, placer, pointed_thing)
|
return display_api.on_place(itemstack, placer, pointed_thing)
|
||||||
end,
|
end,
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
set_formspec(pos)
|
set_formspec(pos)
|
||||||
display_api.on_construct(pos)
|
display_api.on_construct(pos)
|
||||||
end,
|
end,
|
||||||
on_rightclick = function(pos)
|
on_rightclick = function(pos)
|
||||||
set_formspec(pos)
|
set_formspec(pos)
|
||||||
end,
|
end,
|
||||||
on_destruct = display_api.on_destruct,
|
on_destruct = display_api.on_destruct,
|
||||||
on_blast = display_api.on_blast,
|
on_blast = display_api.on_blast,
|
||||||
on_rotate = display_api.on_rotate,
|
on_rotate = display_api.on_rotate,
|
||||||
on_receive_fields = function(pos, formname, fields, player)
|
on_receive_fields = function(pos, formname, fields, player)
|
||||||
if not minetest.is_protected(pos, player:get_player_name()) then
|
if not minetest.is_protected(pos, player:get_player_name()) then
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
if fields.ok or fields.font then
|
if fields.ok or fields.font then
|
||||||
meta:set_string("display_text", fields.display_text)
|
meta:set_string("display_text", fields.display_text)
|
||||||
meta:set_string("infotext", "\""..fields.display_text.."\"")
|
meta:set_string("infotext", "\""..fields.display_text.."\"")
|
||||||
display_api.update_entities(pos)
|
display_api.update_entities(pos)
|
||||||
end
|
|
||||||
if fields.font then
|
|
||||||
font_api.show_font_list(player, pos)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end,
|
if fields.font then
|
||||||
|
font_api.show_font_list(player, pos)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
on_punch = display_api.update_entities,
|
on_punch = display_api.update_entities,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user