Integrated Circuitry

by judos

Status bars, compact-combinators to hide your gigantic circuitry inside a 2x2 entity with has 12 io-ports, circuit-poles, optimized lamps for displays. (All UPS friendly)

Content
4 years ago
0.15 - 0.18
53
Circuit network

i Proper Savingto blueprint implementation hint

3 years ago

To save lua table to blueprint an invisible programmable speaker entity can be used.
Just place it over compact combinator so it's always blueprinted together with it. Or just use it as base entity.

It has alarm text.
Using serpent.line a lua table is turned into text and saved into alarm text.
When entity is built read programmable speakers alarm text back to your mods data.

It's counter intuitive I know, but it works.
Don't be misguided that alarm message is short. I've tested it with 1000000 chars string. It saved and loaded happily. I use this trick in some of my mods.

3 years ago

:D hahaha that is genious. I saw that there's already some tags on blueprints, but it's too much of a hastle to actually be able to set those in every way a blueprint can be created... So yes this is a good idea for blueprinting! Thanks for the idea.
As you might have seen right now I used constant-combinator and store some id on it and then store blueprints somewhere. But the drawback is it does not work cross maps of course...

3 years ago

With this trick you can also:
1) destroy surface on exit - because all the data is stored you no longer have reason to keep it. This greatly simplifies surface management and you also no longer need surfaces interconnection because you can just create invisible combinators on the base surface when player exited edit mode.

And with could make it recursive - allow to place same entity inside.

Why? Because this not just hides logics, but allows to turn them into "functions". But for this to work good namings and icons are needed.

3 years ago

FWIW, the correct implementation for blueprinting is to use entity-with-tags to store an arbitrary lua table -- tables, strings, numbers, etc, all basic types -- and then recover the data from that. Using the programmable speaker (or a constant combinator with an infinite number of slots) is the hack that entity-with-tags was specifically intended to replace.

3 years ago

FWIW, the correct implementation for blueprinting is to use entity-with-tags to store an arbitrary lua table -- tables, strings, numbers, etc, all basic types -- and then recover the data from that. Using the programmable speaker (or a constant combinator with an infinite number of slots) is the hack that entity-with-tags was specifically intended to replace.

No. It won't do (won't replace). Because "tags" only live in ghosts. Not in actual entities. Because of some strange dev's logic they don't allow tags on normal modded entities, but do allow on ghosts. So if you use Programmable speaker trick - you don't have to bother about ANY events with that entity - it just lives inside it and travels all the way togather with it. If you use "entity-with-tags" you have to do jumps and wistles to make it work. I don't really understand why can't all entities just have this field forever.

New response