BGrade-一键升级此插件可以在放置时自动升级构建块。允许玩家轻松升级他们的构建块,避免使用锤子。 权限 此插件使用权限系统。

此插件可以在放置时自动升级构建块。允许玩家轻松升级他们的构建块,避免使用锤子。

权限

此插件使用权限系统。要分配权限,请使用 。要删除权限,请使用 。

oxide.grant <user or group> <name or steam id> <permission>oxide.revoke <user or group> <name or steam id> <permission>

此插件具有一组模块化权限,允许特定用户(即 VIP)升级到某些升级层,而其他用户(即非 VIP)则不能。

  • bgrade.all— 允许被授予的用户使用所有可能的等级。
  • bgrade.nores— 允许用户在升级其块时不必消耗资源
  • bgrade.1— 允许用户自动升级到 1 级
  • bgrade.2— 允许用户自动升级到 2 级
  • bgrade.3— 允许用户自动升级到 3 级
  • bgrade.4— 允许用户自动升级到 4 级

聊天命令

这些命令对用户来说是完全动态的。因此,如果您决定这样做,请将配置文件中将命令更改为任何内容。/bgrade

  • /bgrade t <seconds>— 更改玩家禁用计时器
  • /bgrade 0— 禁用 BGrade
  • /bgrade 1— 启用 Wood 自动升级
  • /bgrade 2— 启用自动 Stone 升级
  • /bgrade 3— 启用自动 Metal 升级
  • /bgrade 4— 启用自动装甲升级

控制台命令

同样,这些命令完全依赖于您的配置值。因此,如果您将它们从默认值更改为 default,请使用所需的命令更改此处的用法。

  • bgrade.up— 主要为 binds 添加,因此用户可以通过按一个键轻松增加他们的 BGrade 级别。绑定方法示例:bind u bgrade.up

配置

设置和选项可以在目录下的文件中进行配置。建议使用编辑器和验证器,以避免格式问题和语法错误。

BGradeconfig

我在这个插件中使用了一个万无一失的配置助手,所以很难破解它。但是,如果您确实设法打破了它,请参阅此处以您想要的方式恢复您的值。

{
  "Building Attack Settings": {
    "Cooldown Time": 30,
    "Enabled": true
  },
  "Command Settings": {
    "Chat Commands": [
      "bgrade",
      "grade"
    ],
    "Console Commands": [
      "bgrade.up"
    ]
  },
  "Refund Settings": {
    "Refund on Block": true
  },
  "Timer Settings": {
    "Default Timer": 30,
    "Enabled": true,
    "Max Timer": 180
  }
}

地方化

默认消息位于目录下的文件中。要添加对其他语言的支持,请创建一个新的语言文件夹(例如 对于德语),请将默认语言文件复制到新文件夹,然后自定义消息。

BGradelang/ende

{
  "Permission": "You don't have permission to use that command",
  "Error.InvalidArgs": "Invalid arguments, please use /{0} help",
  "Error.Resources": "You don't have enough resources to upgrade.",
  "Error.InvalidTime": "Please enter a valid time. '<color=orange>{0}</color>' is not recognised as a number.",
  "Error.TimerTooLong": "Please enter a time that is below the value of <color=orange>{0}</color>.",
  "Notice.SetGrade": "Automatic upgrading is now set to grade <color=orange>{0} ({1})</color>.",
  "Notice.SetTime": "The disable timer is now set to <color=orange>{0}</color>.",
  "Notice.Disabled": "Automatic upgrading is now disabled.",
  "Notice.Disabled.Auto": "Automatic upgrading has been automatically disabled.",
  "Notice.Time": "It'll automatically disable in <color=orange>{0}</color> seconds.",
  "Command.Help": "<color=orange><size=16>BGrade Command Usages</size></color>",
  "Command.Help.0": "/{0} 0 - Disables BGrade",
  "Command.Help.1": "/{0} 1 - Upgrades to Wood upon placement",
  "Comman

最近的更新将破坏使用此插件过去提供的 API 方法的现有插件。请与插件作者联系,并告诉他们阅读下面的部分。

API 方法(面向开发人员)

CanAutoGrade (已弃用)

CanAutoGrade(int playerGrade, BuildingBlock buildingBlock, Planner plan) => 0;

CanBGrade

CanBGrade(int playerGrade, BuildingBlock buildingBlock, Planner plan) => 0;
  • 返回 -1 或 0 以阻止升级
  • 返回 1 以杀死构建块并根据配置值进行退款

这个插件还挂接到 OnStructureUpgrade 中,所以如果你愿意,你也可以使用这个挂接来改变升级行为。返回非 null 值将阻止升级。

© 版权声明
THE END
喜欢就支持一下吧
点赞100 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

图形验证码
取消   颜色代码
昵称表情

    暂无评论内容