mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Log a warning if you do the anglerfish thing
This commit is contained in:
parent
c9fa785ac6
commit
96a08d410e
@ -1,5 +1,6 @@
|
|||||||
using NewHorizons.Builder.General;
|
using NewHorizons.Builder.General;
|
||||||
using NewHorizons.Components;
|
using NewHorizons.Components;
|
||||||
|
using NewHorizons.Components.Orbital;
|
||||||
using NewHorizons.Components.Props;
|
using NewHorizons.Components.Props;
|
||||||
using NewHorizons.External.Modules.Props;
|
using NewHorizons.External.Modules.Props;
|
||||||
using NewHorizons.Handlers;
|
using NewHorizons.Handlers;
|
||||||
@ -374,6 +375,12 @@ namespace NewHorizons.Builder.Props
|
|||||||
// Fix anglerfish speed on orbiting planets
|
// Fix anglerfish speed on orbiting planets
|
||||||
else if (component is AnglerfishController angler)
|
else if (component is AnglerfishController angler)
|
||||||
{
|
{
|
||||||
|
if (planetGO?.GetComponent<NHAstroObject>() is NHAstroObject nhao && !nhao.invulnerableToSun)
|
||||||
|
{
|
||||||
|
// Has a fluid detector, will go gorp (#830)
|
||||||
|
NHLogger.LogWarning("Having an anglerfish on a planet that has a fluid detector can lead to things breaking!");
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
angler._chaseSpeed += OWPhysics.CalculateOrbitVelocity(planetGO.GetAttachedOWRigidbody(), planetGO.GetComponent<AstroObject>().GetPrimaryBody().GetAttachedOWRigidbody()).magnitude;
|
angler._chaseSpeed += OWPhysics.CalculateOrbitVelocity(planetGO.GetAttachedOWRigidbody(), planetGO.GetComponent<AstroObject>().GetPrimaryBody().GetAttachedOWRigidbody()).magnitude;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user