この比較の残りの部分を読み込んでいます。

Gather Manager v2.2.75 - Quarry Patch

作成日 差分は期限切れになりません
68 削除
529 行
73 追加
533 行
using System;
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Linq;
using UnityEngine;
using UnityEngine;


namespace Oxide.Plugins
namespace Oxide.Plugins
{
{


[Info("Gathering Manager", "Mughisi", "2.2.75", ResourceId = 675)]
[Info("Gathering Manager", "Mughisi", "2.2.75", ResourceId = 675)]
class GatherManager : RustPlugin
class GatherManager : RustPlugin
{
{
#region Configuration Data
#region Configuration Data
// Do not modify these values because this will not change anything, the values listed below are only used to create
// Do not modify these values because this will not change anything, the values listed below are only used to create
// the initial configuration file. If you wish changes to the configuration file you should edit 'GatherManager.json'
// the initial configuration file. If you wish changes to the configuration file you should edit 'GatherManager.json'
// which is located in your server's config folder: <drive>:\...\server\<your_server_identity>\oxide\config\
// which is located in your server's config folder: <drive>:\...\server\<your_server_identity>\oxide\config\


private bool configChanged;
private bool configChanged;


// Plugin settings
// Plugin settings
private const string DefaultChatPrefix = "Gather Manager";
private const string DefaultChatPrefix = "Gather Manager";
private const string DefaultChatPrefixColor = "#008000ff";
private const string DefaultChatPrefixColor = "#008000ff";


public string ChatPrefix { get; private set; }
public string ChatPrefix { get; private set; }
public string ChatPrefixColor { get; private set; }
public string ChatPrefixColor { get; private set; }


// Plugin options
// Plugin options
private static readonly Dictionary<string, object> DefaultGatherResourceModifiers = new Dictionary<string, object>();
private static readonly Dictionary<string, object> DefaultGatherResourceModifiers = new Dictionary<string, object>();
private static readonly Dictionary<string, object> DefaultGatherDispenserModifiers = new Dictionary<string, object>();
private static readonly Dictionary<string, object> DefaultGatherDispenserModifiers = new Dictionary<string, object>();
private static readonly Dictionary<string, object> DefaultQuarryResourceModifiers = new Dictionary<string, object>();
private static readonly Dictionary<string, object> DefaultQuarryResourceModifiers = new Dictionary<string, object>();
private static readonly Dictionary<string, object> DefaultPickupResourceModifiers = new Dictionary<string, object>();
private static readonly Dictionary<string, object> DefaultPickupResourceModifiers = new Dictionary<string, object>();
private static readonly Dictionary<string, object> DefaultSurveyResourceModifiers = new Dictionary<string, object>();
private static readonly Dictionary<string, object> DefaultSurveyResourceModifiers = new Dictionary<string, object>();


// Defaults
// Defaults
private const float DefaultMiningQuarryResourceTickRate = 5f;
private const float DefaultMiningQuarryResourceTickRate = 5f;
private const float DefaultExcavatorResourceTickRate = 3f;
private const float DefaultExcavatorResourceTickRate = 3f;
private const float DefaultExcavatorTimeForFullResources = 120f;
private const float DefaultExcavatorTimeForFullResources = 120f;
private const float DefaultExcavatorBeltSpeedMax = 0.1f;
private const float DefaultExcavatorBeltSpeedMax = 0.1f;


public Dictionary<string, float> GatherResourceModifiers { get; private set; }
public Dictionary<string, float> GatherResourceModifiers { get; private set; }
public Dictionary<string, float> GatherDispenserModifiers { get; private set; }
public Dictionary<string, float> GatherDispenserModifiers { get; private set; }
public Dictionary<string, float> QuarryResourceModifiers { get; private set; }
public Dictionary<string, float> QuarryResourceModifiers { get; private set; }
public Dictionary<string, float> ExcavatorResourceModifiers { get; private set; }
public Dictionary<string, float> ExcavatorResourceModifiers { get; private set; }
public Dictionary<string, float> PickupResourceModifiers { get; private set; }
public Dictionary<string, float> PickupResourceModifiers { get; private set; }
public Dictionary<string, float> SurveyResourceModifiers { get; private set; }
public Dictionary<string, float> SurveyResourceModifiers { get; private set; }
public float MiningQuarryResourceTickRate { get; private set; }
public float MiningQuarryResourceTickRate { get; private set; }
public float ExcavatorResourceTickRate { get; private set; }
public float ExcavatorResourceTickRate { get; private set; }
public float ExcavatorTimeForFullResources { get; private set; }
public float ExcavatorTimeForFullResources { get; private set; }
public float ExcavatorBeltSpeedMax { get; private set; }
public float ExcavatorBeltSpeedMax { get; private set; }


// Plugin messages
// Plugin messages
private const string DefaultNotAllowed = "You don't have permission to use this command.";
private const string DefaultNotAllowed = "You don't have permission to use this command.";
private const string DefaultInvalidArgumentsGather =
private const string DefaultInvalidArgumentsGather =
"Invalid arguments supplied! Use gather.rate <type:dispenser|pickup|quarry|survey> <resource> <multiplier>";
"Invalid arguments supplied! Use gather.rate <type:dispenser|pickup|quarry|survey> <resource> <multiplier>";
private const string DefaultInvalidArgumentsDispenser =
private const string DefaultInvalidArgumentsDispenser =
"Invalid arguments supplied! Use dispenser.scale <dispenser:tree|ore|corpse> <multiplier>";
"Invalid arguments supplied! Use dispenser.scale <dispenser:tree|ore|corpse> <multiplier>";
private const string DefaultInvalidArgumentsSpeed =
private const string DefaultInvalidArgumentsSpeed =
"Invalid arguments supplied! Use quarry.rate <time between gathers in seconds>";
"Invalid arguments supplied! Use quarry.rate <time between gathers in seconds>";
private const string DefaultInvalidModifier =
private const string DefaultInvalidModifier =
"Invalid modifier supplied! The new modifier always needs to be bigger than 0!";
"Invalid modifier supplied! The new modifier always needs to be bigger than 0!";
private const string DefaultInvalidSpeed = "You can't set the speed lower than 1 second!";
private const string DefaultInvalidSpeed = "You can't set the speed lower than 1 second!";
private const string DefaultModifyResource = "You have set the gather rate for {0} to x{1} from {2}.";
private const string DefaultModifyResource = "You have set the gather rate for {0} to x{1} from {2}.";
private const string DefaultModifyResourceRemove = "You have reset the gather rate for {0} from {1}.";
private const string DefaultModifyResourceRemove = "You have reset the gather rate for {0} from {1}.";
private const string DefaultModifySpeed = "The Mining Quarry will now provide resources every {0} seconds.";
private const string DefaultModifySpeed = "The Mining Quarry will now provide resources every {0} seconds.";
private const string DefaultInvalidResource =
private const string DefaultInvalidResource =
"{0} is not a valid resource. Check gather.resources for a list of available options.";
"{0} is not a valid resource. Check gather.resources for a list of available options.";
private const string DefaultModifyDispenser = "You have set the resource amount for {0} dispensers to x{1}";
private const string DefaultModifyDispenser = "You have set the resource amount for {0} dispensers to x{1}";
private const string DefaultInvalidDispenser =
private const string DefaultInvalidDispenser =
"{0} is not a valid dispenser. Check gather.dispensers for a list of available options.";
"{0} is not a valid dispenser. Check gather.dispensers for a list of available options.";


private const string DefaultHelpText = "/gather - Shows you detailed gather information.";
private const string DefaultHelpText = "/gather - Shows you detailed gather information.";
private const string DefaultHelpTextPlayer = "Resources gained from gathering have been scaled to the following:";
private const string DefaultHelpTextPlayer = "Resources gained from gathering have been scaled to the following:";
private const string DefaultHelpTextAdmin = "To change the resources gained by gathering use the command:\r\ngather.rate <type:dispenser|pickup|quarry|survey> <resource> <multiplier>\r\nTo change the amount of resources in a dispenser type use the command:\r\ndispenser.scale <dispenser:tree|ore|corpse> <multiplier>\r\nTo change the time between Mining Quarry gathers:\r\nquarry.tickrate <seconds>";
private const string DefaultHelpTextAdmin = "To change the resources gained by gathering use the command:\r\ngather.rate <type:dispenser|pickup|quarry|survey> <resource> <multiplier>\r\nTo change the amount of resources in a dispenser type use the command:\r\ndispenser.scale <dispenser:tree|ore|corpse> <multiplier>\r\nTo change the time between Mining Quarry gathers:\r\nquarry.tickrate <seconds>";
private const string DefaultHelpTextPlayerGains = "Resources gained from {0}:";
private const string DefaultHelpTextPlayerGains = "Resources gained from {0}:";
private const string DefaultHelpTextPlayerMiningQuarrySpeed = "Time between Mining Quarry gathers: {0} second(s).";
private const string DefaultHelpTextPlayerMiningQuarrySpeed = "Time between Mining Quarry gathers: {0} second(s).";
private const string DefaultHelpTextPlayerDefault = "Default values.";
private const string DefaultHelpTextPlayerDefault = "Default values.";
private const string DefaultDispensers = "Resource Dispensers";
private const string DefaultDispensers = "Resource Dispensers";
private const string DefaultCharges = "Survey Charges";
private const string DefaultCharges = "Survey Charges";
private const string DefaultQuarries = "Mining Quarries";
private const string DefaultQuarries = "Mining Quarries";
private const string DefaultExcavators = "Excavators";
private const string DefaultExcavators = "Excavators";
private const string DefaultPickups = "pickups";
private const string DefaultPickups = "pickups";


public string NotAllowed { get; private set; }
public string NotAllowed { get; private set; }
public string InvalidArgumentsGather { get; private set; }
public string InvalidArgumentsGather { get; private set; }
public string InvalidArgumentsDispenser { get; private set; }
public string InvalidArgumentsDispenser { get; private set; }
public string InvalidArgumentsSpeed { get; private set; }
public string InvalidArgumentsSpeed { get; private set; }
public string InvalidModifier { get; private set; }
public string InvalidModifier { get; private set; }
public string InvalidSpeed { get; private set; }
public string InvalidSpeed { get; private set; }
public string ModifyResource { get; private set; }
public string ModifyResource { get; private set; }
public string ModifyResourceRemove { get; private set; }
public string ModifyResourceRemove { get; private set; }
public string ModifySpeed { get; private set; }
public string ModifySpeed { get; private set; }
public string InvalidResource { get; private set; }
public string InvalidResource { get; private set; }
public string ModifyDispenser { get; private set; }
public string ModifyDispenser { get; private set; }
public string InvalidDispenser { get; private set; }
public string InvalidDispenser { get; private set; }
public string HelpText { get; private set; }
public string HelpText { get; private set; }
public string HelpTextPlayer { get; private set; }
public string HelpTextPlayer { get; private set; }
public string HelpTextAdmin { get; private set; }
public string HelpTextAdmin { get; private set; }
public string HelpTextPlayerGains { get; private set; }
public string HelpTextPlayerGains { get; private set; }
public string HelpTextPlayerDefault { get; private set; }
public string HelpTextPlayerDefault { get; private set; }
public string HelpTextPlayerMiningQuarrySpeed { get; private set; }
public string HelpTextPlayerMiningQuarrySpeed { get; private set; }
public string Dispensers { get; private set; }
public string Dispensers { get; private set; }