xray-16
xray-16 copied to clipboard
Fix custom condition factor not saving properly (#1524)
~Doesn't work yet because pSE_InventoryItem m_fCondition is not updated correctly, and overrides the correct value.~ That issue is fixed, should be ready to merge now!
Will break saves; requires new save
credits: lucy
Fixed now - there was some code which was overriding the correct condition.
I removed that line, checked vanilla condition on save/load with multiple item types (weapon, armor, helmet, eatable item) - everything works as expected.
I also checked custom condition added with use_condition
param, and that works as expected too*
*Eatable items also need to have max_uses
defined to function properly.
Does this work with elements that only have IsUsingCondition()
flag?
@Hrusteckiy Yes, it should work. I tested some outfits out- those use FUsingCondition
flag instead of use_condition
from ltx and the condition saves/loads correctly.