From b640c54a6af91f995974d19b739e390cb60879e0 Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Mon, 17 Sep 2018 21:30:40 +0300 Subject: [PATCH] Save the player's mouse a little.. --- elepower_machines/machines/grindstone.lua | 2 +- elepower_nuclear/machines/fusion_reactor.lua | 4 ++-- elepower_papi/network.lua | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/elepower_machines/machines/grindstone.lua b/elepower_machines/machines/grindstone.lua index ad1c27b..5d6a06a 100644 --- a/elepower_machines/machines/grindstone.lua +++ b/elepower_machines/machines/grindstone.lua @@ -146,7 +146,7 @@ ele.register_base_device("elepower_machines:grindstone", { local sttm = meta:get_int("src_time_max") if sttm > 0 then - meta:set_int("src_time", stime + 1) + meta:set_int("src_time", stime + 5) minetest.get_node_timer(pos):start(0.2) end diff --git a/elepower_nuclear/machines/fusion_reactor.lua b/elepower_nuclear/machines/fusion_reactor.lua index bea2c69..2e4301f 100644 --- a/elepower_nuclear/machines/fusion_reactor.lua +++ b/elepower_nuclear/machines/fusion_reactor.lua @@ -333,7 +333,7 @@ local function power_timer(pos) end end - meta:set_string("infotext", ("Feeding controller at %s\nLocal %s"):format( + meta:set_string("infotext", ("Connected to controller at %s\nLocal %s"):format( minetest.pos_to_string(ctrl), ele.capacity_text(localc, locals))) return refresh @@ -348,7 +348,7 @@ local function port_timer(pos) return false end - meta:set_string("infotext", "Feeding controller at " .. minetest.pos_to_string(ctrl)) + meta:set_string("infotext", "Connected to controller at " .. minetest.pos_to_string(ctrl)) return false end diff --git a/elepower_papi/network.lua b/elepower_papi/network.lua index 8c76aa8..6a711ed 100644 --- a/elepower_papi/network.lua +++ b/elepower_papi/network.lua @@ -259,7 +259,11 @@ minetest.register_abm({ pw_demand = pw_demand - pw_storage smeta:set_int("storage", 0) end - minetest.get_node_timer(spos):start(1.0) + + local t = minetest.get_node_timer(spos) + if not t:is_started() then + t:start(1.0) + end end end end,