Closed ysaroka closed 11 months ago
And also that, when reacting, they simply approached the object, and did not break it
I think that the possibility of adding a custom irritant won't be implemented in general. There are methods, EntityAI.OnWorkStart() and EntityAI.OnWorkStop(), to which I can subscribe for enabling or disabling the irritant. However, the problem is that these methods are completely overridden in modded items. For instance, in the "SimpleMatch" mod, meaning I can't add them universally in ItemBase.OnWork*() because they will still be overridden in child classes. Consequently, I don't see a way out of the situation, except to search for a method to initiate my own loop for items that trigger irritation. The last time I attempted this, it resulted in a significant drop in server FPS because I utilized the Timer class.
Implemented, will be added in the next update.
Add the ability to include custom irritant items in config. An essential condition will be the presence of the CEM (EnergyManager) in the irritant item class.