Merge branch 'general-devel' into test-pr

This commit is contained in:
Lucas Nicodemus 2025-01-25 22:35:17 +09:00 committed by GitHub
commit cc2664e599
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 13 additions and 17 deletions

View file

@ -320,8 +320,8 @@ namespace TShockAPI.Configuration
[Description("The reason given if banning a mediumcore player on death.")] [Description("The reason given if banning a mediumcore player on death.")]
public string MediumcoreBanReason = GetString("Death results in a ban"); public string MediumcoreBanReason = GetString("Death results in a ban");
/// <summary>Disbales IP bans by default, if no arguments are passed to the ban command.</summary> /// <summary>Disables IP bans by default, if no arguments are passed to the ban command.</summary>
[Description("Disbales IP bans by default, if no arguments are passed to the ban command.")] [Description("Disables IP bans by default, if no arguments are passed to the ban command.")]
public bool DisableDefaultIPBan; public bool DisableDefaultIPBan;
/// <summary>Enable or disable the whitelist based on IP addresses in the whitelist.txt file.</summary> /// <summary>Enable or disable the whitelist based on IP addresses in the whitelist.txt file.</summary>

View file

@ -529,18 +529,9 @@ namespace TShockAPI
field.GetCustomAttributes(false).FirstOrDefault(o => o is DescriptionAttribute) as DescriptionAttribute; field.GetCustomAttributes(false).FirstOrDefault(o => o is DescriptionAttribute) as DescriptionAttribute;
var desc = descattr != null && !string.IsNullOrWhiteSpace(descattr.Description) ? descattr.Description : GetString("No description available."); var desc = descattr != null && !string.IsNullOrWhiteSpace(descattr.Description) ? descattr.Description : GetString("No description available.");
var commands = GetCommands(name); var strs = GetCommands(name).Select(c => c.Names.Count > 1
foreach (var c in commands) ? $"/{c.Name} (/{string.Join(" /", c.Names.Skip(1))})"
{ : $"/{c.Name}");
for (var i = 0; i < c.Names.Count; i++)
{
c.Names[i] = "/" + c.Names[i];
}
}
var strs =
commands.Select(
c =>
c.Name + (c.Names.Count > 1 ? " ({0})".SFormat(string.Join(" ", c.Names.ToArray(), 1, c.Names.Count - 1)) : ""));
sb.AppendLine($"## {name}"); sb.AppendLine($"## {name}");
sb.AppendLine($"{desc}"); sb.AppendLine($"{desc}");

View file

@ -12,6 +12,6 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="SharpZipLib" Version="1.4.1" /> <PackageReference Include="SharpZipLib" Version="1.4.2" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -7,8 +7,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="NuGet.Packaging" Version="6.3.1" /> <PackageReference Include="NuGet.Packaging" Version="6.3.4" />
<PackageReference Include="NuGet.Protocol" Version="6.3.1" /> <PackageReference Include="NuGet.Protocol" Version="6.3.3" />
<PackageReference Include="NuGet.Resolver" Version="6.3.1" /> <PackageReference Include="NuGet.Resolver" Version="6.3.1" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" /> <PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="6.0.0" /> <PackageReference Include="System.Reflection.MetadataLoadContext" Version="6.0.0" />

View file

@ -78,6 +78,11 @@ Use past tense when adding new entries; sign your name off when you add or chang
* If there is no section called "Upcoming changes" below this line, please add one with `## Upcoming changes` as the first line, and then a bulleted item directly after with the first change. --> * If there is no section called "Upcoming changes" below this line, please add one with `## Upcoming changes` as the first line, and then a bulleted item directly after with the first change. -->
## Upcoming changes ## Upcoming changes
* Fixed `/dump-reference-data` mutate the command names. (#2943, @sgkoishi)
* You know the drill
* Fix typo in config for IP bans. (@redchess64)
## TShock 5.2.1
* Updated `TSPlayer.GodMode`. (@AgaSpace) * Updated `TSPlayer.GodMode`. (@AgaSpace)
* Previously the field was used as some kind of dataset changed by /godmode command, but now it is a property that receives/changes data in journey mode. * Previously the field was used as some kind of dataset changed by /godmode command, but now it is a property that receives/changes data in journey mode.
* Added the `TSPlayer.Client` property. It allows the developer to get the `RemoteClient` player, without an additional call to `Terraria.Netplay.Clients`. (@AgaSpace) * Added the `TSPlayer.Client` property. It allows the developer to get the `RemoteClient` player, without an additional call to `Terraria.Netplay.Clients`. (@AgaSpace)