Adds a sort button to storage boxes, allowing you to sort items by name or category

Supported Games
works with

Features

  • Adds a sort button to storage boxes
  • Allows sorting by item name or category
  • Automatically consolidates separate stacks of the same item when sorting
  • Allows restricting sorting ability to container owner and teammates/friends/clanmates

Permissions

  • sortbutton.use - Allows players to see the sort button and use all features of the plugin

Commands

  • sortbutton - Enable/Disable Sort Button.
  • sortbutton <sort | type> - change sort type.

Configuration

Default configuration:

{
  "Default enabled": true,
  "Default sort by category": true,
  "Check ownership": true,
  "Use Clans": true,
  "Use Friends": true,
  "Use Teams": true,
  "Chat steamID icon": 0,
  "Chat command": [
    "sortbutton"
  ],
  "Containers by short prefab name": {
    "assets/content/vehicles/boats/rhib/subents/rhib_storage.prefab": {
      "Enabled": true,
      "OffsetX": 476.5
    },
    "assets/content/vehicles/boats/rowboat/subents/rowboat_storage.prefab": {
      "Enabled": true,
      "OffsetX": 476.5
    },
    "assets/content/vehicles/modularcar/subents/modular_car_1mod_storage.prefab": {
      "Enabled": true,
      "OffsetX": 476.5
    },
    "assets/content/vehicles/modularcar/subents/modular_car_camper_storage.prefab": {
      "Enabled": true,
      "OffsetX": 476.5
    },
    "assets/content/vehicles/snowmobiles/subents/snowmobileitemstorage.prefab": {
      "Enabled": true,
      "OffsetX": 476.5
    },
    "assets/content/vehicles/submarine/subents/submarineitemstorage.prefab": {
      "Enabled": true,
      "OffsetX": 476.5
    },
    "assets/prefabs/deployable/composter/composter.prefab": {
      "Enabled": true,
      "OffsetX": 476.5
    },
    "assets/prefabs/deployable/dropbox/dropbox.deployed.prefab": {
      "Enabled": true,
      "OffsetX": 476.5
    },
    "assets/prefabs/deployable/fridge/fridge.deployed.prefab": {
      "Enabled": true,
      "OffsetX": 476.5
    },
    "assets/prefabs/deployable/hitch & trough/hitchtrough.deployed.prefab": {
      "Enabled": true,
      "OffsetX": 476.5
    },
    "assets/prefabs/deployable/hot air balloon/subents/hab_storage.prefab": {
      "Enabled": true,
      "OffsetX": 476.5
    },
    "assets/prefabs/deployable/large wood storage/box.wooden.large.prefab": {
      "Enabled": true,
      "OffsetX": 476.5
    },
    "assets/prefabs/deployable/small stash/small_stash_deployed.prefab": {
      "Enabled": true,
      "OffsetX": 476.5
    },
    "assets/prefabs/deployable/tool cupboard/cupboard.tool.deployed.prefab": {
      "Enabled": true,
      "OffsetX": 476.5
    },
    "assets/prefabs/deployable/vendingmachine/vendingmachine.deployed.prefab": {
      "Enabled": true,
      "OffsetX": 476.5
    },
    "assets/prefabs/deployable/woodenbox/woodbox_deployed.prefab": {
      "Enabled": true,
      "OffsetX": 476.5
    },
    "assets/prefabs/misc/halloween/coffin/coffinstorage.prefab": {
      "Enabled": true,
      "OffsetX": 476.5
    }
  },
  "Containers by skin ID": {}
}
  • Default enabled (true or false) -- While true, the sort button will be enabled for players by default. Players can toggle the sort button with the sortbutton command.
  • Default sort by category (true or false) -- While true, the sort button will use category mode by default. Players can toggle the mode with the sortbutton <sort | type> command.
  • Check ownership (true or false) -- While true, players can only sort containers owned by them or teammates/friends/clanmates (if those settings are enabled). Regardless of this setting, all players can sort unowned containers such as vehicle containers.
  • Use Clans (true or false) -- While true, players can sort containers owned by their clanmates while Check ownership is enabled.
  • Use Friends (true or false) -- While true, players can sort containers owned by their friends while Check ownership is enabled.
  • Use Teams (true or false) -- While true, players can sort containers owned by their teammates while Check ownership is enabled.
  • Chat steamID icon -- Determines the icon that will be printed in chat when the player uses the sortbutton command.
  • Chat command -- Determines which commands players can use to change sort button functionality. By default, only the "sortbutton" command is available, but you can add more such as "sb" if you want.
  • Containers by short prefab name -- This section allows you to configure whether the sort button will be enabled for each type of container, as well as where the button will be positioned.
    • Enable (true or false) -- While true, the sort button will appear for this type of container, as long as the player has the sort button enabled.
    • OffsetX -- Determines where the sort button will be horizontally positioned (relative to the center of the screen). The vertical position is determined automatically based on the type of container and its capacity.
  • Containers by skin ID -- This section works like Containers by short prefab name, but allows you to override the behavior for containers with specific skin IDs. This is useful for special containers managed by other plugins, as long as they have a consistent skin or range of skins.

Localization

{
  "Error.NoPermission": "You do not have permission to use this command",
  "Format.ButtonText": "Sort",
  "Format.Category": "<color=#D2691E>Category</color>",
  "Format.Disabled": "<color=#B22222>Disabled</color>",
  "Format.Enabled": "<color=#228B22>Enabled</color>",
  "Format.Name": "<color=#00BFFF>Name</color>",
  "Format.Prefix": "<color=#00FF00>[Sort Button]</color>: ",
  "Info.ButtonStatus": "Sort Button is now {0}",
  "Info.SortType": "Sort Type is now {0}",
  "Info.Help": "List Commands:\n<color=#FFFF00>/{0}</color> - Enable/Disable Sort Button.\n<color=#FFFF00>/{0} <sort | type></color> - change sort type."
}

Credits

  • fullbanner, the original author of this plugin
  • MJSU many thanks for all help
  • MONaH for maintaining this plugin

MIT License


Copyright (c) 2019 fullbanner


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:


The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


Collaborators
  • WhiteThunder
    Developer