Project Zomboid

Project Zomboid

[B42] Lesley's Cookable Containers [Discontinued]
此主题已被锁定
star 2024 年 12 月 29 日 下午 11:23
Consider better way to patch the game, pls
Using Lua files
local SM = ScriptManager.instance local item = SM:getItem("Base.Saucepan") if item then item:DoParam("IsCookable = true") item:getTags():add("Cookable") end
< >
正在显示第 1 - 6 条,共 6 条留言
star 2024 年 12 月 29 日 下午 11:26 
It makes that the mod won't break anything when Indie Stone fires an update whatever they fix.
最后由 star 编辑于; 2024 年 12 月 29 日 下午 11:26
Miss Pauling  [开发者] 1 月 1 日 下午 8:54 
Thanks! I am still not all too familiar with lua tho I am working on it. I don't have a ♥♥♥♥ ton of motivation to work on this mod at the moment but I will patch it very soon, I am also still looking to make more pans and trays into cookable water containers so if I find the time and energy I'll work on the mod anyway and I'll consider using lua files.
star 1 月 2 日 上午 1:37 
The script can be designed with all ids in a separate table, so adding new names will be as easy as pie. ;)
local ALL_POTS = { "Base.Saucepan", "Base.BucketEmpty", "Base.ClayMug", } local SM = ScriptManager.instance for _,id in pairs(ALL_POTS) do local item = SM:getItem(id) if item then item:DoParam("IsCookable = true") item:getTags():add("Cookable") end end
最后由 star 编辑于; 1 月 2 日 上午 1:44
star 1 月 2 日 上午 1:43 
The good news is that you can include ids from other mods in this list without any problems.
Miss Pauling  [开发者] 1 月 9 日 上午 7:33 
引用自 star
The good news is that you can include ids from other mods in this list without any problems.
What would be the file structure for this? Just media/lua/shared?
star 1 月 9 日 上午 9:48 
Yes.
< >
正在显示第 1 - 6 条,共 6 条留言
每页显示数: 1530 50