From 8c486d3d2c5545722342442aa6225838d5e18ca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BE=BD=20=E5=AD=A6?= <1242509682@qq.com> Date: Tue, 5 Nov 2024 09:10:34 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=EF=BC=9AAutoFish=20=E8=87=AA=E5=8A=A8=E9=92=93=E9=B1=BC?= =?UTF-8?q?=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Plugin.sln | 10 + README.md | 1 + README_en.md | 5 +- src/AutoFish/AutoFish.cs | 432 ++++++++++++++++++++++++++ src/AutoFish/AutoFish.csproj | 5 + src/AutoFish/Commands.cs | 309 ++++++++++++++++++ src/AutoFish/Configuration.cs | 90 ++++++ src/AutoFish/README.md | 100 ++++++ src/AutoFish/README_EN.md | 101 ++++++ src/AutoFish/Utils/MyData.cs | 35 +++ src/AutoFish/Utils/SpawnProjectile.cs | 276 ++++++++++++++++ src/AutoFish/Utils/Tools.cs | 22 ++ src/AutoFish/Utils/Vector2Ext.cs | 198 ++++++++++++ 13 files changed, 1582 insertions(+), 2 deletions(-) create mode 100644 src/AutoFish/AutoFish.cs create mode 100644 src/AutoFish/AutoFish.csproj create mode 100644 src/AutoFish/Commands.cs create mode 100644 src/AutoFish/Configuration.cs create mode 100644 src/AutoFish/README.md create mode 100644 src/AutoFish/README_EN.md create mode 100644 src/AutoFish/Utils/MyData.cs create mode 100644 src/AutoFish/Utils/SpawnProjectile.cs create mode 100644 src/AutoFish/Utils/Tools.cs create mode 100644 src/AutoFish/Utils/Vector2Ext.cs diff --git a/Plugin.sln b/Plugin.sln index 8cf95b1e..9530ae66 100644 --- a/Plugin.sln +++ b/Plugin.sln @@ -244,6 +244,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VotePlus", "src\VotePlus\Vo EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LazyAPI", "src\LazyAPI\LazyAPI.csproj", "{FDA7A806-41DA-469F-8290-347ACF613837}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoFish", "src\AutoFish\AutoFish.csproj", "{1225C358-E037-41BF-A249-C2AB071D80FF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1196,6 +1198,14 @@ Global {FDA7A806-41DA-469F-8290-347ACF613837}.Release|Any CPU.Build.0 = Release|Any CPU {FDA7A806-41DA-469F-8290-347ACF613837}.Release|x64.ActiveCfg = Release|Any CPU {FDA7A806-41DA-469F-8290-347ACF613837}.Release|x64.Build.0 = Release|Any CPU + {1225C358-E037-41BF-A249-C2AB071D80FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1225C358-E037-41BF-A249-C2AB071D80FF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1225C358-E037-41BF-A249-C2AB071D80FF}.Debug|x64.ActiveCfg = Debug|Any CPU + {1225C358-E037-41BF-A249-C2AB071D80FF}.Debug|x64.Build.0 = Debug|Any CPU + {1225C358-E037-41BF-A249-C2AB071D80FF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1225C358-E037-41BF-A249-C2AB071D80FF}.Release|Any CPU.Build.0 = Release|Any CPU + {1225C358-E037-41BF-A249-C2AB071D80FF}.Release|x64.ActiveCfg = Release|Any CPU + {1225C358-E037-41BF-A249-C2AB071D80FF}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/README.md b/README.md index 94a3ab91..e660f9fc 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ | [AutoReset](src/AutoReset/README.md) | 完全自动重置 | 无 | | [AutoStoreItems](src/AutoStoreItems/README.md) | 自动储存 | 无 | | [AutoTeam](src/AutoTeam/README.md) | 自动队伍 | 无 | +| [AutoFish](src/AutoFish/README.md) | 自动钓鱼 | 无 | | [Back](src/Back/README.md) | 死亡回溯 | 无 | | [BagPing](src/BagPing/README.md) | 地图上标记宝藏袋 | 无 | | [BetterWhitelist](src/BetterWhitelist/README.md) | 白名单插件 | 无 | diff --git a/README_en.md b/README_en.md index fbe162a1..a3a7185e 100644 --- a/README_en.md +++ b/README_en.md @@ -61,11 +61,12 @@ | [AdditionalPylons](src/AdditionalPylons/README_EN.md) | Yes | Place more Pylons | No | | [AnnouncementBoxPlus](src/AnnouncementBoxPlus/README.md) | No | Enhance Broadcast Box Functionality | No | | [AutoBroadcast](src/AutoBroadcast/README_EN.md) | Yes | Automatic broadcast | No | -| [AutoAirItem](src/AutoAirItem/README_EN.md) | Yes | Automatic trash cans | No | +| [AutoAirItem](src/AutoAirItem/README_EN.md) | No | Automatic trash cans | No | | [AutoClear](src/Autoclear/README_EN.md) | Yes | Intelligent automatic cleaning | No | | [AutoReset](src/AutoReset/README_EN.md) | Yes | Fully automatic reset | No | -| [AutoStoreItems](src/AutoStoreItems/README_EN.md) | Yes | Automatic storage | No | +| [AutoStoreItems](src/AutoStoreItems/README_EN.md) | No | Automatic storage | No | | [AutoTeam](src/AutoTeam/README_EN.md) | Yes | Automatic team formation | No | +| [AutoFish](src/AutoFish/README_EN.md) | No | Automatic fishing | No | | [Back](src/Back/README_EN.md) | Yes | Return to the point of death | No | | [BagPing](src/BagPing/README_EN.md) | Yes | Mark treasure bags on the map | No | | [BetterWhitelist](src/BetterWhitelist/README_EN.md) | Yes | Whitelist plugin | No | diff --git a/src/AutoFish/AutoFish.cs b/src/AutoFish/AutoFish.cs new file mode 100644 index 00000000..3347bcb5 --- /dev/null +++ b/src/AutoFish/AutoFish.cs @@ -0,0 +1,432 @@ +using AutoFish.Utils; +using Terraria; +using Terraria.ID; +using TShockAPI; +using TShockAPI.Hooks; +using TerrariaApi.Server; +using System.Text; + +namespace AutoFish; + +[ApiVersion(2, 1)] +public class AutoFish : TerrariaPlugin +{ + + #region 插件信息 + public override string Name => "自动钓鱼"; + public override string Author => "羽学 少司命"; + public override Version Version => new Version(1, 3, 0); + public override string Description => "涡轮增压不蒸鸭"; + #endregion + + #region 注册与释放 + public AutoFish(Main game) : base(game) { } + public override void Initialize() + { + LoadConfig(); + GeneralHooks.ReloadEvent += ReloadConfig; + GetDataHandlers.NewProjectile += this.ProjectNew!; + GetDataHandlers.NewProjectile += this.BuffUpdate!; + ServerApi.Hooks.ServerJoin.Register(this, this.OnJoin); + GetDataHandlers.PlayerUpdate.Register(this.OnPlayerUpdate); + ServerApi.Hooks.ProjectileAIUpdate.Register(this, this.ProjectAiUpdate); + TShockAPI.Commands.ChatCommands.Add(new Command("autofish", Commands.Afs, "af", "autofish")); + } + + protected override void Dispose(bool disposing) + { + if (disposing) + { + GeneralHooks.ReloadEvent -= ReloadConfig; + GetDataHandlers.NewProjectile -= this.ProjectNew!; + GetDataHandlers.NewProjectile -= this.BuffUpdate!; + ServerApi.Hooks.ServerJoin.Deregister(this, this.OnJoin); + GetDataHandlers.PlayerUpdate.UnRegister(this.OnPlayerUpdate); + ServerApi.Hooks.ProjectileAIUpdate.Deregister(this, this.ProjectAiUpdate); + TShockAPI.Commands.ChatCommands.RemoveAll(x => x.CommandDelegate == Commands.Afs); + } + base.Dispose(disposing); + } + #endregion + + #region 配置重载读取与写入方法 + internal static Configuration Config = new(); + private static void ReloadConfig(ReloadEventArgs args) + { + LoadConfig(); + args.Player.SendInfoMessage(GetString("[自动钓鱼]重新加载配置完毕。")); + } + private static void LoadConfig() + { + Config = Configuration.Read(); + Config.Write(); + } + #endregion + + #region 玩家更新配置方法(创建配置结构) + internal static MyData Data = new(); + private void OnJoin(JoinEventArgs args) + { + if (args == null || !Config.Enabled) + { + return; + } + + var plr = TShock.Players[args.Who]; + + if (plr == null) + { + return; + } + + // 如果玩家不在数据表中,则创建新的数据条目 + if (!Data.Items.Any(item => item.Name == plr.Name)) + { + Data.Items.Add(new MyData.ItemData() + { + Name = plr.Name, + Enabled = true, + Buff = true, + Mod = false, + }); + } + } + #endregion + + #region 触发自动钓鱼方法 + private void ProjectAiUpdate(ProjectileAiUpdateEventArgs args) + { + if (args.Projectile.owner is < 0 or > Main.maxPlayers || + !args.Projectile.active || + !args.Projectile.bobber || + !Config.Enabled) + { + return; + } + + var plr = TShock.Players[args.Projectile.owner]; + if (plr == null || !plr.Active || !plr.HasPermission("autofish")) + { + return; + } + + // 从数据表中获取与玩家名字匹配的配置项 + var list = Data.Items.FirstOrDefault(x => x.Name == plr.Name); + // 如果数据表为空,开关没有开启则返回 + if (list == null || !list.Enabled) + { + return; + } + + //开启消耗模式 + if (Config.ConMod) + { + //多加一个 list.Mod 来判断玩家是否花费了【指定物品】来换取功能时长 + if (list.Mod && list.Enabled) + { + ControlFishing(args, plr); + } + } + else + { + //否则只要打开插件开关就能使用功能 + if (list.Enabled) + { + ControlFishing(args, plr); + } + } + } + #endregion + + #region 自动钓鱼核心逻辑(由少司命贡献) 我就加一下他没写完的逻辑- - + private static void ControlFishing(ProjectileAiUpdateEventArgs args, TSPlayer plr) + { + if (args.Projectile.ai[1] < 0) + { + args.Projectile.ai[0] = 1.0f; + + var baitItem = new Item(); + + // 检查并选择消耗饵料 + plr.TPlayer.ItemCheck_CheckFishingBobber_PickAndConsumeBait(args.Projectile, out var pullTheBobber, out var baitTypeUsed); + if (pullTheBobber) + { + plr.TPlayer.ItemCheck_CheckFishingBobber_PullBobber(args.Projectile, baitTypeUsed); + + // 更新玩家背包 使用饵料信息 + for (var i = 0; i < plr.TPlayer.inventory.Length; i++) + { + var inv = plr.TPlayer.inventory[i]; + + //玩家饵料(指的是你手上鱼竿上的那个数字),使用的饵料是背包里的物品 + if (inv.bait > 0 && baitTypeUsed == inv.type) + { + //当物品数量正常则开始进入钓鱼检查 + if (inv.stack > 0) + { + //当前物品数量为1则移除(避免选中的饵不会主动消失 变成无限饵 或 卡住线程) + if (plr.TPlayer.inventory[i].stack == 1) + { + inv.TurnToAir(); + } + + //发包到对应饵料的格子内 + plr.SendData(PacketTypes.PlayerSlot, "", plr.Index, i); + break; + } + } + } + } + + //松露虫 判断一下玩家是否在海边 + if (baitItem.type == 2673 && plr.X / 16 == Main.oceanBG && plr.Y / 16 == Main.oceanBG) + { + args.Projectile.ai[1] = 0; + plr.SendData(PacketTypes.ProjectileNew, "", args.Projectile.whoAmI); + return; + } + + do //无限循环检查 + { + // 执行钓鱼检查 + args.Projectile.FishingCheck(); + + // 将localAI[1]的值复制到ai[1] + args.Projectile.ai[1] = args.Projectile.localAI[1]; + + //如果额外渔获 有任何1个物品ID 则参与AI[1] + if (Config.DoorItems.Any()) + { + //确保浮漂正在运动,没有鱼上钩(即ai[1]小于等于0) + if (args.Projectile.ai[1] <= 0) + { + // 从DoorItems中随机选择一个物品,并将其ID赋值给ai[1],模拟有新鱼上钩的情况 + args.Projectile.ai[1] = Convert.ToSingle(Config.DoorItems.OrderByDescending(x => Guid.NewGuid()).First()); + } + } + } + while (args.Projectile.ai[1] <= 0); // 循环直到有一个有效的鱼上钩(ai[1]大于0) + + //这里发的是连续弹幕 避免线断 因为弹幕是不需要玩家物理点击来触发收杆的 + plr.SendData(PacketTypes.ProjectileNew, "", args.Projectile.whoAmI); + + var index = SpawnProjectile.NewProjectile(Main.projectile[args.Projectile.whoAmI].GetProjectileSource_FromThis(), + args.Projectile.position, args.Projectile.velocity, args.Projectile.type, 0, 0, args.Projectile.owner, 0, 0, 0); + + plr.SendData(PacketTypes.ProjectileNew, "", index); + } + } + #endregion + + #region 多线钓鱼 + public void ProjectNew(object sender, GetDataHandlers.NewProjectileEventArgs e) + { + var plr = e.Player; + var guid = Guid.NewGuid().ToString(); + var HookCount = Main.projectile.Count(p => p.active && p.owner == e.Owner && p.bobber); // 浮漂计数 + + if (plr == null || + !plr.Active || + !plr.IsLoggedIn || + !Config.Enabled || + !Config.MoreHook || + !plr.HasPermission("autofish") || + HookCount > Config.HookMax - 1) + { + return; + } + + // 从数据表中获取与玩家名字匹配的配置项 + var list = Data.Items.FirstOrDefault(x => x.Name == plr.Name); + // 如果没有找到配置项,或者自动钓鱼功能或启用状态未设置,则返回 + if (list == null || !list.Enabled) + { + return; + } + + //开启消耗模式 + if (Config.ConMod) + { + //玩家的自动钓鱼开关 + if (list.Mod && list.Enabled) + { + // 检查是否上钩 + if (Tools.BobbersActive(e.Owner)) + { + //构建新弹幕 + var index = SpawnProjectile.NewProjectile(Main.projectile[e.Index].GetProjectileSource_FromThis(), + e.Position, e.Velocity, e.Type, (int)e.Damage, e.Knockback, e.Owner, 0, 0, 0, -1, guid); + + plr.SendData(PacketTypes.ProjectileNew, "", index); + + // 更新多线计数 + HookCount++; + } + } + } + + else //正常模式下多线 + { + if (list.Enabled) + { + if (Tools.BobbersActive(e.Owner)) + { + var index = SpawnProjectile.NewProjectile(Main.projectile[e.Index].GetProjectileSource_FromThis(), + e.Position, e.Velocity, e.Type, (int)e.Damage, e.Knockback, e.Owner, 0, 0, 0, -1, guid); + + plr.SendData(PacketTypes.ProjectileNew, "", index); + + HookCount++; + } + } + } + } + #endregion + + #region Buff更新方法 + public void BuffUpdate(object sender, GetDataHandlers.NewProjectileEventArgs e) + { + var plr = e.Player; + + if (plr == null || !plr.Active || !plr.IsLoggedIn || !Config.Enabled || !plr.HasPermission("autofish")) + { + return; + } + + // 从数据表中获取与玩家名字匹配的配置项 + var list = Data.Items.FirstOrDefault(x => x.Name == plr.Name); + if (list == null || !list.Buff ) + { + return; + } + + //出现鱼钩摆动就给玩家施加buff + if (list.Enabled) + { + if (Tools.BobbersActive(e.Owner)) + { + foreach (var buff in Config.BuffID) + { + plr.SetBuff(buff.Key, buff.Value); + } + } + } + } + #endregion + + #region 消耗模式:消耗物品开启自动钓鱼方法 + private void OnPlayerUpdate(object? sender, GetDataHandlers.PlayerUpdateEventArgs e) + { + var plr = e.Player; + if (!Config.Enabled || !Config.ConMod || e == null || + plr == null || !plr.IsLoggedIn || !plr.Active || + !plr.HasPermission("autofish")) + { + return; + } + + var data = Data.Items.FirstOrDefault(x => x.Name == plr.Name); + + if (data == null || !data.Enabled) + { + return; + } + + // 播报玩家消耗鱼饵用的 + var mess = new StringBuilder(); + + //当玩家的自动钓鱼没开启时 + if (!data.Mod) + { + //初始化一个消耗值 + var sun = Config.BaitStack; + + // 统计背包中指定鱼饵的总数量(不包含手上物品) + var TotalBait = plr.TPlayer.inventory.Sum(inv => + (Config.BaitType.Contains(inv.type) && + inv.type != plr.TPlayer.inventory[plr.TPlayer.selectedItem].type) ? + inv.stack : 0); + + // 如果背包中有足够的鱼饵数量 和消耗值相等 + if (TotalBait >= sun) + { + // 遍历背包58格 + for (var i = 0; i < plr.TPlayer.inventory.Length && sun > 0; i++) + { + var inv = plr.TPlayer.inventory[i]; + + // 是Config里指定的鱼饵,不是手上的物品 + if (Config.BaitType.Contains(inv.type)) + { + var BaitStack = Math.Min(sun, inv.stack); // 计算需要消耗的鱼饵数量 + + inv.stack -= BaitStack; // 从背包中扣除鱼饵 + sun -= BaitStack; // 减少消耗值 + + // 记录消耗的鱼饵数量到播报 + mess.AppendFormat(" [c/F25156:{0}]([c/AECDD1:{1}]) ", TShock.Utils.GetItemById(inv.type).Name, BaitStack); + + // 如果背包中的鱼饵数量为0,清空该格子 + if (inv.stack < 1) + { + inv.TurnToAir(); + } + + // 发包给背包里对应格子的鱼饵 + plr.SendData(PacketTypes.PlayerSlot, "", plr.Index, PlayerItemSlotID.Inventory0 + i); + } + } + + // 消耗值清空时,开启自动钓鱼开关 + if (sun <= 0) + { + data.Mod = true; + data.LogTime = DateTime.Now; + plr.SendMessage(GetString($"玩家 [c/46C2D4:{plr.Name}] 已开启[c/F5F251:自动钓鱼] 消耗物品为:{mess}"), 247, 244, 150); + } + } + } + + else //当 data.Mod 开启时 + { + //由它判断关闭自动钓鱼 + ExitMod(plr, data); + } + } + #endregion + + #region 消耗模式:过期后关闭自动钓鱼方法 + private static int ClearCount = 0; //需要关闭钓鱼权限的玩家计数 + private static void ExitMod(TSPlayer plr, MyData.ItemData data) + { + var mess2 = new StringBuilder(); + mess2.AppendLine(GetString($"[i:3455][c/AD89D5:自][c/D68ACA:动][c/DF909A:钓][c/E5A894:鱼][i:3454]")); + mess2.AppendLine(GetString($"以下玩家超过 [c/E17D8C:{Config.timer}] 分钟 已关闭[c/76D5B4:自动钓鱼]权限:")); + + // 只显示分钟 + var Minutes = (DateTime.Now - data.LogTime).TotalMinutes; + + // 时间过期 关闭自动钓鱼权限 + if (Minutes >= Config.timer) + { + ClearCount++; + data.Mod = false; + data.LogTime = default; // 清空记录时间 + mess2.AppendFormat(GetString("[c/A7DDF0:{0}]:[c/74F3C9:{1}分钟]"), data.Name, Math.Floor(Minutes)); + } + + // 确保有一个玩家计数,只播报一次 + if (ClearCount > 0 && mess2.Length > 0) + { + //广告开关 + if (Config.AdvertisementEnabled) + { + //自定义广告内容 + mess2.AppendLine(Config.Advertisement); + } + plr.SendMessage(mess2.ToString(), 247, 244, 150); + ClearCount = 0; + } + } + #endregion +} \ No newline at end of file diff --git a/src/AutoFish/AutoFish.csproj b/src/AutoFish/AutoFish.csproj new file mode 100644 index 00000000..21597d83 --- /dev/null +++ b/src/AutoFish/AutoFish.csproj @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/AutoFish/Commands.cs b/src/AutoFish/Commands.cs new file mode 100644 index 00000000..477a81c4 --- /dev/null +++ b/src/AutoFish/Commands.cs @@ -0,0 +1,309 @@ +using System.Text; +using Terraria; +using TShockAPI; + +namespace AutoFish; + +public class Commands +{ + #region 菜单方法 + private static void HelpCmd(TSPlayer plr) + { + if (plr == null) + { + return; + } + else + { + //普通玩家 + if (!plr.HasPermission("autofish.admin")) + { + var mess = new StringBuilder(); + mess.AppendFormat(GetString($" [i:3455][c/AD89D5:自][c/D68ACA:动][c/DF909A:钓][c/E5A894:鱼][i:3454]")); + + if (AutoFish.Config.AdvertisementEnabled) + { + mess.AppendFormat(AutoFish.Config.Advertisement); + } + + mess.AppendFormat(GetString("\n/af -- 查看自动钓鱼菜单\n") + + GetString("/af on -- 自动钓鱼[c/4686D4:开启]功能\n") + + GetString("/af off -- 自动钓鱼[c/F25055:关闭]功能\n") + + GetString("/af buff -- 开启丨关闭[c/F6B152:钓鱼BUFF]")); + + if (AutoFish.Config.DoorItems.Any()) + { + mess.AppendFormat(GetString("\n/af loot -- 查看[c/F25055:额外渔获表]")); + } + + if (AutoFish.Config.ConMod) + { + mess.AppendFormat(GetString("\n/af list -- 列出消耗模式[c/F5F251:指定物品表]")); + } + + plr.SendMessage(mess.ToString(), 193, 223, 186); + } + + //管理员 + else + { + var mess = new StringBuilder(); + mess.AppendFormat(GetString($" [i:3455][c/AD89D5:自][c/D68ACA:动][c/DF909A:钓][c/E5A894:鱼][i:3454]")); + + if (AutoFish.Config.AdvertisementEnabled) + { + mess.AppendFormat(AutoFish.Config.Advertisement); + } + + mess.AppendFormat(GetString("\n/af on 或 off -- 自动钓鱼[c/4686D4:开启]|[c/F25055:关闭]功能\n") + + GetString("/af buff -- 开启丨关闭[c/F6B152:钓鱼BUFF]\n") + + GetString("/af more -- 开启丨关闭[c/DB48A7:多线模式]\n") + + GetString("/af duo 数字 -- 设置多线的[c/4686D4:钩子数量]\n") + + GetString("/af mod -- 开启丨关闭[c/50D647:消耗模式]")); + + if (AutoFish.Config.ConMod) + { + mess.AppendFormat(GetString("\n/af list -- 列出消耗[c/F5F251:指定物品表]\n") + + GetString("/af set 数量 -- 设置消耗[c/47C2D5:物品数量]要求\n") + + GetString("/af time 数字 -- 设置消耗[c/F6B152:自动时长]\n") + + GetString("/af add 或 del 物品名 -- [c/87DF86:添加]|[c/F25055:移除]消耗指定物品")); + } + + if (AutoFish.Config.DoorItems.Any()) + { + mess.AppendFormat(GetString("\n/af loot -- 查看[c/F25055:额外渔获表]\n") + + GetString("/af + 或 - 名字 -- 为额外渔获[c/87DF86:添加]|[c/F25055:移除]物品")); + } + + plr.SendMessage(mess.ToString(), 193, 223, 186); + } + } + } + #endregion + + public static void Afs(CommandArgs args) + { + var plr = args.Player; + var data = AutoFish.Data.Items.FirstOrDefault(item => item.Name == plr.Name); + + if (!AutoFish.Config.Enabled) + { + return; + } + + if (data == null) + { + args.Player.SendInfoMessage(GetString("请用角色[c/D95065:重进服务器]后输入:/af 指令查看菜单\n羽学声明:本插件纯属[c/7E93DE:免费]请勿上当受骗"), 217, 217, 217); + return; + } + + //消耗模式下的剩余时间记录 + var Minutes = AutoFish.Config.timer - (DateTime.Now - data.LogTime).TotalMinutes; + + if (args.Parameters.Count == 0) + { + HelpCmd(args.Player); + + if (!data.Enabled) + { + args.Player.SendSuccessMessage(GetString($"请输入该指令开启→: [c/92C5EC:/af on]")); + } + + //开启了消耗模式 + else if (AutoFish.Config.ConMod) + { + args.Player.SendMessage(GetString($"自动钓鱼[c/46C4D4:剩余时长]:[c/F3F292:{Math.Floor(Minutes)}]分钟"), 243, 181, 145); + } + + //检测到血月 + if(Main.bloodMoon) + { + args.Player.SendMessage(GetString($"当前为[c/F25055:血月]无法钓上怪物,可[c/46C4D4:关闭]插件:[c/F3F292:/af off]"), 243, 181, 145); + } + return; + } + + if (args.Parameters.Count == 1) + { + if (args.Parameters[0].ToLower() == "on") + { + data.Enabled = true; + args.Player.SendSuccessMessage(GetString($"玩家 [{args.Player.Name}] 已[c/92C5EC:启用]自动钓鱼功能。")); + return; + } + + if (args.Parameters[0].ToLower() == "off") + { + data.Enabled = false; + args.Player.SendSuccessMessage(GetString($"玩家 [{args.Player.Name}] 已[c/92C5EC:禁用]自动钓鱼功能。")); + return; + } + + if (args.Parameters[0].ToLower() == "buff") + { + var isEnabled = data.Buff; + data.Buff = !isEnabled; + var Mess = isEnabled ? GetString("禁用") : GetString("启用"); + args.Player.SendSuccessMessage(GetString($"玩家 [{args.Player.Name}] 已[c/92C5EC:{Mess}]自动钓鱼BUFF")); + return; + } + + if (args.Parameters[0].ToLower() == "list" && AutoFish.Config.ConMod) + { + args.Player.SendInfoMessage(GetString($"[指定消耗物品表]\n") + string.Join(", ", AutoFish.Config.BaitType.Select(x => TShock.Utils.GetItemById(x).Name + "([c/92C5EC:{0}])".SFormat(x)))); + args.Player.SendSuccessMessage(GetString($"兑换规则为:每[c/F5F252:{AutoFish.Config.BaitStack}]个 => [c/92C5EC:{AutoFish.Config.timer}]分钟")); + return; + } + + if (args.Parameters[0].ToLower() == "loot" && AutoFish.Config.DoorItems.Any()) + { + args.Player.SendInfoMessage(GetString($"[额外渔获表]\n") + string.Join(", ", AutoFish.Config.DoorItems.Select(x => TShock.Utils.GetItemById(x).Name + "([c/92C5EC:{0}])".SFormat(x)))); + return; + } + + //管理权限 + if (plr.HasPermission("autofish.admin")) + { + if (args.Parameters[0].ToLower() == "more") + { + var isEnabled = AutoFish.Config.MoreHook; + AutoFish.Config.MoreHook = !isEnabled; + var Mess = isEnabled ? GetString("禁用") : GetString("启用"); + args.Player.SendSuccessMessage(GetString($"玩家 [{args.Player.Name}] 已[c/92C5EC:{Mess}]多线模式")); + AutoFish.Config.Write(); + return; + } + + if (args.Parameters[0].ToLower() == "mod") + { + var isEnabled = AutoFish.Config.ConMod; + AutoFish.Config.ConMod = !isEnabled; + var Mess = isEnabled ? GetString("禁用") : GetString("启用"); + args.Player.SendSuccessMessage(GetString($"玩家 [{args.Player.Name}] 已[c/92C5EC:{Mess}]消耗模式")); + AutoFish.Config.Write(); + return; + } + } + } + + //管理权限 + if (plr.HasPermission("autofish.admin")) + { + if (args.Parameters.Count == 2) + { + Item item; + var Items = TShock.Utils.GetItemByIdOrName(args.Parameters[1]); + if (Items.Count > 1) + { + args.Player.SendMultipleMatchError(Items.Select(i => i.Name)); + return; + } + + if (Items.Count == 0) + { + args.Player.SendErrorMessage(GetString("不存在该物品,\"物品查询\": \"[c/92C5EC:https://terraria.wiki.gg/zh/wiki/Item_IDs]\"")); + return; + } + + else + { + item = Items[0]; + } + + switch (args.Parameters[0].ToLower()) + { + case "add": + { + if (AutoFish.Config.BaitType.Contains(item.type)) + { + args.Player.SendErrorMessage(GetString("物品 [c/92C5EC:{0}] 已在指定鱼饵表中!"), item.Name); + return; + } + AutoFish.Config.BaitType.Add(item.type); + AutoFish.Config.Write(); + args.Player.SendSuccessMessage(GetString("已成功将物品添加指定鱼饵表: [c/92C5EC:{0}]!"), item.Name); + break; + } + + case "del": + { + if (!AutoFish.Config.BaitType.Contains(item.type)) + { + args.Player.SendErrorMessage(GetString("物品 {0} 不在指定鱼饵表中!"), item.Name); + return; + } + AutoFish.Config.BaitType.Remove(item.type); + AutoFish.Config.Write(); + args.Player.SendSuccessMessage(GetString("已成功从指定鱼饵表移出物品: [c/92C5EC:{0}]!"), item.Name); + break; + } + + case "+": + { + if (AutoFish.Config.DoorItems.Contains(item.type)) + { + args.Player.SendErrorMessage(GetString("物品 [c/92C5EC:{0}] 已在额外渔获表中!"), item.Name); + return; + } + AutoFish.Config.DoorItems.Add(item.type); + AutoFish.Config.Write(); + args.Player.SendSuccessMessage(GetString("已成功将物品添加额外渔获表: [c/92C5EC:{0}]!"), item.Name); + break; + } + + case "-": + { + if (!AutoFish.Config.DoorItems.Contains(item.type)) + { + args.Player.SendErrorMessage(GetString("物品 {0} 不在额外渔获中!"), item.Name); + return; + } + AutoFish.Config.DoorItems.Remove(item.type); + AutoFish.Config.Write(); + args.Player.SendSuccessMessage(GetString("已成功从额外渔获移出物品: [c/92C5EC:{0}]!"), item.Name); + break; + } + + case "set": + { + if (int.TryParse(args.Parameters[1], out var num)) + { + AutoFish.Config.BaitStack = num; + AutoFish.Config.Write(); + args.Player.SendSuccessMessage(GetString("已成功将物品数量要求设置为: [c/92C5EC:{0}] 个!"), num); + } + break; + } + + case "duo": + { + if (int.TryParse(args.Parameters[1], out var num)) + { + AutoFish.Config.HookMax = num; + AutoFish.Config.Write(); + args.Player.SendSuccessMessage(GetString("已成功将多钩数量上限设置为: [c/92C5EC:{0}] 个!"), num); + } + break; + } + + case "time": + { + if (int.TryParse(args.Parameters[1], out var num)) + { + AutoFish.Config.timer = num; + AutoFish.Config.Write(); + args.Player.SendSuccessMessage(GetString("已成功将自动时长设置为: [c/92C5EC:{0}] 分钟!"), num); + } + break; + } + + default: + { + HelpCmd(args.Player); + break; + } + } + } + } + } +} diff --git a/src/AutoFish/Configuration.cs b/src/AutoFish/Configuration.cs new file mode 100644 index 00000000..f256b729 --- /dev/null +++ b/src/AutoFish/Configuration.cs @@ -0,0 +1,90 @@ +using Newtonsoft.Json; +using TShockAPI; + +namespace AutoFish; + +internal class Configuration +{ + #region 实例变量 + [JsonProperty("插件开关", Order = -12)] + public bool Enabled { get; set; } = true; + + [JsonProperty("多钩钓鱼", Order = -11)] + public bool MoreHook { get; set; } = true; + + [JsonProperty("多钩上限", Order = -10)] + public int HookMax { get; set; } = 5; + + [JsonProperty("广告开关", Order = -9)] + public bool AdvertisementEnabled { get; set; } = true; + + [JsonProperty("广告内容", Order = -8)] + public string Advertisement { get; set; } = GetString($"\n[i:3456][C/F2F2C7:插件开发] [C/BFDFEA:by] [c/00FFFF:羽学] | [c/7CAEDD:少司命][i:3459]"); + + [JsonProperty("Buff表", Order = -6)] + public Dictionary BuffID { get; set; } = new Dictionary(); + + [JsonProperty("消耗模式", Order = -5)] + public bool ConMod { get; set; } = false; + + [JsonProperty("消耗数量", Order = -4)] + public int BaitStack { get; set; } = 10; + + [JsonProperty("自动时长", Order = -3)] + public int timer { get; set; } = 24; + + [JsonProperty("消耗物品", Order = -2)] + public List BaitType { get; set; } = new(); + + [JsonProperty("额外渔获", Order = -1)] + public List DoorItems = new(); + #endregion + + #region 预设参数方法 + public void Ints() + { + this.BuffID = new Dictionary() + { + { 80,10 }, + { 122,240 } + }; + + this.BaitType = new List + { + 2002, 2675, 2676, 3191, 3194 + }; + + this.DoorItems = new List + { + 29,3093,4345 + }; + } + #endregion + + #region 读取与创建配置文件方法 + public static readonly string FilePath = Path.Combine(TShock.SavePath, "自动钓鱼.json"); + + public void Write() + { + var json = JsonConvert.SerializeObject(this, Formatting.Indented); + File.WriteAllText(FilePath, json); + } + + public static Configuration Read() + { + if (!File.Exists(FilePath)) + { + var NewConfig = new Configuration(); + NewConfig.Ints(); + new Configuration().Write(); + return NewConfig; + } + else + { + var jsonContent = File.ReadAllText(FilePath); + return JsonConvert.DeserializeObject(jsonContent)!; + } + } + #endregion + +} \ No newline at end of file diff --git a/src/AutoFish/README.md b/src/AutoFish/README.md new file mode 100644 index 00000000..a14f5dbd --- /dev/null +++ b/src/AutoFish/README.md @@ -0,0 +1,100 @@ +# AutoFish 自动钓鱼 + +- 作者: 羽学 少司命 +- 出处: 无 +- 这是一个Tshock服务器的自动钓鱼插件 +- 可钓出除了环境已存在物品外还可以为钓鱼配置【额外物品】 +- 可通过配置文件调整单次鱼钩数量上限,或消耗指定物品来换取插件使用时长。 +- 配备完整的指令系统(有些功能没开启或没权限不会显示相关指令) +- 本插件无法在血月钓任何NPC请注意使用指令关闭 +- (处于血月环境下使用/af指令会有相对于提示) + +## 更新日志 + +``` +v1.3.0 +修复了首选鱼饵不会消失,变成无限饵,或卡线程BUG +修改了额外渔获也能与其他环境已存在的物品一起上钩 +重构了消耗模式的代码逻辑,优化性能,修复BUG。 +加入了设置多钩数量的指令:/af duo 数量 +加入了额外渔获表的相关指令 +把/af buff指令改为玩家可用,用来切换自身BUFF + +v1.2.0 +修复了钓鱼不消耗鱼饵问题 +修复了松露虫钓不了猪鲨的BUG +修复了鱼饵数量为1时线程卡住问题 +加入了【消耗模式】配置项 +加入了【钓鱼BUFF】配置项(上钩才会触发) +消耗模式为1.1.0版的扣除物品数量获取自动时长逻辑 +完善了自动钓鱼的指令系统,并对其做了不同权限与模式下的内容显示 + +v1.1.0 +成功完成Tshock版《自动钓鱼》, +加入了消耗鱼饵数量来换取自动钓鱼使用时长的逻辑 +当身上有松露虫时,会自动钓上铁镐,并试图关闭玩家的自动钓鱼开关 +玩家可通过/af on指令重新开启插件,并不会清空玩家的自动钓鱼时长 + +v1.0.0 +试图制作Tshock版《自动钓鱼》,而失败的半成品: +服务器无法修改客户端玩家的操作,更没有相对数据包来处理上钩的状态。 +尝试从AI[0]改为1来触发收线效果,但无法获取到实际的渔获。 + +``` + +## 指令 + +| 语法 | 别名 | 权限 | 说明 | +| -------------------------------- | :---: | :--------------: | :--------------------------------------: | +| /af | /autofish | autofish | 指令菜单(查询自动钓鱼所剩时长) | +| /af on | /autofish on | autofish | 开启玩家自己的自动钓鱼 | +| /af off | /autofish off | autofish | 关闭玩家自己的自动钓鱼 | +| /af list | /autofish list | autofish | 列出消耗模式指定物品表 | +| /af loot | /autofish loot | autofish | 列出额外渔获表 | +| /af buff | /autofish buff | autofish | 开启或关闭玩家自己的钓鱼BUFF | +| /af more | /autofish more | autofish.admin | 开启或关闭多线模式 | +| /af duo 数量 | /autofish duo | autofish.admin | 设置多线的钩子数量 | +| /af + 物品名 | /autofish + name | autofish.admin | 为额外渔获添加物品 | +| /af - 物品名 | /autofish - name | autofish.admin | 为额外渔获移除物品 | +| /af mod | /autofish mod | autofish.admin | 开启或关闭消耗模式 | +| /af set 数量 | /autofish set num | autofish.admin | 设置消耗物品数量要求 | +| /af time 数字 | /autofish time num | autofish.admin | 设置消耗自动时长 | +| /af add 物品名 | /autofish add name | autofish.admin | 添加消耗指定物品 | +| /af del 物品名 | /autofish del name | autofish.admin | 移除消耗指定物品 | +| /reload | 无 | tshock.cfg.reload | 重载配置文件 | + +## 配置 +> 配置文件位置:tshock/自动钓鱼.json +```json +{ + "插件开关": true, //全局插件开关 + "多钩钓鱼": true, //为自动钓鱼开启连发模式,让钓鱼效率更高 + "多钩上限": 5, //定义最多可以多少鱼钩同时自动钓 + "广告开关": true, //下面这条字符串的开关 + "广告内容": "\n[i:3456][C/F2F2C7:插件开发] [C/BFDFEA:by] [c/00FFFF:羽学] | [c/7CAEDD:少司命][i:3459]", //可自定义的字符串内容 + "Buff": { + "80": 10, //80为buff的ID,10为持续时间,单位为帧,60帧=1秒 + "122": 240 + }, + "消耗模式": false, //消耗物品来换取自动钓鱼使用时长 + "消耗数量": 10, //在消耗模式下对以下物品的数量要求(比如物品A有6个+物品B有4个,就算10个) + "自动时长": 24, //在消耗模式下赐予玩家使用自动钓鱼的时间,单位为分钟 + "消耗物品": [ + 2002, //消耗模式的指定消耗物品 + 2675, + 2676, + 3191, + 3194 + ], + "额外渔获": [ + 75, //除了环境本身存在的渔获外的自定义渔获 + 29, + 3093, + 4345 + ] +} +``` +## 反馈 +- 优先发issued -> 共同维护的插件库:https://github.com/UnrealMultiple/TShockPlugin +- 次优先:TShock官方群:816771079 +- 大概率看不到但是也可以:国内社区trhub.cn ,bbstr.net , tr.monika.love diff --git a/src/AutoFish/README_EN.md b/src/AutoFish/README_EN.md new file mode 100644 index 00000000..56780b38 --- /dev/null +++ b/src/AutoFish/README_EN.md @@ -0,0 +1,101 @@ +# AutoFish + +- Authors: 羽学 & 少司命 +- Source: 无 +- AutoFish is an automatic fishing plugin designed for Tshock servers. +- It allows players to automate their fishing activities, enhancing the gameplay experience by adding extra items to the fishing pool and providing various customization options. +- Extra Items: In addition to items that already exist in the environment, you can configure extra items to be caught through fishing. +- Multi-Hook Fishing: Adjust the number of hooks per cast via the configuration file to increase fishing efficiency. +- Consumption Mode: Consume specific items to exchange for plugin usage duration. +- Fishing Buffs: Players can enable or disable fishing buffs that trigger when a catch is made. +- Blood Moon Restriction: No NPCs can be fished during a Blood Moon. A relevant prompt will appear when using the /af command during a Blood Moon. +- Complete Command System: Some features will not display related commands if they are not enabled or the user does not have permission. + +## Update Log + +``` +v1.3.0 +Fixed: Preferred bait would not disappear, turning it into infinite bait or causing thread locking bugs. +Modified: Extra catches can now be hooked along with existing environmental items. +Refactored: Consumption mode code logic to optimize performance and fix bugs. +Added: Command to set the number of multi-hooks: /af duo . +Added: Commands related to the extra catch table. +Changed: Made the /af buff command player-accessible to toggle personal buffs. + +v1.2.0 +Fixed: Fishing did not consume bait. +Fixed: Truffle Worm could not catch a Pigron. +Fixed: Thread locking issue when the bait count was 1. +Added: Configuration option for consumption mode. +Added: Configuration option for fishing buffs (triggered only when a catch is made). +Improved: Enhanced the automatic fishing command system and adjusted the content displayed based on different permissions and modes. + +v1.1.0 +Completed: Initial release of the Tshock version of AutoFish. +Added: Logic to exchange automatic fishing usage duration by consuming bait quantities. +Added: When Truffle Worm is in the player's inventory, it will automatically catch an Iron Pickaxe and attempt to turn off the player's automatic fishing. +Added: Players can use the /af on command to re-enable the plugin without resetting their automatic fishing duration. + +v1.0.0 +Attempted: Initial development of the Tshock version of AutoFish, which failed due to the inability to modify client-side player actions and the lack of data packets to handle the hook state. +Attempted: Triggering the reel-in effect by changing AI[0] to 1, but unable to obtain actual catches. + +``` + +## Commands + +| Command Syntax | Alias | Permission | Description | +| -------------------------------- | :---: | :--------------: | :--------------------------------------: | +| /af | /autofish | autofish | Command menu (check remaining automatic fishing duration) | +| /af on | /autofish on | autofish | Enable automatic fishing for the player | +| /af off | /autofish off | autofish | Disable automatic fishing for the player | +| /af list | /autofish list | autofish | List items specified for consumption mode | +| /af loot | /autofish loot | autofish | List extra catch items | +| /af buff | /autofish buff | autofish | Toggle the player's fishing buff | +| /af more | /autofish more | autofish.admin | Enable or disable multi-hook mode | +| /af duo | /autofish duo | autofish.admin | Set the number of hooks for multi-hook mode | +| /af + | /autofish + | autofish.admin | Add an item to the extra catch list | +| /af - | /autofish - | autofish.admin | Remove an item from the extra catch list | +| /af mod | /autofish mod | autofish.admin | Enable or disable consumption mode | +| /af set | /autofish set | autofish.admin | Set the required quantity of items for consumption mode | +| /af time | /autofish time | autofish.admin | Set the duration of automatic fishing in minutes | +| /af add | /autofish add | autofish.admin | Add a specified item for consumption mode | +| /af del | /autofish del | autofish.admin | Remove a specified item from consumption mode | +| /reload | 无 | tshock.cfg.reload | Reload the configuration file | + +## Configuration +> Configuration file location: tshock/自动钓鱼.json +```json +{ + "插件开关": true, // Global plugin switch + "多钩钓鱼": true, // Enable multi-hook mode for automatic fishing to increase efficiency + "多钩上限": 5, // Define the maximum number of hooks that can fish simultaneously + "广告开关": true, // Switch for the following string + "广告内容": "\n[i:3456][C/F2F2C7:Plugin Development] [C/BFDFEA:by] [c/00FFFF:Yu Xue] | [c/7CAEDD:Shao Siming][i:3459]", // Customizable string content + "Buff": { + "80": 10, // 80 is the buff ID, 10 is the duration in frames (60 frames = 1 second) + "122": 240 + }, + "消耗模式": false, // Consume items to exchange for automatic fishing usage duration + "消耗数量": 10, // Item quantity requirement in consumption mode (e.g., 6 of item A + 4 of item B = 10) + "自动时长": 24, // Duration of automatic fishing granted to players in consumption mode, in minutes + "消耗物品": [ + 2002, // Specified items for consumption mode + 2675, + 2676, + 3191, + 3194 + ], + "额外渔获": [ + 75, // Extra catch items in addition to those that exist in the environment + 29, + 3093, + 4345 + ] +} +``` + +## FeedBack +- Github Issue -> TShockPlugin Repo: https://github.com/UnrealMultiple/TShockPlugin +- TShock QQ Group: 816771079 +- China Terraria Forum: trhub.cn, bbstr.net, tr.monika.love diff --git a/src/AutoFish/Utils/MyData.cs b/src/AutoFish/Utils/MyData.cs new file mode 100644 index 00000000..6167e916 --- /dev/null +++ b/src/AutoFish/Utils/MyData.cs @@ -0,0 +1,35 @@ +namespace AutoFish.Utils; + +public class MyData +{ + //玩家数据表 + public List Items { get; set; } = new List(); + + #region 数据结构 + public class ItemData + { + //玩家名字 + public string Name { get; set; } + + //玩家开关 + public bool Enabled { get; set; } = false; + + //消耗模式开关 + public bool Mod { get; set; } = false; + + //BUFF开关 + public bool Buff { get; set; } = false; + + //记录时间 + public DateTime LogTime { get; set; } + + public ItemData(string name = "", bool enabled = true, bool mod = true, bool buff = true) + { + this.Name = name ?? ""; + this.Enabled = enabled; + this.Mod = mod; + this.Buff = buff; + } + } + #endregion +} diff --git a/src/AutoFish/Utils/SpawnProjectile.cs b/src/AutoFish/Utils/SpawnProjectile.cs new file mode 100644 index 00000000..15f61a35 --- /dev/null +++ b/src/AutoFish/Utils/SpawnProjectile.cs @@ -0,0 +1,276 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; + +namespace AutoFish.Utils; + +public class SpawnProjectile +{ + public static int NewProjectile(IEntitySource spawnSource, Vector2 position, Vector2 velocity, int Type, int Damage, float KnockBack, int Owner = -1, float ai0 = 0f, float ai1 = 0f, float ai2 = 0f, int timeLeft = -1, string uuid = "") + { + return NewProjectile(spawnSource, position.X, position.Y, velocity.X, velocity.Y, Type, Damage, KnockBack, Owner, ai0, ai1, ai2, timeLeft, uuid); + } + + public static int NewProjectile(IEntitySource spawnSource, float X, float Y, float SpeedX, float SpeedY, int Type, int Damage, float KnockBack, int Owner = -1, float ai0 = 0f, float ai1 = 0f, float ai2 = 0, int timeLeft = -1, string uuid = "") + { + if (Owner == -1) + { + Owner = Main.myPlayer; + } + var num = 1000; + for (var i = 999; i > 0; i--) + { + if (!Main.projectile[i].active) + { + num = i; + break; + } + } + if (num == 1000) + { + num = Projectile.FindOldestProjectile(); + } + var projectile = Main.projectile[num]; + projectile.SetDefaults(Type); + projectile.position.X = X - (projectile.width * 0.5f); + projectile.position.Y = Y - (projectile.height * 0.5f); + projectile.owner = Owner; + projectile.velocity.X = SpeedX; + projectile.velocity.Y = SpeedY; + projectile.damage = Damage; + projectile.knockBack = KnockBack; + projectile.identity = num; + projectile.gfxOffY = 0f; + projectile.stepSpeed = 1f; + projectile.wet = Collision.WetCollision(projectile.position, projectile.width, projectile.height); + if (projectile.ignoreWater) + { + projectile.wet = false; + } + projectile.honeyWet = Collision.honey; + projectile.shimmerWet = Collision.shimmer; + Main.projectileIdentity[Owner, num] = num; + Projectile.FindBannerToAssociateTo(spawnSource, projectile); + if (projectile.aiStyle == 1) + { + while (projectile.velocity.X >= 16f || projectile.velocity.X <= -16f || projectile.velocity.Y >= 16f || projectile.velocity.Y < -16f) + { + if (projectile.velocity.HasNanOrInf()) + { + break; + } + + projectile.velocity.X *= 0.97f; + projectile.velocity.Y *= 0.97f; + } + } + + switch (Type) + { + case 206: + projectile.ai[0] = Main.rand.Next(-100, 101) * 0.0005f; + projectile.ai[1] = Main.rand.Next(-100, 101) * 0.0005f; + break; + case 335: + projectile.ai[1] = Main.rand.Next(4); + break; + case 358: + projectile.ai[1] = Main.rand.Next(10, 31) * 0.1f; + break; + case 406: + projectile.ai[1] = Main.rand.Next(10, 21) * 0.1f; + break; + default: + projectile.ai[0] = ai0; + projectile.ai[1] = ai1; + projectile.ai[2] = ai2; + break; + } + + if (Type == 434) + { + projectile.ai[0] = projectile.position.X; + projectile.ai[1] = projectile.position.Y; + } + if (Type > 0 && Type < ProjectileID.Count) + { + if (ProjectileID.Sets.NeedsUUID[Type]) + { + projectile.projUUID = projectile.identity; + } + if (ProjectileID.Sets.StardustDragon[Type]) + { + var num2 = Main.projectile[(int)projectile.ai[0]].projUUID; + if (num2 >= 0) + { + projectile.ai[0] = num2; + } + } + } + if (Main.netMode != 0 && Owner == Main.myPlayer) + { + NetMessage.SendData(27, -1, -1, null, num); + } + + if (Owner == Main.myPlayer) + { + if (ProjectileID.Sets.IsAGolfBall[Type] && Damage <= 0) + { + var num3 = 0; + var num4 = 0; + var num5 = 99999999; + for (var j = 999; j > 0; j--) + { + if (Main.projectile[j].active && ProjectileID.Sets.IsAGolfBall[Main.projectile[j].type] && Main.projectile[j].owner == Owner && Main.projectile[j].damage <= 0) + { + num3++; + if (num5 > Main.projectile[j].timeLeft) + { + num4 = j; + num5 = Main.projectile[j].timeLeft; + } + } + } + if (num3 > 10) + { + Main.projectile[num4].Kill(); + } + } + if (Type == 28) + { + projectile.timeLeft = 180; + } + if (Type == 516) + { + projectile.timeLeft = 180; + } + if (Type == 519) + { + projectile.timeLeft = 180; + } + if (Type == 29) + { + projectile.timeLeft = 300; + } + if (Type == 470) + { + projectile.timeLeft = 300; + } + if (Type == 637) + { + projectile.timeLeft = 300; + } + if (Type == 30) + { + projectile.timeLeft = 180; + } + if (Type == 517) + { + projectile.timeLeft = 180; + } + if (Type == 37) + { + projectile.timeLeft = 180; + } + if (Type == 773) + { + projectile.timeLeft = 180; + } + if (Type == 75) + { + projectile.timeLeft = 180; + } + if (Type == 133) + { + projectile.timeLeft = 180; + } + if (Type == 136) + { + projectile.timeLeft = 180; + } + if (Type == 139) + { + projectile.timeLeft = 180; + } + if (Type == 142) + { + projectile.timeLeft = 180; + } + if (Type == 397) + { + projectile.timeLeft = 180; + } + if (Type == 419) + { + projectile.timeLeft = 600; + } + if (Type == 420) + { + projectile.timeLeft = 600; + } + if (Type == 421) + { + projectile.timeLeft = 600; + } + if (Type == 422) + { + projectile.timeLeft = 600; + } + if (Type == 588) + { + projectile.timeLeft = 180; + } + if (Type == 779) + { + projectile.timeLeft = 60; + } + if (Type == 783) + { + projectile.timeLeft = 60; + } + if (Type == 862 || Type == 863) + { + projectile.timeLeft = 60; + } + if (Type == 443) + { + projectile.timeLeft = 300; + } + if (Type == 681) + { + projectile.timeLeft = 600; + } + if (Type == 684) + { + projectile.timeLeft = 60; + } + if (Type == 706) + { + projectile.timeLeft = 120; + } + if (Type == 680 && Main.player[projectile.owner].setSquireT2) + { + projectile.penetrate = 7; + } + if (Type == 777 || Type == 781 || Type == 794 || Type == 797 || Type == 800 || Type == 785 || Type == 788 || Type == 791 || Type == 903 || Type == 904 || Type == 905 || Type == 906 || Type == 910 || Type == 911) + { + projectile.timeLeft = 180; + } + } + if (Type == 249) + { + projectile.frame = Main.rand.Next(5); + } + if (Owner == Main.myPlayer) + { + Main.player[Owner].TryUpdateChannel(projectile); + } + if (timeLeft > 0) + { + projectile.timeLeft = timeLeft; + } + projectile.miscText = uuid; + return num; + } +} diff --git a/src/AutoFish/Utils/Tools.cs b/src/AutoFish/Utils/Tools.cs new file mode 100644 index 00000000..a580ea49 --- /dev/null +++ b/src/AutoFish/Utils/Tools.cs @@ -0,0 +1,22 @@ +using Terraria; +using TShockAPI; + +namespace AutoFish.Utils; + +public class Tools +{ + #region 判断浮漂跳动 + public static bool BobbersActive(int whoAmI) + { + using (var enumerator = Main.projectile.Where((p) => p.active && p.owner == whoAmI && p.bobber).GetEnumerator()) + { + if (enumerator.MoveNext()) + { + _ = enumerator.Current; + return true; + } + } + return false; + } + #endregion +} diff --git a/src/AutoFish/Utils/Vector2Ext.cs b/src/AutoFish/Utils/Vector2Ext.cs new file mode 100644 index 00000000..949a9cff --- /dev/null +++ b/src/AutoFish/Utils/Vector2Ext.cs @@ -0,0 +1,198 @@ +using Microsoft.Xna.Framework; +using Terraria; +using TShockAPI; + +namespace AutoFish.Utils; + +public static class Vector2Ext +{ + public static bool HasNanOrInf(this Vector2 vec) + { + return float.IsNaN(vec.X) || float.IsInfinity(vec.X) + || float.IsNaN(vec.Y) || float.IsInfinity(vec.Y) + || float.IsPositiveInfinity(vec.X) || float.IsPositiveInfinity(vec.Y); + + } + + public static Vector2 RotationAngle(this Vector2 vel, float angle) + { + return vel.RotatedBy(angle * (Math.PI / 180)); + } + + public static Vector2 ToLenOf(this Vector2 vec, float len) + { + var newVec = vec.SafeNormalize(default); + return newVec * len; + } + + public static Vector2[] GetCircleEdgePoints(this Vector2 pos, float radius, float distanceBetweenPoints) + { + var numPoints = (int)Math.Ceiling(2 * Math.PI * radius / distanceBetweenPoints); + var points = new Vector2[numPoints]; + for (var i = 0; i < numPoints; i++) + { + var angle = (float)(i * (2 * Math.PI) / numPoints); + var x = radius * (float)Math.Cos(angle); + var y = radius * (float)Math.Sin(angle); + points[i] = pos + new Vector2(x, y); + } + return points; + } + + public static Vector2[] GetArcPoints(this Vector2 vel, float startAngle, float endAngle, float radius, float interval) + { + var points = new List(); + var steps = (int)Math.Round((endAngle - startAngle + 360) % 360 / interval); + for (var i = 0; i <= steps; i++) + { + var angle = (startAngle + (i * interval) + 360) % 360; + var x = (float)(radius * Math.Cos(angle * Math.PI / 180)); + var y = (float)(radius * Math.Sin(angle * Math.PI / 180)); + points.Add(new Vector2(x, y) + vel); + } + return points.ToArray(); + } + + public static float Magnitude(this Vector2 vel) + { + return Convert.ToSingle(Math.Sqrt((vel.X * vel.X) + (vel.Y * vel.Y))); + } + + public static Vector2 Normalized(this Vector2 vel) + { + var magnitude = vel.Magnitude(); + return new Vector2(vel.X / magnitude, vel.Y / magnitude); + } + + + public static List FindRangeNPCs(this Vector2 pos, float distanceSquared) + { + var npcs = new List(); + foreach (var npc in Main.npc) + { + if (npc != null && npc.active && npc.CanBeChasedBy(null, false)) + { + if (distanceSquared > Math.Abs(npc.Center.Distance(pos))) + { + npcs.Add(npc); + } + } + } + return npcs; + } + + public static List FindRangeProjectiles(this Vector2 pos, float distanceSquared) + { + var projectile = new List(); + foreach (var proj in Main.projectile) + { + if (proj != null && proj.active) + { + if (distanceSquared > Math.Abs(proj.Center.Distance(pos))) + { + projectile.Add(proj); + } + } + } + return projectile; + } + + public static List FindRangePlayers(this Vector2 pos, float distanceSquared) + { + var players = new List(); + foreach (var ply in Main.player) + { + if (ply != null && ply.active) + { + if (distanceSquared > Math.Abs(ply.Center.Distance(pos))) + { + players.Add(ply); + } + } + } + return players; + } + + public static List FindRangeTSPlayers(this Vector2 pos, float distanceSquared) + { + var players = new List(); + foreach (var ply in TShock.Players) + { + if (ply != null && ply.Active) + { + if (distanceSquared > Math.Abs(ply.TPlayer.Center.Distance(pos))) + { + players.Add(ply); + } + } + } + return players; + } + + + public static NPC? FindRangeNPC(this Vector2 pos, float distanceSquared) + { + var npcs = pos.FindRangeNPCs(distanceSquared); + if (npcs.Count == 0) + { + return null; + } + + var boss = npcs.OrderBy(x => Math.Abs(x.position.Distance(pos))); + return boss.FirstOrDefault(x => x.boss, boss.First()); + } + + public static List GenerateCurvePoints(Vector2 pointA, Vector2 pointB, float radius, float interval) + { + if (radius == 0) + { + return new List { pointA, pointB }; + } + List curvePoints = new(); + double distance = (pointB - pointA).Magnitude(); + var numPoints = (int)Math.Round(distance / interval); + for (var i = 0; i <= numPoints; i++) + { + var t = i / (float)numPoints; + var midPoint = Vector2.Lerp(pointA, pointB, t); + var direction = (pointB - pointA).Normalized(); + var perpendicular = new Vector2(-direction.Y, direction.X); + var curvePoint = midPoint + (radius * perpendicular); + if (radius < 0) + { + curvePoint = midPoint - (Math.Abs(radius) * perpendicular); + } + curvePoints.Add(curvePoint); + } + return curvePoints; + } + + public static List GetPointsOnCircle(this Vector2 center, float radius, float startAngle, float angleIncrement, int loopCount) + { + var points = new List(); + var currentAngle = startAngle; + for (var i = 0; i < loopCount; i++) + { + var x = center.X + (radius * (float)Math.Cos(currentAngle * Math.PI / 180)); + var y = center.Y + (radius * (float)Math.Sin(currentAngle * Math.PI / 180)); + points.Add(new Vector2(x, y)); + currentAngle += angleIncrement; + } + return points; + } + + + public static List CreateCircle(this Vector2 startPoint, Vector2 centerPoint, int angleIncrement, int numberOfPoints) + { + var points = new List(); + for (var i = 0; i < numberOfPoints; i++) + { + float angle = angleIncrement * i; + var x = centerPoint.X + ((float)Math.Cos(angle) * (startPoint.X - centerPoint.X)); + var y = centerPoint.Y + ((float)Math.Sin(angle) * (startPoint.Y - centerPoint.Y)); + points.Add(new Vector2(x, y)); + } + return points; + } + +} From 4c44121b0765e56458d780e5b4b66f7dd9bda59f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BE=BD=20=E5=AD=A6?= <1242509682@qq.com> Date: Wed, 6 Nov 2024 00:12:11 +0800 Subject: [PATCH 2/4] =?UTF-8?q?i18n=20=E8=87=AA=E5=8A=A8=E9=92=93=E9=B1=BC?= =?UTF-8?q?/=E8=87=AA=E5=8A=A8=E5=82=A8=E5=AD=98/=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=9E=83=E5=9C=BE=E6=A1=B6/=E5=BD=A9=E8=99=B9=E8=81=8A?= =?UTF-8?q?=E5=A4=A9/=E6=97=B6=E9=97=B4=E5=8A=A0=E9=80=9F=E5=B7=B2?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README_en.md | 10 +- src/AutoAirItem/i18n/en-US.po | 241 ++++++++++++------------- src/AutoAirItem/i18n/template.pot | 138 +++++++------- src/AutoFish/AutoFish.cs | 2 +- src/AutoFish/i18n/en-US.po | 286 ++++++++++++++++++++++++++++++ src/AutoFish/i18n/template.pot | 253 ++++++++++++++++++++++++++ src/AutoStoreItems/i18n/en-US.po | 121 ++++++++----- src/ConvertWorld/i18n/en-US.po | 4 +- src/RainbowChat/i18n/en-US.po | 148 ++++++++++++++++ src/TimeRate/TimeRate.cs | 2 +- src/TimeRate/i18n/en-US.po | 95 ++++++++++ 11 files changed, 1044 insertions(+), 256 deletions(-) create mode 100644 src/AutoFish/i18n/en-US.po create mode 100644 src/AutoFish/i18n/template.pot create mode 100644 src/RainbowChat/i18n/en-US.po create mode 100644 src/TimeRate/i18n/en-US.po diff --git a/README_en.md b/README_en.md index a3a7185e..399f344d 100644 --- a/README_en.md +++ b/README_en.md @@ -61,12 +61,12 @@ | [AdditionalPylons](src/AdditionalPylons/README_EN.md) | Yes | Place more Pylons | No | | [AnnouncementBoxPlus](src/AnnouncementBoxPlus/README.md) | No | Enhance Broadcast Box Functionality | No | | [AutoBroadcast](src/AutoBroadcast/README_EN.md) | Yes | Automatic broadcast | No | -| [AutoAirItem](src/AutoAirItem/README_EN.md) | No | Automatic trash cans | No | +| [AutoAirItem](src/AutoAirItem/README_EN.md) | Yes | Automatic trash cans | No | | [AutoClear](src/Autoclear/README_EN.md) | Yes | Intelligent automatic cleaning | No | | [AutoReset](src/AutoReset/README_EN.md) | Yes | Fully automatic reset | No | -| [AutoStoreItems](src/AutoStoreItems/README_EN.md) | No | Automatic storage | No | +| [AutoStoreItems](src/AutoStoreItems/README_EN.md) | Yes | Automatic storage | No | | [AutoTeam](src/AutoTeam/README_EN.md) | Yes | Automatic team formation | No | -| [AutoFish](src/AutoFish/README_EN.md) | No | Automatic fishing | No | +| [AutoFish](src/AutoFish/README_EN.md) | Yes | Automatic fishing | No | | [Back](src/Back/README_EN.md) | Yes | Return to the point of death | No | | [BagPing](src/BagPing/README_EN.md) | Yes | Mark treasure bags on the map | No | | [BetterWhitelist](src/BetterWhitelist/README_EN.md) | Yes | Whitelist plugin | No | @@ -87,7 +87,7 @@ | [ChestRestore](src/ChestRestore/README_EN.md) | Yes | Infinite items in resource servers | No | | [CNPCShop](src/CNPCShop/README.md) | No | Custom NPC shop | No | | [ConsoleSql](src/ConsoleSql/README.md) | No | Execute SQL statements in the console | No | -| [ConvertWorld](src/ConvertWorld/README.md) | No | Convert world items by defeating monsters | No | +| [ConvertWorld](src/ConvertWorld/README_EN.md) | Yes | Convert world items by defeating monsters | No | | [CreateSpawn](src/CreateSpawn/README.md) | No | Spawn point building generation | No | | [CriticalHit](src/CriticalHit/README.md) | No | Critical hit prompt | No | | [DamageRuleLoot](src/DamageRuleLoot/README_EN.md) | Yes | Determine the drop treasure bag based on the ratio of damage and transfer damage calculation | No | @@ -146,7 +146,7 @@ | [ProgressControls](src/ProgressControls/README.md) | No | Planbook (Automate server control) | No | | [ProgressRestrict](src/ProgressRestrict/README.md) | No | Super progress detection | [DataSync](src/DataSync/README.md) | | [ProxyProtocolSocket](src/ProxyProtocolSocket/README.md) | No | Accept proxy protocol connections | No | -| [RainbowChat](src/RainbowChat/README.md) | No | Random chat color | No | +| [RainbowChat](src/RainbowChat/README.md) | Yes | Random chat color | No | | [RandomBroadcast](src/RandomBroadcast/README.md) | No | Random broadcast | No | | [RandReSpawn](src/RandRespawn/README.md) | Yes | Random spawn point | No | | [RealTime](src/RealTime/README.md) | No | Synchronize server time with real time | No | diff --git a/src/AutoAirItem/i18n/en-US.po b/src/AutoAirItem/i18n/en-US.po index 2d88adb8..82fd693a 100644 --- a/src/AutoAirItem/i18n/en-US.po +++ b/src/AutoAirItem/i18n/en-US.po @@ -1,96 +1,86 @@ msgid "" msgstr "" "Project-Id-Version: AutoAirItem\n" -"POT-Creation-Date: 2024-10-31 19:21:38+0000\n" -"PO-Revision-Date: 2024-11-01 01:37+0800\n" +"POT-Creation-Date: 2024-11-05 23:19:09+0800\n" +"PO-Revision-Date: 2024-11-05 23:24+0800\n" "Last-Translator: \n" "Language-Team: \n" "Language: en_US\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 3.4.2\n" +"X-Generator: Poedit 3.5\n" -#: ../../Commands.cs:119 +#: ..\..\Commands.cs:119 #, csharp-format msgid "[{0}的垃圾桶]\n" msgstr "[{0}'s Trash Bin]\n" -#: ../../Commands.cs:75 -#, csharp-format -msgid "[c/32CEB7:{0}.][c/F3E83B:{1}:] {2}" -msgstr "" - -#: ../../AutoAirItem.cs:51 +#: ..\..\AutoAirItem.cs:51 msgid "[自动垃圾桶]重新加载配置完毕。" msgstr "[Auto Air Item] Reload configuration completed。" -#: ../../Commands.cs:53 +#: ..\..\Commands.cs:75 +#, csharp-format +msgid "[c/32CEB7:{0}.][c/F3E83B:{1}:] {2}" +msgstr "[c/32CEB7:{0}.][c/F3E83B:{1}:] {2}" + +#: ..\..\Commands.cs:53 #, csharp-format msgid "【以下垃圾桶数量超过[c/92C5EC:{0}]的玩家】" -msgstr "" +msgstr "【Players with more than [c/92C5EC:{0}] trash items】" -#: ../../Commands.cs:17 +#: ..\..\Commands.cs:17 msgid "" "【自动垃圾桶】指令菜单 [i:3456][C/F2F2C7:插件开发] [C/BFDFEA:by] [c/00FFFF:羽" "学][i:3459]\n" msgstr "" +"【AutoTrash】Command Menu [i:3456][C/F2F2C7:Plugin Development] [C/BFDFEA:" +"by] [c/00FFFF:羽学][i:3459]\n" -#: ../../Commands.cs:18 +#: ..\..\Commands.cs:18 msgid "/air —— 查看垃圾桶菜单\n" msgstr "/air —— AutoAirItem Help\n" -#: ../../Commands.cs:27 -#, fuzzy, csharp-format -#| msgid "/air add 或 del 物品名字 —— 添加|删除《自动垃圾桶》的物品" +#: ..\..\Commands.cs:27 +#, csharp-format msgid "/air add 或 del 名字 —— [c/87DF86:添加]|[c/F19092:移出]垃圾桶物品" -msgstr "/air add or del item name —— Add|Remove items from the Auto Trash List" +msgstr "" +"/air add 或 del name — [c/87DF86:Add] | [c/F19092:Remove] trash bin items" -#: ../../Commands.cs:24 -#, fuzzy -#| msgid "/air auto —— 监听垃圾桶位格开关\n" +#: ..\..\Commands.cs:24 msgid "/air auto —— 监听[c/F3B691:垃圾桶位格]开关\n" -msgstr "/air auto —— Toggle Auto Trash Bin listening\n" +msgstr "/air auto — Monitor [c/F3B691:Trash Bin Slot] switch\n" -#: ../../Commands.cs:26 +#: ..\..\Commands.cs:26 msgid "/air ck 数量—— 筛选出物品超过此数量的玩家\n" -msgstr "" +msgstr "/air check number — Filter players with items exceeding this Number\n" -#: ../../Commands.cs:22 -#, fuzzy -#| msgid "/air clear —— 清理垃圾桶\n" +#: ..\..\Commands.cs:22 msgid "/air clear —— [c/85CEDF:清理]垃圾桶\n" -msgstr "/air clear —— Clear Trash List\n" +msgstr "/air clear — [c/85CEDF:Clear] the trash bin\n" -#: ../../Commands.cs:21 -#, fuzzy -#| msgid "/air list —— 列出自己的垃圾桶\n" +#: ..\..\Commands.cs:21 msgid "/air list —— [c/F19092:列出]自己的[c/F2F191:垃圾桶]\n" -msgstr "/air list —— List your own trash bin items\n" +msgstr "/air list — [c/F19092:List] your [c/F2F191:Trash Bin]\n" -#: ../../Commands.cs:25 -#, fuzzy -#| msgid "/air mess —— 开启|关闭清理消息\n" +#: ..\..\Commands.cs:25 msgid "/air mess —— 开启|关闭[c/F2F292:清理消息]\n" -msgstr "/air mess —— Toggle cleaning messages\n" +msgstr "/air mess — Enable | Disable [c/F2F292:Cleanup Messages]\n" -#: ../../Commands.cs:20 -#, fuzzy -#| msgid "/air on —— 开启|关闭垃圾桶功能\n" +#: ..\..\Commands.cs:20 msgid "/air on —— 开启|关闭[c/89DF85:垃圾桶]功能\n" -msgstr "/air on —— Toggle trash bin function\n" +msgstr "/air on — Enable | Disable [c/89DF85:Trash Bin] function\n" -#: ../../Commands.cs:23 -#, fuzzy -#| msgid "/air yes —— 将手持物品加入垃圾桶\n" +#: ..\..\Commands.cs:23 msgid "/air yes —— 将[c/E488C1:手持物品]加入垃圾桶\n" -msgstr "/air yes —— Add held item to the Trash\n" +msgstr "/air yes — Add the [c/E488C1:Held Item] to the trash bin\n" -#: ../../Commands.cs:19 +#: ..\..\Commands.cs:19 msgid "/airreset —— 清空[c/85CFDE:所有玩家]数据\n" -msgstr "" +msgstr "/airreset — Clear data for [c/85CFDE:all players]\n" -#: ../../Commands.cs:178 +#: ..\..\Commands.cs:178 msgid "" "不存在该物品,\"物品查询\": \"[c/92C5EC:https://terraria.wiki.gg/zh/wiki/" "Item_IDs]\"" @@ -98,118 +88,111 @@ msgstr "" "The item does not exist, \"item lookup\": \"[c/92C5EC:https://terraria.wiki." "gg/wiki/Item_IDs]\"" -#: ../../Commands.cs:38 -msgid "已[c/92C5EC:清空]所有玩家《自动垃圾桶》数据!" -msgstr "" - -#: ../../AutoAirItem.cs:147 -#, fuzzy, csharp-format -#| msgid "" -#| "已将 '[c/92C5EC:{0}]'从您的背包中移除|移出垃圾桶: [c/A1D4C2:/air del {1}]" -msgid "" -"已将 '[c/92C5EC:{0}]'从您的背包中移除|[c/92C5EC:返还物品]: [c/A1D4C2:/air " -"del {1}]" -msgstr "" -"Item [c/92C5EC:{0}] has been removed from your backpack | To Retrieve from " -"Trash: [c/A1D4C2:/air del {1}]" - -#: ../../AutoAirItem.cs:132 +#: ..\..\Commands.cs:80 #, csharp-format -msgid "已将 '[c/92C5EC:{0}]'添加到自动垃圾桶|指令菜单: [c/A1D4C2:/air]" -msgstr "" -"Item [c/92C5EC:{0}] has been added to the Auto Trash | Command Help: [c/" -"A1D4C2:/air]" - -#: ../../Commands.cs:249 -#, fuzzy -#| msgid "已成功从垃圾桶删除物品: [c/92C5EC:{0}]!" -msgid "已成功从垃圾桶移出物品: [c/92C5EC:{0}]!" -msgstr "Item [c/92C5EC:{0}] has been successfully deleted from the Trash!" - -#: ../../Commands.cs:197 -msgid "已成功将物品添加到垃圾桶: [c/92C5EC:{0}]!" -msgstr "Item [c/92C5EC:{0}] has been successfully added to the Trash!" +msgid "没有找到垃圾桶数量超过[c/92C5EC:{0}]的玩家" +msgstr "No players found with trash bin counts exceeding [c/92C5EC:{0}]" -#: ../../Commands.cs:136 +#: ..\..\Commands.cs:110 #, csharp-format -msgid "已清理[c/92C5EC: {0} ]的自动垃圾桶表" -msgstr "The Auto Trash list for [c/92C5EC: {0}] has been cleaned" - -#: ../../Commands.cs:110 -#, fuzzy, csharp-format -#| msgid "您的垃圾桶监听状态为:[c/92C5EC:{0}]" msgid "您的垃圾桶[c/F2BEC0:监听状态]为:[c/F3F292:{0}]" -msgstr "Your trash bin listening status is: [c/92C5EC:{0}]" +msgstr "Your trash bin [c/F2BEC0:Monitoring Status] is: [c/F3F292:{0}]" + +#: ..\..\Commands.cs:106 +msgid "请输入该指令开启→: [c/92C5EC:/air on] " +msgstr "Please enter the command to enable →: [c/92C5EC:/air on] " -#: ../../Commands.cs:143 +#: ..\..\Commands.cs:97 +msgid "" +"请用角色[c/D95065:重进服务器]后输入:/air 指令查看菜单\n" +"羽学声明:本插件纯属[c/7E93DE:免费]请勿上当受骗" +msgstr "" +"Please use the character [c/D95065:re-enter the server] and then enter: /air " +"to view the menu.\n" +"Yu Xue statement: This plugin is purely [c/7E93DE:free]; do not be deceived" + +#: ..\..\Commands.cs:143 msgid "手选物品 [c/92C5EC:{0}] 已加入自动垃圾桶中! 脱手即清!" msgstr "" "The manually selected item [c/92C5EC:{0}] has been added to the Auto Trash " "Bin! It will be cleared upon release!" -#: ../../Commands.cs:80 -#, csharp-format -msgid "没有找到垃圾桶数量超过[c/92C5EC:{0}]的玩家" -msgstr "" - -#: ../../Commands.cs:193 -msgid "物品 [c/92C5EC:{0}] 已在垃圾桶中!" -msgstr "Item [c/92C5EC:{0}] is now in the trash bin!" - -#: ../../Commands.cs:207 -msgid "物品 {0} 不在垃圾桶中!" -msgstr "Item {0} is not in the trash bin!" - -#: ../../Commands.cs:127 -#, csharp-format -msgid "玩家 [{0}] 已[c/92C5EC:启用]自动垃圾桶功能。" -msgstr "Player [{0}] has [c/92C5EC:enabled] the Auto Trash Bin function。" +#: ..\..\Commands.cs:111 +msgid "输入指令[c/E4EFBC:切换]自动模式:[c/C086DF:/air auto]" +msgstr "Enter the command to [c/E4EFBC:Toggle] Auto Mode: [c/C086DF:/air auto]" -#: ../../Commands.cs:128 +#: ..\..\Commands.cs:152 #, csharp-format -msgid "玩家 [{0}] 已[c/92C5EC:禁用]自动垃圾桶功能。" -msgstr "Player [{0}] has [c/92C5EC:disabled] the Auto Trash Bin function。" +msgid "玩家 [{0}] 的垃圾桶位格监听功能已[c/92C5EC:禁用]" +msgstr "" +"Player [{0}]'s trash bin slot listening function has been [c/92C5EC:disabled]" -#: ../../Commands.cs:151 +#: ..\..\Commands.cs:151 #, csharp-format msgid "玩家 [{0}] 的垃圾桶位格监听功能已[c/92C5EC:启用]" msgstr "" "Player [{0}]'s trash bin slot listening function has been [c/92C5EC:enabled]" -#: ../../Commands.cs:152 +#: ..\..\Commands.cs:161 #, csharp-format -msgid "玩家 [{0}] 的垃圾桶位格监听功能已[c/92C5EC:禁用]" -msgstr "" -"Player [{0}]'s trash bin slot listening function has been [c/92C5EC:disabled]" +msgid "玩家 [{0}] 的自动清理消息已[c/92C5EC:禁用]" +msgstr "Player [{0}]'s auto cleanup messages have been [c/92C5EC:disabled]" -#: ../../Commands.cs:160 +#: ..\..\Commands.cs:160 #, csharp-format msgid "玩家 [{0}] 的自动清理消息已[c/92C5EC:启用]" msgstr "Player [{0}]'s auto cleanup messages have been [c/92C5EC:enabled]" -#: ../../Commands.cs:161 +#: ..\..\Commands.cs:128 #, csharp-format -msgid "玩家 [{0}] 的自动清理消息已[c/92C5EC:禁用]" -msgstr "Player [{0}]'s auto cleanup messages have been [c/92C5EC:disabled]" +msgid "玩家 [{0}] 已[c/92C5EC:禁用]自动垃圾桶功能。" +msgstr "Player [{0}] has [c/92C5EC:disabled] the Auto Trash Bin function。" + +#: ..\..\Commands.cs:127 +#, csharp-format +msgid "玩家 [{0}] 已[c/92C5EC:启用]自动垃圾桶功能。" +msgstr "Player [{0}] has [c/92C5EC:enabled] the Auto Trash Bin function。" + +#: ..\..\Commands.cs:193 +msgid "物品 [c/92C5EC:{0}] 已在垃圾桶中!" +msgstr "Item [c/92C5EC:{0}] is now in the trash bin!" + +#: ..\..\Commands.cs:207 +msgid "物品 {0} 不在垃圾桶中!" +msgstr "Item {0} is not in the trash bin!" + +#: ..\..\Commands.cs:38 +msgid "已[c/92C5EC:清空]所有玩家《自动垃圾桶》数据!" +msgstr "All players' [c/92C5EC:Cleared] Auto Trash Bin data!" + +#: ..\..\Commands.cs:249 +msgid "已成功从垃圾桶移出物品: [c/92C5EC:{0}]!" +msgstr "Successfully removed item: [c/92C5EC:{0}] from the trash bin!" + +#: ..\..\Commands.cs:197 +msgid "已成功将物品添加到垃圾桶: [c/92C5EC:{0}]!" +msgstr "Item [c/92C5EC:{0}] has been successfully added to the Trash!" -#: ../../Commands.cs:97 +#: ..\..\AutoAirItem.cs:147 +#, csharp-format msgid "" -"请用角色[c/D95065:重进服务器]后输入:/air 指令查看菜单\n" -"羽学声明:本插件纯属[c/7E93DE:免费]请勿上当受骗" +"已将 '[c/92C5EC:{0}]'从您的背包中移除|[c/92C5EC:返还物品]: [c/A1D4C2:/air " +"del {1}]" msgstr "" -"Please use the character [c/D95065:re-enter the server] and then enter: /air " -"to view the menu.\n" -"Yu Xue statement: This plugin is purely [c/7E93DE:free]; do not be deceived" +"Successfully removed '[c/92C5EC:{0}]' from your inventory | [c/92C5EC:Return " +"Item]: [c/A1D4C2:/air del {1}]" -#: ../../Commands.cs:106 -msgid "请输入该指令开启→: [c/92C5EC:/air on] " -msgstr "Please enter the command to enable →: [c/92C5EC:/air on] " +#: ..\..\AutoAirItem.cs:132 +#, csharp-format +msgid "已将 '[c/92C5EC:{0}]'添加到自动垃圾桶|指令菜单: [c/A1D4C2:/air]" +msgstr "" +"Item [c/92C5EC:{0}] has been added to the Auto Trash | Command Help: [c/" +"A1D4C2:/air]" -#: ../../Commands.cs:111 -#, fuzzy -#| msgid "输入指令切换自动模式:[c/92C5EC:/air auto]" -msgid "输入指令[c/E4EFBC:切换]自动模式:[c/C086DF:/air auto]" -msgstr "Enter the command to toggle auto mode: [c/92C5EC:/air auto]" +#: ..\..\Commands.cs:136 +#, csharp-format +msgid "已清理[c/92C5EC: {0} ]的自动垃圾桶表" +msgstr "The Auto Trash list for [c/92C5EC: {0}] has been cleaned" #~ msgid "[c/A7DDF0:{0}]:[c/74F3C9:{1}小时], " #~ msgstr "[c/A7DDF0:{0}]: [c/74F3C9:{1} hours], " diff --git a/src/AutoAirItem/i18n/template.pot b/src/AutoAirItem/i18n/template.pot index 7f67eff5..cb853587 100644 --- a/src/AutoAirItem/i18n/template.pot +++ b/src/AutoAirItem/i18n/template.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: AutoAirItem\n" -"POT-Creation-Date: 2024-10-31 19:21:38+0000\n" -"PO-Revision-Date: 2024-10-31 19:21:38+0000\n" +"POT-Creation-Date: 2024-11-05 23:19:09+0800\n" +"PO-Revision-Date: 2024-11-05 23:19:10+0800\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -10,176 +10,176 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: GetText.NET Extractor\n" -#: ../../Commands.cs:119 +#: ..\..\Commands.cs:119 #, csharp-format msgid "" "[{0}的垃圾桶]\n" msgstr "" -#: ../../Commands.cs:75 -#, csharp-format -msgid "[c/32CEB7:{0}.][c/F3E83B:{1}:] {2}" +#: ..\..\AutoAirItem.cs:51 +msgid "[自动垃圾桶]重新加载配置完毕。" msgstr "" -#: ../../AutoAirItem.cs:51 -msgid "[自动垃圾桶]重新加载配置完毕。" +#: ..\..\Commands.cs:75 +#, csharp-format +msgid "[c/32CEB7:{0}.][c/F3E83B:{1}:] {2}" msgstr "" -#: ../../Commands.cs:53 +#: ..\..\Commands.cs:53 #, csharp-format msgid "【以下垃圾桶数量超过[c/92C5EC:{0}]的玩家】" msgstr "" -#: ../../Commands.cs:17 +#: ..\..\Commands.cs:17 msgid "" "【自动垃圾桶】指令菜单 [i:3456][C/F2F2C7:插件开发] [C/BFDFEA:by] [c/00FFFF:羽学][i:3459]\n" msgstr "" -#: ../../Commands.cs:18 +#: ..\..\Commands.cs:18 msgid "" "/air —— 查看垃圾桶菜单\n" msgstr "" -#: ../../Commands.cs:27 +#: ..\..\Commands.cs:27 #, csharp-format msgid "/air add 或 del 名字 —— [c/87DF86:添加]|[c/F19092:移出]垃圾桶物品" msgstr "" -#: ../../Commands.cs:24 +#: ..\..\Commands.cs:24 msgid "" "/air auto —— 监听[c/F3B691:垃圾桶位格]开关\n" msgstr "" -#: ../../Commands.cs:26 +#: ..\..\Commands.cs:26 msgid "" "/air ck 数量—— 筛选出物品超过此数量的玩家\n" msgstr "" -#: ../../Commands.cs:22 +#: ..\..\Commands.cs:22 msgid "" "/air clear —— [c/85CEDF:清理]垃圾桶\n" msgstr "" -#: ../../Commands.cs:21 +#: ..\..\Commands.cs:21 msgid "" "/air list —— [c/F19092:列出]自己的[c/F2F191:垃圾桶]\n" msgstr "" -#: ../../Commands.cs:25 +#: ..\..\Commands.cs:25 msgid "" "/air mess —— 开启|关闭[c/F2F292:清理消息]\n" msgstr "" -#: ../../Commands.cs:20 +#: ..\..\Commands.cs:20 msgid "" "/air on —— 开启|关闭[c/89DF85:垃圾桶]功能\n" msgstr "" -#: ../../Commands.cs:23 +#: ..\..\Commands.cs:23 msgid "" "/air yes —— 将[c/E488C1:手持物品]加入垃圾桶\n" msgstr "" -#: ../../Commands.cs:19 +#: ..\..\Commands.cs:19 msgid "" "/airreset —— 清空[c/85CFDE:所有玩家]数据\n" msgstr "" -#: ../../Commands.cs:178 +#: ..\..\Commands.cs:178 msgid "" "不存在该物品,\"物品查询\": \"[c/92C5EC:https://terraria.wiki.gg/zh/wiki/Item_IDs]\"" msgstr "" -#: ../../Commands.cs:38 -msgid "已[c/92C5EC:清空]所有玩家《自动垃圾桶》数据!" +#: ..\..\Commands.cs:80 +#, csharp-format +msgid "没有找到垃圾桶数量超过[c/92C5EC:{0}]的玩家" msgstr "" -#: ../../AutoAirItem.cs:147 +#: ..\..\Commands.cs:110 #, csharp-format -msgid "已将 '[c/92C5EC:{0}]'从您的背包中移除|[c/92C5EC:返还物品]: [c/A1D4C2:/air del {1}]" +msgid "您的垃圾桶[c/F2BEC0:监听状态]为:[c/F3F292:{0}]" msgstr "" -#: ../../AutoAirItem.cs:132 -#, csharp-format -msgid "已将 '[c/92C5EC:{0}]'添加到自动垃圾桶|指令菜单: [c/A1D4C2:/air]" +#: ..\..\Commands.cs:106 +msgid "请输入该指令开启→: [c/92C5EC:/air on] " msgstr "" -#: ../../Commands.cs:249 -msgid "已成功从垃圾桶移出物品: [c/92C5EC:{0}]!" +#: ..\..\Commands.cs:97 +msgid "" +"请用角色[c/D95065:重进服务器]后输入:/air 指令查看菜单\n" +"羽学声明:本插件纯属[c/7E93DE:免费]请勿上当受骗" msgstr "" -#: ../../Commands.cs:197 -msgid "已成功将物品添加到垃圾桶: [c/92C5EC:{0}]!" +#: ..\..\Commands.cs:143 +msgid "手选物品 [c/92C5EC:{0}] 已加入自动垃圾桶中! 脱手即清!" msgstr "" -#: ../../Commands.cs:136 -#, csharp-format -msgid "已清理[c/92C5EC: {0} ]的自动垃圾桶表" +#: ..\..\Commands.cs:111 +msgid "输入指令[c/E4EFBC:切换]自动模式:[c/C086DF:/air auto]" msgstr "" -#: ../../Commands.cs:110 +#: ..\..\Commands.cs:152 #, csharp-format -msgid "您的垃圾桶[c/F2BEC0:监听状态]为:[c/F3F292:{0}]" +msgid "玩家 [{0}] 的垃圾桶位格监听功能已[c/92C5EC:禁用]" msgstr "" -#: ../../Commands.cs:143 -msgid "手选物品 [c/92C5EC:{0}] 已加入自动垃圾桶中! 脱手即清!" +#: ..\..\Commands.cs:151 +#, csharp-format +msgid "玩家 [{0}] 的垃圾桶位格监听功能已[c/92C5EC:启用]" msgstr "" -#: ../../Commands.cs:80 +#: ..\..\Commands.cs:161 #, csharp-format -msgid "没有找到垃圾桶数量超过[c/92C5EC:{0}]的玩家" +msgid "玩家 [{0}] 的自动清理消息已[c/92C5EC:禁用]" msgstr "" -#: ../../Commands.cs:193 -msgid "物品 [c/92C5EC:{0}] 已在垃圾桶中!" +#: ..\..\Commands.cs:160 +#, csharp-format +msgid "玩家 [{0}] 的自动清理消息已[c/92C5EC:启用]" msgstr "" -#: ../../Commands.cs:207 -msgid "物品 {0} 不在垃圾桶中!" +#: ..\..\Commands.cs:128 +#, csharp-format +msgid "玩家 [{0}] 已[c/92C5EC:禁用]自动垃圾桶功能。" msgstr "" -#: ../../Commands.cs:127 +#: ..\..\Commands.cs:127 #, csharp-format msgid "玩家 [{0}] 已[c/92C5EC:启用]自动垃圾桶功能。" msgstr "" -#: ../../Commands.cs:128 -#, csharp-format -msgid "玩家 [{0}] 已[c/92C5EC:禁用]自动垃圾桶功能。" +#: ..\..\Commands.cs:193 +msgid "物品 [c/92C5EC:{0}] 已在垃圾桶中!" msgstr "" -#: ../../Commands.cs:151 -#, csharp-format -msgid "玩家 [{0}] 的垃圾桶位格监听功能已[c/92C5EC:启用]" +#: ..\..\Commands.cs:207 +msgid "物品 {0} 不在垃圾桶中!" msgstr "" -#: ../../Commands.cs:152 -#, csharp-format -msgid "玩家 [{0}] 的垃圾桶位格监听功能已[c/92C5EC:禁用]" +#: ..\..\Commands.cs:38 +msgid "已[c/92C5EC:清空]所有玩家《自动垃圾桶》数据!" msgstr "" -#: ../../Commands.cs:160 -#, csharp-format -msgid "玩家 [{0}] 的自动清理消息已[c/92C5EC:启用]" +#: ..\..\Commands.cs:249 +msgid "已成功从垃圾桶移出物品: [c/92C5EC:{0}]!" msgstr "" -#: ../../Commands.cs:161 -#, csharp-format -msgid "玩家 [{0}] 的自动清理消息已[c/92C5EC:禁用]" +#: ..\..\Commands.cs:197 +msgid "已成功将物品添加到垃圾桶: [c/92C5EC:{0}]!" msgstr "" -#: ../../Commands.cs:97 -msgid "" -"请用角色[c/D95065:重进服务器]后输入:/air 指令查看菜单\n" -"羽学声明:本插件纯属[c/7E93DE:免费]请勿上当受骗" +#: ..\..\AutoAirItem.cs:147 +#, csharp-format +msgid "已将 '[c/92C5EC:{0}]'从您的背包中移除|[c/92C5EC:返还物品]: [c/A1D4C2:/air del {1}]" msgstr "" -#: ../../Commands.cs:106 -msgid "请输入该指令开启→: [c/92C5EC:/air on] " +#: ..\..\AutoAirItem.cs:132 +#, csharp-format +msgid "已将 '[c/92C5EC:{0}]'添加到自动垃圾桶|指令菜单: [c/A1D4C2:/air]" msgstr "" -#: ../../Commands.cs:111 -msgid "输入指令[c/E4EFBC:切换]自动模式:[c/C086DF:/air auto]" +#: ..\..\Commands.cs:136 +#, csharp-format +msgid "已清理[c/92C5EC: {0} ]的自动垃圾桶表" msgstr "" diff --git a/src/AutoFish/AutoFish.cs b/src/AutoFish/AutoFish.cs index 3347bcb5..2b7a72e1 100644 --- a/src/AutoFish/AutoFish.cs +++ b/src/AutoFish/AutoFish.cs @@ -198,7 +198,7 @@ private static void ControlFishing(ProjectileAiUpdateEventArgs args, TSPlayer pl if (Config.DoorItems.Any()) { //确保浮漂正在运动,没有鱼上钩(即ai[1]小于等于0) - if (args.Projectile.ai[1] <= 0) + if (args.Projectile.ai[1] < 0) { // 从DoorItems中随机选择一个物品,并将其ID赋值给ai[1],模拟有新鱼上钩的情况 args.Projectile.ai[1] = Convert.ToSingle(Config.DoorItems.OrderByDescending(x => Guid.NewGuid()).First()); diff --git a/src/AutoFish/i18n/en-US.po b/src/AutoFish/i18n/en-US.po new file mode 100644 index 00000000..bc2b26d2 --- /dev/null +++ b/src/AutoFish/i18n/en-US.po @@ -0,0 +1,286 @@ +msgid "" +msgstr "" +"Project-Id-Version: AutoFish\n" +"POT-Creation-Date: 2024-11-05 23:00:31+0800\n" +"PO-Revision-Date: 2024-11-05 23:18+0800\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: en_US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.5\n" + +#: ..\..\Commands.cs:22 ..\..\Commands.cs:51 +msgid "" +" [i:3455][c/AD89D5:自][c/D68ACA:动][c/DF909A:钓][c/E5A894:鱼]" +"[i:3454]" +msgstr "" +" [i:3455][c/AD89D5:Au][c/D68ACA:to][c/DF909A:Fi][c/E5A894:sh]" +"[i:3454]" + +#: ..\..\Commands.cs:160 +msgid "[额外渔获表]\n" +msgstr "[Additional catch table]\n" + +#: ..\..\Commands.cs:153 +msgid "[指定消耗物品表]\n" +msgstr "[List of Designated Consumables]\n" + +#: ..\..\AutoFish.cs:57 +msgid "[自动钓鱼]重新加载配置完毕。" +msgstr "[AutoFish] Configuration reload completed。" + +#: ..\..\AutoFish.cs:415 +msgid "[c/A7DDF0:{0}]:[c/74F3C9:{1}分钟]" +msgstr "[c/A7DDF0:{0}]:[c/74F3C9:{1}minute]" + +#: ..\..\AutoFish.cs:403 +msgid "" +"[i:3455][c/AD89D5:自][c/D68ACA:动][c/DF909A:钓][c/E5A894:鱼][i:3454]" +msgstr "" +"[i:3455][c/AD89D5:Au][c/D68ACA:to][c/DF909A:Fi][c/E5A894:sh][i:3454]" + +#: ..\..\Commands.cs:75 +msgid "/af + 或 - 名字 -- 为额外渔获[c/87DF86:添加]|[c/F25055:移除]物品" +msgstr "" +"/af <+> or <-> -- for extra catch [Add] | [Remove] item" + +#: ..\..\Commands.cs:69 +msgid "" +"/af add 或 del 物品名 -- [c/87DF86:添加]|[c/F25055:移除]消耗指定物品" +msgstr "" +"/af or -- [c/87DF86: Add] | [c/F25055: Remove] " +"Consume specified item" + +#: ..\..\Commands.cs:32 +msgid "/af buff -- 开启丨关闭[c/F6B152:钓鱼BUFF]" +msgstr "/af buff -- Enable | Disable [Fishing BUFF]" + +#: ..\..\Commands.cs:59 +msgid "/af buff -- 开启丨关闭[c/F6B152:钓鱼BUFF]\n" +msgstr "/af buff -- Enable | Disable [Fishing BUFF]\n" + +#: ..\..\Commands.cs:61 +msgid "/af duo 数字 -- 设置多线的[c/4686D4:钩子数量]\n" +msgstr "/af duo -- Set the [c/4686D4:hook count]\n" + +#: ..\..\Commands.cs:62 +msgid "/af mod -- 开启丨关闭[c/50D647:消耗模式]" +msgstr "`/af mod -- Enable | Disable [c/50D647:Consumption Mode]" + +#: ..\..\Commands.cs:60 +msgid "/af more -- 开启丨关闭[c/DB48A7:多线模式]\n" +msgstr "/af more -- Enable | Disable [c/DB48A7:Multi-line Mode]\n" + +#: ..\..\Commands.cs:31 +msgid "/af off -- 自动钓鱼[c/F25055:关闭]功能\n" +msgstr "/af off -- Auto Fishing [c/F25055:Disable] Function\n" + +#: ..\..\Commands.cs:30 +msgid "/af on -- 自动钓鱼[c/4686D4:开启]功能\n" +msgstr "/af on -- Auto Fishing [c/4686D4:Enable] Function\n" + +#: ..\..\Commands.cs:67 +msgid "/af set 数量 -- 设置消耗[c/47C2D5:物品数量]要求\n" +msgstr "/af set -- Set the [c/47C2D5:Item Count] requirement\n" + +#: ..\..\Commands.cs:68 +msgid "/af time 数字 -- 设置消耗[c/F6B152:自动时长]\n" +msgstr "/af time number -- Set the [c/F6B152:auto duration]\n" + +#: ..\..\Configuration.cs:22 +msgid "" +"\n" +"[i:3456][C/F2F2C7:插件开发] [C/BFDFEA:by] [c/00FFFF:羽学] | [c/7CAEDD:少" +"司命][i:3459]" +msgstr "" +"\n" +"[i:3456][C/F2F2C7:Plugin Development] [C/BFDFEA:by] [c/00FFFF:羽学] | " +"[c/7CAEDD:少司命][i:3459]" + +#: ..\..\Commands.cs:29 +msgid "" +"\n" +"/af -- 查看自动钓鱼菜单\n" +msgstr "" +"\n" +"/af -- View the Auto Fishing Menu\n" + +#: ..\..\Commands.cs:66 +msgid "" +"\n" +"/af list -- 列出消耗[c/F5F251:指定物品表]\n" +msgstr "" +"\n" +"/af list -- List the [c/F5F251:Specified Item Table]\n" + +#: ..\..\Commands.cs:41 +msgid "" +"\n" +"/af list -- 列出消耗模式[c/F5F251:指定物品表]" +msgstr "" +"\n" +"/af list -- List the Consumption Mode [c/F5F251:Specified Item Table]" + +#: ..\..\Commands.cs:36 +msgid "" +"\n" +"/af loot -- 查看[c/F25055:额外渔获表]" +msgstr "" +"\n" +"/af loot -- View the [c/F25055:Extra Catch Table]" + +#: ..\..\Commands.cs:74 +msgid "" +"\n" +"/af loot -- 查看[c/F25055:额外渔获表]\n" +msgstr "" +"\n" +"/af loot -- View the [c/F25055:Extra Catch Table]\n" + +#: ..\..\Commands.cs:58 +msgid "" +"\n" +"/af on 或 off -- 自动钓鱼[c/4686D4:开启]|[c/F25055:关闭]功能\n" +msgstr "" +"\n" +"/af or -- Auto Fishing [c/4686D4:Enable] | [c/F25055:" +"Disable] Function\n" + +#: ..\..\Commands.cs:204 +msgid "" +"不存在该物品,\"物品查询\": \"[c/92C5EC:https://terraria.wiki.gg/zh/" +"wiki/Item_IDs]\"" +msgstr "" +"The item does not exist, \"Item Lookup\": \"[c/92C5EC:https://terraria." +"wiki.gg/zh/wiki/Item_IDs]\"" + +#: ..\..\Commands.cs:121 +msgid "" +"当前为[c/F25055:血月]无法钓上怪物,可[c/46C4D4:关闭]插件:[c/F3F292:/af " +"off]" +msgstr "" +"Current condition is [c/F25055:Blood Moon], unable to fish up monsters. " +"You can [c/46C4D4:Disable] the plugin: [c/F3F292:/af off]" + +#: ..\..\Commands.cs:154 +#, csharp-format +msgid "兑换规则为:每[c/F5F252:{0}]个 => [c/92C5EC:{1}]分钟" +msgstr "" +"The exchange rule is: every [c/F5F252:{0}] items => [c/92C5EC:{1}] " +"minutes" + +#: ..\..\Commands.cs:146 ..\..\Commands.cs:171 ..\..\Commands.cs:181 +msgid "禁用" +msgstr "Disabled" + +#: ..\..\Commands.cs:146 ..\..\Commands.cs:171 ..\..\Commands.cs:181 +msgid "启用" +msgstr "Enabled" + +#: ..\..\Commands.cs:109 +msgid "请输入该指令开启→: [c/92C5EC:/af on]" +msgstr "Please enter the command to enable: [c/92C5EC:/af on]" + +#: ..\..\Commands.cs:96 +msgid "" +"请用角色[c/D95065:重进服务器]后输入:/af 指令查看菜单\n" +"羽学声明:本插件纯属[c/7E93DE:免费]请勿上当受骗" +msgstr "" +"Please rejoin the server with your character [c/D95065:rejoin server] " +"and then enter: /af \n" +"Yu Xue declares: This plugin is [c/7E93DE:free], please do not be " +"deceived" + +#: ..\..\Commands.cs:172 +#, csharp-format +msgid "玩家 [{0}] 已[c/92C5EC:{1}]多线模式" +msgstr "Player [{0}] has [c/92C5EC:{1}] Multi-line Mode" + +#: ..\..\Commands.cs:182 +#, csharp-format +msgid "玩家 [{0}] 已[c/92C5EC:{1}]消耗模式" +msgstr "Player [{0}] has [c/92C5EC:{1}] Consumption Mode" + +#: ..\..\Commands.cs:147 +#, csharp-format +msgid "玩家 [{0}] 已[c/92C5EC:{1}]自动钓鱼BUFF" +msgstr "Player [{0}] has [c/92C5EC:{1}] Auto Fishing BUFF" + +#: ..\..\Commands.cs:138 +#, csharp-format +msgid "玩家 [{0}] 已[c/92C5EC:禁用]自动钓鱼功能。" +msgstr "Player [{0}] has [c/92C5EC:Disabled] the Auto Fishing function。" + +#: ..\..\Commands.cs:131 +#, csharp-format +msgid "玩家 [{0}] 已[c/92C5EC:启用]自动钓鱼功能。" +msgstr "Player [{0}] has [c/92C5EC:Enabled] the Auto Fishing function。" + +#: ..\..\AutoFish.cs:385 +#, csharp-format +msgid "玩家 [c/46C2D4:{0}] 已开启[c/F5F251:自动钓鱼] 消耗物品为:{1}" +msgstr "" +"Player [c/46C2D4:{0}] has enabled [c/F5F251:Auto Fishing] with " +"consumption item: {1}" + +#: ..\..\Commands.cs:245 +msgid "物品 [c/92C5EC:{0}] 已在额外渔获表中!" +msgstr "Item [c/92C5EC:{0}] is already in the Extra Catch Table!" + +#: ..\..\Commands.cs:219 +msgid "物品 [c/92C5EC:{0}] 已在指定鱼饵表中!" +msgstr "Item [c/92C5EC:{0}] is already in the Specified Bait Table!" + +#: ..\..\Commands.cs:258 +msgid "物品 {0} 不在额外渔获中!" +msgstr "Item {0} is not in the Extra Catch Table!" + +#: ..\..\Commands.cs:232 +msgid "物品 {0} 不在指定鱼饵表中!" +msgstr "Item {0} is not in the Specified Bait Table!" + +#: ..\..\Commands.cs:263 +msgid "已成功从额外渔获移出物品: [c/92C5EC:{0}]!" +msgstr "" +"Successfully removed item: [c/92C5EC:{0}] from the Extra Catch Table!" + +#: ..\..\Commands.cs:237 +msgid "已成功从指定鱼饵表移出物品: [c/92C5EC:{0}]!" +msgstr "" +"Successfully removed item: [c/92C5EC:{0}] from the Specified Bait Table!" + +#: ..\..\Commands.cs:284 +msgid "已成功将多钩数量上限设置为: [c/92C5EC:{0}] 个!" +msgstr "Successfully set the maximum number of hooks to: [c/92C5EC:{0}]!" + +#: ..\..\Commands.cs:273 +msgid "已成功将物品数量要求设置为: [c/92C5EC:{0}] 个!" +msgstr "Successfully set the item count requirement to: [c/92C5EC:{0}]!" + +#: ..\..\Commands.cs:250 +msgid "已成功将物品添加额外渔获表: [c/92C5EC:{0}]!" +msgstr "Successfully added item to the Extra Catch Table: [c/92C5EC:{0}]!" + +#: ..\..\Commands.cs:224 +msgid "已成功将物品添加指定鱼饵表: [c/92C5EC:{0}]!" +msgstr "" +"Successfully added item to the Specified Bait Table: [c/92C5EC:{0}]!" + +#: ..\..\Commands.cs:295 +msgid "已成功将自动时长设置为: [c/92C5EC:{0}] 分钟!" +msgstr "Successfully set the auto duration to: [c/92C5EC:{0}] minutes!" + +#: ..\..\AutoFish.cs:404 +#, csharp-format +msgid "以下玩家超过 [c/E17D8C:{0}] 分钟 已关闭[c/76D5B4:自动钓鱼]权限:" +msgstr "" +"The following players have exceeded [c/E17D8C:{0}] minutes and have had " +"their [c/76D5B4:Auto Fishing] privileges disabled:" + +#: ..\..\Commands.cs:115 +#, csharp-format +msgid "自动钓鱼[c/46C4D4:剩余时长]:[c/F3F292:{0}]分钟" +msgstr "" +"Auto Fishing [c/46C4D4:Remaining Duration]: [c/F3F292:{0}] minutes" diff --git a/src/AutoFish/i18n/template.pot b/src/AutoFish/i18n/template.pot new file mode 100644 index 00000000..97f945d3 --- /dev/null +++ b/src/AutoFish/i18n/template.pot @@ -0,0 +1,253 @@ +msgid "" +msgstr "" +"Project-Id-Version: AutoFish\n" +"POT-Creation-Date: 2024-11-05 23:00:31+0800\n" +"PO-Revision-Date: 2024-11-05 23:00:32+0800\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: GetText.NET Extractor\n" + +#: ..\..\Commands.cs:22 +#: ..\..\Commands.cs:51 +msgid "" +" [i:3455][c/AD89D5:自][c/D68ACA:动][c/DF909A:钓][c/E5A894:鱼][i:3454]" +msgstr "" + +#: ..\..\Commands.cs:160 +msgid "" +"[额外渔获表]\n" +msgstr "" + +#: ..\..\Commands.cs:153 +msgid "" +"[指定消耗物品表]\n" +msgstr "" + +#: ..\..\AutoFish.cs:57 +msgid "[自动钓鱼]重新加载配置完毕。" +msgstr "" + +#: ..\..\AutoFish.cs:415 +msgid "[c/A7DDF0:{0}]:[c/74F3C9:{1}分钟]" +msgstr "" + +#: ..\..\AutoFish.cs:403 +msgid "[i:3455][c/AD89D5:自][c/D68ACA:动][c/DF909A:钓][c/E5A894:鱼][i:3454]" +msgstr "" + +#: ..\..\Commands.cs:75 +msgid "/af + 或 - 名字 -- 为额外渔获[c/87DF86:添加]|[c/F25055:移除]物品" +msgstr "" + +#: ..\..\Commands.cs:69 +msgid "/af add 或 del 物品名 -- [c/87DF86:添加]|[c/F25055:移除]消耗指定物品" +msgstr "" + +#: ..\..\Commands.cs:32 +msgid "/af buff -- 开启丨关闭[c/F6B152:钓鱼BUFF]" +msgstr "" + +#: ..\..\Commands.cs:59 +msgid "" +"/af buff -- 开启丨关闭[c/F6B152:钓鱼BUFF]\n" +msgstr "" + +#: ..\..\Commands.cs:61 +msgid "" +"/af duo 数字 -- 设置多线的[c/4686D4:钩子数量]\n" +msgstr "" + +#: ..\..\Commands.cs:62 +msgid "/af mod -- 开启丨关闭[c/50D647:消耗模式]" +msgstr "" + +#: ..\..\Commands.cs:60 +msgid "" +"/af more -- 开启丨关闭[c/DB48A7:多线模式]\n" +msgstr "" + +#: ..\..\Commands.cs:31 +msgid "" +"/af off -- 自动钓鱼[c/F25055:关闭]功能\n" +msgstr "" + +#: ..\..\Commands.cs:30 +msgid "" +"/af on -- 自动钓鱼[c/4686D4:开启]功能\n" +msgstr "" + +#: ..\..\Commands.cs:67 +msgid "" +"/af set 数量 -- 设置消耗[c/47C2D5:物品数量]要求\n" +msgstr "" + +#: ..\..\Commands.cs:68 +msgid "" +"/af time 数字 -- 设置消耗[c/F6B152:自动时长]\n" +msgstr "" + +#: ..\..\Configuration.cs:22 +msgid "" +"\n" +"[i:3456][C/F2F2C7:插件开发] [C/BFDFEA:by] [c/00FFFF:羽学] | [c/7CAEDD:少司命][i:3459]" +msgstr "" + +#: ..\..\Commands.cs:29 +msgid "" +"\n" +"/af -- 查看自动钓鱼菜单\n" +msgstr "" + +#: ..\..\Commands.cs:66 +msgid "" +"\n" +"/af list -- 列出消耗[c/F5F251:指定物品表]\n" +msgstr "" + +#: ..\..\Commands.cs:41 +msgid "" +"\n" +"/af list -- 列出消耗模式[c/F5F251:指定物品表]" +msgstr "" + +#: ..\..\Commands.cs:36 +msgid "" +"\n" +"/af loot -- 查看[c/F25055:额外渔获表]" +msgstr "" + +#: ..\..\Commands.cs:74 +msgid "" +"\n" +"/af loot -- 查看[c/F25055:额外渔获表]\n" +msgstr "" + +#: ..\..\Commands.cs:58 +msgid "" +"\n" +"/af on 或 off -- 自动钓鱼[c/4686D4:开启]|[c/F25055:关闭]功能\n" +msgstr "" + +#: ..\..\Commands.cs:204 +msgid "" +"不存在该物品,\"物品查询\": \"[c/92C5EC:https://terraria.wiki.gg/zh/wiki/Item_IDs]\"" +msgstr "" + +#: ..\..\Commands.cs:121 +msgid "当前为[c/F25055:血月]无法钓上怪物,可[c/46C4D4:关闭]插件:[c/F3F292:/af off]" +msgstr "" + +#: ..\..\Commands.cs:154 +#, csharp-format +msgid "兑换规则为:每[c/F5F252:{0}]个 => [c/92C5EC:{1}]分钟" +msgstr "" + +#: ..\..\Commands.cs:146 +#: ..\..\Commands.cs:171 +#: ..\..\Commands.cs:181 +msgid "禁用" +msgstr "" + +#: ..\..\Commands.cs:146 +#: ..\..\Commands.cs:171 +#: ..\..\Commands.cs:181 +msgid "启用" +msgstr "" + +#: ..\..\Commands.cs:109 +msgid "请输入该指令开启→: [c/92C5EC:/af on]" +msgstr "" + +#: ..\..\Commands.cs:96 +msgid "" +"请用角色[c/D95065:重进服务器]后输入:/af 指令查看菜单\n" +"羽学声明:本插件纯属[c/7E93DE:免费]请勿上当受骗" +msgstr "" + +#: ..\..\Commands.cs:172 +#, csharp-format +msgid "玩家 [{0}] 已[c/92C5EC:{1}]多线模式" +msgstr "" + +#: ..\..\Commands.cs:182 +#, csharp-format +msgid "玩家 [{0}] 已[c/92C5EC:{1}]消耗模式" +msgstr "" + +#: ..\..\Commands.cs:147 +#, csharp-format +msgid "玩家 [{0}] 已[c/92C5EC:{1}]自动钓鱼BUFF" +msgstr "" + +#: ..\..\Commands.cs:138 +#, csharp-format +msgid "玩家 [{0}] 已[c/92C5EC:禁用]自动钓鱼功能。" +msgstr "" + +#: ..\..\Commands.cs:131 +#, csharp-format +msgid "玩家 [{0}] 已[c/92C5EC:启用]自动钓鱼功能。" +msgstr "" + +#: ..\..\AutoFish.cs:385 +#, csharp-format +msgid "玩家 [c/46C2D4:{0}] 已开启[c/F5F251:自动钓鱼] 消耗物品为:{1}" +msgstr "" + +#: ..\..\Commands.cs:245 +msgid "物品 [c/92C5EC:{0}] 已在额外渔获表中!" +msgstr "" + +#: ..\..\Commands.cs:219 +msgid "物品 [c/92C5EC:{0}] 已在指定鱼饵表中!" +msgstr "" + +#: ..\..\Commands.cs:258 +msgid "物品 {0} 不在额外渔获中!" +msgstr "" + +#: ..\..\Commands.cs:232 +msgid "物品 {0} 不在指定鱼饵表中!" +msgstr "" + +#: ..\..\Commands.cs:263 +msgid "已成功从额外渔获移出物品: [c/92C5EC:{0}]!" +msgstr "" + +#: ..\..\Commands.cs:237 +msgid "已成功从指定鱼饵表移出物品: [c/92C5EC:{0}]!" +msgstr "" + +#: ..\..\Commands.cs:284 +msgid "已成功将多钩数量上限设置为: [c/92C5EC:{0}] 个!" +msgstr "" + +#: ..\..\Commands.cs:273 +msgid "已成功将物品数量要求设置为: [c/92C5EC:{0}] 个!" +msgstr "" + +#: ..\..\Commands.cs:250 +msgid "已成功将物品添加额外渔获表: [c/92C5EC:{0}]!" +msgstr "" + +#: ..\..\Commands.cs:224 +msgid "已成功将物品添加指定鱼饵表: [c/92C5EC:{0}]!" +msgstr "" + +#: ..\..\Commands.cs:295 +msgid "已成功将自动时长设置为: [c/92C5EC:{0}] 分钟!" +msgstr "" + +#: ..\..\AutoFish.cs:404 +#, csharp-format +msgid "以下玩家超过 [c/E17D8C:{0}] 分钟 已关闭[c/76D5B4:自动钓鱼]权限:" +msgstr "" + +#: ..\..\Commands.cs:115 +#, csharp-format +msgid "自动钓鱼[c/46C4D4:剩余时长]:[c/F3F292:{0}]分钟" +msgstr "" + diff --git a/src/AutoStoreItems/i18n/en-US.po b/src/AutoStoreItems/i18n/en-US.po index 9051a4de..5c99642c 100644 --- a/src/AutoStoreItems/i18n/en-US.po +++ b/src/AutoStoreItems/i18n/en-US.po @@ -2,262 +2,285 @@ msgid "" msgstr "" "Project-Id-Version: AutoStoreItems\n" "POT-Creation-Date: 2024-10-31 19:21:41+0000\n" -"PO-Revision-Date: 2024-11-01 01:40+0800\n" +"PO-Revision-Date: 2024-11-05 23:36+0800\n" "Last-Translator: \n" "Language-Team: \n" "Language: en_US\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 3.4.2\n" +"X-Generator: Poedit 3.5\n" #: ../../Commands.cs:76 #, csharp-format msgid "[{0}的自动储存表]\n" -msgstr "" +msgstr "[{0}'s Auto Storage Table]\n" #: ../../Tool.cs:14 msgid "[c/32CEB7:保险箱]" -msgstr "" +msgstr "[c/32CEB7:Safe]" #: ../../Tool.cs:13 msgid "[c/32CEB7:存钱罐]" -msgstr "" +msgstr "[c/32CEB7:PiggyBank]" #: ../../Tool.cs:15 -#, fuzzy -#| msgid "护卫熔炉" msgid "[c/32CEB7:护卫熔炉]" -msgstr "Defender's Forge" +msgstr "[c/32CEB7:GuardianFurnace]" #: ../../Tool.cs:16 msgid "[c/32CEB7:虚空袋]" -msgstr "" +msgstr "[c/32CEB7:VoidBag]" #: ../../Configuration.cs:16 -#, fuzzy -#| msgid "[存在BUG] 收藏的物品会被取消收藏(指虚空袋的药水堆叠进箱子的风险)" msgid "" "[存在BUG] 收藏的物品会被取消收藏(指虚空袋的药水堆叠进箱子的风险) ,物品如果没" "放到【存钱罐】等储存空间内是不会触发自动存储的" msgstr "" -"[Existing BUG] collected items will be Unfavorite (referring to the Void Bag " -"potions having the risk of stacking into the chest)" +"[BUG EXISTS] Favorited items may become unfavorited (risk of potion stacks " +"in the Void Bag being split into chests). Items will not trigger automatic " +"storage if they are not placed in storage spaces such as [Piggy Banks]." #: ../../Configuration.cs:13 msgid "" "[性能模式] 堆叠达到单格上限物品不进行分堆累积(人多推荐,发2次包),关闭会为超" "出上限物品寻找空槽继续累积(最多发4次包)" msgstr "" +"[Performance Mode] Stack items up to the single slot limit without splitting " +"(recommended for many players, sends 2 packets), disabling this will search " +"for empty slots to continue stacking items that exceed the limit (sends up " +"to 4 packets)." #: ../../Configuration.cs:10 msgid "" "[自动] [手持] [装备] 当开启3种模式任意一个时其他2个模式会默认关闭,不论哪种模" "式都需要玩家移动和攻击才会触发储存" msgstr "" +"[Auto] [Held] [Equipped] When any one of these three modes is enabled, the " +"other two modes will default to being disabled. Regardless of which mode is " +"active, storage will only trigger when the player moves or attacks." #: ../../AutoStoreItems.cs:52 msgid "[自动存储]重新加载配置完毕。" -msgstr "[Auto Storage] Configuration reloaded successfully." +msgstr "[Auto Storage] Configuration reloaded successfully。" #: ../../Commands.cs:17 msgid "" "【自动储存】指令菜单 [i:3456][C/F2F2C7:插件开发] [C/BFDFEA:by] [c/00FFFF:羽" "学][i:3459]\n" msgstr "" +"【AutoStorage】Command Menu [i:3456][C/F2F2C7:Plugin Development] [C/BFDFEA:" +"by] [c/00FFFF:羽学][i:3459]\n" #: ../../Commands.cs:18 msgid "/ast —— 查看自动储存菜单\n" -msgstr "" +msgstr "/ast — View the Auto Storage Menu\n" #: ../../Commands.cs:28 msgid "/ast add 或 del 名字 —— [c/87DF86:添加]|[c/F19092:删除]自存物品" msgstr "" +"/ast add 或 del — [c/87DF86:Add] | [c/F19092:Delete] self-storage " +"items" #: ../../Commands.cs:22 msgid "/ast armor —— 开启|关闭[c/F2F191:装备识别]模式\n" -msgstr "" +msgstr "/ast armor — Enable | Disable [c/F2F191:Equipment Recognition] mode\n" #: ../../Commands.cs:20 msgid "/ast auto —— 开启|关闭[c/89DF85:自动识别]模式\n" -msgstr "" +msgstr "/ast auto — Enable | Disable [c/89DF85:Auto Recognition] mode\n" #: ../../Commands.cs:25 msgid "/ast bank —— 监听[c/F3B691:储存空间位格]开关\n" -msgstr "" +msgstr "/ast bank — Monitor [c/F3B691:Storage Space Slot] switch\n" #: ../../Commands.cs:24 msgid "/ast clear —— [c/E488C1:清理]自动储存表\n" -msgstr "" +msgstr "/ast clear — [c/E488C1:Clear] the Auto Storage Table\n" #: ../../Commands.cs:21 msgid "/ast hand —— 开启|关闭[c/F19092:手持识别]模式\n" -msgstr "" +msgstr "/ast hand — Enable | Disable [c/F19092:Held Item Recognition] mode\n" #: ../../Commands.cs:23 msgid "/ast list —— [c/85CEDF:列出]自己的[c/85CEDF:自动储存表]\n" -msgstr "" +msgstr "/ast list — [c/85CEDF:List] your [c/85CEDF:Auto Storage Table]\n" #: ../../Commands.cs:26 msgid "/ast mess —— 开启|关闭物品[c/F2F292:自存消息]\n" -msgstr "" +msgstr "/ast mess — Enable | Disable [c/F2F292:Self-Storage Messages]\n" #: ../../Commands.cs:27 msgid "/ast pm —— 开启|关闭[c/85CFDE:性能模式]\n" -msgstr "" +msgstr "/ast pm — Enable | Disable [c/85CFDE:Performance Mode]\n" #: ../../Commands.cs:19 msgid "/astreset —— 清空[c/85CFDE:所有玩家]数据\n" -msgstr "" +msgstr "/astreset — Clear All data for [c/85CFDE:all players]\n" #: ../../Commands.cs:162 msgid "" "不存在该物品,\"物品查询\": \"[c/92C5EC:https://terraria.wiki.gg/zh/wiki/" "Item_IDs]\"" msgstr "" +"The item does not exist, \"Item Lookup\": \"[c/92C5EC:https://terraria.wiki." +"gg/zh/wiki/Item_IDs]\"" #: ../../Commands.cs:69 msgid "只有玩家[c/E4EFBC:移动|攻击]才会执行[c/87DF86:自存]" msgstr "" +"Only when the player [c/E4EFBC:moves | attacks] will the [c/87DF86:self-" +"storage] be executed." #: ../../Commands.cs:85 ../../Commands.cs:135 msgid "启用" -msgstr "" +msgstr "Enabled" #: ../../Commands.cs:39 msgid "已[c/92C5EC:清空]所有玩家《自动储存》数据!" -msgstr "" +msgstr "All players' [c/92C5EC:Cleared] Auto Storage data!" #: ../../Tool.cs:124 ../../Tool.cs:152 ../../Tool.cs:203 -#, fuzzy, csharp-format -#| msgid "已将'[c/92C5EC:{0}]'存入您的{1} 当前数量: {2}" +#, csharp-format msgid "已将 '[c/92C5EC:{0}]' 存入您的 {1} 当前数量: {2}" -msgstr "has stored ‘[c/92C5EC:{0}]’ into your {1}. Current stacks: {2}" +msgstr "" +"Successfully stored '[c/92C5EC:{0}]' in your {1}. Current quantity: {2}" #: ../../Tool.cs:51 #, csharp-format msgid "已将 '[c/92C5EC:{0}]'添加到自动储存表|指令菜单:[c/A1D4C2:/ast]" msgstr "" +"Successfully added '[c/92C5EC:{0}]' to the Auto Storage Table | Command " +"Menu: [c/A1D4C2:/ast]" #: ../../Tool.cs:100 #, csharp-format msgid "已将'[c/92C5EC:{0}]'存入您的{1} 当前数量: {2}" -msgstr "has stored ‘[c/92C5EC:{0}]’ into your {1}. Current stacks: {2}" +msgstr "" +"Successfully stored '[c/92C5EC:{0}]' in your {1}. Current quantity: {2}" #: ../../Commands.cs:195 msgid "已成功从自动储存删除物品: [c/92C5EC:{0}]!" -msgstr "" +msgstr "Successfully deleted item: [c/92C5EC:{0}] from the Auto Storage!" #: ../../Commands.cs:181 msgid "已成功将物品添加到自动储存: [c/92C5EC:{0}]!" -msgstr "" +msgstr "Successfully added item to the Auto Storage: [c/92C5EC:{0}]!" #: ../../Commands.cs:127 #, csharp-format msgid "已清理[c/92C5EC: {0} ]的自动储存表" -msgstr "" +msgstr "Successfully cleared the Auto Storage Table for [c/92C5EC:{0}]." #: ../../Commands.cs:87 msgid "性能模式:不为[c/C086DF:堆叠达到单格上限]物品进行分堆累积" msgstr "" +"Performance Mode: Does not split stacks for items that [c/C086DF:reach the " +"single slot limit]." #: ../../Tool.cs:221 #, csharp-format msgid "您的 {0} 已经满了,无法继续存入物品。" -msgstr "" +msgstr "Your {0} is already full, and no more items can be stored." #: ../../Commands.cs:67 #, csharp-format msgid "您的[c/BCB7E9:装备识别]为:[c/F29192:{0}]" -msgstr "" +msgstr "Your [c/BCB7E9:Equipment Recognition] is: [c/F29192:{0}]" #: ../../Commands.cs:68 #, csharp-format msgid "您的[c/E4EFBC:手持储存]为:[c/C086DF:{0}]" -msgstr "" +msgstr "Your [c/E4EFBC:Held Item Storage] is: [c/C086DF:{0}]" #: ../../Commands.cs:66 #, csharp-format msgid "您的[c/F2BEC0:自动识别]为:[c/87DF86:{0}]" -msgstr "" +msgstr "Your [c/F2BEC0:Auto Recognition] is: [c/87DF86:{0}]" #: ../../Commands.cs:65 #, csharp-format msgid "您的自存[c/BBE9B7:监听]为:[c/E489C0:{0}]" -msgstr "" +msgstr "Your self-storage [c/BBE9B7:Monitoring] is: [c/E489C0:{0}]" #: ../../Commands.cs:64 #, csharp-format msgid "服务器[c/87DF86:性能模式]:[c/C086DF:{0}]" -msgstr "" +msgstr "Server [c/87DF86:Performance Mode]: [c/C086DF:{0}]" #: ../../Commands.cs:177 msgid "物品 [c/92C5EC:{0}] 已在自动储存中!" -msgstr "" +msgstr "Item [c/92C5EC:{0}] is already in the Auto Storage!" #: ../../Commands.cs:191 msgid "物品 {0} 不在自动储存中!" -msgstr "" +msgstr "Item {0} is not in the Auto Storage!" #: ../../Commands.cs:86 #, csharp-format msgid "玩家 [{0}] 已[c/92C5EC:{1}]服务器性能模式。" -msgstr "" +msgstr "Player [{0}] has [c/92C5EC:{1}] the server performance mode." #: ../../Commands.cs:95 #, csharp-format msgid "玩家 [{0}] 已[c/92C5EC:启用]自动识别模式。" -msgstr "" +msgstr "Player [{0}] has [c/92C5EC:Enabled] the Auto Recognition mode." #: ../../Commands.cs:106 #, csharp-format msgid "玩家 [{0}] 已[c/92C5EC:启用]装备识别储存模式。" msgstr "" +"Player [{0}] has [c/92C5EC:Enabled] the Equipment Recognition Storage mode." #: ../../Commands.cs:96 #, csharp-format msgid "玩家 [{0}] 已[c/92C5EC:禁用]自动识别模式。" -msgstr "" +msgstr "Player [{0}] has [c/92C5EC:Disabled] the Auto Recognition mode." #: ../../Commands.cs:107 #, csharp-format msgid "玩家 [{0}] 已[c/92C5EC:禁用]装备识别储存模式。" msgstr "" +"Player [{0}] has [c/92C5EC:Disabled] the Equipment Recognition Storage mode." #: ../../Commands.cs:136 #, csharp-format msgid "玩家 [{0}] 的储物空间位格监听功能已[c/92C5EC:{1}]" msgstr "" +"Player [{0}]’s storage space slot monitoring function has been [c/92C5EC:{1}]" #: ../../Commands.cs:117 #, csharp-format msgid "玩家 [{0}] 的手持识别模式已[c/92C5EC:启用]" -msgstr "" +msgstr "Player [{0}]’s held item recognition mode has been [c/92C5EC:Enabled]" #: ../../Commands.cs:118 #, csharp-format msgid "玩家 [{0}] 的手持识别模式已[c/92C5EC:禁用]" -msgstr "" +msgstr "Player [{0}]’s held item recognition mode has been [c/92C5EC:Disabled]" #: ../../Commands.cs:144 #, csharp-format msgid "玩家 [{0}] 的自动储存消息已[c/92C5EC:启用]" -msgstr "" +msgstr "Player [{0}]’s auto storage messages have been [c/92C5EC:Enabled]" #: ../../Commands.cs:145 #, csharp-format msgid "玩家 [{0}] 的自动储存消息已[c/92C5EC:禁用]" -msgstr "" +msgstr "Player [{0}]’s auto storage messages have been [c/92C5EC:Disabled]" #: ../../Commands.cs:85 ../../Commands.cs:135 msgid "禁用" -msgstr "" +msgstr "Disabled" #: ../../Commands.cs:57 msgid "" "请用角色[c/D95065:重进服务器]后输入:/ast 指令查看菜单\n" "羽学声明:本插件纯属[c/7E93DE:免费]请勿上当受骗" msgstr "" +"Please rejoin the server with your character [c/D95065:rejoin server] and " +"then enter: /ast \n" +"Yu Xue declares: This plugin is [c/7E93DE:free], please do not be deceived" #, fuzzy #~| msgid "" diff --git a/src/ConvertWorld/i18n/en-US.po b/src/ConvertWorld/i18n/en-US.po index 5cab3b7e..a2bf46d4 100644 --- a/src/ConvertWorld/i18n/en-US.po +++ b/src/ConvertWorld/i18n/en-US.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: ConvertWorld\n" "POT-Creation-Date: 2024-09-28 12:12:09+0000\n" -"PO-Revision-Date: 2024-09-30 19:13+0800\n" +"PO-Revision-Date: 2024-11-06 00:06+0800\n" "Last-Translator: \n" "Language-Team: \n" "Language: en\n" @@ -13,7 +13,7 @@ msgstr "" #: ../../ConvertWorld.cs:44 msgid "[替换世界物品]重新加载配置完毕。" -msgstr "[ConvertWorld] Configuration reloaded successfully." +msgstr "[ConvertWorld] Configuration reloaded successfully。" #: ../../ConvertWorld.cs:158 msgid "已替换世界物品! \n" diff --git a/src/RainbowChat/i18n/en-US.po b/src/RainbowChat/i18n/en-US.po new file mode 100644 index 00000000..6a3f2416 --- /dev/null +++ b/src/RainbowChat/i18n/en-US.po @@ -0,0 +1,148 @@ +msgid "" +msgstr "" +"Project-Id-Version: RainbowChat\n" +"POT-Creation-Date: 2024-11-01 01:25:58+0800\n" +"PO-Revision-Date: 2024-11-06 00:04+0800\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: en_US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.5\n" + +#: ../../Commands.cs:152 ../../RainbowChat.cs:113 +msgid "[i:3454][c/E83849:注意][i:3454]\n" +msgstr "[i:3454][c/E83849:Note][i:3454]\n" + +#: ../../RainbowChat.cs:52 +msgid "[彩色聊天]重新加载配置完毕。" +msgstr "[RainbowChat] Configuration reloaded successfully." + +#: ../../Commands.cs:179 +#, csharp-format +msgid "{0} 的彩虹聊天已 启用." +msgstr "{0}’s Rainbow Chat has been Enabled." + +#: ../../Commands.cs:180 +#, csharp-format +msgid "{0} 的彩虹聊天已 禁用." +msgstr "{0}’s Rainbow Chat has been Disabled." + +#: ../../Commands.cs:33 +#, csharp-format +msgid "{0} 的彩虹聊天插件已关闭." +msgstr "{0}’s Rainbow Chat plugin has been turned off." + +#: ../../Commands.cs:25 +#, csharp-format +msgid "{0} 的彩虹聊天插件已启用." +msgstr "{0}’s Rainbow Chat plugin has been enabled." + +#: ../../Commands.cs:206 +#, csharp-format +msgid "{0} 的渐变聊天已 启用." +msgstr "{0}’s Gradient Chat has been Enabled." + +#: ../../Commands.cs:207 +#, csharp-format +msgid "{0} 的渐变聊天已 禁用." +msgstr "{0}’s Gradient Chat has been Disabled." + +#: ../../Commands.cs:141 +msgid "《彩虹聊天》 菜单指令\n" +msgstr "《Rainbow Chat》 Menu Command\n" + +#: ../../Commands.cs:142 +msgid "/rc 开启 或 关闭 - 开启|关闭插件功能\n" +msgstr "/rc Or - Enable | Disable plugin function\n" + +#: ../../Commands.cs:146 +msgid "/rc 渐变 - 开启或关闭自己的渐变聊天\n" +msgstr "/rc gradient - Enable or disable your own gradient chat\n" + +#: ../../Commands.cs:147 +msgid "/rc 渐变 开始 R,G,B - 设置渐变聊天起始颜色\n" +msgstr "/rc gradient start R,G,B - Set the starting color for gradient chat\n" + +#: ../../Commands.cs:148 +msgid "/rc 渐变 结束 R,G,B - 设置渐变聊天结束颜色" +msgstr "/rc gradient end R,G,B - Set the ending color for gradient chat" + +#: ../../Commands.cs:144 +msgid "/rc 渐变开关 - 全局开启|关闭渐变色功能\n" +msgstr "/rc gswitch - Globally enable | disable gradient color function\n" + +#: ../../Commands.cs:145 +msgid "/rc 随机 - 开启或关闭自己的随机单色整句\n" +msgstr "/rc random - Enable Or Disable your own random monochrome sentences\n" + +#: ../../Commands.cs:143 +msgid "/rc 随机开关 - 全局开启|关闭随机色功能\n" +msgstr "/rc rswitch - Globally enable | disable random color function\n" + +#: ../../Commands.cs:153 ../../RainbowChat.cs:114 +msgid "使用[c/B0B2D1:非正版客户端]或[c/B0B2D1:语言资源包]导致TS指令异常\n" +msgstr "Using a [c/B0B2D1:non-official client] or [c/B0B2D1:language resource pack] may cause TShock command abnormalities.\n" + +#: ../../Commands.cs:52 +msgid "全局的渐变色聊天已 启用." +msgstr "Global gradient color chat has been Enabled." + +#: ../../Commands.cs:53 +msgid "全局的渐变色聊天已 禁用." +msgstr "Global gradient color chat has been Disabled." + +#: ../../Commands.cs:42 +msgid "全局的随机色聊天已 启用." +msgstr "Global random color chat has been enabled." + +#: ../../Commands.cs:43 +msgid "全局的随机色聊天已 禁用." +msgstr "Global random color chat has been disabled" + +#: ../../RainbowChat.cs:76 +msgid "您的渐变聊天功能已自动开启." +msgstr "Your gradient chat feature has automatically turned on" + +#: ../../RainbowChat.cs:116 +msgid "或者请玩家使用 [c/B0B2D1:.help] 代替 [c/B0B2D1:/help]" +msgstr "Or Please have the player use [c/B0B2D1:.help] instead of [c/B0B2D1:/help]" + +#: ../../Commands.cs:155 +msgid "或者请玩家使用 [c/B0B2D1:.help] 代替 [c/B0B2D1:/help]" +msgstr "Or Please have the player use [c/B0B2D1:.help] instead of [c/B0B2D1:/help]" + +#: ../../Commands.cs:110 +msgid "无效的结束颜色值。请使用格式如 'R,G,B'(逗号分隔)的颜色表示法。" +msgstr "Invalid end color value. Please use the format 'R,G,B' (comma-separated) for color notation." + +#: ../../Commands.cs:88 +msgid "无效的起始颜色值。请使用格式如 'R,G,B'(逗号分隔)的颜色表示法。" +msgstr "Invalid start color value. Please use the format 'R,G,B' (comma-separated) for color notation." + +#: ../../Commands.cs:84 +#, csharp-format +msgid "渐变开始颜色已设置为 R:{0}, G:{1}, B:{2}" +msgstr "The gradient start color has been set to R:{0}, G:{1}, B:{2}." + +#: ../../Commands.cs:106 +#, csharp-format +msgid "渐变结束颜色已设置为 R:{0}, G:{1}, B:{2}" +msgstr "The gradient end color has been set to R:{0}, G:{1}, B:{2}." + +#: ../../Commands.cs:115 +msgid "结束颜色值缺失。请使用如 '/rc 渐变 结束 0,255,0' 的格式。" +msgstr "End color value is missing. Please use the format '/rc gradient end 0,255,0'." + +#: ../../Commands.cs:154 ../../RainbowChat.cs:115 +msgid "请服主安装[c/B0B2D1:Chireiden.TShock.Omni]插件修复\n" +msgstr "Please have the server owner install the [c/B0B2D1:Chireiden.TShock.Omni] plugin to fix the issue\n" + +#: ../../Commands.cs:93 +msgid "起始颜色值缺失。请使用如 '/rc 渐变 开始 255,0,0' 的格式。" +msgstr "Start color value is missing. Please use the format '/rc gradient start 255,0,0'。" + +#: ../../Commands.cs:226 +msgid "错误的玩家!" +msgstr "Incorrect player!" diff --git a/src/TimeRate/TimeRate.cs b/src/TimeRate/TimeRate.cs index a0d50022..d192f834 100644 --- a/src/TimeRate/TimeRate.cs +++ b/src/TimeRate/TimeRate.cs @@ -70,7 +70,7 @@ private void UpdateTimeRate(On.Terraria.Main.orig_UpdateTimeRate orig) //用标识决定是否发包优化时间流逝视觉 var Update = false; - if (plrCount > 0 && (Config.Enabled || (all && Config.All) || (one && Config.One)) || plrCount == 0) + if ((plrCount > 0 && (Config.Enabled || (all && Config.All) || (one && Config.One))) || plrCount == 0) { var Rate = plrCount > 0 && (Config.Enabled || (all && Config.All) || (one && Config.One)) ? Config.UpdateRate : 1; diff --git a/src/TimeRate/i18n/en-US.po b/src/TimeRate/i18n/en-US.po new file mode 100644 index 00000000..101798df --- /dev/null +++ b/src/TimeRate/i18n/en-US.po @@ -0,0 +1,95 @@ +msgid "" +msgstr "" +"Project-Id-Version: TimeRate\n" +"POT-Creation-Date: 2024-10-25 14:11:05+0000\n" +"PO-Revision-Date: 2024-11-05 23:47+0800\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: en_US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.5\n" + +#: ../../Commands.cs:9 +msgid "[c/3ADB2C:启用]" +msgstr "[c/3ADB2C:Enable]" + +#: ../../Commands.cs:11 +msgid "[c/55A2E0:启用]" +msgstr "[c/55A2E0:Enable]" + +#: ../../Commands.cs:17 +msgid "[c/EBE9A2:时间加速插件] [C/BFDFEA:by] [c/00FFFF:羽学][i:3459]\n" +msgstr "[c/EBE9A2:TimeAccelerationPlugin] [C/BFDFEA:by] [c/00FFFF:Yu Xue][i:3459]\n" + +#: ../../Commands.cs:9 ../../Commands.cs:10 ../../Commands.cs:11 +msgid "[c/F25C71:关闭]" +msgstr "[c/F25C71:Disabled]" + +#: ../../Commands.cs:10 +msgid "[c/FFF261:启用]" +msgstr "[c/FFF261:Enable]" + +#: ../../TimeRate.cs:46 +msgid "[时间加速插件]重新加载配置完毕。" +msgstr "[TimeAccelerationPlugin] Configuration reloaded successfully." + +#: ../../Commands.cs:19 +msgid "/reload —— 重载配置文件\n" +msgstr "/reload — Reload Configuration file\n" + +#: ../../Commands.cs:18 +msgid "/times —— 时间加速指令菜单\n" +msgstr "/times — Time Acceleration Command Menu\n" + +#: ../../Commands.cs:21 +msgid "/times all —— 开启|关闭[c/FFF261:全员睡觉]加速\n" +msgstr "/times all — Enable | Disable [c/FFF261:Everyone Sleep] acceleration\n" + +#: ../../Commands.cs:22 +msgid "/times on | off —— 开启|关闭[c/3ADB2C:指令]加速\n" +msgstr "/times on | off — Enable | Disable [c/3ADB2C:Command] acceleration\n" + +#: ../../Commands.cs:20 +msgid "/times one —— 开启|关闭[c/55A2E0:单人睡觉]加速\n" +msgstr "/times one — Enable | Disable [c/55A2E0:Single Player Sleep] acceleration\n" + +#: ../../Commands.cs:23 +msgid "/times set 数字 —— 设置速率|日晷:[c/F25C71:60] 正常:[c/55A2E0:1]" +msgstr "/times set number — Set Speed | Sundial: [c/F25C71:60] Normal: [c/55A2E0:1]" + +#: ../../Commands.cs:33 ../../Commands.cs:42 ../../Commands.cs:53 +#: ../../Commands.cs:64 +msgid "启用" +msgstr "Enable" + +#: ../../Commands.cs:54 +msgid "已[c/C9C7F5:{0}]全员睡觉加速!当前速率为:[c/FFFCCF:{1}]!" +msgstr "Everyone sleep acceleration has been [c/C9C7F5:{0}]! Current speed is: [c/FFFCCF:{1}]!" + +#: ../../Commands.cs:65 +msgid "已[c/C9C7F5:{0}]单人睡觉加速!当前速率为:[c/FFFCCF:{1}]!" +msgstr "Single player sleep acceleration has been [c/C9C7F5:{0}]! Current speed is: [c/FFFCCF:{1}]!" + +#: ../../Commands.cs:43 +msgid "已[c/C9C7F5:{0}]时间流速!当前速率为:[c/FFFCCF:{1}]!" +msgstr "Time flow speed has been [c/C9C7F5:{0}]! Current speed is: [c/FFFCCF:{1}]!" + +#: ../../Commands.cs:34 +msgid "已成功[c/C9C7F5:{0}]时间流速! 当前速率为:[c/FFFCCF:{1}]" +msgstr "Time flow speed has been successfully [c/C9C7F5:{0}]! Current speed is: [c/FFFCCF:{1}]" + +#: ../../Commands.cs:80 +msgid "已成功时间流速设置为: [c/C9C7F5:{0}] !" +msgstr "Time flow speed has been successfully set to: [c/C9C7F5:{0}]!" + +#: ../../Commands.cs:33 ../../Commands.cs:42 ../../Commands.cs:53 +#: ../../Commands.cs:64 +msgid "禁用" +msgstr "Disabled" + +#: ../../Commands.cs:24 +#, csharp-format +msgid "速率:[c/C9C7F5:{0}] 指令:{1} 全员:{2} 单人:{3}" +msgstr "Speed: [c/C9C7F5:{0}] Command: {1} Everyone: {2} Single Player: {3}" From 736598a64e98c8440d85a37fbbd3a96ffb4a66de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BE=BD=20=E5=AD=A6?= <1242509682@qq.com> Date: Wed, 6 Nov 2024 01:03:49 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=EF=BC=9A=E5=A4=8D=E6=B4=BB=E5=B8=81v1.0.2=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=87=AA=E5=8A=A8=E5=9E=83=E5=9C=BE=E6=A1=B6?= =?UTF-8?q?=E4=B8=8E=E8=87=AA=E5=8A=A8=E5=82=A8=E5=AD=98=E7=9A=84=E8=8B=B1?= =?UTF-8?q?=E6=96=87=E6=8C=87=E4=BB=A4=E8=8F=9C=E5=8D=95=E5=8D=95=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Plugin.sln | 10 + README.md | 1 + README_en.md | 1 + src/AutoAirItem/i18n/en-US.po | 4 +- src/AutoAirItem/i18n/template.pot | 4 +- src/AutoStoreItems/i18n/en-US.po | 6 +- src/RebirthCoin/.gitignore | 162 +++++++++++++++++ src/RebirthCoin/Config/Configuration.cs | 51 ++++++ src/RebirthCoin/LPlayer.cs | 20 ++ src/RebirthCoin/README.md | 43 +++++ src/RebirthCoin/README_EN.md | 42 +++++ src/RebirthCoin/RebirthCoin.cs | 231 ++++++++++++++++++++++++ src/RebirthCoin/RebirthCoin.csproj | 5 + src/RebirthCoin/i18n/en-US.po | 33 ++++ src/RebirthCoin/i18n/template.pot | 32 ++++ 15 files changed, 638 insertions(+), 7 deletions(-) create mode 100644 src/RebirthCoin/.gitignore create mode 100644 src/RebirthCoin/Config/Configuration.cs create mode 100644 src/RebirthCoin/LPlayer.cs create mode 100644 src/RebirthCoin/README.md create mode 100644 src/RebirthCoin/README_EN.md create mode 100644 src/RebirthCoin/RebirthCoin.cs create mode 100644 src/RebirthCoin/RebirthCoin.csproj create mode 100644 src/RebirthCoin/i18n/en-US.po create mode 100644 src/RebirthCoin/i18n/template.pot diff --git a/Plugin.sln b/Plugin.sln index 9530ae66..f053c024 100644 --- a/Plugin.sln +++ b/Plugin.sln @@ -246,6 +246,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LazyAPI", "src\LazyAPI\Lazy EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoFish", "src\AutoFish\AutoFish.csproj", "{1225C358-E037-41BF-A249-C2AB071D80FF}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RebirthCoin", "src\RebirthCoin\RebirthCoin.csproj", "{87D2DF3A-5F8C-42A4-BA29-9D142E49572B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1206,6 +1208,14 @@ Global {1225C358-E037-41BF-A249-C2AB071D80FF}.Release|Any CPU.Build.0 = Release|Any CPU {1225C358-E037-41BF-A249-C2AB071D80FF}.Release|x64.ActiveCfg = Release|Any CPU {1225C358-E037-41BF-A249-C2AB071D80FF}.Release|x64.Build.0 = Release|Any CPU + {87D2DF3A-5F8C-42A4-BA29-9D142E49572B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {87D2DF3A-5F8C-42A4-BA29-9D142E49572B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87D2DF3A-5F8C-42A4-BA29-9D142E49572B}.Debug|x64.ActiveCfg = Debug|Any CPU + {87D2DF3A-5F8C-42A4-BA29-9D142E49572B}.Debug|x64.Build.0 = Debug|Any CPU + {87D2DF3A-5F8C-42A4-BA29-9D142E49572B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {87D2DF3A-5F8C-42A4-BA29-9D142E49572B}.Release|Any CPU.Build.0 = Release|Any CPU + {87D2DF3A-5F8C-42A4-BA29-9D142E49572B}.Release|x64.ActiveCfg = Release|Any CPU + {87D2DF3A-5F8C-42A4-BA29-9D142E49572B}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/README.md b/README.md index e660f9fc..14bc8f4e 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,7 @@ | [RegionView](src/RegionView/README.md) | 显示区域边界 | 无 | | [ReFishTask](src/ReFishTask/README.md) | 自动刷新渔夫任务 | 无 | | [Respawn](src/Respawn/README.md) | 原地复活 | 无 | +| [RebirthCoin](src/RebirthCoin/README.md) | 复活币 | 无 | | [RestInventory](src/RestInventory/README.md) | 提供 REST 查询背包接口 | 无 | | [Sandstorm](src/Sandstorm/README.md) | 切换沙尘暴 | 无 | | [ServerTools](src/ServerTools/README.md) | 服务器管理工具 | 无 | diff --git a/README_en.md b/README_en.md index 399f344d..849d1b28 100644 --- a/README_en.md +++ b/README_en.md @@ -154,6 +154,7 @@ | [RegionView](src/RegionView/README.md) | No | Display area boundaries | No | | [ReFishTask](src/ReFishTask/README.md) | No | Automatically refresh fisherman tasks | No | | [Respawn](src/Respawn/README.md) | No | Respawn at the death place | No | +| [RebirthCoin](src/RebirthCoin/README_EN.md) | Yes | Consume designated items to revive player | No | | [RestInventory](src/RestInventory/README.md) | No | Provide REST query backpack interface | No | | [Sandstorm](src/Sandstorm/README.md) | No | Toggle sandstorm | No | | [ServerTools](src/ServerTools/README.md) | No | Server management tools | No | diff --git a/src/AutoAirItem/i18n/en-US.po b/src/AutoAirItem/i18n/en-US.po index 82fd693a..2f32a086 100644 --- a/src/AutoAirItem/i18n/en-US.po +++ b/src/AutoAirItem/i18n/en-US.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: AutoAirItem\n" "POT-Creation-Date: 2024-11-05 23:19:09+0800\n" -"PO-Revision-Date: 2024-11-05 23:24+0800\n" +"PO-Revision-Date: 2024-11-06 00:56+0800\n" "Last-Translator: \n" "Language-Team: \n" "Language: en_US\n" @@ -46,7 +46,7 @@ msgstr "/air —— AutoAirItem Help\n" #, csharp-format msgid "/air add 或 del 名字 —— [c/87DF86:添加]|[c/F19092:移出]垃圾桶物品" msgstr "" -"/air add 或 del name — [c/87DF86:Add] | [c/F19092:Remove] trash bin items" +"/air or name — [c/87DF86:Add] | [c/F19092:Remove] trash bin items" #: ..\..\Commands.cs:24 msgid "/air auto —— 监听[c/F3B691:垃圾桶位格]开关\n" diff --git a/src/AutoAirItem/i18n/template.pot b/src/AutoAirItem/i18n/template.pot index cb853587..178a030a 100644 --- a/src/AutoAirItem/i18n/template.pot +++ b/src/AutoAirItem/i18n/template.pot @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: AutoAirItem\n" -"POT-Creation-Date: 2024-11-05 23:19:09+0800\n" -"PO-Revision-Date: 2024-11-05 23:19:10+0800\n" +"POT-Creation-Date: 2024-11-06 00:54:47+0800\n" +"PO-Revision-Date: 2024-11-06 00:54:47+0800\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" diff --git a/src/AutoStoreItems/i18n/en-US.po b/src/AutoStoreItems/i18n/en-US.po index 5c99642c..c76d38c6 100644 --- a/src/AutoStoreItems/i18n/en-US.po +++ b/src/AutoStoreItems/i18n/en-US.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: AutoStoreItems\n" "POT-Creation-Date: 2024-10-31 19:21:41+0000\n" -"PO-Revision-Date: 2024-11-05 23:36+0800\n" +"PO-Revision-Date: 2024-11-06 01:02+0800\n" "Last-Translator: \n" "Language-Team: \n" "Language: en_US\n" @@ -79,8 +79,8 @@ msgstr "/ast — View the Auto Storage Menu\n" #: ../../Commands.cs:28 msgid "/ast add 或 del 名字 —— [c/87DF86:添加]|[c/F19092:删除]自存物品" msgstr "" -"/ast add 或 del — [c/87DF86:Add] | [c/F19092:Delete] self-storage " -"items" +"/ast or — [c/87DF86:Add] | [c/F19092:Delete] self-" +"storage items" #: ../../Commands.cs:22 msgid "/ast armor —— 开启|关闭[c/F2F191:装备识别]模式\n" diff --git a/src/RebirthCoin/.gitignore b/src/RebirthCoin/.gitignore new file mode 100644 index 00000000..0f053cb2 --- /dev/null +++ b/src/RebirthCoin/.gitignore @@ -0,0 +1,162 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates +*.vsidx + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets +!packages/*/build/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +#packages/ + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + + +#LightSwitch generated files +GeneratedArtifacts/ +_Pvt_Extensions/ +ModelManifest.xml + +# ========================= +# Windows detritus +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac desktop service store files +.DS_Store +packages/ +CourtView2000V2.Puller/Help/ + +# JetBrains IDEA +.idea diff --git a/src/RebirthCoin/Config/Configuration.cs b/src/RebirthCoin/Config/Configuration.cs new file mode 100644 index 00000000..a17bab4b --- /dev/null +++ b/src/RebirthCoin/Config/Configuration.cs @@ -0,0 +1,51 @@ +using Newtonsoft.Json; +using TShockAPI; + +namespace Plugin; + +public class Configuration +{ + [JsonProperty("插件开关", Order = 6)] + public bool Enabled = true; + + [JsonProperty("允许PVP复活", Order = 7)] + public bool PVP = false; + + [JsonProperty("复活提醒", Order = 8)] + public string Mess = GetString("{0} 被圣光笼罩,瞬间复活!!!"); + + [JsonProperty("复活提醒的颜色", Order = 9)] + public int[] Colors = new int[3] { 255, 215, 0 }; + + [JsonProperty("复活币的物品ID",Order = 10)] + public int[] ItemID = new int[] { 3229 }; + + #region 读取与创建配置文件方法 + public static string FilePath => Path.Combine(TShock.SavePath, "复活币.json"); + public void Write() + { + var json = JsonConvert.SerializeObject(this, Formatting.Indented); + File.WriteAllText(FilePath, json); + } + + public static Configuration Read(string path) + { + if (!File.Exists(path)) + { + var c = new Configuration(); + c.Write(); + return c; + } + else + { + using (var fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read)) + using (var sr = new StreamReader(fs)) + { + var json = sr.ReadToEnd(); + var cf = JsonConvert.DeserializeObject(json); + return cf!; + } + } + } + #endregion +} diff --git a/src/RebirthCoin/LPlayer.cs b/src/RebirthCoin/LPlayer.cs new file mode 100644 index 00000000..4e1ba968 --- /dev/null +++ b/src/RebirthCoin/LPlayer.cs @@ -0,0 +1,20 @@ +namespace Plugin; + +public class LPlayer +{ + public int Index { get; set; } + + public float x { get; set; } + + public float y { get; set; } + + public bool tp { get; set; } + + public LPlayer(int index) + { + Index = index; + tp = false; + x = 0f; + y = 0f; + } +} diff --git a/src/RebirthCoin/README.md b/src/RebirthCoin/README.md new file mode 100644 index 00000000..db7f02a4 --- /dev/null +++ b/src/RebirthCoin/README.md @@ -0,0 +1,43 @@ +# RebirthCoin 复活币 + +- 作者: GK & 羽学 +- 出处: GK的QQ群232109072 +- 这是一个Tshock服务器插件,主要用于:消耗指定道具,让玩家快速复活。 + +## 更新日志 + +``` +v1.0.2 +适配.Net 6.0 +将复活币的物品ID从整数改为数组(支持更多物品作为复活币) +将复活币权限名改为:RebirthCoin +``` + +## 指令 + +| 语法 | 别名 | 权限 | 说明 | +| -------------------------------- | :---: | :--------------: | :--------------------------------------: | +| 无 | 无 | RebirthCoin | 复活币使用权限 | +| /reload | 无 | tshock.cfg.reload | 重载配置文件 | + +## 配置 +> 配置文件位置:tshock/复活币.json +```json +{ + "插件开关": true, //开启或者关闭插件功能 + "允许PVP复活": false, //允许或禁止玩家在pvp模式下使用复活币 + "复活提醒": "{0} 被圣光笼罩,瞬间复活!!!", //复活时提示语的字符串 + "复活提醒的颜色": [ + 255, //复活提示语的颜色,分别为RGB,数值越大颜色越浅,全部填写255就是白色。 + 215, + 0 + ], + "复活币的物品ID": [ + 3229 //具体使用哪些物品作为复活币,这里写的是物品ID,支持多个物品用","逗号隔开 + ] +} +``` +## 反馈 +- 优先发issued -> 共同维护的插件库:https://github.com/UnrealMultiple/TShockPlugin +- 次优先:TShock官方群:816771079 +- 大概率看不到但是也可以:国内社区trhub.cn ,bbstr.net , tr.monika.love \ No newline at end of file diff --git a/src/RebirthCoin/README_EN.md b/src/RebirthCoin/README_EN.md new file mode 100644 index 00000000..dd84f024 --- /dev/null +++ b/src/RebirthCoin/README_EN.md @@ -0,0 +1,42 @@ +# RebirthCoin + +- Authors: GK & 羽学 +- Source: 无 +- Description: This is a TShock server plugin mainly used for allowing players to quickly resurrect by consuming specific items. + +## Update Log + +``` +v1.0.2 +Adapted to .NET 6.0 +Changed the resurrection coin item ID from int to int[] (array) +``` + +## Commands + +| Syntax | Alias | Permission | Description | +| -------------------------------- | :---: | :--------------: | :--------------------------------------: | +| No | No | RebirthCoin | Permission to use resurrection coins | +| /reload | No | tshock.cfg.reload | Reload the configuration file | + +## Configuration +> Configuration file location: tshock/复活币.json +```json +{ + "插件开关": true, // Enable or disable the plugin function + "允许PVP复活": false, // Allow or disallow using resurrection coins in PvP mode + "复活提醒": "{0} 被圣光笼罩,瞬间复活!!!", // The message displayed when a player resurrects + "复活提醒的颜色": [ + 255, // The color of the resurrection message, RGB values, higher numbers mean lighter colors, all 255 means white. + 215, + 0 + ], + "复活币的物品ID": [ + 3229 // Item IDs that can be used as resurrection coins, multiple items can be listed separated by commas. + ] +} +``` +## FeedBack +- Github Issue -> TShockPlugin Repo: https://github.com/UnrealMultiple/TShockPlugin +- TShock QQ Group: 816771079 +- China Terraria Forum: trhub.cn, bbstr.net, tr.monika.love \ No newline at end of file diff --git a/src/RebirthCoin/RebirthCoin.cs b/src/RebirthCoin/RebirthCoin.cs new file mode 100644 index 00000000..45347c16 --- /dev/null +++ b/src/RebirthCoin/RebirthCoin.cs @@ -0,0 +1,231 @@ +using Terraria; +using Terraria.DataStructures; +using TerrariaApi.Server; +using TShockAPI; +using TShockAPI.Hooks; + +namespace Plugin; + +[ApiVersion(2, 1)] +public class TestPlugin : TerrariaPlugin +{ + #region 插件信息 + public override string Name => "复活币"; + public override string Author => "GK 阁下"; + public override string Description => "让死者瞬间原地复活的神奇力量!"; + public override Version Version => new Version(1, 0, 0, 2); + #endregion + + #region 实例与变量 + private LPlayer[] LPlayers { get; set; } + #endregion + + #region 注册与释放 + public TestPlugin(Main game) : base(game) + { + this.Order = 99; + this.LPlayers = new LPlayer[256]; + } + + public override void Initialize() + { + LoaderComfig(); + GeneralHooks.ReloadEvent += this.ReloadConfig; + ServerApi.Hooks.NetGetData.Register(this, this.GetData); + ServerApi.Hooks.NetGreetPlayer.Register(this, this.OnGreetPlayer); + ServerApi.Hooks.ServerLeave.Register(this, this.OnLeave); + } + + protected override void Dispose(bool disposing) + { + if (disposing) + { + GeneralHooks.ReloadEvent -= this.ReloadConfig; + ServerApi.Hooks.NetGetData.Deregister(this, this.GetData); + ServerApi.Hooks.NetGreetPlayer.Deregister(this, this.OnGreetPlayer); + ServerApi.Hooks.ServerLeave.Deregister(this, this.OnLeave); + } + base.Dispose(disposing); + } + #endregion + + #region 配置重载读取与写入方法 + public static Configuration Config { get; set; } = new Configuration(); + public static void LoaderComfig() + { + try + { + if (File.Exists(Configuration.FilePath)) + { + Config = Configuration.Read(Configuration.FilePath); + } + else + { + TShock.Log.ConsoleError(GetString("未找到复活币配置,已为您创建!修改配置后输入指令 /reload 重新读取")); + } + Config.Write(); + } + catch (Exception ex) + { + TShock.Log.ConsoleError(ex.ToString()); + } + + //服务器没开启强制开荒或插件已开启,则关闭插件 + if (!Main.ServerSideCharacter && Config.Enabled) + { + TShock.Log.ConsoleError(GetString("启动复活币需要先启动SSC功能,检测到服务器未开启SSC功能已自动关闭复活币功能")); + Config.Enabled = false; + Config.Write(); + } + } + + private void ReloadConfig(ReloadEventArgs args) + { + LoaderComfig(); + args.Player.SendInfoMessage(GetString("[复活币]重新加载配置完毕。")); + } + #endregion + + #region 验证每个玩家数据是否能和服务器接轨用的 + private void OnGreetPlayer(GreetPlayerEventArgs e) + { + lock (this.LPlayers) + { + this.LPlayers[e.Who] = new LPlayer(e.Who); + } + } + + private void OnLeave(LeaveEventArgs e) + { + lock (this.LPlayers) + { + if (this.LPlayers[e.Who] != null) + { + this.LPlayers[e.Who] = null; + } + } + } + #endregion + + #region 获取玩家复活数据 + private void GetData(GetDataEventArgs args) + { + var plr = TShock.Players[args.Msg.whoAmI]; + + //玩家为空则返回 + if (plr == null) + { + return; + } + + lock (this.LPlayers) + { + //玩家索引为空则返回 + if (this.LPlayers[plr.Index] == null) + { + return; + } + } + + //如果玩家连接状态无效,或事件已处理则返回 + if (!plr.ConnectionAlive || !plr.Active || args.Handled) + { + return; + } + + //玩家没死亡或没权限 返回 + if ((int)args.MsgID != 118 || !plr.HasPermission("RebirthCoin")) + { + return; + } + + //如果玩家生成(指重生) + if ((int)args.MsgID == 12) + { + using (var binaryReader = new BinaryReader(new MemoryStream(args.Msg.readBuffer, args.Index, args.Length))) + { + binaryReader.ReadByte(); + var num = binaryReader.ReadInt16(); + var num2 = binaryReader.ReadInt16(); + var num3 = binaryReader.ReadInt32(); + var val2 = (PlayerSpawnContext)binaryReader.ReadByte(); + if (val2 == 0 && num3 <= 0 && this.LPlayers[plr.Index].tp) + { + plr.Teleport(this.LPlayers[plr.Index].x, this.LPlayers[plr.Index].y, 1); + this.LPlayers[plr.Index].tp = false; + args.Handled = true; + } + return; + } + } + + //如果玩家没开启SSC,或插件配置开关没启动 则返回 + if (!plr.SaveServerCharacter() && Config.Enabled) + { + Console.WriteLine(GetString("启动复活币需要先启动SSC功能! ")); + return; + } + + //背包格子的索引值,定义为空 + var slot = -1; + + //如果插件开启 + if (Config.Enabled) + { + //背包58格只取前50格遍历,51-54是钱币栏,55-58是弹药栏(不可能存物品) + for (var i = 0; i < 50; i++) + { + //如果背包格子出现这个数组里的ID 则选择这个格子的索引值 + if (Config.ItemID.Contains(plr.TPlayer.inventory[i].netID)) + { + slot = i; + break; + } + } + + //如果格子索引为空,返回 + if (slot == -1) + { + return; + } + } + + try + { + using var binaryReader2 = new BinaryReader(new MemoryStream(args.Msg.readBuffer, args.Index, args.Length)); + binaryReader2.ReadByte(); + var val3 = PlayerDeathReason.FromReader(new BinaryReader(binaryReader2.BaseStream)); + var num5 = binaryReader2.ReadInt16(); + var b = (byte)(binaryReader2.ReadByte() - 1); + BitsByte val4 = binaryReader2.ReadByte(); + var flag = val4[0]; + binaryReader2.Close(); + + if (!flag || Config.PVP) + { + if (Config.Enabled && slot != -1) + { + var inv = plr.TPlayer.inventory[slot]; + inv.stack--; + plr.SendData((PacketTypes)5, "", plr.Index, slot, plr.TPlayer.inventory[0].prefix, 0f, 0); + } + + this.LPlayers[plr.Index].x = plr.X; + this.LPlayers[plr.Index].y = plr.Y; + this.LPlayers[plr.Index].tp = true; + + //玩家生成 + plr.Spawn(0, null); + + //发送消息 + plr.SendInfoMessage(Config.Mess.Replace("{0}", plr.Name), Convert.ToByte(Config.Colors[0]), Convert.ToByte(Config.Colors[1]), Convert.ToByte(Config.Colors[2])); + args.Handled = true; + } + } + catch (Exception ex) + { + TShock.Log.ConsoleError(ex.ToString()); + } + } + #endregion +} \ No newline at end of file diff --git a/src/RebirthCoin/RebirthCoin.csproj b/src/RebirthCoin/RebirthCoin.csproj new file mode 100644 index 00000000..6973768b --- /dev/null +++ b/src/RebirthCoin/RebirthCoin.csproj @@ -0,0 +1,5 @@ + + + + + diff --git a/src/RebirthCoin/i18n/en-US.po b/src/RebirthCoin/i18n/en-US.po new file mode 100644 index 00000000..2b0b45dd --- /dev/null +++ b/src/RebirthCoin/i18n/en-US.po @@ -0,0 +1,33 @@ +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: RebirthCoin\n" +"POT-Creation-Date: 2024-11-06 00:43+0800\n" +"PO-Revision-Date: 2024-11-06 00:46+0800\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: en_US\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.5\n" + +#: ..\..\RebirthCoin.cs:85 +msgid "[复活币]重新加载配置完毕。" +msgstr "[RebirthCoin]Reloading Configuration completed。" + +#: ..\..\Config\Configuration.cs:15 +msgid "{0} 被圣光笼罩,瞬间复活!!!" +msgstr "{0} is enveloped by holy light and instantly resurrected!!!" + +#: ..\..\RebirthCoin.cs:76 +msgid "启动复活币需要先启动SSC功能,检测到服务器未开启SSC功能已自动关闭复活币功能" +msgstr "To activate the RebirthCoin, the SSC function needs to be activated first. If it is detected that the server has not enabled the SSC function, the RebirthCoin function will be automatically turned off" + +#: ..\..\RebirthCoin.cs:165 +msgid "启动复活币需要先启动SSC功能! " +msgstr "To activate RebirthCoin, you need to first activate the SSC function! " + +#: ..\..\RebirthCoin.cs:64 +msgid "未找到复活币配置,已为您创建!修改配置后输入指令 /reload 重新读取" +msgstr "No RebirthCoin Configuration found, created for you! After modifying the configuration, enter the command/reload to read again" diff --git a/src/RebirthCoin/i18n/template.pot b/src/RebirthCoin/i18n/template.pot new file mode 100644 index 00000000..fc027f0c --- /dev/null +++ b/src/RebirthCoin/i18n/template.pot @@ -0,0 +1,32 @@ +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: RebirthCoin\n" +"POT-Creation-Date: 2024-11-06 00:43+0800\n" +"PO-Revision-Date: 2024-11-06 00:42:54+0800\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.5\n" + +#: ..\..\RebirthCoin.cs:85 +msgid "[复活币]重新加载配置完毕。" +msgstr "" + +#: ..\..\Config\Configuration.cs:15 +msgid "{0} 被圣光笼罩,瞬间复活!!!" +msgstr "" + +#: ..\..\RebirthCoin.cs:76 +msgid "启动复活币需要先启动SSC功能,检测到服务器未开启SSC功能已自动关闭复活币功能" +msgstr "" + +#: ..\..\RebirthCoin.cs:165 +msgid "启动复活币需要先启动SSC功能! " +msgstr "" + +#: ..\..\RebirthCoin.cs:64 +msgid "未找到复活币配置,已为您创建!修改配置后输入指令 /reload 重新读取" +msgstr "" From 7f91a610e92fcdebe0e3b70facda800094ebad5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BE=BD=20=E5=AD=A6?= <1242509682@qq.com> Date: Wed, 6 Nov 2024 01:14:09 +0800 Subject: [PATCH 4/4] fix --- src/AutoFish/i18n/en-US.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AutoFish/i18n/en-US.po b/src/AutoFish/i18n/en-US.po index bc2b26d2..c0a6fc63 100644 --- a/src/AutoFish/i18n/en-US.po +++ b/src/AutoFish/i18n/en-US.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: AutoFish\n" "POT-Creation-Date: 2024-11-05 23:00:31+0800\n" -"PO-Revision-Date: 2024-11-05 23:18+0800\n" +"PO-Revision-Date: 2024-11-06 01:13+0800\n" "Last-Translator: \n" "Language-Team: \n" "Language: en_US\n" @@ -67,7 +67,7 @@ msgstr "/af duo -- Set the [c/4686D4:hook count]\n" #: ..\..\Commands.cs:62 msgid "/af mod -- 开启丨关闭[c/50D647:消耗模式]" -msgstr "`/af mod -- Enable | Disable [c/50D647:Consumption Mode]" +msgstr "/af mod -- Enable | Disable [c/50D647:Consumption Mode]" #: ..\..\Commands.cs:60 msgid "/af more -- 开启丨关闭[c/DB48A7:多线模式]\n"