Skip to content

Commit 5ee21b4

Browse files
committed
chore(protocol): align enums and compatibility with Terraria 1.4.5
Add missing enum members in the protocol library to match Terraria 1.4.5. Adjust RemoteClient tile section sizing and expose ResetSections.
1 parent beb29dc commit 5ee21b4

File tree

6 files changed

+52
-10
lines changed

6 files changed

+52
-10
lines changed

docs/OTAPI.USP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Unlike standard OTAPI builds, this package introduces a **breaking change** by r
1313

1414
## Compatibility
1515

16-
- Terraria: **1.4.4.9**
16+
- Terraria: **1.4.5.5**
1717
- OTAPI: `[INJECT_OTAPI_VERSION]`
1818

1919
## Important Notes

docs/OTAPI.USP.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
<description>
1313
An additional IL patch layered on top of OTAPI, enabling multiple Terraria server instances to run concurrently within a single process.
1414
</description>
15-
<summary>Unified Server Process [INJECT_VERSION] on Open Terraria API [INJECT_OTAPI_VERSION] - Terraria 1.4.5.4[INJECT_GIT_HASH]</summary>
15+
<summary>Unified Server Process [INJECT_VERSION] on Open Terraria API [INJECT_OTAPI_VERSION] - Terraria 1.4.5.5[INJECT_GIT_HASH]</summary>
1616
<releaseNotes>
17-
Preliminary Terraria 1.4.5.4
17+
Preliminary Terraria 1.4.5.5
1818
</releaseNotes>
1919
<copyright>Copyright 2025-[INJECT_YEAR]</copyright>
2020
<tags>Terraria,OTAPI,MultiServer</tags>

src/OTAPI.UnifiedServerProcess/Mods/RemoteClientMod.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,13 @@ namespace Terraria
5656
{
5757
public class patch_RemoteClient : RemoteClient
5858
{
59+
public void ResetSections() => mfwh_ResetSections();
60+
5961
[MonoMod.MonoModReplace]
6062
public new void mfwh_ResetSections() {
6163
if (Main.maxSectionsX > TileSections.GetLength(0) || Main.maxSectionsY > TileSections.GetLength(1)) {
62-
TileSections = new bool[Main.maxSectionsX, Main.maxSectionsY];
63-
TileSectionsCheckTime = new uint[Main.maxSectionsX, Main.maxSectionsY];
64+
TileSections = new bool[Main.maxSectionsX + 1, Main.maxSectionsY + 1];
65+
TileSectionsCheckTime = new uint[Main.maxSectionsX + 1, Main.maxSectionsY + 1];
6466
return;
6567
}
6668
Array.Clear(this.TileSections, 0, this.TileSections.Length);
@@ -70,8 +72,8 @@ public class patch_RemoteClient : RemoteClient
7072
public new void mfwh_orig_ctor_RemoteClient() {
7173
Name = "Anonymous";
7274
StatusText = "";
73-
TileSections = new bool[2, 2];
74-
TileSectionsCheckTime = new uint[2, 2];
75+
TileSections = new bool[2 + 1, 2 + 1];
76+
TileSectionsCheckTime = new uint[2 + 1, 2 + 1];
7577
SpamProjectileMax = 100f;
7678
SpamAddBlockMax = 100f;
7779
SpamDeleteBlockMax = 500f;

src/TrProtocol/ExportedModels/Terraria/GameContent/Drawing/ParticleOrchestraType.cs

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ public enum ParticleOrchestraType : byte
1919
TerraBlade,
2020
ChlorophyteLeafCrystalPassive,
2121
ChlorophyteLeafCrystalShot,
22-
AshTreeShake,
22+
BestReforge,
2323
PetExchange,
2424
SlapHand,
2525
FlyMeal,
26+
VampireOnFire,
2627
GasTrap,
2728
ItemTransfer,
2829
ShimmerArrow,
@@ -33,5 +34,41 @@ public enum ParticleOrchestraType : byte
3334
WaffleIron,
3435
PooFly,
3536
ShimmerTownNPC,
36-
ShimmerTownNPCSend
37+
ShimmerTownNPCSend,
38+
DeadCellsMushroomBoiExplosion,
39+
DeadCellsDownDashExplosion,
40+
DeadCellsBarnacleShotFiring,
41+
BlueLightningSmall,
42+
ShadowOrbExplosion,
43+
UFOLaser,
44+
DeadCellsBeheadedEffect,
45+
DeadCellsFlint,
46+
DeadCellsBarrelExplosion,
47+
DeadCellsMushroomBoiTargetFound,
48+
MoonLordWhipHit,
49+
MoonLordWhipEye,
50+
PlayerVoiceOverrideSound,
51+
RainbowBoulder1,
52+
RainbowBoulder2,
53+
RainbowBoulder3,
54+
RainbowBoulder4,
55+
FakeFish,
56+
LakeSparkle,
57+
NatureFly,
58+
FakeFishJump,
59+
ClassyCane,
60+
MagnetSphereBolt,
61+
HeatRay,
62+
ShadowbeamHostile,
63+
ShadowbeamFriendly,
64+
RainbowBoulderPetBounce,
65+
StormLightning,
66+
StormlightningWindup,
67+
PaladinsShieldHit,
68+
HeroicisSetSpawnSound,
69+
BlueLightningSmallLong,
70+
InScreenDungeonSpawn,
71+
CattivaHit,
72+
PaladinsHammerShockwave,
73+
Count
3774
}

src/TrProtocol/ExportedModels/Terraria/GameContent/TeleportPylonType.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ public enum TeleportPylonType : byte
1010
Snow,
1111
GlowingMushroom,
1212
Victory,
13+
Underworld,
14+
Shimmer,
1315
Count
1416
}

src/TrProtocol/ExportedModels/Terraria/PlayerSpawnContext.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ public enum PlayerSpawnContext : byte
33
{
44
ReviveFromDeath,
55
SpawningIntoWorld,
6-
RecallFromItem
6+
RecallFromItem,
7+
TeamSwap
78
}

0 commit comments

Comments
 (0)