Blueprint Variables


This adds circuit signals to the game that when blueprinted, provides an interface to quickly apply changes to all circuit conditions. Additionally, it will update named entities, such as train station names.

Utilities
8 months ago
1.1
4.80K
Trains Logistic network Circuit network Blueprints

g Brackets in train station name causes crash

6 months ago

I have a train station which I want to name "[VARIABLE1] Load" and this causes the mod to crash:

Die Mod Blueprint Variables (0.1.5) hat einen Fehler verursacht, der nicht behoben werden kann.
Bitte informiere den Autor der Mod über diesen Fehler.

Error while running event blueprint-variables::on_gui_click (ID 1)
blueprint-variables/variables-manager.lua:400: malformed pattern (missing ']')
stack traceback:
[C]: in function 'gsub'
blueprint-variables/variables-manager.lua:400: in function 'applyNames'
blueprint-variables/gui.lua:55: in function 'handler'
flib/gui-lite.lua:177: in function <flib/gui-lite.lua:160>

6 months ago

Okay, fixed it :-)
If anyone else wants to deal with the thing until the Space Age comes out, change the patterns to this in variables-manager.lua:

local newNewMatch = "%=(blueprint%-variable%-[%w%-%_]+)"
local newTrainMatch = "(blueprint%-variable%-.+)"

local newDoubleMatch = "([%w%-%]+%=(blueprint%-variable%-[%w%-%]+))"

New response