From 157c050d878c24d1b0079d4802ba1e0be232c952 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Sat, 8 Aug 2020 12:31:42 +0200 Subject: [PATCH] ta1 hammer and power_available bugs fixed --- iron_age/hammer.lua | 1 + power/node_api.lua | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/iron_age/hammer.lua b/iron_age/hammer.lua index 879baa3..dfbbf73 100644 --- a/iron_age/hammer.lua +++ b/iron_age/hammer.lua @@ -156,6 +156,7 @@ if minetest.global_exists("wielded_light") then damage_groups = {fleshy=4}, }, sound = {breaks = "default_tool_breaks"}, + light_source = 12, after_use = function(itemstack, user, node, digparams) minetest.after(0.01, handler, user:get_player_name(), node) itemstack:add_wear(digparams.wear) diff --git a/power/node_api.lua b/power/node_api.lua index a5db533..d7f9996 100644 --- a/power/node_api.lua +++ b/power/node_api.lua @@ -144,7 +144,8 @@ function techage.power.power_available(pos, Cable) local nvm = techage.get_nvm(pos) local tlib_type = Cable.tube_type local netID = nvm[Cable.tube_type] and nvm[Cable.tube_type]["netID"] - return networks.has_network(tlib_type, netID) + local netw = networks.has_network(tlib_type, netID) + return netw and netw.on and netw.alive and netw.alive > 0 end -- this is more a try to start, the start will be performed by on_power()