Changing the format for writing chain-calls for FormSpecs.

This commit is contained in:
Van
2026-04-13 22:06:02 +03:00
parent c172198ff7
commit 7661cacbfe
7 changed files with 92 additions and 90 deletions

View File

@@ -28,22 +28,22 @@ local function getFormSpecString(self, playerName, isSelect)
end
end
listForm:
scrollContainer(listFormItems, 0.5, 0.5, 8, 6, 'work_station:list_items', 'vertical'):
scrollbar(8, 0.5, 0.25, 7, 'vertical', 'work_station:list_items')
listForm
:scrollContainer(listFormItems, 0.5, 0.5, 8, 6, 'work_station:list_items', 'vertical')
:scrollbar(8, 0.5, 0.25, 7, 'vertical', 'work_station:list_items')
if isSelect then
local stage = craft.stagesByName[craft.startStageName]
local outputDef = core.registered_nodes[craft.output]
listForm:
itemImage(9, 0.5, 2, 2, craft.output):
areaLabel(9, 6, 2, 1, 'Start crafting:'):
button(9, 6.5, 3, 1, 'work_station:start_craft', 'x1'):
button(12, 6.5,3, 1, 'work_station:start_craft', 'x10'):
areaLabel(11.5, 0.5, 4, 4,
outputDef._title..'\n'..
outputDef._description):
areaLabel(9, 2.5, 6, 4, 'Craft description:'..'\n'..craft:toString())
listForm
:itemImage(9, 0.5, 2, 2, craft.output)
:areaLabel(9, 6, 2, 1, 'Start crafting:')
:button(9, 6.5, 3, 1, 'work_station:start_craft', 'x1')
:button(12, 6.5,3, 1, 'work_station:start_craft', 'x10')
:areaLabel(11.5, 0.5, 4, 4,
outputDef._title..'\n'..
outputDef._description)
:areaLabel(9, 2.5, 6, 4, 'Craft description:'..'\n'..craft:toString())
end
return listForm:toString()