-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A couple of items... #1
Comments
One additional thought... I'm not very fond of the copy / paste functionality in the factorio text-box, as you probably already discovered factorio removes new lines. This makes it difficult to build more complex projects with the computer mod. One idea I had is allowing an external read only mount to the filesystem. I hacked in a single file into /external/test but I could imagine allowing other plugins to register new code snippets in that manner. Hacking around Lua I discovered the local text = [==[ ]==] functionality, that along with an import worked well for me! |
Thank you, I look at these points quickly. And indeed, this concern with the copy / paste annoys me from the beginning and despite the hours trying to circumvent it, I had not found a solution. I will apronfonde your idea;) |
Hi, After long hours of debugging, I found and corrected the problem when loading a game that was running a program. Main consequences:
ex: local a = 3
local b = 4
os.wait (function (a, b)
term.write (a) -- print "3"
end, 1, a, b) In order to simplify writing, apis have emerged: ex: local a = 3
local b = 4
os.set ("env1", a, b)
os.wait (function ()
local a, b = os.get ("env1")
term.write (a) -- print "3"
end, 1) NB: lan.lua updated too. I chose : |
Great! I've merged your latest changes and will try them out. Here's a new issue I encountered... In _readCombinatorSignal, if network.signals is empty I get errors. I fixed this by modifying the network check to: if network and network.signals ~= Nil then Thanks! Will |
Well, I validate the correction, even if I do not know in which case "network" can exist without "network.signals" |
Great plugin! I've been playing around with the new computer, I've had some decent success working with it.
One issue I found was in lan.lua. If a circuit value is reporting a negative number, the current code ignores it. I modified the plugin to use this logic instead:
if value.signal and value.signal.name and value.count ~= 0 then
The other issue I came across is every time I loaded a game that was running a program, the game would crash. I would get the following cryptic error message:
computer_core/logic/computerCommands.lua:600: attempt to index upvalue 'fs' (a nil value)
I never discovered the root cause of the issue (I'm still learning lua & the factorio mod environment) but I did work around it via this change to control.lua:raise_event:
Thanks!
The text was updated successfully, but these errors were encountered: