Page 1 of 1

[Genhis][2.0.43] Platform state changes not triggering on_space_platform_changed_state from state 2 to 6 correctly

Posted: Thu Apr 24, 2025 10:25 am
by PigStyle
When running this script to catch state changes we are not getting the state change from 2 to 6 (on_path to waiting_at_station)

Code: Select all

script.on_event(defines.events.on_space_platform_changed_state, function(event)
    local plat = event.platform
    game.print(plat.name.." has been changed state from:"..event.old_state.. ",to:" .. plat.state)
end)
Problem:
-It will catch when a platforms takes off (from state 2 to 6), but it will not catch the change from 6 to 2 when the platform reaches the destination.
-Attached is picture of platform and game.print infos using above script.
-It does not appear to matter if there is a condition that need filled or not.

How to replicate:
-Send platform to any planet starting from an idle state (waiting on conditions or just paused)

What I expected to happen:
-Change of state from 6 to 2 when leaving
-Change from state 2 to 6 when reaching destination

It happens every time.

I have debugger mods and the mod I am currently making enabled, can attach them as well if needed.

Re: [Genhis][2.0.43] Platform state changes not triggering on_space_platform_changed_state from state 2 to 6 correctly

Posted: Fri Apr 25, 2025 7:17 am
by Genhis
Thanks for the report, it's fixed for 2.0.46.