LuaEntity::custom_state_string

braxbro
Inserter
Inserter
Posts: 27
Joined: Sun Jan 01, 2023 2:54 am
Contact:

LuaEntity::custom_state_string

Post by braxbro »

Hi. I noticed lately that disabling machines via script leads to a terribly unhelpful 'disabled by script' tooltip. Basegame entities have things like 'no power' or 'no ingredients' or the like for these tooltips, which can be really helpful to newer players wanting to troubleshoot their setups.

Hence, I propose a way to set a custom tooltip to override the text of the default states so that mods like Pyanodon's Alien Life can, for example, say 'missing <insert item here>' when they turn off their machines due to lack of the proper modules. Being able to do so would allow mods to have similar explanations to basegame entities, even when mods use scripts, compound entities, etc. to create custom mechanics and limitations.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: LuaEntity::custom_state_string

Post by Deadlock989 »

+1
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 614
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: LuaEntity::custom_state_string

Post by raiguard »

Implemented for 2.0 as LuaEntity::custom_status read/write. You can specify both the diode color and the label text.

LuaEntity::status read and working visualisations will remain unchanged - the custom status will only show in GUIs.
Don't forget, you're here forever.
User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 419
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: LuaEntity::custom_state_string

Post by Stringweasel »

:D
Alt-F4 Author | Factorio Modder
My Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby
Official Contributor to Space Exploration
Post Reply

Return to “Implemented mod requests”