Removing entities on a space platform via right-click fires the `on_space_platform_built_entity` event with `player_index` field populated in the event object.
Removing via cut action or removal blueprint does NOT include `player_index` in the event callback.
Both of these actions are performed by a player and affect the undo/redo stack, so IMO should indicate which player performed them.
Use case: updating entity tags in the undo stack after removal with data a mod needs to restore the previous game state if undo is triggered.
[2.0.28] player_index missing from some `on_space_platform_built_entity` events
Re: [2.0.28] player_index missing from some `on_space_platform_built_entity` events
That is absolutely Not a bug. on_space_platform_built_entity is raised when a space platform builds entity. Player can only request entities to be built by placing ghosts. on_space_platform_built_entity does not contain player_index for the same reason why on_robot_built_entity does not contain player_index.
- IsaacOscar
- Filter Inserter
- Posts: 843
- Joined: Sat Nov 09, 2024 2:36 pm
- Contact:
Re: [2.0.28] player_index missing from some `on_space_platform_built_entity` events
I had a similar problem, event.entity.last_user should hopefully give the player that built the ghost.