Project Zomboid

Project Zomboid

[B41/B42] Item Condition
Hx 27.12.2024 klo 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
Viimeisin muokkaaja on Hx; 15.1. klo 22.47
< >
Näytetään 1-4 / 4 kommentista
Nice.

This works.
You're a genius bro. Thanks a lot !
Thanks!
This no longer works in the latest version.
< >
Näytetään 1-4 / 4 kommentista
Sivua kohden: 1530 50