Use mcl_formspec.get_itemslot_bg_v4 instead of mcl_formspec.get_itemslot_bg

This commit is contained in:
2025-12-07 18:19:19 +01:00
parent 42378a4331
commit 29b5a6c996
18 changed files with 54 additions and 52 deletions

View File

@@ -187,22 +187,22 @@ function industrialtest.Miner.getFormspec(self,pos)
local powerPercent=meta:get_int("industrialtest.powerAmount")/meta:get_int("industrialtest.powerCapacity")*100
local formspec={
"label[0.7,1.15;"..S("Drill").."]",
"list[context;drill;0.7,1.5;1,1]",
industrialtest.internal.getItemSlotBg(0.7,1.5,1,1),
"list[context;drill;0.7,1.5;1,1]",
"label[0.7,2.75;"..S("Pipe").."]",
"list[context;src;0.7,3.1;1,1]",
industrialtest.internal.getItemSlotBg(0.7,3.1,1,1),
"list[context;src;0.7,3.1;1,1]",
"label[0.7,4.35;"..S("Scanner").."]",
"list[context;scanner;0.7,4.7;1,1]",
industrialtest.internal.getItemSlotBg(0.7,4.7,1,1),
"list[context;dst;2.28,1.9;5,3]",
"list[context;scanner;0.7,4.7;1,1]",
industrialtest.internal.getItemSlotBg(2.28,1.9,5,3),
"list[context;upgrades;9.1,1.2;1,1]",
"list[context;dst;2.28,1.9;5,3]",
industrialtest.internal.getItemSlotBg(9.1,1.2,1,1),
"list[context;upgrades;9.1,1.2;1,1]",
(powerPercent>0 and "image[9.1,2.29;1,1;industrialtest_gui_electricity_bg.png^[lowpart:"..powerPercent..":industrialtest_gui_electricity_fg.png]"
or "image[9.1,2.29;1,1;industrialtest_gui_electricity_bg.png]"),
"list[context;powerStorage;9.1,3.5;1,1]",
industrialtest.internal.getItemSlotBg(9.1,3.5,1,1),
"list[context;powerStorage;9.1,3.5;1,1]",
"listring[context;src]",
"listring[context;dst]"
}