[2.1.19] Script changes to platform hub checkboxes are not shown until the GUI is reopened

This subforum contains all the issues which we already resolved.
TheFritzinator
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Sep 17, 2026 2:12 am
Contact:

[2.1.19] Script changes to platform hub checkboxes are not shown until the GUI is reopened

Post by TheFritzinator »

Background

While developing a mod that manages space platforms, I noticed that changes made through the runtime Lua API to certain native platform settings were not reflected in an already-open platform GUI. I initially suspected an issue in the mod, but was able to reproduce the behavior in a fresh, unmodded Space Age save using only console commands.

The underlying property values change correctly, and reopening the platform GUI displays the new values. This suggests that the open GUI is not being refreshed after these properties are changed through script.

What did I do?

1. Opened the hub GUI of a space platform.
2. While leaving the GUI open, used the console to toggle 'LuaEntity::providing_to_other_platforms':

Code: Select all

/c local h=game.player.surface.platform.hub; h.providing_to_other_platforms=not h.providing_to_other_platforms; game.player.print("Stored value: "..tostring(h.providing_to_other_platforms))
3. Repeated with 'LuaEntity::request_missing_construction_materials':

Code: Select all

/c local h=game.player.surface.platform.hub; h.request_missing_construction_materials=not h.request_missing_construction_materials; game.player.print("Stored value: "..tostring(h.request_missing_construction_materials))
What happened?

In both cases:
  • The command printed the newly assigned value correctly.
  • Reading the property immediately after assignment returned the correct value.
  • The corresponding checkbox in the already-open platform GUI continued showing its previous state.
  • Closing and reopening the GUI made the checkbox display the correct state.
For comparison, the equivalent test with 'LuaSpacePlatform::paused' updates its open GUI control immediately:

Code: Select all

/c local p=game.player.surface.platform; p.paused=not p.paused; game.player.print("Stored value: "..tostring(p.paused))
What did I expect?

The open platform GUI checkbox should immediately reflect the new property value, as the pause-thrust toggle does.

How often does it happen?

Every time for both of these properties:
  • 'LuaEntity::providing_to_other_platforms'
  • 'LuaEntity::request_missing_construction_materials'
Additional information

Tracing back, it appears that both affected Lua API read/write properties were added in Factorio 2.1.10. It appears that their setters correctly update the platform hub state but do not refresh the corresponding checkbox in an already-open platform GUI.

The game did not produce a log for this bug, nor is a specific savegame necessary. It can be replicated in any save with the console commands provided.
Rseding91
Factorio Staff
Factorio Staff
Posts: 17556
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.1.19] Script changes to platform hub checkboxes are not shown until the GUI is reopened

Post by Rseding91 »

Thanks for the report. This is now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”