Fix bug #107 (Blocks not rendering properly)
This commit is contained in:
parent
80d4edb99c
commit
2d71d06dc5
@ -3,7 +3,7 @@
|
||||
TechAge
|
||||
=======
|
||||
|
||||
Copyright (C) 2019-2022 Joachim Stolberg
|
||||
Copyright (C) 2019-2023 Joachim Stolberg
|
||||
|
||||
AGPL v3
|
||||
See LICENSE.txt for more information
|
||||
@ -520,6 +520,20 @@ function NodeStates:on_beduino_request_data(pos, topic, payload)
|
||||
end
|
||||
end
|
||||
|
||||
function NodeStates.get_beduino_state(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
local nvm = techage.get_nvm(pos)
|
||||
if node.name == "ignore" then -- unloaded node?
|
||||
return 0, {techage.UNLOADED}
|
||||
elseif nvm.techage_state == RUNNING then
|
||||
local ttl = (nvm.last_active or 0) + MAX_CYCLE_TIME
|
||||
if ttl < minetest.get_gametime() then
|
||||
return 0, {techage.INACTIVE}
|
||||
end
|
||||
end
|
||||
return 0, {nvm.techage_state or STOPPED}
|
||||
end
|
||||
|
||||
-- restart timer
|
||||
function NodeStates:on_node_load(pos)
|
||||
local nvm = techage.get_nvm(pos)
|
||||
|
@ -115,7 +115,7 @@ techage.Items = {
|
||||
ta3_sequencer = "techage:ta3_sequencer",
|
||||
ta3_timer = "techage:ta3_timer",
|
||||
ta3_terminal = "techage:terminal2",
|
||||
ta3_signallamp = "techage:signal_lamp_off",
|
||||
ta3_colorlamp = "techage:color_lamp_off",
|
||||
ta3_doorblock = "techage:doorblock20",
|
||||
ta3_programmer = "techage:programmer",
|
||||
ta3_doorcontroller = "techage:ta3_doorcontroller",
|
||||
|
@ -217,7 +217,6 @@ minetest.register_node("techage:ta5_fr_controller_pas", {
|
||||
on_timer = node_timer,
|
||||
after_dig_node = after_dig_node,
|
||||
on_receive_fields = on_receive_fields,
|
||||
drawtype = "nodebox",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy=2, cracky=2, crumbly=2},
|
||||
is_ground_content = false,
|
||||
@ -257,7 +256,6 @@ minetest.register_node("techage:ta5_fr_controller_act", {
|
||||
on_timer = node_timer,
|
||||
after_dig_node = after_dig_node,
|
||||
on_receive_fields = on_receive_fields,
|
||||
drawtype = "nodebox",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy=2, cracky=2, crumbly=2, not_in_creative_inventory=1},
|
||||
drop = "",
|
||||
|
@ -54,7 +54,6 @@ minetest.register_node("techage:ta5_magnet1", {
|
||||
Cable:after_dig_node(pos)
|
||||
techage.del_mem(pos)
|
||||
end,
|
||||
drawtype = "nodebox",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy=2, cracky=2, crumbly=2},
|
||||
is_ground_content = false,
|
||||
@ -88,7 +87,6 @@ minetest.register_node("techage:ta5_magnet2", {
|
||||
Cable:after_dig_node(pos)
|
||||
techage.del_mem(pos)
|
||||
end,
|
||||
drawtype = "nodebox",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy=2, cracky=2, crumbly=2},
|
||||
is_ground_content = false,
|
||||
|
Loading…
Reference in New Issue
Block a user