Panakotta00 / FicsIt-Networks

Control, Monitor, Manage and Automate your Satisfactory.
https://ficsit.app/mod/FicsItNetworks
GNU General Public License v3.0
158 stars 51 forks source link

Question #51

Closed Skyamoeba closed 4 years ago

Skyamoeba commented 4 years ago

Sorry can’t put a label on this as I’m on my IPad and I don’t think this has loaded well.

Will this kind of like Computercraft or expanded with more functionality as if so, would something like the below work in a future version of this mod or is there something in place that I am missing in the documentation, I know the below is not accurate but gets what I would like to do as instead of a splitter you could have it so the refineries that make plastic turn on thus making an even more efficient factory as it will only activate what it needs, or if something is power hungry you can stagger the production so it only one step at a time is activated say to make turbo motors.

gpu = computer.getGPUs()[1] MonA = computer.getScreens()[1] gpu:bindScreen(MonA)

//Machines or Storage name would be either what the user has put or by default what //the UUID would be.

ContA = component.proxy(component.findComponent("PlasticStorage") ContAItm = component.proxy(component.getItemCount(“PlasticStorage”)) SplitterA = component.proxy(component.findSplitter(“PlasticSplitter”)

if Cont1Atm =< 200 then SplitterA.Left(Plastic) else monA.setCursorPos(9,3) monA.(TXTCOL[15]) monA.write(" Full ") end

Panakotta00 commented 4 years ago

Well, it is is kinda there already... How to do it is a bit different, but what you try to do is achievable.

Skyamoeba commented 4 years ago

Thanks, last question promise, is there a sleep function or wait as the way I am having to do this is the below as cannot call os.clock or I am doing it wrong.

function sleep(n) for n=1, n do Panel:getModule(0,0):setColor(10.0,10.0,0.0,0.9) end Panel:getModule(0,0):setColor(0.0,10.0,0.0,0.9) end

so sleep(100000) = 8 seconds or / in game ticks?

(panel button is there for indication when the program is in the sleep state would be nice to be able to put in the computer case)

Really enjoying the MOD and getting to know LUA.

edit- Just tried to move while it is in my sleep state above, makes the game lag I will put that idea on the back burner. lol

Panakotta00 commented 4 years ago

I would recommend you to check out the discord server. To create a sleep function you would use event.pull and computer.millis