ta1 hammer and power_available bugs fixed

master
Joachim Stolberg 2020-08-08 12:31:42 +02:00
parent 96b227da2d
commit 157c050d87
2 changed files with 3 additions and 1 deletions

View File

@ -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)

View File

@ -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()