Moon Logic deprecated

by mk-fg

Adds Lua-programmable circuit network combinator. Based on Sandboxed LuaCombinator and LuaCombinator2 mods. Probably won't work in multiplayer games.

Content
2 years ago
1.0 - 1.1
4.97K
Circuit network

b [fixed] Error while running event Moon_Logic::on_gui_opened

4 years ago

This happens when a mlc-gui is already open and I klick on another mlc to open that gui:

1625.079 Script @Moon_Logic/control.lua:214: {
x = 6,
y = 0
}
1927.868 Error MainLoop.cpp:1207: Exception at tick 3016319: Die Mod Moon Logic (0.0.13) hat einen Fehler verursacht, der nicht behoben werden kann.
Bitte informiere den Autor der Mod über diesen Fehler.

Error while running event Moon_Logic::on_gui_opened (ID 84)
Gui element with name mlc-gui already present in the parent element.
stack traceback:
Moon_Logic/gui.lua:113: in function 'elc'
Moon_Logic/gui.lua:119: in function 'create_gui'
Moon_Logic/gui.lua:220: in function 'open'
Moon_Logic/control.lua:515: in function <Moon_Logic/control.lua:504>
stack traceback:
[C]: in function 'add'
Moon_Logic/gui.lua:113: in function 'elc'
Moon_Logic/gui.lua:119: in function 'create_gui'
Moon_Logic/gui.lua:220: in function 'open'
Moon_Logic/control.lua:515: in function <Moon_Logic/control.lua:504>

4 years ago

Hm, yeah, code kinda supports opening multiple windows for these, but for me clickin on other combinator closes that window and opens a new one.
Not entirely sure if maybe it's some factorio option that makes them work like that, but dunno how to reproduce it.

4 years ago

Do it like constant combinator: only one gui can be open at the same time.

4 years ago

Yeah, probably should, as these guis are giant anyway.

4 years ago
(updated 4 years ago)

Normally when you open a gui of an entity any other open entity-gui is closed. That is default behaviour.
In the current version of mlc any other gui remains open. Probably you should care for this too. But this is nice-to-have I guess.

4 years ago

In the current version of mlc any other gui remains open.

Yeah, weird, can't seem to reproduce it here with any two GUIs.
I.e. if I open chest and then click on MLC, chest one gets closed, MLC's opened, and vice-versa.

4 years ago

It happens only, when you first click into the edit area

4 years ago

It happens only, when you first click into the edit area

Ah, right, see that here as well, looks almost like a factorio bug :)

4 years ago

looks almost like a factorio bug

Ah, nope, that's the bug that I introduced by making "close gui" event on Esc key unfocus the editing area first, instead of closing whole gui.

4 years ago

Should be fixed in 0.0.14.

New response