烹饪基本流程完成

This commit is contained in:
2025-08-08 17:22:47 +08:00
parent b09eeeef18
commit 6fafddc43d
12 changed files with 75 additions and 6 deletions

View File

@ -0,0 +1,20 @@
local CookMaterialUtils = {}
local Utils = require("GamePlay.Utils")
function CookMaterialUtils.TemperatureToDoneness(temperature)
return math.floor(temperature / 70)
end
function CookMaterialUtils.GetCookwareOpNextState(cookward_id, cook_material_id, temperature)
local config = Utils.GetDataTableConfig(
"CookMaterialStateConfig", cook_material_id
)
if not config then return nil end
local doneness = CookMaterialUtils.TemperatureToDoneness(temperature)
local doneness_config = config.CookConfig:Get(doneness)
if not doneness_config then return nil end
return doneness_config.CookwareNextStateID
end
return CookMaterialUtils