I am looking to write a sorting plugin for Rust. I am currently working on the configuration bit currently. I want to be able to click on a "Configure" button and show the user a configuration screen. The configuration screen would include a storage container to filter for the box. So the user can drag an item into this filter box and the box wouldn't allow items not in the filter to be placed in the box. I have figured out how to create StorageContainer/ItemContainer and display it, but it hides the current loot window. I was hoping I could display the item container over the player inventory instead of replacing the current loot box's UI. I have been looking at the PlayerOpenLoot method. There is a panelName parameter that looks promising, but I can't figure out where a list of the panels are. I have discovered "generic" and "genericlarge" work. I tried creating a CUIPanel with a panel name, but it throws an error when I try to use CUIPanel.
var pos = new Vector3(player.transform.position.x, player.transform.position.y - 1, player.transform.position.z);
var boxContainer = GameManager.server.CreateEntity(
"assets/prefabs/deployable/woodenbox/woodbox_deployed.prefab", pos) as StorageContainer;
boxContainer.GetComponent<DestroyOnGroundMissing>().enabled = false;
boxContainer.GetComponent<GroundWatch>().enabled = false;
boxContainer.transform.position = pos;
if (!boxContainer) return;
boxContainer.limitNetworking = true;
ItemContainer container = new ItemContainer();
container.playerOwner = player;
container.ServerInitialize(null, 50);
container.MarkDirty();
if (container.uid == 0)
container.GiveUID();
boxContainer.enableSaving = false;
boxContainer.Spawn();
boxContainer.inventory = container;
ContainerOffset(
"StorageSorterUIConfigure",
"0.75 0.75 0.75 0",
"0.5 0",
"0.5 0",
"75 341",
"179 459"
);
timer.In(0.1f, () => boxContainer.PlayerOpenLoot(player, "genericlarge"));