- Current behaviour is that when destroyers/defenders are created their target position is set to the entity that killed them.
- If a player picks up the artillery after the capsules spawn then they lose their cause.target and stop, not reaching the cause of the turret death.
- I've changed this behaviour so that if the target.cause is artillery then it spawns a defender/destroyer projectile NOT an entity. The projectile target can therefore be a position not an entity. So the capsules won't stop if the artillery is picked up.
- If the cause is not artillery turret or wagon then a destroyer/defender capsule entity is spawned instead of a projectile because a projectile cannot track the player.
- If the player picks up the artillery turret before the projectile that kills a turret arrives then the event cause.name will be missing and no bots spawn at all. I have changed the behaviour so that "if not cause" then we assume they're doing something fucky. We won't have the entity cause name or position, so let's just spawn double the normal amount of destroyers and just send them at 0, 0 since we know nothing else to do with them.
- Added spidetron to artillery_target_entities list
- Added code to fire a rocket at spidertrons as well as the non-damaging artillery
- Tested effect of 4 and 8 artillery rockets on spidertron. Kills shields quick but spidertron takes about a minute to die. Enough to deter them from staying too long but not too OP.
When a combat robot expires and is targeting an artillery wagon, it will now explode. This is a work around for a factorio bug where combat robots do not attack artillery wagons.
- Changed get_inventory(1) to get_inventory(defines.inventory.character_main) to make it clearer which inventory we're getting.
- changed area charted to 3x3 full chunks cented on the chunk containing the pinged coordinate. Will now charta 96x96 tile area which is more reasonable considering the cost of /spy
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.