Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

38 Commits

Repository files navigation

Recycle allows players to recycle items into their resources.

Permissions

  • recycle.use -- Allows players to use the recycler
  • recycle.admin -- Allows players to destroy all recyclers or dropped bags currently created by Recycle
  • recycle.bypass -- Allows players to bypass the cooldown of recycling

Commands

  • recycle -- Opens a recycler, can be configured
  • recycle reloadconfig -- Reloads the configuration file
  • purgerecyclers -- Destroys all recyclers and drops their contents to a locked bag at the owner's position
  • purgebags -- Destroys all bags created by Recycle

Configuration

{
"Settings": {
"Command To Open Recycler": "recycle",
"Cooldown (in minutes)": 5.0,
"Maximum Radiation": 1.0,
"Refund Ratio": 0.5,
"NPCs Only": false,
"Allowed In Safe Zones": true,
"Instant Recycling": false,
"Send Recycled Items To Inventory": true,
"Send Items To Inventory Before Bag": true,
"NPC Ids": [],
"Recyclable Types": [
"Ammunition",
"Attire",
"Component",
"Construction",
"Electrical",
"Fun",
"Items",
"Medical",
"Misc",
"Resources",
"Tool",
"Traps",
"Weapon"
],
"Blacklisted Items": []
},
"VERSION": "3.1.9"
}

For Developers

Hooks

Invoked when checking if a recycler is safe to open.

privateboolCanOpenRecycler(BasePlayerplayer)

API Calls

Adds an NPC to the NPC list

privatevoidAddNPC(stringnpcID)

Removes an NPC from the NPC list

privatevoidRemoveNPC(stringnpcID)

Checks if an entity is a recycler managed by Recycler.

privateboolIsRecycleBox(BaseNetworkableentity)

Checks if a player can safely open a recycler.

privateboolCanPlayerOpenRecycler(BasePlayerplayer)

Checks if the player is current on cooldown from using the recycler.

privateboolIsOnCooldown(BasePlayerplayer)

Forcefully opens a recycler for the player

!! No checks are done, including calling the hook !!

privatevoidOpenRecycler(BasePlayerplayer)

Credits

  • Calytic, the original author of this plugin
  • 5Dev24, for maintaining this plugin
  • nivex, for maintaining this plugin

About

Recycle items into their resources

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages