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

This subforum contains all the issues which we already resolved.
PigStyle
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Jul 06, 2023 2:29 pm
Contact:

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

Post 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.
Attachments
factorio-current.log
(17.63 KiB) Downloaded 12 times
Screenshot_20250424_051527.png
Screenshot_20250424_051527.png (1.39 MiB) Viewed 318 times
Genhis
Factorio Staff
Factorio Staff
Posts: 792
Joined: Wed Dec 24, 2014 8:19 am
Contact:

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

Post by Genhis »

Thanks for the report, it's fixed for 2.0.46.
Post Reply

Return to “Resolved Problems and Bugs”