Skip to content

Commit

Permalink
Fix compilation errors on BZ branch
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeTwentyThree committed Aug 31, 2023
1 parent 624fcb2 commit 64bf91b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Nautilus/Assets/PrefabTemplates/EggTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ public EggTemplate SetUndiscoveredTechType()
UndiscoveredTechType = EnumHandler.AddEntry<TechType>(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;
}
Expand Down Expand Up @@ -257,7 +261,11 @@ private IEnumerator ProcessEgg(GameObject obj)
liveMixin.health = MaxHealth;

var creatureEgg = obj.EnsureComponent<CreatureEgg>();
#if SUBNAUTICA
creatureEgg.animator = obj.GetComponentInChildren<Animator>() ?? obj.EnsureComponent<Animator>();
#else
creatureEgg.animators = obj.GetComponentsInChildren<Animator>();
#endif
creatureEgg.creatureType = HatchingCreature;
PrefabDatabase.TryGetPrefabFilename(CraftData.GetClassIdForTechType(HatchingCreature), out var filename);
creatureEgg.creaturePrefab = new AssetReferenceGameObject(filename).ForceValid();
Expand Down

0 comments on commit 64bf91b

Please sign in to comment.