i Could this mod be altered to do the same thing to enemies?
I was just wondering if you think it would be possible to do the exact same thing to enemies as this mod does to the player? That way trains wouldn't be stopped and destroyed by aggravated enemies hanging out on the tracks.
You could, but it would probably lag out the game a fair bit using this mods approach.
The mod looks for any trains near each player, if it's finds any it then does further checks to see if there is danger. So a few checks per player.
But for bitters and trains you'd have to check for each train if any biters where near. So a few checks for many trains.
I would think looking at how train damage is done on impact would be better.
Yeah, that's what I started to think when I took a look at your code. I came to the same conclusion of increasing impact damage too, and that's just what I did here: https://gfycat.com/DefiantForsakenKarakul
I can't seem to upload it here though for some reason. Keep getting an "unknown error".
I'm posting here as it's similar, but would it be possible to have this available as a form of power armor item as well? Keep the threat of being hit, but add in an item that will react when equipped.
And in the same vein, would it be possible to have it just affect Xterminator who has quite a lovely history with trains?
logged as new suggestion: https://mods.factorio.com/mod/splatter_guard/discussion/5be4c80c46c1ee000ba6d2a1