Project Zomboid

Project Zomboid

[B41]Working mask improved and updated
Fragger 30 Aug, 2024 @ 6:07am
The extended version I made
Originally posted by Fͥraͣgͫger:
Thanks! I happened to make an extended version of that mod a few days ago, and it requires Working Masks to work properly. It probably works differently from yours. I haven't released it, and I don't plan to since I'm a lazy person xD.

I put the code in the discussion, so I hope it can give you some reference.

Also, one more question: according to your description, your mod runs independently, right? So I don't need to install Working Masks?

-- 延迟执行扩展,确保原始 MaskEfficiencyTable 已加载 Events.OnGameStart.Add(function() if not MaskEfficiencyTable then print("Error: MaskEfficiencyTable not initialized.") return end local NewMaskEfficiencyTable = { -- KATTAJ1 Military Pack ["Base.Military_MaskHelmet_GasMask-M80"] = 1.0, -- Military Gas Mask M80 -- OCP Gear ["Base.OCP-GasMask"] = 1.0, -- Ranger's Gas Mask } -- Merge new masks into the original MaskEfficiencyTable for mask, efficiency in pairs(NewMaskEfficiencyTable) do MaskEfficiencyTable[mask] = efficiency end print("New masks added to MaskEfficiencyTable.") end)