Players were using remotely located artillery wagons in lakes to cheesily clear the map with no repercussions. Swarms of destroyer capsules would hover over the artillery but not target it. They would timeout and the player could then refill the wagon with ammo.
I've changed the entity_died_events file to events.lua since it now has on_entity_died, on_player_died and on_combat_robot_expired.
I have added the on_combat_robot_expired event so that when the robots timeout they explode, damaging nearby entities.
Added lines to store the unix time the restart happens as well as how many ticks the game lasted. Starting storing these now so I have some interesting data to use in a week or two.
Added changed requested by grilledham:
- Used format_time function
- Added local var to show that text string was role ID.
- Added another commented var with the ID of a test role in case we want to test something and not ping @crash_site
- Added markdown to make printed string bold
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.