raiguard / EditorExtensions

Extends the Factorio map editor with new features, testing tools, and other utilities to aid with sandbox play and scenario creation.
https://mods.factorio.com/mod/EditorExtensions
Other
28 stars 11 forks source link

[Enhancement] Add ability to set mod context for running code snippet #164

Closed kryojenik closed 6 months ago

kryojenik commented 9 months ago

Description

Add the ability to specify mod context when running a code snippet.

Admittedly this may be ignorance on my part, but the only way I have been able to run a snippet is to drag an area on the map while the snippets are open. It prepends an area=... statement to the code that is executed. As far as I know the __MOD_NAME__ qualifier needs to be the first line in order to set a context.

There have been a few times where I wanted to work with a particular mods global data with something more than a one-liner. Being able to set a mod context (preferably via a drop down) would be kinda helpful.

Reproduction

No response

raiguard commented 6 months ago

EE can't add any new features to the editor GUI itself. I will consider adding this capability to the base game for 2.0 though.