Project Zomboid

Project Zomboid

[B41/B42] Item Condition
Hx 27. dec. 2024 kl. 6:38
2
B42 Bug Fix
2852309899\mods\qdx_item_condition\42\media\lua\client\qdx\item_condition\ItemConditionUtil.lua
function ItemCondition.Util:GetItemCondition(a_item) local condition = 0.0 if self:IsItemHandWeapon(a_item) then local percent = a_item:getCondition() / a_item:getConditionMax() condition = ItemCondition.Math:Clamp(percent, 0.0, 1.0) elseif self:IsItemWaterSource(a_item) then condition = ItemCondition.Math:Clamp(a_item:getUsedDelta(), 0.0, 1.0) end return condition end




↓ Change ↓

function ItemCondition.Util:GetItemCondition(a_item) local condition = 0.0 if self:IsItemHandWeapon(a_item) then local percent = a_item:getCondition() / a_item:getConditionMax() condition = ItemCondition.Math:Clamp(percent, 0.0, 1.0) elseif self:IsItemWaterSource(a_item) then condition = ItemCondition.Math:Clamp(a_item:getCurrentUsesFloat(), 0.0, 1.0) end return condition end



Fix Mod
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3394609418
Sidst redigeret af Hx; 15. jan. kl. 22:47
< >
Viser 1-4 af 4 kommentarer
Sick Boy 27. dec. 2024 kl. 11:40 
Nice.

This works.
LordCamelot 4. jan. kl. 4:19 
You're a genius bro. Thanks a lot !
ibu 8. jan. kl. 21:08 
Thanks!
Choko 18. mar. kl. 15:34 
This no longer works in the latest version.
< >
Viser 1-4 af 4 kommentarer
Per side: 1530 50