Improve repairkit for pumps
This commit is contained in:
parent
680f411e04
commit
9f38cef427
@ -53,7 +53,7 @@ local function ta4_formspec(self, pos, nvm)
|
||||
"box[0,-0.1;7.8,0.5;#c6e8ff]"..
|
||||
"label[3,-0.1;"..minetest.colorize("#000000", S("Pusher")).."]"..
|
||||
techage.question_mark_help(7.5, S("Optionally configure\nthe pusher with one item"))..
|
||||
techage.wrench_image(7.4, -0.05) ..
|
||||
techage.wrench_image(7.4, -0.05) ..
|
||||
"list[context;main;3.5,0.8;1,1;]"..
|
||||
"image_button[3.5,2;1,1;".. self:get_state_button_image(nvm) ..";state_button;]"..
|
||||
"tooltip[3.5,2;1,1;"..self:get_state_tooltip(nvm).."]"..
|
||||
@ -123,7 +123,7 @@ end
|
||||
local function pushing(pos, crd, meta, nvm)
|
||||
local pull_dir = meta:get_int("pull_dir")
|
||||
local push_dir = meta:get_int("push_dir")
|
||||
|
||||
|
||||
if not nvm.limit then
|
||||
local num = nvm.item_count or nvm.num_items or crd.num_items
|
||||
num = push(pos, crd, meta, nvm, pull_dir, push_dir, num)
|
||||
|
@ -86,7 +86,7 @@ local function pumping(pos, nvm, state, capa)
|
||||
local mem = techage.get_mem(pos)
|
||||
mem.dbg_cycles = (mem.dbg_cycles or 0) - 1
|
||||
local outdir = M(pos):get_int("outdir")
|
||||
|
||||
|
||||
if not nvm.limit then
|
||||
local num = pump(pos, mem, nvm, state, outdir, capa)
|
||||
if num > 0 then
|
||||
|
@ -1098,6 +1098,8 @@ Biome=Biom
|
||||
Node owner=Blockbesitzer
|
||||
Position=Position
|
||||
Position temperature=Positionstemperatur
|
||||
Pump connected to no/empty tank(s).=Pumpe an keine/leere Tank(s) angeschlossen.
|
||||
Pump connected to tank(s) with: @1=Pumpe an Tank(s) angeschlossen mit: @1
|
||||
TechAge Info Tool (use @= read status info)=TechAge Info Werkzeug
|
||||
TechAge Repair Kit=TechAge Reparaturset
|
||||
|
||||
|
@ -1098,6 +1098,8 @@ Biome=
|
||||
Node owner=
|
||||
Position=
|
||||
Position temperature=
|
||||
Pump connected to no/empty tank(s).=
|
||||
Pump connected to tank(s) with: @1=
|
||||
TechAge Info Tool (use @= read status info)=
|
||||
TechAge Repair Kit=
|
||||
|
||||
|
@ -197,8 +197,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
end)
|
||||
|
||||
|
||||
register_signallamp("techage:signal_lamp",
|
||||
S("TechAge Signal Lamp"),
|
||||
register_signallamp("techage:signal_lamp",
|
||||
S("TechAge Signal Lamp"),
|
||||
{"techage_signal_lamp.png^[colorize:#000000:100"},
|
||||
{
|
||||
type = "fixed",
|
||||
@ -209,8 +209,8 @@ register_signallamp("techage:signal_lamp",
|
||||
}
|
||||
)
|
||||
|
||||
register_signallamp("techage:signal_lamp2",
|
||||
S("TechAge Signal Lamp 2 "),
|
||||
register_signallamp("techage:signal_lamp2",
|
||||
S("TechAge Signal Lamp 2 "),
|
||||
{"techage_signallamp2.png"}
|
||||
)
|
||||
|
||||
|
@ -115,6 +115,16 @@ local function read_state(itemstack, user, pointed_thing)
|
||||
if owner ~= "" then
|
||||
minetest.chat_send_player(user:get_player_name(), S("Node owner")..": "..owner.." ")
|
||||
end
|
||||
if ndef and ndef.networks and ndef.networks.pipe2 and ndef.networks.pipe2.ntype == "pump" then
|
||||
local tbl = networks.liquid.get_liquids(pos, Pipe2)
|
||||
if #tbl > 0 then
|
||||
local names = table.concat(tbl, ", ")
|
||||
minetest.chat_send_player(user:get_player_name(), S("Pump connected to tank(s) with: @1", names))
|
||||
else
|
||||
minetest.chat_send_player(user:get_player_name(), S("Pump connected to no/empty tank(s)."))
|
||||
end
|
||||
end
|
||||
|
||||
minetest.chat_send_player(user:get_player_name(), S("Position")..": "..minetest.pos_to_string(pos).." ")
|
||||
itemstack:add_wear(65636/200)
|
||||
return itemstack
|
||||
|
Loading…
Reference in New Issue
Block a user