Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/Economics.Core/Command/BankCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,14 @@ public static void BankClear(CommandArgs args)

[SubCommand("query")]
[CommandPermission(EconomicsPerm.QueryCurrency, EconomicsPerm.CurrencyAdmin)]
[HelpText("/bank query or /bank quer <player>")]
[HelpText("/bank query or /bank query <player>")]
public static void BankQuery(CommandArgs args)
{
var sb = new StringBuilder();
string? name;
if (args.Parameters.Count > 1)
{
name = args.Parameters[1];
return;
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions src/Economics.Core/Economics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ namespace Economics.Core;
[ApiVersion(2, 1)]
public class Economics : TerrariaPlugin
{
public override string Author => "少司命";
public override string Author => "少司命, 千亦(修复 bug)";

public override string Description => GetString("提供经济系统API");

public override string Name => Assembly.GetExecutingAssembly().GetName().Name!;
public override Version Version => new Version(2, 0, 0, 10);
public override Version Version => new Version(2, 0, 0, 11);

public readonly static List<TSPlayer> ServerPlayers = [];

Expand Down
5 changes: 4 additions & 1 deletion src/Economics.Core/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Economics.Core 插件[经济套件核心]

- 作者: 少司命
- 作者: 少司命,千亦(修复 bug)
- 出处: 无
- EconomicsAPI是延续POBC设计思路的新经济系统,他本身并无特别的功
能,只提供货币系统,以及一些API。
Expand Down Expand Up @@ -175,6 +175,9 @@

## 更新日志

### v2.0.0.11
- 修复 /bank query 指定玩家无输出问题

### v2.0.0.10
- 修复CombatMsg无法正常显示击杀后获得货币数的问题

Expand Down
9 changes: 7 additions & 2 deletions src/Economics.Regain/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Economics.Regain 回收物品插件

- 作者: 少司命
- 作者: 少司命,千亦(修复 bug)
- 出处: 无
- 可自定义回收物品插件

Expand All @@ -19,7 +19,8 @@
> 配置文件位置:tshock/Economics/Regain.json
```json
{
"回收物品列表": [
"最大显示页": 20,
"回收物品表": [
{
"物品ID": 2990,
"回收价格": [
Expand Down Expand Up @@ -52,6 +53,10 @@
```
## 更新日志

### v2.0.0.5
- 修复 /regain list 不显示回收物品列表
- 更正 readme 的配置错误

### v2.0.0.0
- 适配多货币

Expand Down
12 changes: 5 additions & 7 deletions src/Economics.Regain/Regain..cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,17 @@ namespace Economics.Regain;
[ApiVersion(2, 1)]
public class Regain : TerrariaPlugin
{
public override string Author => "少司命";
public override string Author => "少司命,千亦(修复 bug)";

public override string Description => GetString("对玩家的物品进行回收!");

public override string Name => System.Reflection.Assembly.GetExecutingAssembly().GetName().Name!;
public override Version Version => new Version(2, 0, 0, 4);
public override Version Version => new Version(2, 0, 0, 5);

public Regain(Main game) : base(game)
{
}

internal static Config Config { get; set; } = new();

public override void Initialize()
{
Config.Load();
Expand Down Expand Up @@ -57,7 +55,7 @@ void Show(List<string> line)
line,
new PaginationTools.Settings
{
MaxLinesPerPage = Config.PageMax,
MaxLinesPerPage = Config.Instance.PageMax,
NothingToDisplayString = GetString("当前可回收物品"),
HeaderFormat = GetString("回收物品列表 ({0}/{1}):"),
FooterFormat = GetString("输入 {0}regain list {{0}} 查看更多").SFormat(Commands.Specifier)
Expand All @@ -66,7 +64,7 @@ void Show(List<string> line)
}
bool Verify(out Config.RegainInfo? regain)
{
if (!Config.TryGetRegain(args.Player.SelectedItem.type, out regain) || regain == null)
if (!Config.Instance.TryGetRegain(args.Player.SelectedItem.type, out regain) || regain == null)
{
args.Player.SendErrorMessage(GetString("该物品暂时无法回收!"));
return false;
Expand Down Expand Up @@ -109,7 +107,7 @@ bool Verify(out Config.RegainInfo? regain)
{
if (args.Parameters[0].ToLower() == "list")
{
var line = Config.Regains.Select(x => x.ToString()).ToList();
var line = Config.Instance.Regains.Select(x => x.ToString()).ToList();
Show(line);
return;
}
Expand Down
Loading