Factorio version: 2.1.14
DLCs: no
Description:
This is a follow-up to 135356
The crash has been fixed (thanks!), but set_command() itself still does not work properly: the unit group simply switches to the gathering state and stays like that until it expires.
It does not matter which command is used — command.flee, command.go_to_location, or others — they all result in the group getting stuck in the gathering state when called in on_build_base_arrived
As a result, you can get this: Steps to reproduce:
- Load the game with the attached mod
- Place the test entity (commandable-crash-test-chest)
- Wait for the biters to send an expansion group, or trigger it manually using /c game.get_surface("nauvis").build_enemy_base({ 15 , 15 }, 5, game.forces["enemy"])
- Once the group arrives at its destination, it will get stuck in the gathering state.
Upon executing set_command() with type = defines.command.flee, the group should disband and the biters should flee from the entity specified in the "from" parameter as it happens in 2.0.77
Similarly, type = defines.command.go_to_location should force the group to move to the specified location.

