- 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.
When a scenario fails to start the restarting state was not reset, which prevented another restart from being started. We now clear the restarting flag.
* Simple entity removal in Builders
Performance could be improved
* Removed rocks parameter
The increased radius caused simple-entity to work
* Added another way to remove units that should be more efficient
* Changed find_entities to use area instead of radius
* removed remove_units function
* changed function name from names to name
* added table.shallow_copy
* reworked 'remove_*' builders
* used remove_* builders for existing maps
* update .luacheckrc
* Added links to documentation for each public function
* Added links for new functions