Starbound

Starbound

Repeater (Wiring)
Not Mr Flıbble  [开发者] 2016 年 8 月 5 日 上午 11:17
Considering splitting the repeater into two devices (logic, power)
This would mean that the basic repeater would be back to being as simple as it originally was, and would reduce load (less code to run) where power usage isn't needed.

I may split it into two mods at the same time…
< >
正在显示第 1 - 1 条,共 1 条留言
bk3000 2016 年 8 月 15 日 上午 10:17 
I haven't looked at your code but consider this option.
Don't do this
function someFunction()
local stuff = otherstuff[1]
return stuff
end
just declare it and later assign it like this
someFunction = function()
local stuff = otherstuff[1]
return stuff
end

Point being you define the function depending on what it needs to do. If it is getting complex and maybe too big, you might consider making an external package containing tables of code. Then you reference like
if someCondition then
someFunction = codeblocks.powerTransmit[1]
end
最后由 bk3000 编辑于; 2016 年 8 月 15 日 上午 10:18
< >
正在显示第 1 - 1 条,共 1 条留言
每页显示数: 1530 50