Page 1 of 1
Gui element that shows script inventory
Posted: Sat Oct 25, 2025 3:43 pm
by meifray
a GuiElementType that supports LuaGameScript.create_inventory()
Re: Gui element that shows script inventory
Posted: Sat Oct 25, 2025 6:45 pm
by Osmo
Re: Gui element that shows script inventory
Posted: Tue Oct 28, 2025 7:35 pm
by Rseding91
This has been requested a few times but it lacks details about how it's supposed to function.
* Would it show the full contents of some inventory or is it just showing mod-defined names/counts?
* Would it allow normal cursor interactions (add/remove/set-filter/clear-filter?)
* Would it attempt to support shift/ctrl + click (if so, where do the items go?)
Re: Gui element that shows script inventory
Posted: Wed Oct 29, 2025 12:47 am
by Osmo
Allowing cursor interactions is usually the whole point, otherwise a table could work for just displaying the inventory (though there are a lot of things that need to be replicated, like filters, bar, quality, health and spoilage meters, etc.). Disabling the element could disable all interactions
For shift/ctrl-clicking there could be some event, and the mods decide what needs to be done. Or specifying another inventory on the element which will be used to fast transfer items to since that's by far the most common case.
Re: Gui element that shows script inventory
Posted: Wed Oct 29, 2025 3:50 pm
by meifray
Rseding91 wrote: Tue Oct 28, 2025 7:35 pm
This has been requested a few times but it lacks details about how it's supposed to function.
* Would it show the full contents of some inventory or is it just showing mod-defined names/counts?
* Would it allow normal cursor interactions (add/remove/set-filter/clear-filter?)
* Would it attempt to support shift/ctrl + click (if so, where do the items go?)
1.it should work like the old output slots in assembler, which it always show in a fixed box and will have a small scroller to scroll over content.
2.yes, it is like a chest just that no inserter and bot can access it, tho filter function should be a toggle option for this inventory.
3.It should have a order key and piroritze highest order of custom inventory to be calculated, and if player is open a gui with only this kind of inventory, player may quick insert items into the one qith highest priority.( the actual in-game inventory should have highest priority in default ofc. ))
Quick extract should have no such problem because usually player's inventory is there as the inserting target.
Re: Gui element that shows script inventory
Posted: Wed Oct 29, 2025 5:50 pm
by robot256
Can you provide any more details about your application and why an invisible container entity with interactions disabled is insufficient? A script could cause the player to open the container's gui even if the container itself is not clickable. The contents can be stored in the invisible container instead of the script inventory all the time, or the script inventory can be easily copied to it upon being opened.
Re: Gui element that shows script inventory
Posted: Wed Oct 29, 2025 6:18 pm
by curiosity
robot256 wrote: Wed Oct 29, 2025 5:50 pm
Can you provide any more details about your application and why an invisible container entity with interactions disabled is insufficient? A script could cause the player to open the container's gui even if the container itself is not clickable. The contents can be stored in the invisible container instead of the script inventory all the time, or the script inventory can be easily copied to it upon being opened.
You don't need a container. Script inventories can be opened directly.
Re: Gui element that shows script inventory
Posted: Thu Oct 30, 2025 11:39 am
by robot256
curiosity wrote: Wed Oct 29, 2025 6:18 pm
robot256 wrote: Wed Oct 29, 2025 5:50 pm
Can you provide any more details about your application and why an invisible container entity with interactions disabled is insufficient? A script could cause the player to open the container's gui even if the container itself is not clickable. The contents can be stored in the invisible container instead of the script inventory all the time, or the script inventory can be easily copied to it upon being opened.
You don't need a container. Script inventories can be opened directly.
Ah so the request is specifically for a GUI element that behaves like a container GUU and can be embedded inside a more complex custom GUI than a typical container GUI. That's why I asked about an example application.
Re: Gui element that shows script inventory
Posted: Thu Oct 30, 2025 4:46 pm
by protocol_1903
robot256 wrote: Thu Oct 30, 2025 11:39 am
Ah so the request is specifically for a GUI element that behaves like a container GUU and can be embedded inside a more complex custom GUI than a typical container GUI. That's why I asked about an example application.
That would be a very nice builtin GUI