From 64bf91b2ec5965b42779831ac6c457f2262ff2d1 Mon Sep 17 00:00:00 2001 From: LeeTwentyThree <31892011+LeeTwentyThree@users.noreply.github.com> Date: Thu, 31 Aug 2023 16:04:08 -0400 Subject: [PATCH] Fix compilation errors on BZ branch --- Nautilus/Assets/PrefabTemplates/EggTemplate.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Nautilus/Assets/PrefabTemplates/EggTemplate.cs b/Nautilus/Assets/PrefabTemplates/EggTemplate.cs index fb7ead60..1a94fe74 100644 --- a/Nautilus/Assets/PrefabTemplates/EggTemplate.cs +++ b/Nautilus/Assets/PrefabTemplates/EggTemplate.cs @@ -190,7 +190,11 @@ public EggTemplate SetUndiscoveredTechType() UndiscoveredTechType = EnumHandler.AddEntry(info.ClassID + "Undiscovered") .WithPdaInfo("Creature Egg", "An unidentified egg.") .WithIcon(SpriteManager.Get(info.TechType)) +#if SUBNAUTICA .WithSizeInInventory(CraftData.GetItemSize(info.TechType)); +#else + .WithSizeInInventory(TechData.GetItemSize(info.TechType)); +#endif return this; } @@ -257,7 +261,11 @@ private IEnumerator ProcessEgg(GameObject obj) liveMixin.health = MaxHealth; var creatureEgg = obj.EnsureComponent(); +#if SUBNAUTICA creatureEgg.animator = obj.GetComponentInChildren() ?? obj.EnsureComponent(); +#else + creatureEgg.animators = obj.GetComponentsInChildren(); +#endif creatureEgg.creatureType = HatchingCreature; PrefabDatabase.TryGetPrefabFilename(CraftData.GetClassIdForTechType(HatchingCreature), out var filename); creatureEgg.creaturePrefab = new AssetReferenceGameObject(filename).ForceValid();