mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
parent
775364170d
commit
d115d6afae
@ -72,33 +72,35 @@ namespace NewHorizons.Builder.General
|
|||||||
{
|
{
|
||||||
suitUpQueued = false;
|
suitUpQueued = false;
|
||||||
if (Locator.GetPlayerController()._isWearingSuit) return;
|
if (Locator.GetPlayerController()._isWearingSuit) return;
|
||||||
try
|
|
||||||
{
|
|
||||||
var spv = GameObject.Find("Ship_Body/Module_Supplies/Systems_Supplies/ExpeditionGear").GetComponent<SuitPickupVolume>();
|
|
||||||
spv.SetValue("_containsSuit", false);
|
|
||||||
|
|
||||||
if (spv.GetValue<bool>("_allowSuitReturn"))
|
|
||||||
spv.GetValue<MultipleInteractionVolume>("_interactVolume").ChangePrompt(UITextType.ReturnSuitPrompt, spv.GetValue<int>("_pickupSuitCommandIndex"));
|
|
||||||
else
|
|
||||||
spv.GetValue<MultipleInteractionVolume>("_interactVolume").EnableSingleInteraction(false, spv.GetValue<int>("_pickupSuitCommandIndex"));
|
|
||||||
|
|
||||||
Locator.GetPlayerTransform().GetComponent<PlayerSpacesuit>().SuitUp(false, true, true);
|
Locator.GetPlayerTransform().GetComponent<PlayerSpacesuit>().SuitUp(false, true, true);
|
||||||
|
|
||||||
spv.SetValue("_timer", 0f);
|
// Make the ship act as if the player took the suit
|
||||||
spv.SetValue("_index", 0);
|
var spv = GameObject.Find("Ship_Body/Module_Supplies/Systems_Supplies/ExpeditionGear")?.GetComponent<SuitPickupVolume>();
|
||||||
|
|
||||||
GameObject suitGeometry = spv.GetValue<GameObject>("_suitGeometry");
|
if (spv == null) return;
|
||||||
|
|
||||||
|
spv._containsSuit = false;
|
||||||
|
|
||||||
|
if (spv._allowSuitReturn)
|
||||||
|
{
|
||||||
|
spv._interactVolume.ChangePrompt(UITextType.ReturnSuitPrompt, spv._pickupSuitCommandIndex);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
spv._interactVolume.EnableSingleInteraction(false, spv._pickupSuitCommandIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
spv._timer = 0f;
|
||||||
|
spv._index = 0;
|
||||||
|
|
||||||
|
GameObject suitGeometry = spv._suitGeometry;
|
||||||
if (suitGeometry != null) suitGeometry.SetActive(false);
|
if (suitGeometry != null) suitGeometry.SetActive(false);
|
||||||
|
|
||||||
OWCollider suitOWCollider = spv.GetValue<OWCollider>("_suitOWCollider");
|
OWCollider suitOWCollider = spv._suitOWCollider;
|
||||||
if (suitOWCollider != null) suitOWCollider.SetActivation(false);
|
if (suitOWCollider != null) suitOWCollider.SetActivation(false);
|
||||||
|
|
||||||
spv.enabled = true;
|
spv.enabled = true;
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
|
||||||
{
|
|
||||||
Logger.LogWarning($"Was unable to suit up player. {e.Message}, {e.StackTrace}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user