烹饪基本流程完成
This commit is contained in:
20
Content/Lua/Utils/Cook/CookMaterial.lua
Normal file
20
Content/Lua/Utils/Cook/CookMaterial.lua
Normal 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
|
||||
Reference in New Issue
Block a user