Merge branch 'general-devel' into pr3005
This commit is contained in:
commit
b9d984863d
14 changed files with 72 additions and 33 deletions
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
|
|
@ -1,2 +1,2 @@
|
|||
# These are supported funding model platforms
|
||||
github: [SignatureBeef, hakusaro, Stealownz, QuiCM]
|
||||
github: [SignatureBeef, QuiCM]
|
||||
|
|
|
|||
25
.github/workflows/ci-docker.yml
vendored
Normal file
25
.github/workflows/ci-docker.yml
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
name: CI (Docker image)
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Build image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7,windows/amd64
|
||||
push: false
|
||||
pull: true
|
||||
cache-from: type=gha, scope=${{ github.workflow }}
|
||||
cache-to: type=gha, scope=${{ github.workflow }}
|
||||
10
Dockerfile
10
Dockerfile
|
|
@ -1,10 +1,8 @@
|
|||
ARG TARGETPLATFORM=linux/amd64
|
||||
ARG BUILDPLATFORM=${TARGETPLATFORM}
|
||||
# TARGETPLATFORM and BUILDPLATFORM are automatically filled in by Docker buildx.
|
||||
# They should not be set in the global scope manually.
|
||||
|
||||
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/dotnet/sdk:6.0 AS builder
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
# Copy build context
|
||||
WORKDIR /TShock
|
||||
COPY . ./
|
||||
|
|
@ -12,6 +10,10 @@ COPY . ./
|
|||
# Build and package release based on target architecture
|
||||
RUN dotnet build -v m
|
||||
WORKDIR /TShock/TShockLauncher
|
||||
|
||||
# Make TARGETPLATFORM available to the container.
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
RUN \
|
||||
case "${TARGETPLATFORM}" in \
|
||||
"linux/amd64") export ARCH="linux-x64" \
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<p align="center">
|
||||
<img src="https://tshock.co/newlogo.png" alt="TShock for Terraria"><br />
|
||||
<img src="https://tshock.s3.us-west-001.backblazeb2.com/newlogo.png" alt="TShock for Terraria"><br />
|
||||
<a href="https://ci.appveyor.com/project/hakusaro/tshock">
|
||||
<img src="https://ci.appveyor.com/api/projects/status/chhe61q227lqdlg1?svg=true" alt="AppVeyor Build Status">
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<p align="center">
|
||||
<img src="https://tshock.co/newlogo.png" alt="TShock for Terraria"><br />
|
||||
<img src="https://tshock.s3.us-west-001.backblazeb2.com/newlogo.png" alt="TShock for Terraria"><br />
|
||||
<a href="https://ci.appveyor.com/project/hakusaro/tshock">
|
||||
<img src="https://ci.appveyor.com/api/projects/status/chhe61q227lqdlg1?svg=true" alt="AppVeyor Build Status">
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -320,8 +320,8 @@ namespace TShockAPI.Configuration
|
|||
[Description("The reason given if banning a mediumcore player on death.")]
|
||||
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>
|
||||
[Description("Disbales IP bans by default, if no arguments are passed to the ban command.")]
|
||||
/// <summary>Disables IP bans by default, if no arguments are passed to the ban command.</summary>
|
||||
[Description("Disables IP bans by default, if no arguments are passed to the ban command.")]
|
||||
public bool DisableDefaultIPBan;
|
||||
|
||||
/// <summary>Enable or disable the whitelist based on IP addresses in the whitelist.txt file.</summary>
|
||||
|
|
|
|||
|
|
@ -529,18 +529,9 @@ namespace TShockAPI
|
|||
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 commands = GetCommands(name);
|
||||
foreach (var c in commands)
|
||||
{
|
||||
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)) : ""));
|
||||
var strs = GetCommands(name).Select(c => c.Names.Count > 1
|
||||
? $"/{c.Name} (/{string.Join(" /", c.Names.Skip(1))})"
|
||||
: $"/{c.Name}");
|
||||
|
||||
sb.AppendLine($"## {name}");
|
||||
sb.AppendLine($"{desc}");
|
||||
|
|
|
|||
|
|
@ -428,6 +428,8 @@ namespace TShockAPI
|
|||
Hooks.AccountHooks.AccountDelete += OnAccountDelete;
|
||||
Hooks.AccountHooks.AccountCreate += OnAccountCreate;
|
||||
|
||||
On.Terraria.RemoteClient.Reset += RemoteClient_Reset;
|
||||
|
||||
GetDataHandlers.InitGetDataHandler();
|
||||
Commands.InitCommands();
|
||||
|
||||
|
|
@ -496,6 +498,12 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
|
||||
private static void RemoteClient_Reset(On.Terraria.RemoteClient.orig_Reset orig, RemoteClient client)
|
||||
{
|
||||
client.ClientUUID = null;
|
||||
orig(client);
|
||||
}
|
||||
|
||||
private static void OnAchievementInitializerLoad(ILContext il)
|
||||
{
|
||||
// Modify AchievementInitializer.Load to remove the Main.netMode == 2 check (occupies the first 4 IL instructions)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
Also, be sure to release on github with the exact assembly version tag as below
|
||||
so that the update manager works correctly (via the Github releases api and mimic)
|
||||
-->
|
||||
<Version>5.2.0</Version>
|
||||
<Version>5.2.1</Version>
|
||||
<AssemblyTitle>TShock for Terraria</AssemblyTitle>
|
||||
<Company>Pryaxis & TShock Contributors</Company>
|
||||
<Product>TShockAPI</Product>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,8 @@ namespace TShockAPI
|
|||
/// </summary>
|
||||
public class TextLog : ILog, IDisposable
|
||||
{
|
||||
private readonly StreamWriter _logWriter;
|
||||
private readonly bool ClearFile;
|
||||
private StreamWriter _logWriter;
|
||||
|
||||
/// <summary>
|
||||
/// File name of the Text log
|
||||
|
|
@ -44,7 +45,7 @@ namespace TShockAPI
|
|||
public TextLog(string filename, bool clear)
|
||||
{
|
||||
FileName = filename;
|
||||
_logWriter = new StreamWriter(filename, !clear);
|
||||
ClearFile = clear;
|
||||
}
|
||||
|
||||
public bool MayWriteType(TraceLevel type)
|
||||
|
|
@ -247,6 +248,10 @@ namespace TShockAPI
|
|||
{
|
||||
if (!MayWriteType(level))
|
||||
return;
|
||||
if (_logWriter is null)
|
||||
{
|
||||
_logWriter = new StreamWriter(FileName, !ClearFile);
|
||||
}
|
||||
|
||||
var caller = "TShock";
|
||||
|
||||
|
|
@ -278,7 +283,10 @@ namespace TShockAPI
|
|||
|
||||
public void Dispose()
|
||||
{
|
||||
_logWriter.Dispose();
|
||||
if (_logWriter != null)
|
||||
{
|
||||
_logWriter.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,6 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SharpZipLib" Version="1.4.1" />
|
||||
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NuGet.Packaging" Version="6.3.1" />
|
||||
<PackageReference Include="NuGet.Protocol" Version="6.3.1" />
|
||||
<PackageReference Include="NuGet.Packaging" Version="6.3.4" />
|
||||
<PackageReference Include="NuGet.Protocol" Version="6.3.3" />
|
||||
<PackageReference Include="NuGet.Resolver" Version="6.3.1" />
|
||||
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
|
||||
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="6.0.0" />
|
||||
|
|
|
|||
|
|
@ -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. -->
|
||||
|
||||
## Upcoming changes
|
||||
* Fixed `/dump-reference-data` mutate the command names. (#2943, @sgkoishi)
|
||||
* Added `ParryDamageBuff` (Striking Moment with Brand of the Inferno and shield) for player, updated `CursedInferno` buff for NPC (@sgkoishi, #3005)
|
||||
* Fix typo in config for IP bans. (@redchess64)
|
||||
|
||||
## TShock 5.2.1
|
||||
* 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.
|
||||
* Added the `TSPlayer.Client` property. It allows the developer to get the `RemoteClient` player, without an additional call to `Terraria.Netplay.Clients`. (@AgaSpace)
|
||||
|
|
@ -88,9 +93,9 @@ Use past tense when adding new entries; sign your name off when you add or chang
|
|||
* Added a method `TSPlayer.UpdateSection` with arguments `rectangle` and `isLoaded`, which will load some area from the server to the player. (@AgaSpace)
|
||||
* Added a method `TSPlayer.GiveItem`, which has `TShockAPI.NetItem` structure in its arguments. (@AgaSpace)
|
||||
* Added a property `TSPlayer.Hostile`, which gets pvp player mode. (@AgaSpace)
|
||||
* Fixed bug where when the `UseSqlLogs` config property is true, an empty log file would still get created. (@ZakFahey)
|
||||
* Fixed typo in `/gbuff`. (@sgkoishi, #2955)
|
||||
* Rewrote the `.dockerignore` file into a denylist. (@timschumi)
|
||||
* Added `ParryDamageBuff` (Striking Moment with Brand of the Inferno and shield) for player, updated `CursedInferno` buff for NPC (@sgkoishi, #3005)
|
||||
|
||||
## TShock 5.2
|
||||
* An additional option `pvpwithnoteam` is added at `PvPMode` to enable PVP with no team. (@CelestialAnarchy, #2617, @ATFGK)
|
||||
|
|
|
|||
|
|
@ -14,15 +14,15 @@ Open ports can also be passed through using `-p <host_port>:<container_port>`.
|
|||
|
||||
For Example:
|
||||
```bash
|
||||
# Building the image
|
||||
docker build -t tshock:linux-amd64 --build-arg TARGETPLATFORM=linux/amd64 .
|
||||
# Building the image using buildx and loading it into docker
|
||||
docker buildx build -t tshock:latest --load .
|
||||
|
||||
# Running the image
|
||||
docker run -p 7777:7777 -p 7878:7878 \
|
||||
-v /home/cider/tshock/:/tshock \
|
||||
-v /home/cider/.local/share/Terraria/Worlds:/worlds \
|
||||
-v /home/cider/tshock/plugins:/plugins \
|
||||
--rm -it tshock:linux-amd64 \
|
||||
--rm -it tshock:latest \
|
||||
-world /worlds/backflip.wld -motd "OMFG DOCKER"
|
||||
```
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ Using `docker buildx`, you could build [multi-platform images](https://docs.dock
|
|||
For Example:
|
||||
```bash
|
||||
# Building the image using buildx and loading it into docker
|
||||
sudo docker buildx build -t tshock:linux-arm64 --platform linux/arm64 --load .
|
||||
docker buildx build -t tshock:linux-arm64 --platform linux/arm64 --load .
|
||||
|
||||
# Running the image
|
||||
docker run -p 7777:7777 -p 7878:7878 \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue