mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-29 00:32:43 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
b5e071c68e
@ -1,9 +1,20 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<RootNamespace>EpicTransport</RootNamespace>
|
||||
<Title>EpicOnlineTransport</Title>
|
||||
<Authors>Nudge Nudge Games</Authors>
|
||||
<Company>Nudge Nudge Games</Company>
|
||||
<Copyright>Copyright © 2021 Nudge Nudge Games</Copyright>
|
||||
<PackageLicenseFile>License.md</PackageLicenseFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="OuterWildsGameLibs" Version="1.1.13.393" IncludeAssets="compile" />
|
||||
<Reference Include="../Mirror/*.dll" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="License.md">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>\</PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
21
EpicOnlineTransport/License.md
Normal file
21
EpicOnlineTransport/License.md
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Nudge Nudge Games
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@ -1,7 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||
<Title>Epic Rerouter</Title>
|
||||
<Company>William Corby, Henry Pointer</Company>
|
||||
<Authors>William Corby, Henry Pointer</Authors>
|
||||
<Copyright>Copyright © William Corby, Henry Pointer 2022-2023</Copyright>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\LICENSE">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>\</PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="OuterWildsGameLibs" Version="1.1.13.393" IncludeAssets="compile" />
|
||||
<PackageReference Include="OWML" Version="2.9.0" IncludeAssets="compile" />
|
||||
|
22
MirrorWeaver/License.md
Normal file
22
MirrorWeaver/License.md
Normal file
@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2015, Unity Technologies
|
||||
Copyright (c) 2019, vis2k, Paul and Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
@ -1,10 +1,21 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<PackageLicenseFile>License.md</PackageLicenseFile>
|
||||
<Title>Mirror Weaver</Title>
|
||||
<Authors>Unity Technologies, vis2k, Paul and Contributors, William Corby</Authors>
|
||||
<Company>Unity Technologies, vis2k, Paul and Contributors, William Corby</Company>
|
||||
<Copyright></Copyright>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="OuterWildsGameLibs" Version="1.1.13.393" />
|
||||
<PackageReference Include="OWML" Version="2.9.0" />
|
||||
<Reference Include="../Mirror/*.dll" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="License.md">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>\</PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@ -69,6 +69,43 @@ public class RespawnOnDeath : MonoBehaviour
|
||||
|
||||
RespawnManager.Instance.TriggerRespawnMap();
|
||||
|
||||
SetupDeathPositions();
|
||||
|
||||
// do some exit dream world stuff since real deaths dont do that
|
||||
if (PlayerState.InDreamWorld())
|
||||
{
|
||||
ResetPlayerDreamworld();
|
||||
}
|
||||
|
||||
ResetCloak();
|
||||
ResetPlayerComponents();
|
||||
ResetCanvases();
|
||||
|
||||
var mixer = Locator.GetAudioMixer();
|
||||
mixer._deathMixed = false;
|
||||
mixer._nonEndTimesVolume.FadeTo(1, 0.5f);
|
||||
mixer._endTimesVolume.FadeTo(1, 0.5f);
|
||||
mixer.MixMap();
|
||||
|
||||
var playerBody = Locator.GetPlayerBody();
|
||||
playerBody.WarpToPositionRotation(_playerSpawnPoint.transform.position, _playerSpawnPoint.transform.rotation);
|
||||
playerBody.SetVelocity(_playerSpawnPoint.GetPointVelocity());
|
||||
_playerSpawnPoint.AddObjectToTriggerVolumes(Locator.GetPlayerDetector().gameObject);
|
||||
_playerSpawnPoint.AddObjectToTriggerVolumes(_fluidDetector.gameObject);
|
||||
_playerSpawnPoint.OnSpawnPlayer();
|
||||
|
||||
_playerResources._isSuffocating = false;
|
||||
_playerResources.DebugRefillResources();
|
||||
// death by oxygen turns this off, so we gotta enable it again
|
||||
Delay.RunNextFrame(() => _playerResources.enabled = true);
|
||||
|
||||
ResetSuitState();
|
||||
|
||||
QSBPlayerManager.LocalPlayer.LocalFlashlight.TurnOff(false);
|
||||
}
|
||||
|
||||
private void SetupDeathPositions()
|
||||
{
|
||||
var inSpace = PlayerTransformSync.LocalInstance.SectorDetector.SectorList.Count == 0;
|
||||
|
||||
if (inSpace)
|
||||
@ -86,94 +123,71 @@ public class RespawnOnDeath : MonoBehaviour
|
||||
_deathPositionRelative = DeathClosestAstroObject.InverseTransformPoint(deathPosition);
|
||||
DeathPlayerUpVector = Locator.GetPlayerTransform().up;
|
||||
DeathPlayerForwardVector = Locator.GetPlayerTransform().forward;
|
||||
}
|
||||
|
||||
// do some exit dream world stuff since real deaths dont do that
|
||||
if (PlayerState.InDreamWorld())
|
||||
private void ResetPlayerDreamworld()
|
||||
{
|
||||
var __instance = Locator.GetDreamWorldController();
|
||||
|
||||
var wakeType = DreamWakeType.Default; // TODO maybe get actual death type? idk
|
||||
__instance._wakeType = wakeType;
|
||||
__instance.CheckDreamZone2Completion();
|
||||
__instance.CheckSleepWakeDieAchievement(wakeType);
|
||||
|
||||
__instance._activeGhostGrabController?.ReleasePlayer();
|
||||
__instance._activeZoomPoint?.CancelZoom();
|
||||
|
||||
if (__instance._outsideLanternBounds)
|
||||
{
|
||||
var __instance = Locator.GetDreamWorldController();
|
||||
|
||||
var wakeType = DreamWakeType.Default; // TODO maybe get actual death type? idk
|
||||
__instance._wakeType = wakeType;
|
||||
__instance.CheckDreamZone2Completion();
|
||||
__instance.CheckSleepWakeDieAchievement(wakeType);
|
||||
|
||||
__instance._activeGhostGrabController?.ReleasePlayer();
|
||||
__instance._activeZoomPoint?.CancelZoom();
|
||||
|
||||
if (__instance._outsideLanternBounds)
|
||||
{
|
||||
__instance.EnterLanternBounds();
|
||||
}
|
||||
|
||||
__instance._simulationCamera.OnExitDreamWorld();
|
||||
SunLightController.UnregisterSunOverrider(__instance);
|
||||
if (__instance._proxyShadowLight != null)
|
||||
{
|
||||
__instance._proxyShadowLight.enabled = true;
|
||||
}
|
||||
__instance._insideDream = false;
|
||||
__instance._waitingToLightLantern = false;
|
||||
__instance._playerLantern.OnExitDreamWorld();
|
||||
|
||||
// TODO : drop player lantern at campfire
|
||||
|
||||
Locator.GetPlayerSectorDetector().RemoveFromAllSectors();
|
||||
|
||||
__instance._playerLantern.OnExitDreamWorld();
|
||||
__instance._dreamArrivalPoint.OnExitDreamWorld();
|
||||
__instance._dreamCampfire.OnDreamCampfireExtinguished -= __instance.OnDreamCampfireExtinguished;
|
||||
__instance._dreamCampfire = null;
|
||||
|
||||
__instance.ExtinguishDreamRaft();
|
||||
Locator.GetAudioMixer().UnmixDreamWorld();
|
||||
Locator.GetAudioMixer().UnmixSleepAtCampfire(1f);
|
||||
|
||||
if (__instance._playerCamAmbientLightRenderer != null)
|
||||
{
|
||||
__instance._playerCamAmbientLightRenderer.enabled = false;
|
||||
}
|
||||
|
||||
__instance._playerCamera.cullingMask |= 1 << LayerMask.NameToLayer("Sun");
|
||||
__instance._playerCamera.farClipPlane = __instance._prevPlayerCameraFarPlaneDist;
|
||||
__instance._prevPlayerCameraFarPlaneDist = 0f;
|
||||
__instance._playerCamera.mainCamera.backgroundColor = Color.black;
|
||||
__instance._playerCamera.planetaryFog.enabled = true;
|
||||
__instance._playerCamera.postProcessingSettings.screenSpaceReflectionAvailable = false;
|
||||
__instance._playerCamera.postProcessingSettings.ambientOcclusionAvailable = true;
|
||||
|
||||
GlobalMessenger.FireEvent("ExitDreamWorld");
|
||||
__instance.EnterLanternBounds();
|
||||
}
|
||||
|
||||
var sectorList = PlayerTransformSync.LocalInstance.SectorDetector.SectorList;
|
||||
if (sectorList.All(x => x.Type != Sector.Name.TimberHearth))
|
||||
__instance._simulationCamera.OnExitDreamWorld();
|
||||
SunLightController.UnregisterSunOverrider(__instance);
|
||||
if (__instance._proxyShadowLight != null)
|
||||
{
|
||||
// stops sectors from breaking when you die on TH??
|
||||
Locator.GetPlayerSectorDetector().RemoveFromAllSectors();
|
||||
Locator.GetPlayerCameraDetector().GetComponent<AudioDetector>().DeactivateAllVolumes(0f);
|
||||
__instance._proxyShadowLight.enabled = true;
|
||||
}
|
||||
__instance._insideDream = false;
|
||||
__instance._waitingToLightLantern = false;
|
||||
__instance._playerLantern.OnExitDreamWorld();
|
||||
|
||||
// TODO : drop player lantern at campfire
|
||||
|
||||
Locator.GetPlayerSectorDetector().RemoveFromAllSectors();
|
||||
|
||||
__instance._playerLantern.OnExitDreamWorld();
|
||||
__instance._dreamArrivalPoint.OnExitDreamWorld();
|
||||
__instance._dreamCampfire.OnDreamCampfireExtinguished -= __instance.OnDreamCampfireExtinguished;
|
||||
__instance._dreamCampfire = null;
|
||||
|
||||
__instance.ExtinguishDreamRaft();
|
||||
Locator.GetAudioMixer().UnmixDreamWorld();
|
||||
Locator.GetAudioMixer().UnmixSleepAtCampfire(1f);
|
||||
|
||||
if (__instance._playerCamAmbientLightRenderer != null)
|
||||
{
|
||||
__instance._playerCamAmbientLightRenderer.enabled = false;
|
||||
}
|
||||
|
||||
// undo stuff that PlayerDeath event does
|
||||
var cloak = Locator.GetCloakFieldController();
|
||||
cloak._playerInsideCloak = false;
|
||||
cloak._playerCloakFactor = 0f;
|
||||
cloak._worldFadeFactor = 0f;
|
||||
cloak._interiorRevealFactor = 0f;
|
||||
cloak._rendererFade = 1;
|
||||
cloak.OnPlayerExit.Invoke();
|
||||
GlobalMessenger.FireEvent("ExitCloak");
|
||||
__instance._playerCamera.cullingMask |= 1 << LayerMask.NameToLayer("Sun");
|
||||
__instance._playerCamera.farClipPlane = __instance._prevPlayerCameraFarPlaneDist;
|
||||
__instance._prevPlayerCameraFarPlaneDist = 0f;
|
||||
__instance._playerCamera.mainCamera.backgroundColor = Color.black;
|
||||
__instance._playerCamera.planetaryFog.enabled = true;
|
||||
__instance._playerCamera.postProcessingSettings.screenSpaceReflectionAvailable = false;
|
||||
__instance._playerCamera.postProcessingSettings.ambientOcclusionAvailable = true;
|
||||
|
||||
GlobalMessenger.FireEvent("ExitDreamWorld");
|
||||
}
|
||||
|
||||
private void ResetCanvases()
|
||||
{
|
||||
foreach (var item in QSBWorldSync.GetUnityObjects<ScreenPromptList>())
|
||||
{
|
||||
item.OnPlayerResurrection();
|
||||
}
|
||||
|
||||
PlayerState._isDead = false;
|
||||
Locator.GetPlayerController().OnPlayerResurrection();
|
||||
QSBWorldSync.GetUnityObject<PlayerBreathingAudio>().enabled = true;
|
||||
Locator.GetPlayerCamera().GetComponent<PlayerCameraEffectController>().OnPlayerResurrection();
|
||||
Locator.GetPlayerAudioController().OnPlayerResurrection();
|
||||
Locator.GetDeathManager()._isDying = false;
|
||||
|
||||
foreach (var item in QSBWorldSync.GetUnityObjects<ThrustAndAttitudeIndicator>())
|
||||
{
|
||||
item.enabled = true;
|
||||
@ -195,30 +209,10 @@ public class RespawnOnDeath : MonoBehaviour
|
||||
{
|
||||
item.enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
var visorEffect = QSBWorldSync.GetUnityObject<VisorEffectController>();
|
||||
visorEffect._cracked = false;
|
||||
visorEffect._crackStartTime = 0f;
|
||||
visorEffect._crackEffectRenderer.enabled = false;
|
||||
visorEffect._crackEffectRenderer.material.SetFloat(visorEffect._propID_Cutoff, 1f);
|
||||
|
||||
var mixer = Locator.GetAudioMixer();
|
||||
mixer._deathMixed = false;
|
||||
mixer._nonEndTimesVolume.FadeTo(1, 0.5f);
|
||||
mixer._endTimesVolume.FadeTo(1, 0.5f);
|
||||
mixer.MixMap();
|
||||
|
||||
var playerBody = Locator.GetPlayerBody();
|
||||
playerBody.WarpToPositionRotation(_playerSpawnPoint.transform.position, _playerSpawnPoint.transform.rotation);
|
||||
playerBody.SetVelocity(_playerSpawnPoint.GetPointVelocity());
|
||||
_playerSpawnPoint.AddObjectToTriggerVolumes(Locator.GetPlayerDetector().gameObject);
|
||||
_playerSpawnPoint.AddObjectToTriggerVolumes(_fluidDetector.gameObject);
|
||||
_playerSpawnPoint.OnSpawnPlayer();
|
||||
|
||||
_playerResources._isSuffocating = false;
|
||||
_playerResources.DebugRefillResources();
|
||||
// death by oxygen turns this off, so we gotta enable it again
|
||||
Delay.RunNextFrame(() => _playerResources.enabled = true);
|
||||
private void ResetSuitState()
|
||||
{
|
||||
_spaceSuit.RemoveSuit(true);
|
||||
|
||||
foreach (var pickupVolume in _suitPickupVolumes)
|
||||
@ -235,8 +229,42 @@ public class RespawnOnDeath : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QSBPlayerManager.LocalPlayer.LocalFlashlight.TurnOff(false);
|
||||
private void ResetCloak()
|
||||
{
|
||||
var cloak = Locator.GetCloakFieldController();
|
||||
cloak._playerInsideCloak = false;
|
||||
cloak._playerCloakFactor = 0f;
|
||||
cloak._worldFadeFactor = 0f;
|
||||
cloak._interiorRevealFactor = 0f;
|
||||
cloak._rendererFade = 1;
|
||||
cloak.OnPlayerExit.Invoke();
|
||||
GlobalMessenger.FireEvent("ExitCloak");
|
||||
}
|
||||
|
||||
private void ResetPlayerComponents()
|
||||
{
|
||||
var sectorList = PlayerTransformSync.LocalInstance.SectorDetector.SectorList;
|
||||
if (sectorList.All(x => x.Type != Sector.Name.TimberHearth))
|
||||
{
|
||||
// stops sectors from breaking when you die on TH??
|
||||
Locator.GetPlayerSectorDetector().RemoveFromAllSectors();
|
||||
Locator.GetPlayerCameraDetector().GetComponent<AudioDetector>().DeactivateAllVolumes(0f);
|
||||
}
|
||||
|
||||
PlayerState._isDead = false;
|
||||
Locator.GetPlayerController().OnPlayerResurrection();
|
||||
QSBWorldSync.GetUnityObject<PlayerBreathingAudio>().enabled = true;
|
||||
Locator.GetPlayerCamera().GetComponent<PlayerCameraEffectController>().OnPlayerResurrection();
|
||||
Locator.GetPlayerAudioController().OnPlayerResurrection();
|
||||
Locator.GetDeathManager()._isDying = false;
|
||||
|
||||
var visorEffect = QSBWorldSync.GetUnityObject<VisorEffectController>();
|
||||
visorEffect._cracked = false;
|
||||
visorEffect._crackStartTime = 0f;
|
||||
visorEffect._crackEffectRenderer.enabled = false;
|
||||
visorEffect._crackEffectRenderer.material.SetFloat(visorEffect._propID_Cutoff, 1f);
|
||||
}
|
||||
|
||||
private SpawnPoint GetSpawnPoint()
|
||||
|
@ -21,6 +21,11 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<UnityDllsDir Condition="Exists('$(UnityAssetsDir)')">$(UnityAssetsDir)\Dlls</UnityDllsDir>
|
||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||
<Title>Quantum Space Buddies</Title>
|
||||
<Authors>Henry Pointer, William Corby, Aleksander Waage, Ricardo Lopes</Authors>
|
||||
<Copyright>Copyright © Henry Pointer, William Corby, Aleksander Waage, Ricardo Lopes 2020-2023</Copyright>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
</PropertyGroup>
|
||||
<Target Name="copy dlls to unity" AfterTargets="PostBuildEvent" Condition="Exists('$(UnityDllsDir)')">
|
||||
<ItemGroup>
|
||||
@ -32,6 +37,14 @@
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="..\LICENSE">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>\</PackagePath>
|
||||
</None>
|
||||
<None Include="..\README.md">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath>\</PackagePath>
|
||||
</None>
|
||||
<None Include="default-config.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
@ -20,7 +20,7 @@ using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
/*
|
||||
Copyright (C) 2020 - 2022
|
||||
Copyright (C) 2020 - 2023
|
||||
Henry Pointer (_nebula / misternebula),
|
||||
Will Corby (JohnCorby),
|
||||
Aleksander Waage (AmazingAlek),
|
||||
|
Loading…
x
Reference in New Issue
Block a user