Project Zomboid

Project Zomboid

[B41/B42] Item Condition
Hx 2024 年 12 月 27 日 上午 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
最後修改者:Hx; 1 月 15 日 下午 10:47
< >
目前顯示第 1-4 則留言,共 4
Sick Boy 2024 年 12 月 27 日 上午 11:40 
Nice.

This works.
LordCamelot 1 月 4 日 上午 4:19 
You're a genius bro. Thanks a lot !
ibu 1 月 8 日 下午 9:08 
Thanks!
Choko 3 月 18 日 下午 3:34 
This no longer works in the latest version.
< >
目前顯示第 1-4 則留言,共 4
每頁顯示: 1530 50