Read/Write editor settings

User avatar
Gergely
Filter Inserter
Filter Inserter
Posts: 666
Joined: Sun Apr 10, 2016 8:31 pm
Contact:

Read/Write editor settings

Post by Gergely »

Title. Ability for script to read and modify the Map Editor settings of a player.
Rseding91
Factorio Staff
Factorio Staff
Posts: 17239
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Read/Write editor settings

Post by Rseding91 »

I'll see about adding it, but what's the use-case?
If you want to get ahold of me I'm almost always on Discord.
User avatar
Gergely
Filter Inserter
Filter Inserter
Posts: 666
Joined: Sun Apr 10, 2016 8:31 pm
Contact:

Re: Read/Write editor settings

Post by Gergely »

My use case is writing scripts that respect those settings.
  • When marking a building for deconstruction via order_deconstruction, specifying a player causes the entity to be removed if the player is in editor mode and has the instant deconstruction setting enabled. It also adds to their undo stack. This is expected behavior. However, the script cannot predict whether this will happen beforehand.
  • When building a blueprint using build_blueprint, unlike order_deconstruction, this method does not respect the specified player's instant building setting and always places ghosts. (Nor does it affect their undo stack which might be a bug!!) Therefore I need to be able to tell whether the player has the setting enabled and if so, have the script revive the resulting ghosts immediately.
  • I would like to change the defaults for some editor settings. For example: Enable infinity filters by default every time I start a new save in the scenario.
Post Reply

Return to “Implemented mod requests”