Armor Plating

by VortiK

Adds armor plating equipment to increase vehicles hitpoints and improve their survivability. - Supports AAI Vehicles. - Supports Angel's Heavy Tank. - Has built in mod support.

Content
3 years ago
0.16 - 1.1
11.8K
Armor

g Performance leak

4 years ago

About the previous discussion in Krastorio compatibility, I have another suggestion to give u.
I see that u use on_entity_damaged for modify the incoming damage, "WITHOUT FILTERS", this mean that each time there's a wave of biters ur mod will consume a lot of ups because ur script manage an event for each shot on a biters, in end game this is very high quantities of callbacks.
Fortunately on_entity_damaged event support LuaEntityDamagedEventFilters, apply a filter like:
filter = {
{ filter = "vehicle" }
}
script.blabla(eventname, func, filter)

Will improve ur ups consume.

4 years ago

yep, noticed the same when playing with fire department... that filter would really help in certain scenarios

4 years ago

Hello,

Thanks for the feedback and suggestion, I've push a new version with a filter on the on_entity_damaged event.

Let me know if it works better in your "fire prone" situations :)

4 years ago

thx, it turned out that i had another issue :) but i also added the filter to all my mods, i guess it helps :)

3 years ago

The filter won't work reliably (it does now, since 0.18.27 -- but there still are people who use 0.18.26 or older). So, keeping in a fall-back filter at the top of the function still is required UNLESS your mod depends on "base >= 0.18.27".

New response