List/array gadget.
Adding some kind of list/array gadget would probably be pretty powerful and make certain things like inventory systems a lot easier.
I'm imagining there would be a list gadget that stores the data, ideally it would allow storing numbers and text (for text we'd also need to add a concept of text-based variables aka strings).
And then the list modifier gadget would let you add an item to the front/back of the list, remove an item from the front/back of the list, check if an item is in the list, sort the list, randomise the list elements, retrieve a list item from an index, replace a list item etc. etc.
-
I agree, I want this!
I have a detailed list gadget here:
https://indreams.me/collection/cbLFjDcxHYj
It’s quite thermo heavy at large sizes though!
You can also achieve a list using exclusive gates. If you emit an exclusive gate with interrupt it should become the current active gate. You can then use this mechanism as the “head” of the list. If when you emit, you treat this as a row of data. You make sure to feed the row data at time of emit. Keep it alive by looping the value around in a node. Now if you feed all these looping wires back out into a parent “output” node. Even with 1000 “rows” there will only ever be one signal outputting. So there you go, a really quick and cheap list!
댓글을 남기려면 로그인하세요.