[boskid][2.0.12] defines.space_platform_state is missing the define for number 7

This subforum contains all the issues which we already resolved.
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 373
Joined: Tue Jul 08, 2014 10:06 am
Contact:

[boskid][2.0.12] defines.space_platform_state is missing the define for number 7

Post by LuziferSenpai »

Hey,

after playing around with platforms, I noticed that one number you get from the event defines.events.on_space_platform_changed_state is missing its define counterpart.
10-29-2024, 10-16-50.png
10-29-2024, 10-16-50.png (51.61 KiB) Viewed 687 times
Reproduce:
  1. Make a new savegame, I used the small testing envoirment + cheat mode
  2. Use the command:

    Code: Select all

    /c
    script.on_event(defines.events.on_space_platform_changed_state, function(event)
        local stateTable = {
            "Waiting for starter pack",
            "Starter pack on the way",
            "On the path",
            "Waiting for depature",
            "No schedule",
            "No path",
            "Waiting at station",
            "???",
            "Starter pack requested"
        }
    
        game.print("New State: " .. stateTable[event.platform.state + 1])
        game.print("Old State: " .. stateTable[event.old_state + 1])
    end)
    
  3. Create a new space platform
  4. Look at the chat:
    10-29-2024, 10-18-45.png
    10-29-2024, 10-18-45.png (249.32 KiB) Viewed 687 times
  5. Other option is to use:

    Code: Select all

    /c game.print(game.players[1].force.platforms[1].state)
    10-29-2024, 10-24-43.png
    10-29-2024, 10-24-43.png (17.48 KiB) Viewed 682 times
Greetz,

Luzifer
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2820
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [boskid][2.0.12] defines.space_platform_state is missing the define for number 7

Post by boskid »

Thanks for the report. Issue is now fixed for 2.0.13.

In the meantime as a workaround you can add this line on top of your control.lua:

Code: Select all

defines.space_platform_state.paused = 7

Post Reply

Return to “Resolved Problems and Bugs”