This commit is contained in:
Joachim Stolberg 2020-02-01 22:08:06 +01:00
parent 4a9ca006d6
commit d4f8b742f5
6 changed files with 0 additions and 16 deletions

View File

@ -201,7 +201,6 @@ function techage.register_consumer(base_name, inv_name, tiles, tNode, validState
end
local tubelib2_on_update2 = function(pos, outdir, tlib2, node)
print("tubelib2_on_update2", tlib2.tube_type)
if tlib2.tube_type == "pipe2" then
liquid.update_network(pos, outdir, tlib2)
else

View File

@ -298,7 +298,3 @@ techage.add_grinder_recipe({input="default:jungletree", output="default:junglele
techage.add_grinder_recipe({input="default:pine_tree", output="default:pine_needles 8"})
techage.add_grinder_recipe({input="default:acacia_tree", output="default:acacia_leaves 8"})
techage.add_grinder_recipe({input="default:aspen_tree", output="default:aspen_leaves 8"})
local ndef = minetest.registered_nodes["techage:ta2_grinder_pas"] or {}
print("techage:ta2_grinder_pas", dump(ndef.tubelib2_on_update2))

View File

@ -141,13 +141,11 @@ local function node_connections(pos, tlib2)
local val = 0
local ndef = net_def2(pos, node.name, tlib2.tube_type)
local sides = ndef.sides or ndef.get_sides and ndef.get_sides(pos, node)
--print("node_connections", node.name, dump(sides))
if sides then
for dir = 1,6 do
val = val * 2
local side = DirToSide[outdir_to_dir(dir, node.param2)]
if sides[side] then
--print(side, sides[side], P2S(pos), dir, connected(tlib2, pos, dir))
if connected(tlib2, pos, dir) then
techage.mark_side("singleplayer", pos, dir, "node_connections", "", 1)--------------------
val = val + 1
@ -335,10 +333,8 @@ function techage.networks.get_network(tube_type, netID)
end
function techage.networks.delete_network(tube_type, netID)
print("delete_network", tube_type, string.format("%012X", netID))
if Networks[tube_type] and Networks[tube_type][netID] then
Networks[tube_type][netID] = nil
print("deleted")
end
end

View File

@ -123,10 +123,8 @@ techage.power.enrich_node({"techage:ta4_reactor_stand"}, {
-- controlled by the fillerpipe
techage.register_node({"techage:ta4_reactor_stand"}, {
on_transfer = function(pos, in_dir, topic, payload)
--print(topic, dump(payload))
local nvm = techage.get_nvm(pos)
if topic == "power" then
--print("power", nvm.has_power)
return nvm.has_power or power.power_available(pos, Cable)
elseif topic == "output" then
local outdir = M(pos):get_int("outdir")

View File

@ -185,7 +185,6 @@ local function can_start(pos, nvm, state)
end
local function on_node_state_change(pos, old_state, new_state)
print("on_node_state_change")
local pwr1 = techage.needs_power2(old_state)
local pwr2 = techage.needs_power2(new_state)
if pwr1 ~= pwr2 then

View File

@ -88,19 +88,15 @@ end
local function get_network_table(pos, outdir, ntype)
local netID = get_netID(pos, outdir)
print(1)
if netID then
print(2)
local netw = networks.get_network("pipe2", netID)
if not netw then
print(3)
netw = networks.collect_network_nodes(pos, outdir, Pipe)
networks.set_network("pipe2", netID, netw)
end
print("netw", string.format("%012X", netID), dump(netw))
return netw[ntype] or {}
end
print(4)
return {}
end