Skip to content

Commit df106bd

Browse files
committed
chore(repo): migrate TrProtocol to submodule and bump OTAPI to 3.3.8
- replace in-repo TrProtocol sources with submodule at src/TrProtocol (pinned to afd8a2c) - update CI/docs for submodule workflow - bump OTAPI.Upcoming 3.3.7 -> 3.3.8
1 parent 514eae4 commit df106bd

File tree

383 files changed

+24
-12978
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

383 files changed

+24
-12978
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
21+
submodules: recursive
2122

2223
- name: Setup .NET SDK
2324
uses: actions/setup-dotnet@v4
@@ -58,6 +59,11 @@ jobs:
5859
--store-password-in-clear-text `
5960
--configfile NuGet.config
6061
62+
- name: Show submodule status
63+
shell: pwsh
64+
run: |
65+
git submodule status --recursive
66+
6167
- name: Restore dependencies
6268
shell: pwsh
6369
run: |

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "src/TrProtocol"]
2+
path = src/TrProtocol
3+
url = https://github.com/CedaryCat/TrProtocol.git

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ You only need a local source build when experimenting with patches or contributi
2626

2727

2828
## Quick Start
29-
1) Restore and build
29+
1) Initialize submodules, restore and build
30+
- `git submodule update --init --recursive`
3031
- `dotnet restore src/OTAPI.UnifiedServerProcess.sln`
3132
- `dotnet build src/OTAPI.UnifiedServerProcess.sln -c Release`
3233

@@ -44,7 +45,7 @@ You only need a local source build when experimenting with patches or contributi
4445
- RootContext: Per‑server root that holds the instance‑bound systems you previously accessed as statics (e.g., Main, Netplay, NetMessage, Collision). See `src/OTAPI.UnifiedServerProcess/Mods/RootContext.cs` and `src/OTAPI.UnifiedServerProcess/Core/PatchingLogic.cs`.
4546
- Context‑bound systems: USP’s patching pass rewrites static state and call sites to live under the context. From a mod/plugin perspective you use `ctx.Main`, `ctx.Netplay`, `ctx.NetMessage`, `ctx.Collision`, etc., instead of global `Terraria.*` statics.
4647
- GlobalNetwork sample: Demonstrates sharing global sockets while routing per‑client processing to the correct server context. See `src/OTAPI.UnifiedServerProcess.GlobalNetwork/Network/Router.cs` and `src/OTAPI.UnifiedServerProcess.GlobalNetwork/Servers/ServerContext.cs`.
47-
- TrProtocol: Strong‑typed packet models under `src/TrProtocol/NetPackets/*` plus a source generator for fast (de)serialization.
48+
- TrProtocol: Strong‑typed packet models under `src/TrProtocol/src/TrProtocol/NetPackets/*` plus a source generator for fast (de)serialization.
4849
- TileProvider: Replaces ITile/Tile with TileData + RefTileData and a context‑aware TileCollection. See `src/OTAPI.UnifiedServerProcess/Mods/TileProviderMod.cs`.
4950

5051

@@ -112,7 +113,7 @@ Note: This is a development/engineering project; APIs and features may evolve ov
112113
- Patching pipeline: `src/OTAPI.UnifiedServerProcess/Core/PatchingLogic.cs`
113114
- GlobalNetwork components: `Program.cs`, `Network/Router.cs`, `Servers/ServerContext.cs` under `src/OTAPI.UnifiedServerProcess.GlobalNetwork`
114115
- TileProvider: `Mods/TileProviderMod.cs`
115-
- TrProtocol: models and generators under `src/TrProtocol` and `src/TrProtocol.SerializerGenerator`
116+
- TrProtocol: models and generators under `src/TrProtocol/src/TrProtocol` and `src/TrProtocol/src/TrProtocol.SerializerGenerator`
116117

117118
External resources for deeper technical detail:
118119
- DeepWiki: `https://deepwiki.com/CedaryCat/OTAPI.UnifiedServerProcess`

docs/Developer-Guide.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ After restore/build, the assemblies are available from NuGet; you don’t need t
4141
## Build from Source (secondary)
4242
```
4343
cd OTAPI.UnifiedServerProcess
44+
git submodule update --init --recursive
4445
dotnet restore src/OTAPI.UnifiedServerProcess.sln
4546
dotnet build src/OTAPI.UnifiedServerProcess.sln -c Release
4647
dotnet run -c Debug -p src/OTAPI.UnifiedServerProcess

src/OTAPI.UnifiedServerProcess.sln

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OTAPI.UnifiedServerProcess.
1111
EndProject
1212
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OTAPI.UnifiedServerProcess.ConsoleClient", "OTAPI.UnifiedServerProcess.ConsoleClient\OTAPI.UnifiedServerProcess.ConsoleClient.csproj", "{5BFD176F-57B3-711D-14AE-097425D79738}"
1313
EndProject
14-
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "TrProtocol.Shared", "TrProtocol.Shared\TrProtocol.Shared.shproj", "{768417B4-D342-4006-B196-5F7178582209}"
14+
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "TrProtocol.Shared", "TrProtocol\src\TrProtocol.Shared\TrProtocol.Shared.shproj", "{768417B4-D342-4006-B196-5F7178582209}"
1515
EndProject
16-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrProtocol.SerializerGenerator", "TrProtocol.SerializerGenerator\TrProtocol.SerializerGenerator.csproj", "{B49F3FA4-BBFC-934D-D703-7FEE77507D30}"
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrProtocol.SerializerGenerator", "TrProtocol\src\TrProtocol.SerializerGenerator\TrProtocol.SerializerGenerator.csproj", "{B49F3FA4-BBFC-934D-D703-7FEE77507D30}"
1717
EndProject
18-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrProtocol", "TrProtocol\TrProtocol.csproj", "{F252FFD8-5DE7-DAA8-BA3D-341C543C73EE}"
18+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrProtocol", "TrProtocol\src\TrProtocol\TrProtocol.csproj", "{F252FFD8-5DE7-DAA8-BA3D-341C543C73EE}"
1919
EndProject
2020
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "解决方案项", "解决方案项", "{9FA3D6BD-1EC1-3BA5-80CB-CE02773A58D5}"
2121
ProjectSection(SolutionItems) = preProject
@@ -135,8 +135,8 @@ Global
135135
SolutionGuid = {A7CFB05D-AB46-4256-92A6-C8723719BBD5}
136136
EndGlobalSection
137137
GlobalSection(SharedMSBuildProjectFiles) = preSolution
138-
TrProtocol.Shared\TrProtocol.Shared.projitems*{768417b4-d342-4006-b196-5f7178582209}*SharedItemsImports = 13
139-
TrProtocol.Shared\TrProtocol.Shared.projitems*{b49f3fa4-bbfc-934d-d703-7fee77507d30}*SharedItemsImports = 5
140-
TrProtocol.Shared\TrProtocol.Shared.projitems*{f252ffd8-5de7-daa8-ba3d-341c543c73ee}*SharedItemsImports = 5
138+
TrProtocol\src\TrProtocol.Shared\TrProtocol.Shared.projitems*{768417b4-d342-4006-b196-5f7178582209}*SharedItemsImports = 13
139+
TrProtocol\src\TrProtocol.Shared\TrProtocol.Shared.projitems*{b49f3fa4-bbfc-934d-d703-7fee77507d30}*SharedItemsImports = 5
140+
TrProtocol\src\TrProtocol.Shared\TrProtocol.Shared.projitems*{f252ffd8-5de7-daa8-ba3d-341c543c73ee}*SharedItemsImports = 5
141141
EndGlobalSection
142142
EndGlobal

src/OTAPI.UnifiedServerProcess/OTAPI.UnifiedServerProcess.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
</ItemGroup>
2020

2121
<ItemGroup>
22-
<PackageReference Include="OTAPI.Upcoming" Version="3.3.7-mf-a807e26.13" />
22+
<PackageReference Include="OTAPI.Upcoming" Version="3.3.8-mf-a807e26.16" />
2323
<PackageReference Include="MonoMod.RuntimeDetour.HookGen" Version="22.7.31.1" />
24-
<PackageReference Include="ModFramework.Modules.CSharp" Version="1.1.15-mf-a807e26.13" />
24+
<PackageReference Include="ModFramework.Modules.CSharp" Version="1.1.15-mf-a807e26.16" />
2525
</ItemGroup>
2626

2727
<ItemGroup>
28-
<ProjectReference Include="..\TrProtocol\TrProtocol.csproj" />
28+
<ProjectReference Include="..\TrProtocol\src\TrProtocol\TrProtocol.csproj" />
2929
</ItemGroup>
3030

3131
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">

src/TrProtocol

Submodule TrProtocol added at afd8a2c

src/TrProtocol.SerializerGenerator/AnalyzerReleases.Shipped.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/TrProtocol.SerializerGenerator/AnalyzerReleases.Unshipped.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/TrProtocol.SerializerGenerator/CompilationContext.cs

Lines changed: 0 additions & 218 deletions
This file was deleted.

0 commit comments

Comments
 (0)