Skip to content

Commit

Permalink
fix tutel log spam once and for all
Browse files Browse the repository at this point in the history
  • Loading branch information
Govorunb committed May 19, 2024
1 parent 5afd65e commit aa57c5e
Show file tree
Hide file tree
Showing 5 changed files with 222 additions and 170 deletions.
29 changes: 29 additions & 0 deletions SCHIZO/Creatures/Tutel/TutelGravityInterop.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
namespace SCHIZO.Creatures.Tutel;

partial class TutelGravityInterop
{
private void Awake()
{
#if BELOWZERO
LandCreatureGravity lcg = gameObject.AddComponent<LandCreatureGravity>();
lcg.onSurfaceTracker = onSurfaceTracker as OnSurfaceTracker;
lcg.liveMixin = liveMixin as LiveMixin;
lcg.creatureRigidbody = creatureRigidbody;
lcg.worldForces = worldForces as WorldForces;
lcg.bodyCollider = bodyCollider;
lcg.pickupable = pickupable as Pickupable;
lcg.downforce = downforce;
lcg.aboveWaterGravity = aboveWaterGravity;
lcg.underWaterGravity = underWaterGravity;
lcg.applyDownforceUnderwater = applyDownforceUnderwater;
lcg.canGoInStasisUnderwater = canGoInStasisUnderwater;
lcg.trackSurfaceCollider = trackSurfaceCollider;
#else
CaveCrawlerGravity ccg = gameObject.AddComponent<CaveCrawlerGravity>();
ccg.caveCrawler = caveCrawler;
ccg.liveMixin = liveMixin as LiveMixin;
ccg.crawlerRigidbody = creatureRigidbody;
#endif
Destroy(this);
}
}
9 changes: 2 additions & 7 deletions SCHIZO/Patches/DisableMoreComponentsInWaterPark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Linq;
using SCHIZO.Attributes;
using SCHIZO.Creatures.Components;
using SCHIZO.Creatures.Ermfish;
using SCHIZO.Events.Ermcon;

namespace SCHIZO.Patches;
Expand All @@ -13,15 +14,9 @@ internal static class DisableMoreComponentsInWaterPark
[InitializeMod]
public static void AddComponentsToDisable()
{
// uncomment this if you really *really* care about 10ns
//int len = WaterParkCreature.behavioursToDisableInside.Length;
//Type[] arr = new Type[len + 3];
//WaterParkCreature.behavioursToDisableInside.CopyTo(arr, 0);
//arr[len] = typeof(CarryCreature);
//arr[len + 1] = typeof(ErmconAttendee);
//arr[len + 2] = typeof(ErmconPanelist);
Type[] arr = WaterParkCreature.behavioursToDisableInside.Concat([
typeof(CarryCreature),
typeof(ErmStack),
typeof(ErmconAttendee),
typeof(ErmconPanelist)
]).ToArray();
Expand Down
Loading

0 comments on commit aa57c5e

Please sign in to comment.