Already fixed locally, will be in the next snapshot.
QuickSort
Adds a GUI that allows players to quickly sort items into containers
Total Downloads: 14,542 - First Release: Jul 26, 2015 - Last Update: Mar 31, 2017
- 5/5, 44 likes
-
Wulf Community Admin
-
How can i make it work for only group, or group rank needed for it to work?
Like now im using better chat to set ranks on groups, and i want it to be used only for vip+. -
[Oxide] 1:47 PM [Warning] 'QuickSort v0.1.0' plugin is using deprecated hook: OnPlayerLoot
What is the problem? -
Wulf Community Admin
-
-
-
help please
[Oxide] 12:39 PM [Warning] 'QuickSort v0.1.0' plugin is using deprecated hook: OnPlayerLoot -
This currently broken? think the new update has broken it?
-
Does this even work anymore? Nevermind. Disregard this or better yet if someone could delete this
-
Plugin seems to have been broken overtime with unupdated code to match oxide changes, i tried to update it and managed to get it to show up again but it would never go away after closing chests etc, this is the broken code if someone could please look into it :
private void OnPlayerLoot(PlayerLoot lootInventory, BaseEntity targetEntity)
{
BasePlayer player;
if((player = lootInventory.GetComponent<BasePlayer>()) == null)
return;
if(targetEntity.GetComponent<LootableCorpse>() != null || targetEntity is BasePlayer || targetEntity is ResearchTable)
return;
lootInventory.entitySource.gameObject.AddComponent<UIDestroyer>();
CommunityEntity.ServerInstance.ClientRPCEx(new Network.SendInfo() { connection = player.net.connection }, null, "AddUI", new Facepunch.ObjectList(translatedJson, null, null, null, null));
}
I have tried changing the OnPlayerLoot etc line to the updated part Oxide has but the line in bold seems to be causing a ton of issues I just dont understand. -
Code:
[Oxide] 10:19 AM [Warning] 'QuickSort v0.1.0' plugin is using deprecated hook: OnPlayerLoot
-
still broken. we need a fix! we miss this plugin so bad!
-
Wulf Community Admin
-
Nvm previous comments, works fine with latest version of oxide without any changes.
Last edited by a moderator: Feb 5, 2016 -
When you press All button shouldnt it move all the items (including your belt/clothes)?
if anyone wants it like that then go into QuickSort.cs and add these lines:
Underneath (line 56):
Code:ItemContainer playerMain = player.inventory.containerMain;
Code:ItemContainer playerBelt = player.inventory.containerBelt; ItemContainer playerWear = player.inventory.containerWear;
Code:ItemContainer playerMain = player.inventory.containerMain;
Code:itemsSelected.AddRange(CloneItemList(playerWear.itemList)); itemsSelected.AddRange(CloneItemList(playerBelt.itemList));
-
[Oxide] [Error] QuickSort plugin failed to compile!
[Oxide] [Error] QuickSort.cs(138,62): error CS0103: The name `playerBelt' does not exist in the current context -
Code:ItemContainer playerBelt = player.inventory.containerBelt;
-
i tried this as well and got back
[Oxide] 1:54 PM [Error] QuickSort plugin failed to compile!
[Oxide] 1:54 PM [Error] QuickSort.cs(81,19): error CS0136: A local variable named `playerMain' cannot be declared in this scope because it would give a different meaning to `playerMain', which is already used in a `parent or current' scope to denote something else -
The whole code should look like this:
Code:private void AutoDeposit(ConsoleSystem.Arg arg) { if(arg.Player() == null) return; BasePlayer player = arg.Player(); List<Item> itemsSelected; List<Item> uselessItems; ItemContainer container = GetLootedInventory(player); ItemContainer playerMain = player.inventory.containerMain; ItemContainer playerBelt = player.inventory.containerBelt; ItemContainer playerWear = player.inventory.containerWear; if(container != null && playerMain != null) { if(arg.Args != null && arg.Args.Length == 1) { if(arg.Args[0].Equals("ex")) { itemsSelected = GetExistingItems(playerMain, container); } else { ItemCategory category = StringToItemCategory(arg.Args[0]); itemsSelected = GetItemsOfType(playerMain, category); } } else { itemsSelected = CloneItemList(playerMain.itemList); itemsSelected.AddRange(CloneItemList(playerWear.itemList)); itemsSelected.AddRange(CloneItemList(playerBelt.itemList)); } uselessItems = GetUselessItems(itemsSelected, container); foreach(Item item in uselessItems) { itemsSelected.Remove(item); } itemsSelected.Sort((item1, item2) => item2.info.itemid.CompareTo(item1.info.itemid)); MoveItems(itemsSelected, container); } }
-
Would it be possible for you to upload the whole QuickSort.cs file with your next reply?
Check out my .cs file