Added discord notification for the @crash site role when crash site is restarted using the /restart command. Pings users with @Crash Site role and prints the map time to add to competitiveness.
Space race has a bug that sometimes a rock will spawn where the silo needs to be. But the code only removes trees. This will allow me to call a function to delete rocks.
- Changed behaviour for non-admins. Now checks for spawners, biters and turrets but doesn't require walls and power structures to be destroyed for restart
- Added checks to limit non-admins from changing the scenario by using an argument after /restart. Now defaults to current scenario for non-admins.
Updated crash site /restart command so that guests and regulars can call it when map is cleared
- Only admin can abort, once the map is cleared.
- Guests and Regular can both call /restart when all enemy units and structures are dead
- Tested on S10 by running this command:
/c local surface=game.player.surface
for key, entity in pairs(surface.find_entities_filtered({force="enemy"})) do
entity.destroy()
end
- Need to merge into develop to test on live server in case conditions at the end of the game are different
- Thought about adding rocket launched condition but decided against it.
Originally proposed change to allow for a numerical surface_index to work with the diggy-clear-void debugging command. But found that command works as is by using the text 'redmew' as the surface index. Discarded proposed change and documented example use in comments to help clarify how to use.
Fixes an infrequent bug in hail_hydra that has existed a long time. Currently Factorio does not allow enemy entitities of type 'turret' to target entities of type 'car' (includes cars and tanks). Doing so logs an error. If this changes in the future then the condition cause.type ~= "car" below can be removed.