准备制作食材预处理流程,为lua直接读data table做基建

...
This commit is contained in:
2025-08-19 03:23:36 +08:00
parent 6fafddc43d
commit 626808fde9
29 changed files with 328 additions and 51 deletions

View File

@ -0,0 +1,40 @@
local PreCookStationPanel = {}
local PRE_COOK_TOOL_CNT = 3
function PreCookStationPanel:ctor()
self.cook_tool_slots = {}
end
function PreCookStationPanel:OnInitialized()
self.BackBtn.OnClicked:Add(function() self:BP_Close() end)
self.cook_tool_slots = {}
for i = 1, PRE_COOK_TOOL_CNT do
local slot_name = "PreCookToolSlot_" .. tostring(i)
table.insert(self.cook_tool_slots, self[slot_name])
end
end
function PreCookStationPanel:Construct()
self:Refresh()
end
function PreCookStationPanel:Destruct()
end
function PreCookStationPanel:Refresh()
self:RefreshPreCookTools()
end
function PreCookStationPanel:RefreshPreCookTools()
local display_tools = {"PCT0001"}
for i = 1, PRE_COOK_TOOL_CNT do
self.cook_tool_slots[i]:SetPreCookToolID(display_tools[i])
end
end
return Class(nil, nil, PreCookStationPanel)