Skip to content

Commit 7afbc09

Browse files
authored
Merge pull request #75 from CedaryCat/main
Release
2 parents c664752 + 4264704 commit 7afbc09

6 files changed

Lines changed: 23 additions & 19 deletions

File tree

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# UnifierTSL
1+
# UnifierTSL
22

33
> Languages: [English](./README.md) | [简体中文](./docs/README.zh-cn.md)
44
@@ -90,16 +90,16 @@ The baseline values below come straight from project files and runtime version h
9090
|:--|:--|:--|
9191
| Target framework | `.NET 9.0` | `src/UnifierTSL/*.csproj` |
9292
| Terraria | `1.4.5.5` | `src/UnifierTSL/VersionHelper.cs` (assembly file version from OTAPI/Terraria runtime) |
93-
| OTAPI USP | `1.1.0-pre-release-upstream.26` | `src/UnifierTSL/UnifierTSL.csproj` |
93+
| OTAPI USP | `1.1.0-pre-release-upstream.29` | `src/UnifierTSL/UnifierTSL.csproj` |
9494

9595
<details>
9696
<summary><strong>TShock and dependency details</strong></summary>
9797

9898
| Item | Value |
9999
|:--|:--|
100-
| Bundled TShock version | `6.0.0` |
100+
| Bundled TShock version | `6.1.0` |
101101
| Sync branch | `general-devel` |
102-
| Sync commit | `0dbb07854cf9cb4e47e315d6160d785d51a27788` |
102+
| Sync commit | `1afaeb514343ca547abceeb357654603d1e2a456` |
103103
| Source | `src/Plugins/TShockAPI/TShockAPI.csproj` |
104104

105105
Additional dependency baselines:
@@ -536,3 +536,4 @@ This table reflects the currently maintained/documented packaging targets, not e
536536
<p align="center">
537537
<sub>Made with ❤️ by the UnifierTSL contributors · Licensed under GPL-3.0</sub>
538538
</p>
539+

docs/README.zh-cn.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# UnifierTSL
1+
# UnifierTSL
22

33
> Languages: [English](../README.md) | [简体中文](./README.zh-cn.md)
44
@@ -90,16 +90,16 @@ UnifierTSL 把 [OTAPI Unified Server Process](https://github.com/CedaryCat/OTAPI
9090
|:--|:--|:--|
9191
| 目标框架 | `.NET 9.0` | `src/UnifierTSL/*.csproj` |
9292
| Terraria | `1.4.5.5` | `src/UnifierTSL/VersionHelper.cs`(从 OTAPI/Terraria 运行时程序集文件版本读取) |
93-
| OTAPI USP | `1.1.0-pre-release-upstream.26` | `src/UnifierTSL/UnifierTSL.csproj` |
93+
| OTAPI USP | `1.1.0-pre-release-upstream.29` | `src/UnifierTSL/UnifierTSL.csproj` |
9494

9595
<details>
9696
<summary><strong>TShock 与依赖详情</strong></summary>
9797

9898
| 项目 ||
9999
|:--|:--|
100-
| 内置 TShock 版本 | `6.0.0` |
100+
| 内置 TShock 版本 | `6.1.0` |
101101
| 同步分支 | `general-devel` |
102-
| 同步提交 | `0dbb07854cf9cb4e47e315d6160d785d51a27788` |
102+
| 同步提交 | `1afaeb514343ca547abceeb357654603d1e2a456` |
103103
| 来源 | `src/Plugins/TShockAPI/TShockAPI.csproj` |
104104

105105
附加依赖版本:
@@ -536,3 +536,4 @@ dotnet run --project src/UnifierTSL.Publisher/UnifierTSL.Publisher.csproj -- \
536536
<p align="center">
537537
<sub>Made with ❤️ by the UnifierTSL contributors · Licensed under GPL-3.0</sub>
538538
</p>
539+

src/Plugins/TShockAPI/SaveManager.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,28 @@ static SaveManager() {
3333
_channel = Channel.CreateUnbounded<SaveTask?>();
3434
_saveWorkerTask = Task.Run(SaveWorkerAsync);
3535

36-
On.Terraria.IO.WorldFileSystemContext.SaveWorld_bool_bool += OnSaveWorld;
36+
On.Terraria.IO.WorldFileSystemContext._SaveWorld += OnSaveWorld;
3737
TShock.DisposingEvent += Dispose;
3838
}
3939

40-
private static void OnSaveWorld(On.Terraria.IO.WorldFileSystemContext.orig_SaveWorld_bool_bool orig,
40+
private static void OnSaveWorld(On.Terraria.IO.WorldFileSystemContext.orig__SaveWorld orig,
4141
Terraria.IO.WorldFileSystemContext self,
4242
bool useCloudSaving,
43-
bool resetTime) {
43+
bool resetTime,
44+
bool useTemps,
45+
bool canBeSkipped) {
4446

4547
if (self.root is ServerContext server) {
4648
OnSaveWorld(server);
4749
}
48-
orig(self, useCloudSaving, resetTime);
50+
orig(self, useCloudSaving, resetTime, useTemps, canBeSkipped);
4951
}
5052

5153
private static void Dispose() {
5254
_channel.Writer.TryWrite(null); // Signal exit
5355
_saveWorkerTask.Wait();
5456

55-
On.Terraria.IO.WorldFileSystemContext.SaveWorld_bool_bool -= OnSaveWorld;
57+
On.Terraria.IO.WorldFileSystemContext._SaveWorld -= OnSaveWorld;
5658
}
5759

5860
public static void OnSaveWorld(ServerContext server) {

src/Plugins/TShockAPI/TShockAPI.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<!-- Parallel mainline sync baseline tracking -->
99
<MainlineSyncRepo>https://github.com/Pryaxis/TShock.git</MainlineSyncRepo>
1010
<MainlineSyncBranch>general-devel</MainlineSyncBranch>
11-
<MainlineSyncCommit>0dbb07854cf9cb4e47e315d6160d785d51a27788</MainlineSyncCommit>
12-
<MainlineVersion>6.0.0</MainlineVersion>
11+
<MainlineSyncCommit>1afaeb514343ca547abceeb357654603d1e2a456</MainlineSyncCommit>
12+
<MainlineVersion>6.1.0</MainlineVersion>
1313

1414
<!-- Packaging and identity: this is the UnifierTSL migration package, not upstream's official package -->
1515
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>

src/UnifierTSL/SynchronizedGuard.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ static SynchronizedGuard() {
2626
On.Terraria.IO.FavoritesFile.Load
2727
+= (orig, file, root)
2828
=> { lock (favoritesFileLock) { orig(file, root); } };
29-
On.Terraria.IO.WorldFileSystemContext.SaveWorld_bool_bool
30-
+= (orig, self, _, resetTime)
29+
On.Terraria.IO.WorldFileSystemContext._SaveWorld
30+
+= (orig, self, _, resetTime, useTemps, canBeSkipped)
3131
=> {
3232
UnifiedServerProcess.RootContext s = self.root;
3333
if (s.Main.worldName == "") {
@@ -38,7 +38,7 @@ static SynchronizedGuard() {
3838
}
3939
using (FileLockManager.Enter(self.root.Main.worldPathName)) {
4040
FileUtilities.ProtectedInvoke(delegate {
41-
self.InternalSaveWorld(false, resetTime);
41+
self.InternalSaveWorld(false, resetTime, useTemps);
4242
});
4343
}
4444
};

src/UnifierTSL/UnifierTSL.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<PrivateAssets>all</PrivateAssets>
3636
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3737
</PackageReference>
38-
<PackageReference Include="OTAPI.USP" Version="1.1.0-pre-release-upstream.26" />
38+
<PackageReference Include="OTAPI.USP" Version="1.1.0-pre-release-upstream.29" />
3939
<PackageReference Include="ModFramework" Version="1.1.15" />
4040
<PackageReference Include="MonoMod.RuntimeDetour" Version="25.2.3" />
4141
<PackageReference Include="MonoMod.RuntimeDetour.HookGen" Version="22.7.31.1" />

0 commit comments

Comments
 (0)