haha, thanks for considering my ideas. I am still studying the UI APIs. Very disappointed by how we are restricted to create left-aligned buttons while the default buttons in Factorio are right-aligned.Nexela wrote:I shoulda took a nap now I am gonna be tired!!!!
It loads, it works. now I just have to figure out where my typo is causing it not to save . and then after that I need to logicify a lot of stuff. Why did there have to be so many changes from .12.1 to .13!!!!
And I agree on the UI. It needs help. One of the first things I am gonna do after I get it functional is switch it around so it pops up with the default UI. Then I am gonna take two asprin and work on the gui layout and possibly get rid of the tacky window at the top or if I keep it make it more YARM Like. Ohhhh popups gonna have to look into how that works!
One of the things I had actually started commenting into the code before I even seen your additional requests was TODO - Force/All? for messages.
I also am going to add in unit/player alarms to trigger when people/biters get in range. And also as per your request broadcast a distance. Since I don't have the code in front of me ATM I might have to bump up the delay a bit to keep script timers down. pseudo message table:
{id{msg, alert{popup,console,flying,sillydefaultgui}, broadcast{person/force/surface/world?}, Lampposition{x,y}}
So Many Ideas!!!!
After this is all functional or least basicly functional It will get revamped into a new mod with additional combinator related stuff based on a couple more older mods. Mostly related to trains. 1st one being an individual cargo-wagon/loco cargo reader. and the second one that adds/remove tracks based on signal conditions so setting a train signal to red will finally do something more usefull then close a gate. And lets not forget I still want to do a GUI for autofill! Busy Busy beaver
As for the UI display problem, I think you can use LuaPlayer.opened to check whether the entity is selected in on_tick. I see this method used in some other mods, including Choumiko's SmartTrains.
And yesterday, I saw this mod too: https://mods.factorio.com/mods/Zinal/Custom_Events. I haven't looked into it yet but based on its description, it seems to be exactly for this purpose.
For popup message, I am thinking about just add a "frame" on player.gui.center with a "label" and "button" inside it. But maybe also need to add a "flow" to contain the frames vertically. I will show you the preview or even the code when I get the time to make it.
No need to rush. I am busy on making mods too. I have many crazy ideas but don't know whether they are doable or not. Before 0.13 becomes stable, I will concentrate on developing mods instead of actually playing the game.