From fee41f562d490c2aaa37a55e356024598aec8bd7 Mon Sep 17 00:00:00 2001 From: _nebula <41904486+misternebula@users.noreply.github.com> Date: Sat, 4 May 2024 23:09:28 +0100 Subject: [PATCH 01/10] fix using base game static field instead of custom --- .../Ghosts/Actions/QSBIdentifyIntruderAction.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/QSB/EchoesOfTheEye/Ghosts/Actions/QSBIdentifyIntruderAction.cs b/QSB/EchoesOfTheEye/Ghosts/Actions/QSBIdentifyIntruderAction.cs index 1934de9ec..5d40f2e69 100644 --- a/QSB/EchoesOfTheEye/Ghosts/Actions/QSBIdentifyIntruderAction.cs +++ b/QSB/EchoesOfTheEye/Ghosts/Actions/QSBIdentifyIntruderAction.cs @@ -260,7 +260,7 @@ public override void OnArriveAtPosition() { _controller.SetLanternConcealed(false, true); _controller.ChangeLanternFocus(1f, 2f); - _controller.FaceNodeList(IdentifyIntruderAction.s_nodesToSpotlight, num, TurnSpeed.MEDIUM, 1f, false); + _controller.FaceNodeList(s_nodesToSpotlight, num, TurnSpeed.MEDIUM, 1f, false); return; } } @@ -291,9 +291,9 @@ private int GenerateSpotlightList(GhostNode node, Vector3 ignoreDirection) { if (Vector3.Angle(node.neighbors[i].localPosition - localPosition, ignoreDirection) >= 45f) { - IdentifyIntruderAction.s_nodesToSpotlight[num] = node.neighbors[i]; + s_nodesToSpotlight[num] = node.neighbors[i]; num++; - if (num == IdentifyIntruderAction.s_nodesToSpotlight.Length) + if (num == s_nodesToSpotlight.Length) { break; } From 08b4792f605a9b03469da0454e217ca4cb1d398d Mon Sep 17 00:00:00 2001 From: _nebula <41904486+misternebula@users.noreply.github.com> Date: Sat, 4 May 2024 23:09:39 +0100 Subject: [PATCH 02/10] AAAAAAAAAAAAAAAAAAAAAAAAAAA --- QSB/EchoesOfTheEye/Ghosts/Patches/GhostHotelDirectorPatches.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/QSB/EchoesOfTheEye/Ghosts/Patches/GhostHotelDirectorPatches.cs b/QSB/EchoesOfTheEye/Ghosts/Patches/GhostHotelDirectorPatches.cs index c011964b5..051bc5712 100644 --- a/QSB/EchoesOfTheEye/Ghosts/Patches/GhostHotelDirectorPatches.cs +++ b/QSB/EchoesOfTheEye/Ghosts/Patches/GhostHotelDirectorPatches.cs @@ -41,6 +41,7 @@ public static bool OnDestroy(GhostHotelDirector __instance) /* * I have no idea why, but for some reason unknown to the damned souls that walk this mortal plane, * this method only runs when this patch is here. What the absolute fuck. + * Update - This is still needed. Run while you still can. */ [HarmonyPrefix] From 5b1437763707249abdd3a6d5a75a77f24f6f1e97 Mon Sep 17 00:00:00 2001 From: _nebula <41904486+misternebula@users.noreply.github.com> Date: Sat, 4 May 2024 23:15:07 +0100 Subject: [PATCH 03/10] lol its 2024 --- QSB/QSB.csproj | 2 +- QSB/QSBCore.cs | 2 +- QSBPatcher/QSBPatcher.csproj | 2 +- README.md | 2 +- SteamRerouter/SteamRerouter.csproj | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/QSB/QSB.csproj b/QSB/QSB.csproj index 5be7bf64f..c2fa55a6a 100644 --- a/QSB/QSB.csproj +++ b/QSB/QSB.csproj @@ -6,7 +6,7 @@ Multiplayer mod for Outer Wilds Henry Pointer, William Corby, Aleksander Waage, Ricardo Lopes Henry Pointer, William Corby, Aleksander Waage, Ricardo Lopes - Copyright © Henry Pointer, William Corby, Aleksander Waage, Ricardo Lopes 2020-2023 + Copyright © Henry Pointer, William Corby, Aleksander Waage, Ricardo Lopes 2020-2024 LICENSE README.md $(OwmlDir)\Mods\Raicuparta.QuantumSpaceBuddies diff --git a/QSB/QSBCore.cs b/QSB/QSBCore.cs index 289ef88b5..d56dfc40d 100644 --- a/QSB/QSBCore.cs +++ b/QSB/QSBCore.cs @@ -28,7 +28,7 @@ using QSB.Utility.Deterministic; /* - Copyright (C) 2020 - 2023 + Copyright (C) 2020 - 2024 Henry Pointer (_nebula / misternebula), Will Corby (JohnCorby), Aleksander Waage (AmazingAlek), diff --git a/QSBPatcher/QSBPatcher.csproj b/QSBPatcher/QSBPatcher.csproj index 7b6830bd5..bd73382a6 100644 --- a/QSBPatcher/QSBPatcher.csproj +++ b/QSBPatcher/QSBPatcher.csproj @@ -7,6 +7,6 @@ Copies steamworks into the game for non-steam vendors William Corby, Henry Pointer William Corby, Henry Pointer - Copyright © William Corby, Henry Pointer 2022-2023 + Copyright © William Corby, Henry Pointer 2022-2024 diff --git a/README.md b/README.md index e1b2239a3..ab9f8eb8e 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ See [DEVELOPMENT.md](DEVELOPMENT.md) ## License and legal stuff -Copyright (C) 2020 - 2023 : +Copyright (C) 2020 - 2024 : - Henry Pointer (_nebula or misternebula) - Will Corby (JohnCorby) - Aleksander Waage (AmazingAlek) diff --git a/SteamRerouter/SteamRerouter.csproj b/SteamRerouter/SteamRerouter.csproj index f447e88cc..97ce5beae 100644 --- a/SteamRerouter/SteamRerouter.csproj +++ b/SteamRerouter/SteamRerouter.csproj @@ -7,7 +7,7 @@ Handles game steam interaction, since qsb uses its own app id William Corby, Henry Pointer William Corby, Henry Pointer - Copyright © William Corby, Henry Pointer 2022-2023 + Copyright © William Corby, Henry Pointer 2022-2024 LICENSE From ada70a41de4bca7636c505d0912e1c40355df814 Mon Sep 17 00:00:00 2001 From: _nebula <41904486+misternebula@users.noreply.github.com> Date: Sun, 5 May 2024 14:15:57 +0100 Subject: [PATCH 04/10] add IsHost to debug gui --- QSB/Utility/DebugGUI.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/QSB/Utility/DebugGUI.cs b/QSB/Utility/DebugGUI.cs index 4fc4b60c0..d3f983bb7 100644 --- a/QSB/Utility/DebugGUI.cs +++ b/QSB/Utility/DebugGUI.cs @@ -108,6 +108,7 @@ private static void DrawGui() return; } + WriteLine(1, $"IsHost : {QSBCore.IsHost}"); WriteLine(1, $"HasWokenUp : {QSBWorldSync.AllObjectsReady}"); if (WakeUpSync.LocalInstance != null) { From 4c93a5f3cde38cc80792323e9e75ad2c4c126c12 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Sun, 5 May 2024 11:51:47 -0700 Subject: [PATCH 05/10] there is no other installation other than the good one --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index ab9f8eb8e..d89c10c1a 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,6 @@ Spoilers within! ## Installation -### Easy installation (recommended) - - [Install the Outer Wilds Mod Manager](https://outerwildsmods.com/mod-manager/) - Install Quantum Space Buddies from the mod list displayed in the application From 2abd7fac6d982bb0706f890c0ea1328716b80eee Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Sun, 5 May 2024 12:05:57 -0700 Subject: [PATCH 06/10] fix actions --- .github/workflows/build.yaml | 2 +- .github/workflows/release.yml | 10 +++------- QSB-NH/QSB-NH.csproj | 23 +++++++++++++++++++++++ QSB/QSB.csproj | 20 -------------------- 4 files changed, 27 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1fa379e14..8082e4b24 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,4 +19,4 @@ jobs: - uses: actions/upload-artifact@v2 with: name: Raicuparta.QuantumSpaceBuddies - path: .\QSB\Bin\Debug \ No newline at end of file + path: .\QSB-NH\Bin\Debug \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6126719ce..f78ea41c6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,6 @@ permissions: env: PROJ_USERNAME: Raicuparta PROJ_NAME: QuantumSpaceBuddies - REAL_PROJ_NAME: QSB jobs: pre_job: @@ -34,7 +33,7 @@ jobs: - name: Read Manifest id: read-manifest - run: echo "manifest=$(< ./${{ env.REAL_PROJ_NAME }}/manifest.json sed ':a;N;$!ba;s/\n/ /g')" >> $GITHUB_OUTPUT + run: echo "manifest=$(< ./QSB/manifest.json sed ':a;N;$!ba;s/\n/ /g')" >> $GITHUB_OUTPUT - name: Check For Release id: check-tag @@ -63,9 +62,6 @@ jobs: - name: Setup .NET uses: "actions/setup-dotnet@v3" - - name: Remove .csproj.user - run: if (Test-Path ${{ env.REAL_PROJ_NAME }}/${{ env.REAL_PROJ_NAME }}.csproj.user) { rm ${{ env.REAL_PROJ_NAME }}/${{ env.REAL_PROJ_NAME }}.csproj.user } - - name: Build Mod run: dotnet build -c Release @@ -73,10 +69,10 @@ jobs: uses: "actions/upload-artifact@v3" with: name: "${{ env.PROJ_USERNAME }}.${{ env.PROJ_NAME }}" - path: "${{ env.REAL_PROJ_NAME }}/bin/Release" + path: "QSB-NH/bin/Release" - name: Zip For Release - run: 7z a ${{ env.PROJ_USERNAME }}.${{ env.PROJ_NAME }}.zip ./${{ env.REAL_PROJ_NAME }}/bin/Release/** + run: 7z a ${{ env.PROJ_USERNAME }}.${{ env.PROJ_NAME }}.zip ./QSB-NH/bin/Release/** - name: Create Release uses: "ncipollo/release-action@v1" diff --git a/QSB-NH/QSB-NH.csproj b/QSB-NH/QSB-NH.csproj index 3bd1280b8..d0c21d234 100644 --- a/QSB-NH/QSB-NH.csproj +++ b/QSB-NH/QSB-NH.csproj @@ -29,4 +29,27 @@ + + + + + + <_Files Remove="@(_Files)" /> + <_Files Include="$(OutputPath)\*.exe.config" /> + + + + + + $(UnityAssetsDir)\Dlls + + + + <_Files Remove="@(_Files)" /> + <_Files Include="$(OutputPath)/*.dll" /> + <_Files Include="$(OutputPath)/*.exe" /> + + + + diff --git a/QSB/QSB.csproj b/QSB/QSB.csproj index c2fa55a6a..442ae014f 100644 --- a/QSB/QSB.csproj +++ b/QSB/QSB.csproj @@ -13,30 +13,10 @@ CS1998;CS0649 - - - <_Files Remove="@(_Files)" /> - <_Files Include="$(OutputPath)\*.exe.config" /> - - - - - - $(UnityAssetsDir)\Dlls - - - - <_Files Remove="@(_Files)" /> - <_Files Include="$(OutputPath)/*.dll" /> - <_Files Include="$(OutputPath)/*.exe" /> - - - - True From 9cf92937f203670cb59668ee1c1caa969cb8a492 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Sun, 5 May 2024 12:08:28 -0700 Subject: [PATCH 07/10] weave qsb nh too --- QSB-NH/QSB-NH.csproj | 47 ++++++++++++++++++++++---------------------- QSB/QSB.csproj | 20 +++++++++++++++++++ 2 files changed, 44 insertions(+), 23 deletions(-) diff --git a/QSB-NH/QSB-NH.csproj b/QSB-NH/QSB-NH.csproj index d0c21d234..c2dd06b79 100644 --- a/QSB-NH/QSB-NH.csproj +++ b/QSB-NH/QSB-NH.csproj @@ -8,6 +8,30 @@ CS1998;CS0649 + + + <_Files Remove="@(_Files)" /> + <_Files Include="$(OutputPath)\*.exe.config" /> + + + + + + + + + + $(UnityAssetsDir)\Dlls + + + + <_Files Remove="@(_Files)" /> + <_Files Include="$(OutputPath)/*.dll" /> + <_Files Include="$(OutputPath)/*.exe" /> + + + + @@ -29,27 +53,4 @@ - - - - - - <_Files Remove="@(_Files)" /> - <_Files Include="$(OutputPath)\*.exe.config" /> - - - - - - $(UnityAssetsDir)\Dlls - - - - <_Files Remove="@(_Files)" /> - <_Files Include="$(OutputPath)/*.dll" /> - <_Files Include="$(OutputPath)/*.exe" /> - - - - diff --git a/QSB/QSB.csproj b/QSB/QSB.csproj index 442ae014f..c2fa55a6a 100644 --- a/QSB/QSB.csproj +++ b/QSB/QSB.csproj @@ -13,10 +13,30 @@ CS1998;CS0649 + + + <_Files Remove="@(_Files)" /> + <_Files Include="$(OutputPath)\*.exe.config" /> + + + + + + $(UnityAssetsDir)\Dlls + + + + <_Files Remove="@(_Files)" /> + <_Files Include="$(OutputPath)/*.dll" /> + <_Files Include="$(OutputPath)/*.exe" /> + + + + True From 7aba6bb2a86bf853ccd66b8ee652a0b1676d4bb9 Mon Sep 17 00:00:00 2001 From: _nebula <41904486+misternebula@users.noreply.github.com> Date: Sun, 5 May 2024 20:19:10 +0100 Subject: [PATCH 08/10] Fix #671 --- QSB/Menus/MenuManager.cs | 15 +++++++++++++-- QSB/QSBCore.cs | 2 +- QSB/TimeSync/WakeUpSync.cs | 17 +++++++++++++---- QSB/Utility/DebugGUI.cs | 3 ++- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/QSB/Menus/MenuManager.cs b/QSB/Menus/MenuManager.cs index bdee8f690..ee3f26dcc 100644 --- a/QSB/Menus/MenuManager.cs +++ b/QSB/Menus/MenuManager.cs @@ -50,6 +50,8 @@ public class MenuManager : MonoBehaviour, IAddComponentOnStart private GameObject _choicePopupPrefab; + public bool WillBeHost; + public void Start() { Instance = this; @@ -606,6 +608,7 @@ private void PreHost() private void Host(bool newMultiplayerSave) { QSBCore.IsInMultiplayer = true; + WillBeHost = true; if (newMultiplayerSave) { @@ -648,7 +651,11 @@ private void Host(bool newMultiplayerSave) LoadGame(PlayerData.GetWarpedToTheEye()); // wait until scene load and then wait until Start has ran // why is this done? GameStateMessage etc works on title screen since nonhost has to deal with that - Delay.RunWhen(() => TimeLoop._initialized, QSBNetworkManager.singleton.StartHost); + Delay.RunWhen(() => TimeLoop._initialized, () => + { + QSBNetworkManager.singleton.StartHost(); + Delay.RunWhen(() => NetworkServer.active, () => WillBeHost = false); + }); }; OpenInfoPopup(string.Format(QSBLocalization.Current.CopySteamIDToClipboard, steamId) @@ -660,7 +667,11 @@ private void Host(bool newMultiplayerSave) LoadGame(PlayerData.GetWarpedToTheEye()); // wait until scene load and then wait until Start has ran // why is this done? GameStateMessage etc works on title screen since nonhost has to deal with that - Delay.RunWhen(() => TimeLoop._initialized, QSBNetworkManager.singleton.StartHost); + Delay.RunWhen(() => TimeLoop._initialized, () => + { + QSBNetworkManager.singleton.StartHost(); + Delay.RunWhen(() => NetworkServer.active, () => WillBeHost = false); + }); } } diff --git a/QSB/QSBCore.cs b/QSB/QSBCore.cs index d56dfc40d..4e2b3fba7 100644 --- a/QSB/QSBCore.cs +++ b/QSB/QSBCore.cs @@ -58,7 +58,7 @@ public class QSBCore : ModBehaviour public static AssetBundle NetworkAssetBundle { get; private set; } public static AssetBundle ConversationAssetBundle { get; private set; } public static AssetBundle HUDAssetBundle { get; private set; } - public static bool IsHost => NetworkServer.active; + public static bool IsHost => NetworkServer.active || (IsInMultiplayer && MenuManager.Instance.WillBeHost); public static bool IsInMultiplayer; public static string QSBVersion => Helper.Manifest.Version; public static string GameVersion => diff --git a/QSB/TimeSync/WakeUpSync.cs b/QSB/TimeSync/WakeUpSync.cs index 9b1c4442b..a04af3564 100644 --- a/QSB/TimeSync/WakeUpSync.cs +++ b/QSB/TimeSync/WakeUpSync.cs @@ -66,6 +66,11 @@ public void Start() public float GetTimeDifference() { + if (QSBCore.IsHost) + { + return 0f; + } + var myTime = Time.timeSinceLevelLoad; return myTime - _serverTime; } @@ -114,6 +119,7 @@ private void Init() CurrentState = State.Loaded; if (QSBCore.IsHost) { + _serverTime = Time.timeSinceLevelLoad; SendServerTime(); } else @@ -160,8 +166,7 @@ private void WakeUpOrSleep() return; } - var myTime = Time.timeSinceLevelLoad; - var diff = myTime - _serverTime; + var diff = GetTimeDifference(); if (ServerStateManager.Instance.GetServerState() is not (ServerState.InSolarSystem or ServerState.InEye)) { @@ -188,6 +193,12 @@ private void WakeUpOrSleep() private void StartFastForwarding(FastForwardReason reason) { + if (QSBCore.IsHost) + { + DebugLog.ToConsole($"Tried to fast-forward as server??? What???? _serverTime = {_serverTime}, GetTimeDifference() = {GetTimeDifference()}", MessageType.Error); + return; + } + if (CurrentState == State.FastForwarding) { TimeSyncUI.TargetTime = _serverTime; @@ -276,13 +287,11 @@ private void UpdateServer() if (ServerStateManager.Instance == null) { - DebugLog.ToConsole($"Warning - ServerStateManager.Instance is null!", MessageType.Warning); return; } if (QSBPlayerManager.LocalPlayer == null) { - DebugLog.ToConsole($"Warning - LocalPlayer is null!", MessageType.Warning); return; } diff --git a/QSB/Utility/DebugGUI.cs b/QSB/Utility/DebugGUI.cs index d3f983bb7..23320abfa 100644 --- a/QSB/Utility/DebugGUI.cs +++ b/QSB/Utility/DebugGUI.cs @@ -11,6 +11,7 @@ using QSB.WorldSync; using System; using System.Linq; +using QSB.Menus; using UnityEngine; namespace QSB.Utility; @@ -108,7 +109,7 @@ private static void DrawGui() return; } - WriteLine(1, $"IsHost : {QSBCore.IsHost}"); + WriteLine(1, $"IsHost : {QSBCore.IsHost} (WillBeHost : {(MenuManager.Instance != null ? MenuManager.Instance.WillBeHost : "MenuManager null")})"); WriteLine(1, $"HasWokenUp : {QSBWorldSync.AllObjectsReady}"); if (WakeUpSync.LocalInstance != null) { From 75f20b864fa6a3e929f3ed3a271390bf28479d81 Mon Sep 17 00:00:00 2001 From: Yan Dekov Date: Wed, 8 May 2024 00:03:49 +0700 Subject: [PATCH 09/10] fixed syntax error --- QSB/Translations/ru.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/QSB/Translations/ru.json b/QSB/Translations/ru.json index f11ee8532..1898bb6d3 100644 --- a/QSB/Translations/ru.json +++ b/QSB/Translations/ru.json @@ -39,9 +39,9 @@ "TimeSyncWaitForAllToDie": "Ожидание конца цикла...", "GalaxyMapEveryoneNotPresent": "Ещё не время. Все должны быть здесь, чтобы начать.", "YouAreDead": "Вы погибли.", - "WaitingForRespawn": "Ожидание, пока кто-нибудь возрадит вас...", + "WaitingForRespawn": "Ожидание, пока кто-нибудь возродит вас...", "WaitingForAllToDie": "Ожидание смерти {0} игрока(ов)...", - "AttachToShip": "Зацепиться на корабль", + "AttachToShip": "Зацепиться за корабль", "DetachFromShip": "Отцепиться от корабля", "DeathMessages": { "Default": [ From 5f1f1b25aed837b60624eaca7435cfa2e35d7948 Mon Sep 17 00:00:00 2001 From: _nebula <41904486+misternebula@users.noreply.github.com> Date: Tue, 11 Jun 2024 08:10:39 +0100 Subject: [PATCH 10/10] update manifest + packages --- QSB/QSB.csproj | 4 ++-- QSB/manifest.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/QSB/QSB.csproj b/QSB/QSB.csproj index c2fa55a6a..fab304576 100644 --- a/QSB/QSB.csproj +++ b/QSB/QSB.csproj @@ -74,8 +74,8 @@ - - + + diff --git a/QSB/manifest.json b/QSB/manifest.json index 7211c7371..ec6c058f2 100644 --- a/QSB/manifest.json +++ b/QSB/manifest.json @@ -4,8 +4,8 @@ "author": "Nebula, John, Alek, & Rai", "name": "Quantum Space Buddies", "uniqueName": "Raicuparta.QuantumSpaceBuddies", - "version": "1.1.1", - "owmlVersion": "2.11.1", + "version": "1.2.0", + "owmlVersion": "2.13.0", "dependencies": [ "_nebula.MenuFramework", "JohnCorby.VanillaFix" ], "pathsToPreserve": [ "debugsettings.json" ], "conflicts": [