Implement copper cable
This commit is contained in:
10
utils.lua
10
utils.lua
@@ -36,8 +36,16 @@ local function inspectNode(pos,playerName)
|
||||
"field[0.5,5.4;2,0.5;powerAmount;"..S("Power Amount")..";"..powerAmount.."]",
|
||||
"field[0.5,6.2;2,0.5;powerIOConfig;"..S("Power IO Config")..";"..powerIOConfig.."]",
|
||||
"button[0.5,6.8;2,0.5;update;"..S("Update").."]",
|
||||
"button[4.2,1.25;2.8,0.5;triggerNeighbours;"..S("Trigger Neighbours").."]"
|
||||
"button[4.2,1.25;2.8,0.5;triggerNeighbours;"..S("Trigger Neighbours").."]",
|
||||
"label[4.2,2.25;"..S("Connections:").."]"
|
||||
}
|
||||
local connections=industrialtest.api.getConnections(pos)
|
||||
local sides={"X-","X+","Y-","Y+","Z-","Z+"}
|
||||
local sideString=""
|
||||
for _,value in ipairs(connections) do
|
||||
sideString=sideString..sides[value].." "
|
||||
end
|
||||
table.insert(formspec,"label[4.2,2.65;"..sideString.."]")
|
||||
powerStorageInspectorContext[playerName]=pos
|
||||
minetest.show_formspec(playerName,"industrialtest:power_storage_inspector_formspec",table.concat(formspec,""))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user