Skip to content

Commit ece5104

Browse files
Coding-HenJannify
andcommitted
Fixed resource asset parsing
Co-authored-by: Jannify <[email protected]>
1 parent f84bddd commit ece5104

File tree

87 files changed

+1311
-162
lines changed

Some content is hidden

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

87 files changed

+1311
-162
lines changed

Nitrox.BuildTool/Program.cs

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Diagnostics;
33
using System.IO;
44
using System.Reflection;
@@ -22,7 +22,11 @@ public static class Program
2222

2323
public static string GeneratedOutputDir => Path.Combine(ProcessDir, "generated_files");
2424

25+
#if BELOWZERO
26+
private const int LEGACY_BRANCH_SUBNAUTICA_VERSION = 49370;
27+
#elif SUBNAUTICA
2528
private const int LEGACY_BRANCH_SUBNAUTICA_VERSION = 68598;
29+
#endif
2630

2731
public static async Task Main(string[] args)
2832
{
@@ -58,7 +62,11 @@ private static void LogError(string message)
5862

5963
private static void AbortIfInvalidGameVersion(GameInstallData game)
6064
{
65+
#if BELOWZERO
66+
string gameVersionFile = Path.Combine(game.InstallDir, "SubnauticaZero_Data", "StreamingAssets", "SNUnmanagedData", "plastic_status.ignore");
67+
#elif SUBNAUTICA
6168
string gameVersionFile = Path.Combine(game.InstallDir, "Subnautica_Data", "StreamingAssets", "SNUnmanagedData", "plastic_status.ignore");
69+
#endif
6270
if (!File.Exists(gameVersionFile))
6371
{
6472
return;

Nitrox.Test/Patcher/Patches/Dynamic/Builder_TryPlace_PatchTest.cs

+5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ public class Builder_TryPlace_PatchTest
1414
public void Sanity()
1515
{
1616
IEnumerable<CodeInstruction> originalIl = PatchTestHelper.GetInstructionsFromMethod(Builder_TryPlace_Patch.TARGET_METHOD);
17+
#if SUBNAUTICA
1718
IEnumerable<CodeInstruction> transformedIl = Builder_TryPlace_Patch.Transpiler(null, originalIl);
1819
originalIl.Count().Should().Be(transformedIl.Count() - (Builder_TryPlace_Patch.InstructionsToAdd1.Count + Builder_TryPlace_Patch.InstructionsToAdd2.Count));
20+
#elif BELOWZERO
21+
IEnumerable<CodeInstruction> transformedIl = Builder_TryPlace_Patch.Transpiler(null, originalIl, Builder_TryPlace_Patch.TARGET_METHOD.GetILGenerator());
22+
originalIl.Count().Should().Be(transformedIl.Count() - 4);
23+
#endif
1924
}
2025
}

Nitrox.Test/Server/Serialization/WorldPersistenceTest.cs

+2
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,12 @@ private static void EntityTest(Entity entity, Entity entityAfter)
381381
case BuildEntity buildEntity when globalRootEntityAfter is BuildEntity buildEntityAfter:
382382
Assert.AreEqual(buildEntity.BaseData, buildEntityAfter.BaseData);
383383
break;
384+
#if SUBNAUTICA
384385
case EscapePodWorldEntity escapePodWorldEntity when globalRootEntityAfter is EscapePodWorldEntity escapePodWorldEntityAfter:
385386
Assert.AreEqual(escapePodWorldEntity.Damaged, escapePodWorldEntityAfter.Damaged);
386387
Assert.IsTrue(escapePodWorldEntity.Players.SequenceEqual(escapePodWorldEntityAfter.Players));
387388
break;
389+
#endif
388390
case InteriorPieceEntity interiorPieceEntity when globalRootEntityAfter is InteriorPieceEntity interiorPieceEntityAfter:
389391
Assert.AreEqual(interiorPieceEntity.BaseFace, interiorPieceEntityAfter.BaseFace);
390392
break;

NitroxClient/Communication/Packets/Processors/BuildingResyncProcessor.cs

+8
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,19 @@ public static void ClearBaseChildren(Base @base)
166166
}
167167
foreach (VehicleDockingBay vehicleDockingBay in @base.GetComponentsInChildren<VehicleDockingBay>(true))
168168
{
169+
#if SUBNAUTICA
169170
if (vehicleDockingBay.dockedVehicle)
170171
{
171172
UnityEngine.Object.Destroy(vehicleDockingBay.dockedVehicle.gameObject);
172173
vehicleDockingBay.SetVehicleUndocked();
173174
}
175+
#elif BELOWZERO
176+
if (vehicleDockingBay.dockedObject)
177+
{
178+
UnityEngine.Object.Destroy(vehicleDockingBay.dockedObject.gameObject);
179+
vehicleDockingBay.SetVehicleUndocked();
180+
}
181+
#endif
174182
}
175183
}
176184
}

NitroxClient/Debuggers/Drawer/Unity/TransformDrawer.cs

+4
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ private void DrawTransform(Transform transform)
9696
if (GUILayout.Button("Goto", GUILayout.MaxWidth(75)) && Player.main)
9797
{
9898
SubRoot subRoot = transform.GetComponentInParent<SubRoot>(true);
99+
#if SUBNAUTICA
99100
Player.main.SetCurrentSub(subRoot, true);
101+
#elif BELOWZERO
102+
Player.main.SetCurrentSub(subRoot);
103+
#endif
100104
Player.main.SetPosition(transform.position);
101105
}
102106
}

NitroxClient/GameLogic/Entities.cs

+2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ public Entities(IPacketSender packetSender, ThrottledPacketSender throttledPacke
5555
entitySpawnersByType[typeof(WorldEntity)] = new WorldEntitySpawner(entityMetadataManager, playerManager, localPlayer, this);
5656
entitySpawnersByType[typeof(PlaceholderGroupWorldEntity)] = entitySpawnersByType[typeof(WorldEntity)];
5757
entitySpawnersByType[typeof(PrefabPlaceholderEntity)] = entitySpawnersByType[typeof(WorldEntity)];
58+
#if SUBNAUTICA
5859
entitySpawnersByType[typeof(EscapePodWorldEntity)] = entitySpawnersByType[typeof(WorldEntity)];
60+
#endif
5961
entitySpawnersByType[typeof(PlayerWorldEntity)] = entitySpawnersByType[typeof(WorldEntity)];
6062
entitySpawnersByType[typeof(VehicleWorldEntity)] = entitySpawnersByType[typeof(WorldEntity)];
6163
entitySpawnersByType[typeof(SerializedWorldEntity)] = entitySpawnersByType[typeof(WorldEntity)];

NitroxClient/GameLogic/HUD/PlayerListTab.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ public class PlayerListTab : NitroxPDATab
1414
public override PDATab FallbackTabIcon => PDATab.Inventory;
1515

1616
public override uGUI_PDATab uGUI_PDATab => tab;
17-
17+
#if SUBNAUTICA
1818
public override PDATab PDATabId => (PDATab)8;
19+
#elif BELOWZERO
20+
public override PDATab PDATabId => (PDATab)9;
21+
#endif
1922

2023
public override void OnInitializePDA(uGUI_PDA uGUI_PDA)
2124
{

NitroxClient/GameLogic/Helper/EquipmentHelper.cs

+2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ public class EquipmentHelper
1313
o => o.GetComponent<BaseNuclearReactor>().AliveOrNull()?.equipment,
1414
o => o.GetComponent<CyclopsDecoyLoadingTube>().AliveOrNull()?.decoySlots,
1515
o => o.GetComponent<Exosuit>().AliveOrNull()?.modules,
16+
#if SUBNAUTICA
1617
o => o.GetComponent<SeaMoth>().AliveOrNull()?.modules,
18+
#endif
1719
o => o.GetComponent<UpgradeConsole>().AliveOrNull()?.modules,
1820
o => o.GetComponent<Vehicle>().AliveOrNull()?.modules,
1921
o => o.GetComponent<VehicleUpgradeConsoleInput>().AliveOrNull()?.equipment,

NitroxClient/GameLogic/LiveMixinManager.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ public bool ShouldApplyNextHealthUpdate(LiveMixin receiver, GameObject dealer =
5454
vehicleDockingBay.interpolatingVehicle == dealerVehicle ||
5555
vehicleDockingBay.nearbyVehicle == dealerVehicle)
5656
#elif BELOWZERO
57-
if (vehicleDockingBay.GetDockedVehicle() == dealerVehicle ||
58-
vehicleDockingBay.interpolatingVehicle == dealerVehicle ||
57+
if (vehicleDockingBay.GetDockedObject().vehicle == dealerVehicle ||
58+
vehicleDockingBay.interpolatingDockable.vehicle == dealerVehicle ||
5959
vehicleDockingBay.nearbyDockable.vehicle == dealerVehicle)
6060
#endif
6161
{

NitroxClient/GameLogic/LocalPlayer.cs

+10-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ public LocalPlayer(IMultiplayerSession multiplayerSession, IPacketSender packetS
4343
this.packetSender = packetSender;
4444
this.throttledPacketSender = throttledPacketSender;
4545
body = new Lazy<GameObject>(() => Player.main.RequireGameObject("body"));
46+
#if SUBNAUTICA
4647
playerModel = new Lazy<GameObject>(() => Body.RequireGameObject("player_view"));
48+
#elif BELOWZERO
49+
playerModel = new Lazy<GameObject>(() => Body.RequireGameObject("player_view_female"));
50+
#endif
4751
bodyPrototype = new Lazy<GameObject>(CreateBodyPrototype);
4852
Permissions = Perms.PLAYER;
4953
}
@@ -73,9 +77,9 @@ public void BroadcastLocation(Vector3 location, Vector3 velocity, Quaternion bod
7377
public void BroadcastDeath(Vector3 deathPosition) => packetSender.Send(new PlayerDeathEvent(PlayerId, deathPosition.ToDto()));
7478

7579
public void BroadcastSubrootChange(Optional<NitroxId> subrootId) => packetSender.Send(new SubRootChanged(PlayerId, subrootId));
76-
80+
#if SUBNAUTICA
7781
public void BroadcastEscapePodChange(Optional<NitroxId> escapePodId) => packetSender.Send(new EscapePodChanged(PlayerId, escapePodId));
78-
82+
#endif
7983
public void BroadcastWeld(NitroxId id, float healthAdded) => packetSender.Send(new WeldAction(id, healthAdded));
8084

8185
public void BroadcastHeldItemChanged(NitroxId itemId, PlayerHeldItemChanged.ChangeType techType, NitroxTechType isFirstTime) => packetSender.Send(new PlayerHeldItemChanged(PlayerId, itemId, techType, isFirstTime));
@@ -100,7 +104,11 @@ private GameObject CreateBodyPrototype()
100104
clone.name = "RemotePlayerPrototype";
101105

102106
// Removing items that are held in hand
107+
#if SUBNAUTICA
103108
foreach (Transform child in clone.transform.Find($"player_view/{PlayerEquipmentConstants.ITEM_ATTACH_POINT_GAME_OBJECT_NAME}"))
109+
#elif BELOWZERO
110+
foreach (Transform child in clone.transform.Find($"player_view_female/{PlayerEquipmentConstants.ITEM_ATTACH_POINT_GAME_OBJECT_NAME}"))
111+
#endif
104112
{
105113
if (!child.gameObject.name.Contains("attach1_"))
106114
{
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
#if BELOWZERO
2+
using System;
3+
using System.Collections.Generic;
4+
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.Abstract;
5+
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.ColorSwap.Strategy;
6+
using NitroxClient.Unity.Helper;
7+
using NitroxModel_Subnautica.DataStructures;
8+
using UnityEngine;
9+
using static NitroxClient.GameLogic.PlayerLogic.PlayerModel.PlayerEquipmentConstants;
10+
11+
namespace NitroxClient.GameLogic.PlayerLogic.PlayerModel.ColorSwap
12+
{
13+
public class ColdProtectiveSuitColorSwapManager : IColorSwapManager
14+
{
15+
public Action<ColorSwapAsyncOperation> CreateColorSwapTask(INitroxPlayer nitroxPlayer)
16+
{
17+
GameObject playerModel = nitroxPlayer.PlayerModel;
18+
Color playerColor = nitroxPlayer.PlayerSettings.PlayerColor.ToUnity();
19+
IColorSwapStrategy colorSwapStrategy = new HueSwapper(playerColor);
20+
21+
SkinnedMeshRenderer coldProtectiveHeadRenderer = playerModel.GetRenderer(COLD_PROTECTIVE_HEAD_GAME_OBJECT_NAME);
22+
coldProtectiveHeadRenderer.material.ApplyClonedTexture();
23+
24+
SkinnedMeshRenderer coldProtectiveMaskRenderer = playerModel.GetRenderer(COLD_PROTECTIVE_MASK_GAME_OBJECT_NAME);
25+
coldProtectiveMaskRenderer.material.ApplyClonedTexture();
26+
27+
SkinnedMeshRenderer coldProtectiveSuitRenderer = playerModel.GetRenderer(COLD_PROTECTIVE_BODY_GAME_OBJECT_NAME);
28+
coldProtectiveSuitRenderer.material.ApplyClonedTexture();
29+
coldProtectiveSuitRenderer.materials[1].ApplyClonedTexture();
30+
31+
SkinnedMeshRenderer coldProtectiveHandsRenderer = playerModel.GetRenderer(COLD_PROTECTIVE_HANDS_GAME_OBJECT_NAME);
32+
coldProtectiveHandsRenderer.material.ApplyClonedTexture();
33+
34+
Color[] headTexturePixels = coldProtectiveHeadRenderer.material.GetMainTexturePixels();
35+
Color[] maskTexturePixels = coldProtectiveMaskRenderer.material.GetMainTexturePixels();
36+
Color[] suitTexturePixels = coldProtectiveSuitRenderer.material.GetMainTexturePixels();
37+
Color[] armsTexturePixels = coldProtectiveSuitRenderer.materials[1].GetMainTexturePixels();
38+
Color[] handsTexturePixels = coldProtectiveHandsRenderer.material.GetMainTexturePixels();
39+
40+
return operation =>
41+
{
42+
HsvSwapper coldProtectiveSuitFilter = new HsvSwapper(colorSwapStrategy);
43+
coldProtectiveSuitFilter.SetHueRange(0f, 20f);
44+
coldProtectiveSuitFilter.SetSaturationRange(45f, 100f);
45+
coldProtectiveSuitFilter.SwapColors(headTexturePixels);
46+
coldProtectiveSuitFilter.SwapColors(maskTexturePixels);
47+
coldProtectiveSuitFilter.SwapColors(suitTexturePixels);
48+
coldProtectiveSuitFilter.SwapColors(armsTexturePixels);
49+
coldProtectiveSuitFilter.SwapColors(handsTexturePixels);
50+
operation.UpdateIndex(COLD_PROTECTIVE_HEAD_INDEX_KEY, headTexturePixels);
51+
operation.UpdateIndex(COLD_PROTECTIVE_MASK_INDEX_KEY, maskTexturePixels);
52+
operation.UpdateIndex(COLD_PROTECTIVE_BODY_INDEX_KEY, suitTexturePixels);
53+
operation.UpdateIndex(COLD_PROTECTIVE_ARMS_INDEX_KEY, armsTexturePixels);
54+
operation.UpdateIndex(COLD_PROTECTIVE_HANDS_INDEX_KEY, handsTexturePixels);
55+
};
56+
}
57+
58+
public void ApplyPlayerColor(Dictionary<string, Color[]> pixelIndex, INitroxPlayer nitroxPlayer)
59+
{
60+
Color[] headPixelIndexes = pixelIndex[COLD_PROTECTIVE_HEAD_INDEX_KEY];
61+
Color[] maskPixelIndexes = pixelIndex[COLD_PROTECTIVE_MASK_INDEX_KEY];
62+
Color[] suitPixelIndexes = pixelIndex[COLD_PROTECTIVE_BODY_INDEX_KEY];
63+
Color[] armsTexturePixels = pixelIndex[COLD_PROTECTIVE_ARMS_INDEX_KEY];
64+
Color[] handsPixelIndexes = pixelIndex[COLD_PROTECTIVE_HANDS_INDEX_KEY];
65+
66+
GameObject playerModel = nitroxPlayer.PlayerModel;
67+
68+
SkinnedMeshRenderer coldProtectiveHeadRenderer = playerModel.GetRenderer(COLD_PROTECTIVE_HEAD_GAME_OBJECT_NAME);
69+
coldProtectiveHeadRenderer.material.UpdateMainTextureColors(headPixelIndexes);
70+
71+
SkinnedMeshRenderer coldProtectiveMaskRenderer = playerModel.GetRenderer(COLD_PROTECTIVE_MASK_GAME_OBJECT_NAME);
72+
coldProtectiveMaskRenderer.material.UpdateMainTextureColors(maskPixelIndexes);
73+
74+
SkinnedMeshRenderer coldProtectiveSuitRenderer = playerModel.GetRenderer(COLD_PROTECTIVE_BODY_GAME_OBJECT_NAME);
75+
coldProtectiveSuitRenderer.material.UpdateMainTextureColors(suitPixelIndexes);
76+
coldProtectiveSuitRenderer.material.SetTexture("_MainTex", coldProtectiveSuitRenderer.material.mainTexture);
77+
coldProtectiveSuitRenderer.material.SetTexture("_SpecTex", coldProtectiveSuitRenderer.material.mainTexture);
78+
79+
coldProtectiveSuitRenderer.materials[1].UpdateMainTextureColors(armsTexturePixels);
80+
coldProtectiveSuitRenderer.materials[1].SetTexture("_MainTex", coldProtectiveSuitRenderer.materials[1].mainTexture);
81+
coldProtectiveSuitRenderer.materials[1].SetTexture("_SpecTex", coldProtectiveSuitRenderer.materials[1].mainTexture);
82+
83+
SkinnedMeshRenderer reinforcedHandsRenderer = playerModel.GetRenderer(REINFORCED_GLOVES_GAME_OBJECT_NAME);
84+
reinforcedHandsRenderer.material.UpdateMainTextureColors(handsPixelIndexes);
85+
}
86+
}
87+
}
88+
#endif

NitroxClient/GameLogic/PlayerLogic/PlayerModel/ColorSwap/FinColorSwapManager.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.Abstract;
44
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.ColorSwap.Strategy;
@@ -20,11 +20,13 @@ public Action<ColorSwapAsyncOperation> CreateColorSwapTask(INitroxPlayer nitroxP
2020
SkinnedMeshRenderer basicFinRenderer = playerModel.GetRenderer(FINS_GAME_OBJECT_NAME);
2121
basicFinRenderer.material.ApplyClonedTexture();
2222

23+
#if SUBNAUTICA
2324
SkinnedMeshRenderer chargedFinRenderer = playerModel.GetRenderer(CHARGED_FINS_GAME_OBJECT_NAME);
2425
chargedFinRenderer.material.ApplyClonedTexture();
2526

2627
SkinnedMeshRenderer glideFinRenderer = playerModel.GetRenderer(GLIDE_FINS_GAME_OBJECT_NAME);
2728
glideFinRenderer.material.ApplyClonedTexture();
29+
#endif
2830

2931
//All fin models use the same texture.
3032
Color[] texturePixels = basicFinRenderer.material.GetMainTexturePixels();
@@ -50,7 +52,7 @@ public void ApplyPlayerColor(Dictionary<string, Color[]> pixelIndex, INitroxPlay
5052
basicFinRenderer.material.UpdateMainTextureColors(pixels);
5153
basicFinRenderer.material.SetTexture("_MainTex", basicFinRenderer.material.mainTexture);
5254
basicFinRenderer.material.SetTexture("_SpecTex", basicFinRenderer.material.mainTexture);
53-
55+
#if SUBNAUTICA
5456
SkinnedMeshRenderer chargedFinRenderer = playerModel.GetRenderer(CHARGED_FINS_GAME_OBJECT_NAME);
5557
chargedFinRenderer.material.UpdateMainTextureColors(pixels);
5658
chargedFinRenderer.material.SetTexture("_MainTex", chargedFinRenderer.material.mainTexture);
@@ -60,6 +62,7 @@ public void ApplyPlayerColor(Dictionary<string, Color[]> pixelIndex, INitroxPlay
6062
glideFinRenderer.material.UpdateMainTextureColors(pixels);
6163
glideFinRenderer.material.SetTexture("_MainTex", glideFinRenderer.material.mainTexture);
6264
glideFinRenderer.material.SetTexture("_SpecTex", glideFinRenderer.material.mainTexture);
65+
#endif
6366
}
6467
}
6568
}

NitroxClient/GameLogic/PlayerLogic/PlayerModel/ColorSwap/RadiationHelmetColorSwapManager.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
#if SUBNAUTICA
2+
using System;
23
using System.Collections.Generic;
34
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.Abstract;
45
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.ColorSwap.Strategy;
@@ -55,3 +56,4 @@ public void ApplyPlayerColor(Dictionary<string, Color[]> pixelIndex, INitroxPlay
5556
}
5657
}
5758
}
59+
#endif

NitroxClient/GameLogic/PlayerLogic/PlayerModel/ColorSwap/RadiationSuitColorSwapManager.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
#if SUBNAUTICA
2+
using System;
23
using System.Collections.Generic;
34
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.Abstract;
45
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.ColorSwap.Strategy;
@@ -88,3 +89,4 @@ public void ApplyPlayerColor(Dictionary<string, Color[]> pixelIndex, INitroxPlay
8889
}
8990
}
9091
}
92+
#endif

NitroxClient/GameLogic/PlayerLogic/PlayerModel/ColorSwap/RadiationSuitVestColorSwapManager.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
#if SUBNAUTICA
2+
using System;
23
using System.Collections.Generic;
34
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.Abstract;
45
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.ColorSwap.Strategy;
@@ -44,3 +45,4 @@ public void ApplyPlayerColor(Dictionary<string, Color[]> pixelIndex, INitroxPlay
4445
}
4546
}
4647
}
48+
#endif

NitroxClient/GameLogic/PlayerLogic/PlayerModel/ColorSwap/RadiationTankColorSwapManager.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
#if SUBNAUTICA
2+
using System;
23
using System.Collections.Generic;
34
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.Abstract;
45
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.ColorSwap.Strategy;
@@ -46,3 +47,4 @@ public void ApplyPlayerColor(Dictionary<string, Color[]> pixelIndex, INitroxPlay
4647
}
4748
}
4849
}
50+
#endif

NitroxClient/GameLogic/PlayerLogic/PlayerModel/ColorSwap/RebreatherColorSwapManager.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
#if SUBNAUTICA
2+
using System;
23
using System.Collections.Generic;
34
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.Abstract;
45
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.ColorSwap.Strategy;
@@ -66,3 +67,4 @@ private static void FixRebreatherMaterials(GameObject playerModel, SkinnedMeshRe
6667
}
6768
}
6869
}
70+
#endif

NitroxClient/GameLogic/PlayerLogic/PlayerModel/ColorSwap/ReinforcedSuitColorSwapManager.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.Abstract;
44
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.ColorSwap.Strategy;

NitroxClient/GameLogic/PlayerLogic/PlayerModel/ColorSwap/ScubaTankColorSwapManager.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
#if SUBNAUTICA
2+
using System;
23
using System.Collections.Generic;
34
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.Abstract;
45
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.ColorSwap.Strategy;
@@ -46,3 +47,4 @@ public void ApplyPlayerColor(Dictionary<string, Color[]> pixelIndex, INitroxPlay
4647
}
4748
}
4849
}
50+
#endif

0 commit comments

Comments
 (0)