emil92b
Intermediate OT User
im trying to make it so items with an armor value of 0 or greater will show up in description and aswell show other attributes such as absorbPercentFire even if the armor value is 0, without the need of setting 'showattributes' to true.
example:
how it currently output:
You see test item.
how it should output:
You see test item (Arm: 0, protection fire +20%).
tfs 1.3 *
C++:
else if (it.armor != 0 || (item && item->getArmor() != 0) || it.showAttributes) {
bool begin = true;
int32_t armor = (item ? item->getArmor() : it.armor);
if (armor != 0) {
s << " (Arm:" << armor;
begin = false;
}
example:
Lua:
<item id="1000" name="test item">
<attribute key="armor" value="0"/>
<attribute key="absorbPercentFire" value="20"/>
</item>
how it currently output:
You see test item.
how it should output:
You see test item (Arm: 0, protection fire +20%).
tfs 1.3 *
Last edited: