Public Quarry Lock is for PVE server, to protect loot on static quarry and pump jack.

Supported Games
GameServerKingsGameServerKings
works with

Permissions

  • publicquarrylock.quarryonly
    when Use Permission is true. allow player to use the quarry. default name but can be modified in config

  • publicquarrylock.pumpjackonly
    when Use Permission is true. allow player to use the pumpjack. default name but can be modified in config

  • publicquarrylock.admin
    to bypass quarry/pumpjack loot protection by admins

permission name can be modified in config file. user lowercase permission names

Commands

  • quarry
    view quarry and pumpjack status
  • quarryclear
    Reset quarry / pumpjack lock status

command name can be modified in config file

Configuration

{
  "Use permission": false,
  "PermissionAdmin": "publicquarrylock.admin",
  "Permission for quarry only": "publicquarrylock.quarryonly",
  "Permission for pumpjack only": "publicquarrylock.pumpjackonly",
  "Enable for mining quarry": true,
  "Enable for pump jack": true,
  "Enable player quarry": false,
  "Enable player pumpjack": false,
  "CoolDown before releasing mining quarry (min)": 5.0,
  "Send quarry available message to all": true,
  "Enable engine loot after it is started, to add fuel": true,
  "Use Teams": true,
  "Use Clans plugin": false,
  "Use DynamicPVP to disable lock in PVP zones": false,
  "CoolDown in sec. before a player or team can restart the quarry (0 is disabled)": 30.0,
  "Usage cooldown to all quarry": true,
  "Maximum stack size for diesel engine (-1 to disable function)": -1,
  "Number of slots for diesel storage (-1 to disable function)": -1,
  "Number of slots for output storage (-1 to disable function)": -1,
  "quarry chat command": "quarry",
  "Quarry clear status": "quarryclear",
  "Empty the output hopper when quarry/pumpjack start": false,
  "Clear quarry lock after all player from team/clan disconnect": false,
  "Clear quarry lock after player owner disconnect": false,
  "Time after all player disconnect before quarry clear (minutes)": 10,  
  "Use Discord hook": false,
  "Discord hook url": "",
  "Debug": false,
  "Log to file": false
}

Use permission: false

set to true if you want to use permission system for quarry / pumpjack

PermissionAdmin : "publicquarrylock.admin"

Name of the permission for admin functions

"PermissionUse: "publicquarrylock.quarryonly",

Name of the permission when Use permission is set to true, to be able to use quarry

"PermissionUse: "publicquarrylock.pumpjackonly",

Name of the permission when Use permission is set to true, to be able to use pumpjack

Enable for mining quarry : true

Use plugin on static mining quarry ( those already on the map)

Enable for pump jack : true

Use plugin on static pumpjack quarry ( those already on the map)

Enable player quarry and pumpjack : false

Use the plugin on player placed quarry and pumpjack

CoolDown before releasing mining quarry (min) : 5.0

The player using the public quarry / pumpjack receive a message when the quarry turn off.this is number of minutes after the engine turn off and before it unlock the output to all players.Time is in minutes

Send quarry available message to all : true,

After the cooldown, control if a broadcast is send to all players

Enable engine loot after it is started, to add fuel : true

allow looting of the fuel tank after the engine is started.If false, it stop player adding fuel to extend usage.

Use Teams: true

team members will share quarry / pumpjack operation (rust team)

Use Clans plugin: true

use the clan plugin to share quarry / pumpjack operation

Use DynamicPVP to disable lock in PVP zones": true,when true, check if a quarry is in a DynamicPVP zone. If it is, the quarry will not lock to a player and will remain lootable by all.Once a quarry is protected, it will remain protected until the fuel run out. a dynamic event will not unlock a locked quarry.

"CoolDown in min. before a player or team can restart the quarry (0 is disabled)": 30.0

Set a cooldown after the quarry turn off, before a player/team/clan can use it againTime is in minutes. if a Player/Team has used the quarry then finish, they have to wait that long before they can use it again.

Usage cooldown to all quarry : true

if true, the cooldown apply to all static quarry and pumpjack, when player use one of quarry.and when false, a player can use all quarry at the same time.

Maximum stack size for diesel engine (-1 to disable function) : -1,

Option to modify the stack size of the diesel for the static quarry / pumpjack only.set to -1 to disable the function.this implementation only modify the "inventory.maxStackSize" for the diesel engine. may not work well with other plugin. if this is the case, just disable this option it with -1.also this parameter can only be used with a value lower then the global stack size.

Number of slots for diesel storage (-1 to disable function) : -1

Number of slots to deposit for the diesel enginethis, combined with the max stack size will determine the run time of the quarrys

Number of slots for output storage (-1 to disable function) : -1

Number of storage slots on the output hopper

quarry chat command : "quarry"

command to view quarrys / pumpjack status

Quarry clear status : "quarryclear"

admin command to clear the lock status of all quarrys and pumpjackcommand can be issued in RCON, chat or console

Empty the output hopper when quarry/pumpjack start": false,if enable, the content of the output hopper will be put in a small loot bag when the quarry / pumpjack start.

Clear quarry lock after all player from team/clan disconnect": false

Clear quarry lock after player owner disconnect": false

Time after all player disconnect before quarry clear (minutes)": 10

Option to unlock quarrys and pumpjack when player disconnect from the server for some time.

Use Discord hook: false

Discord hook url: "a discord url"

Configure a discord hook and send some information to discord

Debug: true

Display some basic debug info to console

Log to file: true

Send basic debug info to log file in

Note: When the cooldown parameter of the configuration in changed, it is preferable to delete the datafile of publicquarrylock.

Localization

{
  "QuarryOff": "<color=#FF1500>- {1} at {0} just turn off !</color>",
  "QuarryCoolDown": "<color=#FF1500>- You have {0} min. to get the ore, before quarry unlock to all</color>",
  "QuarryInUse": "<color=#FFA500>{2} at {1} currently in use by {0}</color>",
  "QuarryStartEngine": "{1} started for {0,2:F0} minutes",
  "QuarryStartEngineHM": "{2} started for {0,2:F0} hour, {1,2:F0} minutes",
  "QuarryStartEngineNolock": "{0} started in Dynamic PVP zone (not locked)",
  "QuarryStarted": "{2} at {1}, started by {0}. loot is protected",
  "QuarryStoped": "{2} at {1}, stopped and is available to all",
  "QuarryFuel": "<color=#FFA500>{1} currently running with {0} fuel in storage</color>",
  "QuarryPlCooldown": "{1} player cooldown will expire in {0} min.",
  "QuarryAvailableIn": "{1} at {0} will be available in {1,2:F0} min.",
  "QuarryClearStatus": "Clearing the status of mining quarry and pump jack",
  "MiningQuarry": "Mining quarry",
  "PumpJack": "pump jack"
}

About limiting the amout of diesel

Without limits, players can fill the diesel engine and hold the quarry for a very long time. Limiting the max stack size and number of slots, will limit the amount of diesel a player can put in the engine.

for example, stack-item-storage can set the amount of fuel put in the diesel enginehttps://umod.org/plugins/stack-item-storage

plugin ChestStackMultiplier does a similar function https://umod.org/plugins/chest-stack-multiplierand there a probably others.

the container used for configuration are :"assets/prefabs/deployable/quarry/fuelstorage.prefab""assets/prefabs/deployable/oil jack/fuelstorage.prefab"

Developer Hooks

void OnQuarryToggledOff(MiningQuarry quarry)

Called when a Static quarry or pumpjack stop because fuel is exausted or output hopper is full.

MIT License

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.