Improve repairkit for pumps

This commit is contained in:
Joachim Stolberg 2022-09-10 20:42:31 +02:00
parent 680f411e04
commit 9f38cef427
6 changed files with 21 additions and 7 deletions

View File

@ -1098,6 +1098,8 @@ Biome=Biom
Node owner=Blockbesitzer Node owner=Blockbesitzer
Position=Position Position=Position
Position temperature=Positionstemperatur 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 Info Tool (use @= read status info)=TechAge Info Werkzeug
TechAge Repair Kit=TechAge Reparaturset TechAge Repair Kit=TechAge Reparaturset

View File

@ -1098,6 +1098,8 @@ Biome=
Node owner= Node owner=
Position= Position=
Position temperature= Position temperature=
Pump connected to no/empty tank(s).=
Pump connected to tank(s) with: @1=
TechAge Info Tool (use @= read status info)= TechAge Info Tool (use @= read status info)=
TechAge Repair Kit= TechAge Repair Kit=

View File

@ -115,6 +115,16 @@ local function read_state(itemstack, user, pointed_thing)
if owner ~= "" then if owner ~= "" then
minetest.chat_send_player(user:get_player_name(), S("Node owner")..": "..owner.." ") minetest.chat_send_player(user:get_player_name(), S("Node owner")..": "..owner.." ")
end 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).." ") minetest.chat_send_player(user:get_player_name(), S("Position")..": "..minetest.pos_to_string(pos).." ")
itemstack:add_wear(65636/200) itemstack:add_wear(65636/200)
return itemstack return itemstack