bugfixes for consumer, pumpjack and reboiler

bauxite depth set to -500
heatexchanger capa command changed
This commit is contained in:
Joachim Stolberg 2019-11-21 23:21:44 +01:00
parent ff36c809cb
commit 08c89b178a
6 changed files with 30 additions and 9 deletions

View File

@ -227,7 +227,10 @@ function techage.register_consumer(base_name, inv_name, tiles, tNode, validState
on_metadata_inventory_move = tNode.on_metadata_inventory_move,
on_metadata_inventory_put = tNode.on_metadata_inventory_put,
on_metadata_inventory_take = tNode.on_metadata_inventory_take,
networks = tNode.networks,
tubelib2_on_update2 = tNode.tubelib2_on_update2,
paramtype = tNode.paramtype,
paramtype2 = "facedir",
drop = "",
diggable = false,

View File

@ -361,7 +361,7 @@ techage.register_node({"techage:heatexchanger1"}, {
on_recv_message = function(pos, src, topic, payload)
local mem = tubelib2.get_mem(pos)
if topic == "capa" then
return mem.capa or 0
return techage.power.percent(mem.capa_max, mem.capa)
else
return State:on_receive_message(pos, topic, payload)
end

View File

@ -51,7 +51,7 @@ minetest.register_ore({
clust_scarcity = 16 * 16 * 16,
clust_size = 6,
y_max = -50,
y_min = -150,
y_min = -500,
noise_threshold = 0.0,
noise_params = {
offset = 0.5,

View File

@ -67,7 +67,7 @@ Erdöl kann nur mit Hilfe des Explorers gefunden und mit Hilfe entsprechender TA
### Bauxit
Bauxit wird nur im Untertagebau gewonnen. Bauxit findet man nur in Stein in einer Höhe zwischen -50 und -150 Meter.
Bauxit wird nur im Untertagebau gewonnen. Bauxit findet man nur in Stein in einer Höhe zwischen -50 und -500 Meter.
Es wird zur Herstellung von Aluminium benötigt, was vor allem in TA4 Verwendung findet.

View File

@ -69,8 +69,8 @@ end
local function pumping(pos, crd, meta, mem)
if has_oil(pos, meta) then
--if techage.push_items(pos, 6, items) ~= true then
if liquid.put(pos, 6, "techage:oil_source", 1) > 0 then
local leftover = liquid.put(pos, 6, "techage:oil_source", 1)
if leftover and leftover > 0 then
crd.State:blocked(pos, mem)
return
end
@ -141,8 +141,6 @@ tiles.act = {
}
local tubing = {
is_pusher = true, -- is a pulling/pushing node
on_recv_message = function(pos, src, topic, payload)
local resp = CRD(pos).State:on_receive_message(pos, topic, payload)
if resp then
@ -170,6 +168,7 @@ local _, node_name_ta3, _ =
M(pos):set_string("storage_pos", P2S(info.storage_pos))
end
end
Pipe:after_place_node(pos)
end,
networks = {
pipe = {
@ -185,6 +184,10 @@ local _, node_name_ta3, _ =
node_timer = keep_running,
on_rotate = screwdriver.disallow,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
Pipe:after_dig_node(pos)
end,
groups = {choppy=2, cracky=2, crumbly=2},
is_ground_content = false,
sounds = default.node_sound_wood_defaults(),

View File

@ -93,6 +93,9 @@ local function node_timer(pos, elapsed)
mem.liquid.amount = mem.liquid.amount - 5
local leftover = pump_cmnd(pos, "put")
if (tonumber(leftover) or 1) > 0 then
mem.liquid.amount = mem.liquid.amount + 5
mem.error = 25 -- = 5 pump cycles
M(pos):set_string("infotext", S("TA3 Oil Reboiler: blocked"))
swap_node(pos, false)
return false
end
@ -127,8 +130,20 @@ local _liquid = {
capa = CAPA,
peek = liquid.srv_peek,
put = function(pos, indir, name, amount)
local mem = tubelib2.get_mem(pos)
if mem.error and mem.error > 0 then
mem.error = mem.error - 1
if mem.error <= 0 then
M(pos):set_string("infotext", S("TA3 Oil Reboiler"))
start_node(pos)
return liquid.srv_put(pos, indir, name, amount)
else
return amount
end
else
start_node(pos)
return liquid.srv_put(pos, indir, name, amount)
end
end,
take = liquid.srv_take,
}