I was working on extension to The Ruins Mod and am wondering about compatibility with Robot Army.
Problems I found are:
- Force created by Ruins is ignored on init causing crashes on bot deploy.
- Ruins use unhandled event when spawning entities. defines.events.script_raised_built
Proposed changes (don't crash instantly):
In control.init_robotarmy() replace:
event.force = game.forces["player"]
handleForceCreated(event)
event.force = game.forces["enemy"]
handleForceCreated(event)
event.force = game.forces["neutral"]
handleForceCreated(event)
with forces iteration: https://pastebin.com/nvyj25UL
In control register event handler:
script.on_event(defines.events.script_raised_built, handleOnScriptRaisedBuilt)
In eventhandlers add: https://pastebin.com/Hixxmjsk