Barotrauma 潜渊症

Barotrauma 潜渊症

Lua Component
18 条留言
Matheus 2023 年 9 月 27 日 上午 7:06 
Since this one is obsolete, please also consider using MicroLua
zomgtehderpy  [作者] 2023 年 4 月 1 日 下午 10:13 
with the release of a Better Lua Component , this one should be considered a proof-of-concept and not used unless you are a masochist.
zomgtehderpy  [作者] 2023 年 3 月 29 日 下午 12:27 
@Derpino I am pretty sure indexes go from 1 to 8, not 0 to 7.
Derpino 2023 年 3 月 13 日 上午 11:54 
I can't get this mod to work for some reason with even with a super simple script "out[0]=9001".

I have lua for barotrauma installed and get some other dependent mods to work...:steamsad:
Maddremor 2023 年 1 月 7 日 上午 6:12 
I don't know how useful this will be, but I'm still having memory leaks with this in MP.
zomgtehderpy  [作者] 2022 年 10 月 21 日 上午 6:43 
4096 is a soft cap and can be increased exactly as you said. i remember reading somewhere that too much data in memory component might negatively affect game performance, so there's that. minimizing code could be a slightly better idea.
testing for mp should be pretty simple: first 3 lines from sample code, push button, text display, couple of wires; start a round, click the button, end the round, start the next one (output should retain), all the while checking for consistency among all clients. i coudve test it myself but i hab no frens :c
NeckRopeMancer 2022 年 10 月 20 日 下午 12:09 
Has anyone tested this in MP (as the author says they have not)?
|SPQR| Vetinarix 2022 年 8 月 5 日 下午 7:03 
Excellent news - cheers.
Will let you know if it's not :)
zomgtehderpy  [作者] 2022 年 8 月 4 日 上午 12:30 
@Vetinarix incompatibility is highly unlikely.
all potential leaks should be fixed now with brand new storage method and other fixes.
please update your designs and check for errors.
|SPQR| Vetinarix 2022 年 8 月 2 日 下午 11:57 
Worth pointing out, it may have been the math I was doing in the lua component itself, although admittedly it wasn't too complex.
|SPQR| Vetinarix 2022 年 8 月 2 日 下午 11:35 
Hey,
I've noticed a memory leak occurring when running this mod both locally and on server, and the leak effects player clients connected to the server as well.

I am running the lua component mod with other mods, but have iterated through variations of the pack until I determined that the lua component mod is the cause of the leak.

At first I thought it might be a compatibility issue with other mods...
(list of mods I'm running: https://pastebin.com/81MPRbfw)

But I've also tested running Baro with ONLY lua component, and the memory leak is still present.
When lua component is removed, the memory leak is no longer present.

Not sure how to trace the issue further unfortunately, but hoping you're able to reproduce and resolve it :)
zomgtehderpy  [作者] 2022 年 6 月 25 日 上午 2:22 
"error pcall in" means there's something wrong happened when actually executing your code, may as well be indexing a nil value.
i[k] should be "" (empty string) when no signal received on k.
if you would share your design i can test it and see what could be done for better error handling.

just realized it wasn't the best idea to hardcode inputs as "i" as it's too easy to accidentally overwrite it.
anyways this mod needs and will soon get a rewrite (unfortunately breaking old setups at least partially)
Katte 2022 年 6 月 25 日 上午 12:30 
Could you make it so that requesting a value from an input pin that isnt receiving a signal defaults to null and not an error?
Katte 2022 年 6 月 24 日 下午 11:50 
ah so it would appear i am stupid and didnt properly install the lua mod.

I have another issue though: linking a text display to certain of my LUA modules outputs "error pcall in" and im not sure what that means
Katte 2022 年 6 月 24 日 下午 11:25 
This mod appears to be broken, i have a terminal hooked up to a lua component on input pin 1 and a text display on output pin 1. the component is running the code o[1]=i[1]. instead of making whatever i type appear on the text display, nothin happens at all
Ramazan23 2022 年 6 月 4 日 上午 4:21 
5 components reactor controller in Lua (link to original)

o[1]=i[1]/i[2];o[2]=o[1]/(i[3]/75)

o[1]=turbineoutput o[2]=fussiorate
i[1]=load i[2]=maxpower/100 i[3]=fuel_out

Thank you for this mod!
Dailyyy 2022 年 5 月 23 日 下午 3:57 
me griefing with lua component
SydWad 2022 年 5 月 23 日 下午 3:54 
This is a bad idea