I'm trying to do own mod and stuck with strange behavior issue. I'm creating special usage to several items on right click. My custom action is performed and used tool should be damaged. And? of course, once tool's durability is reached it cracks. Crack sound is played, tool disappears from toolbar. BUT if i click with mouse into empty cell in toolbar that tool reappears with full durability.
I suppose that in spite it is removed from ItemSlot, some references are still somewhere and I can't find what else I should do to permanently destroy broken tool.
Any suggestions?
Here is a short mod example for easier reproducing of described problem. Just take any spear in hand and right click. It will break. But if you left click with mouse into inventory slot it will resurrect.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
CollectibleObject.DamageItem does not destroys item completely?
in Mods & Mod Development
Posted
Hi,
I'm trying to do own mod and stuck with strange behavior issue. I'm creating special usage to several items on right click. My custom action is performed and used tool should be damaged. And? of course, once tool's durability is reached it cracks. Crack sound is played, tool disappears from toolbar. BUT if i click with mouse into empty cell in toolbar that tool reappears with full durability.
I suppose that in spite it is removed from ItemSlot, some references are still somewhere and I can't find what else I should do to permanently destroy broken tool.
Any suggestions?
Here is a short mod example for easier reproducing of described problem. Just take any spear in hand and right click. It will break. But if you left click with mouse into inventory slot it will resurrect.