Skip to content

Commit b2e55d6

Browse files
authored
Merge pull request #688 from qsb-dev/dev
1.2.0
2 parents 875d744 + 5f1f1b2 commit b2e55d6

File tree

15 files changed

+72
-31
lines changed

15 files changed

+72
-31
lines changed

.github/workflows/build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ jobs:
1919
- uses: actions/upload-artifact@v2
2020
with:
2121
name: Raicuparta.QuantumSpaceBuddies
22-
path: .\QSB\Bin\Debug
22+
path: .\QSB-NH\Bin\Debug

.github/workflows/release.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ permissions:
1616
env:
1717
PROJ_USERNAME: Raicuparta
1818
PROJ_NAME: QuantumSpaceBuddies
19-
REAL_PROJ_NAME: QSB
2019

2120
jobs:
2221
pre_job:
@@ -34,7 +33,7 @@ jobs:
3433

3534
- name: Read Manifest
3635
id: read-manifest
37-
run: echo "manifest=$(< ./${{ env.REAL_PROJ_NAME }}/manifest.json sed ':a;N;$!ba;s/\n/ /g')" >> $GITHUB_OUTPUT
36+
run: echo "manifest=$(< ./QSB/manifest.json sed ':a;N;$!ba;s/\n/ /g')" >> $GITHUB_OUTPUT
3837

3938
- name: Check For Release
4039
id: check-tag
@@ -63,20 +62,17 @@ jobs:
6362
- name: Setup .NET
6463
uses: "actions/setup-dotnet@v3"
6564

66-
- name: Remove .csproj.user
67-
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 }
68-
6965
- name: Build Mod
7066
run: dotnet build -c Release
7167

7268
- name: Upload Artifact
7369
uses: "actions/upload-artifact@v3"
7470
with:
7571
name: "${{ env.PROJ_USERNAME }}.${{ env.PROJ_NAME }}"
76-
path: "${{ env.REAL_PROJ_NAME }}/bin/Release"
72+
path: "QSB-NH/bin/Release"
7773

7874
- name: Zip For Release
79-
run: 7z a ${{ env.PROJ_USERNAME }}.${{ env.PROJ_NAME }}.zip ./${{ env.REAL_PROJ_NAME }}/bin/Release/**
75+
run: 7z a ${{ env.PROJ_USERNAME }}.${{ env.PROJ_NAME }}.zip ./QSB-NH/bin/Release/**
8076

8177
- name: Create Release
8278
uses: "ncipollo/release-action@v1"

QSB-NH/QSB-NH.csproj

+24
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,30 @@
88
<NoWarn>CS1998;CS0649</NoWarn>
99
</PropertyGroup>
1010

11+
<Target Name="clean after building" AfterTargets="PostBuildEvent">
12+
<ItemGroup>
13+
<_Files Remove="@(_Files)" />
14+
<_Files Include="$(OutputPath)\*.exe.config" />
15+
</ItemGroup>
16+
<Delete Files="@(_Files)" />
17+
</Target>
18+
19+
<Target Name="weave qsb nh" AfterTargets="PostBuildEvent">
20+
<Exec Command=".\MirrorWeaver &quot;$(TargetPath)&quot;" WorkingDirectory="..\MirrorWeaver\bin\$(Configuration)\" />
21+
</Target>
22+
23+
<PropertyGroup>
24+
<UnityDllsDir Condition="Exists('$(UnityAssetsDir)')">$(UnityAssetsDir)\Dlls</UnityDllsDir>
25+
</PropertyGroup>
26+
<Target Name="copy dlls to unity" AfterTargets="PostBuildEvent" Condition="Exists('$(UnityDllsDir)')">
27+
<ItemGroup>
28+
<_Files Remove="@(_Files)" />
29+
<_Files Include="$(OutputPath)/*.dll" />
30+
<_Files Include="$(OutputPath)/*.exe" />
31+
</ItemGroup>
32+
<Copy SourceFiles="@(_Files)" DestinationFolder="$(UnityDllsDir)" />
33+
</Target>
34+
1135
<ItemGroup>
1236
<Folder Include="lib\" />
1337
</ItemGroup>

QSB/EchoesOfTheEye/Ghosts/Actions/QSBIdentifyIntruderAction.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ public override void OnArriveAtPosition()
260260
{
261261
_controller.SetLanternConcealed(false, true);
262262
_controller.ChangeLanternFocus(1f, 2f);
263-
_controller.FaceNodeList(IdentifyIntruderAction.s_nodesToSpotlight, num, TurnSpeed.MEDIUM, 1f, false);
263+
_controller.FaceNodeList(s_nodesToSpotlight, num, TurnSpeed.MEDIUM, 1f, false);
264264
return;
265265
}
266266
}
@@ -291,9 +291,9 @@ private int GenerateSpotlightList(GhostNode node, Vector3 ignoreDirection)
291291
{
292292
if (Vector3.Angle(node.neighbors[i].localPosition - localPosition, ignoreDirection) >= 45f)
293293
{
294-
IdentifyIntruderAction.s_nodesToSpotlight[num] = node.neighbors[i];
294+
s_nodesToSpotlight[num] = node.neighbors[i];
295295
num++;
296-
if (num == IdentifyIntruderAction.s_nodesToSpotlight.Length)
296+
if (num == s_nodesToSpotlight.Length)
297297
{
298298
break;
299299
}

QSB/EchoesOfTheEye/Ghosts/Patches/GhostHotelDirectorPatches.cs

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public static bool OnDestroy(GhostHotelDirector __instance)
4141
/*
4242
* I have no idea why, but for some reason unknown to the damned souls that walk this mortal plane,
4343
* this method only runs when this patch is here. What the absolute fuck.
44+
* Update - This is still needed. Run while you still can.
4445
*/
4546

4647
[HarmonyPrefix]

QSB/Menus/MenuManager.cs

+13-2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public class MenuManager : MonoBehaviour, IAddComponentOnStart
5050

5151
private GameObject _choicePopupPrefab;
5252

53+
public bool WillBeHost;
54+
5355
public void Start()
5456
{
5557
Instance = this;
@@ -606,6 +608,7 @@ private void PreHost()
606608
private void Host(bool newMultiplayerSave)
607609
{
608610
QSBCore.IsInMultiplayer = true;
611+
WillBeHost = true;
609612

610613
if (newMultiplayerSave)
611614
{
@@ -648,7 +651,11 @@ private void Host(bool newMultiplayerSave)
648651
LoadGame(PlayerData.GetWarpedToTheEye());
649652
// wait until scene load and then wait until Start has ran
650653
// why is this done? GameStateMessage etc works on title screen since nonhost has to deal with that
651-
Delay.RunWhen(() => TimeLoop._initialized, QSBNetworkManager.singleton.StartHost);
654+
Delay.RunWhen(() => TimeLoop._initialized, () =>
655+
{
656+
QSBNetworkManager.singleton.StartHost();
657+
Delay.RunWhen(() => NetworkServer.active, () => WillBeHost = false);
658+
});
652659
};
653660

654661
OpenInfoPopup(string.Format(QSBLocalization.Current.CopySteamIDToClipboard, steamId)
@@ -660,7 +667,11 @@ private void Host(bool newMultiplayerSave)
660667
LoadGame(PlayerData.GetWarpedToTheEye());
661668
// wait until scene load and then wait until Start has ran
662669
// why is this done? GameStateMessage etc works on title screen since nonhost has to deal with that
663-
Delay.RunWhen(() => TimeLoop._initialized, QSBNetworkManager.singleton.StartHost);
670+
Delay.RunWhen(() => TimeLoop._initialized, () =>
671+
{
672+
QSBNetworkManager.singleton.StartHost();
673+
Delay.RunWhen(() => NetworkServer.active, () => WillBeHost = false);
674+
});
664675
}
665676
}
666677

QSB/QSB.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<Description>Multiplayer mod for Outer Wilds</Description>
77
<Authors>Henry Pointer, William Corby, Aleksander Waage, Ricardo Lopes</Authors>
88
<Company>Henry Pointer, William Corby, Aleksander Waage, Ricardo Lopes</Company>
9-
<Copyright>Copyright © Henry Pointer, William Corby, Aleksander Waage, Ricardo Lopes 2020-2023</Copyright>
9+
<Copyright>Copyright © Henry Pointer, William Corby, Aleksander Waage, Ricardo Lopes 2020-2024</Copyright>
1010
<PackageLicenseFile>LICENSE</PackageLicenseFile>
1111
<PackageReadmeFile>README.md</PackageReadmeFile>
1212
<OutputPath Condition="Exists('$(OwmlDir)')">$(OwmlDir)\Mods\Raicuparta.QuantumSpaceBuddies</OutputPath>
@@ -74,8 +74,8 @@
7474
</None>
7575
</ItemGroup>
7676
<ItemGroup>
77-
<PackageReference Include="OuterWildsGameLibs" Version="1.1.14.768" IncludeAssets="compile" />
78-
<PackageReference Include="OWML" Version="2.11.1" IncludeAssets="compile" />
77+
<PackageReference Include="OuterWildsGameLibs" Version="1.1.15.1018" IncludeAssets="compile" />
78+
<PackageReference Include="OWML" Version="2.13.0" IncludeAssets="compile" />
7979
<Reference Include="..\Lib\*.dll" />
8080
<ProjectReference Include="..\FizzySteamworks\FizzySteamworks.csproj" />
8181
<ProjectReference Include="..\SteamRerouter\SteamRerouter.csproj" />

QSB/QSBCore.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
using QSB.Utility.Deterministic;
2929

3030
/*
31-
Copyright (C) 2020 - 2023
31+
Copyright (C) 2020 - 2024
3232
Henry Pointer (_nebula / misternebula),
3333
Will Corby (JohnCorby),
3434
Aleksander Waage (AmazingAlek),
@@ -58,7 +58,7 @@ public class QSBCore : ModBehaviour
5858
public static AssetBundle NetworkAssetBundle { get; private set; }
5959
public static AssetBundle ConversationAssetBundle { get; private set; }
6060
public static AssetBundle HUDAssetBundle { get; private set; }
61-
public static bool IsHost => NetworkServer.active;
61+
public static bool IsHost => NetworkServer.active || (IsInMultiplayer && MenuManager.Instance.WillBeHost);
6262
public static bool IsInMultiplayer;
6363
public static string QSBVersion => Helper.Manifest.Version;
6464
public static string GameVersion =>

QSB/TimeSync/WakeUpSync.cs

+13-4
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ public void Start()
6666

6767
public float GetTimeDifference()
6868
{
69+
if (QSBCore.IsHost)
70+
{
71+
return 0f;
72+
}
73+
6974
var myTime = Time.timeSinceLevelLoad;
7075
return myTime - _serverTime;
7176
}
@@ -114,6 +119,7 @@ private void Init()
114119
CurrentState = State.Loaded;
115120
if (QSBCore.IsHost)
116121
{
122+
_serverTime = Time.timeSinceLevelLoad;
117123
SendServerTime();
118124
}
119125
else
@@ -160,8 +166,7 @@ private void WakeUpOrSleep()
160166
return;
161167
}
162168

163-
var myTime = Time.timeSinceLevelLoad;
164-
var diff = myTime - _serverTime;
169+
var diff = GetTimeDifference();
165170

166171
if (ServerStateManager.Instance.GetServerState() is not (ServerState.InSolarSystem or ServerState.InEye))
167172
{
@@ -188,6 +193,12 @@ private void WakeUpOrSleep()
188193

189194
private void StartFastForwarding(FastForwardReason reason)
190195
{
196+
if (QSBCore.IsHost)
197+
{
198+
DebugLog.ToConsole($"Tried to fast-forward as server??? What???? _serverTime = {_serverTime}, GetTimeDifference() = {GetTimeDifference()}", MessageType.Error);
199+
return;
200+
}
201+
191202
if (CurrentState == State.FastForwarding)
192203
{
193204
TimeSyncUI.TargetTime = _serverTime;
@@ -276,13 +287,11 @@ private void UpdateServer()
276287

277288
if (ServerStateManager.Instance == null)
278289
{
279-
DebugLog.ToConsole($"Warning - ServerStateManager.Instance is null!", MessageType.Warning);
280290
return;
281291
}
282292

283293
if (QSBPlayerManager.LocalPlayer == null)
284294
{
285-
DebugLog.ToConsole($"Warning - LocalPlayer is null!", MessageType.Warning);
286295
return;
287296
}
288297

QSB/Translations/ru.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
"TimeSyncWaitForAllToDie": "Ожидание конца цикла...",
4040
"GalaxyMapEveryoneNotPresent": "Ещё не время. Все должны быть здесь, чтобы начать.",
4141
"YouAreDead": "Вы погибли.",
42-
"WaitingForRespawn": "Ожидание, пока кто-нибудь возрадит вас...",
42+
"WaitingForRespawn": "Ожидание, пока кто-нибудь возродит вас...",
4343
"WaitingForAllToDie": "Ожидание смерти {0} игрока(ов)...",
44-
"AttachToShip": "Зацепиться на корабль",
44+
"AttachToShip": "Зацепиться за корабль",
4545
"DetachFromShip": "Отцепиться от корабля",
4646
"DeathMessages": {
4747
"Default": [

QSB/Utility/DebugGUI.cs

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using QSB.WorldSync;
1212
using System;
1313
using System.Linq;
14+
using QSB.Menus;
1415
using UnityEngine;
1516

1617
namespace QSB.Utility;
@@ -108,6 +109,7 @@ private static void DrawGui()
108109
return;
109110
}
110111

112+
WriteLine(1, $"IsHost : {QSBCore.IsHost} (WillBeHost : {(MenuManager.Instance != null ? MenuManager.Instance.WillBeHost : "MenuManager null")})");
111113
WriteLine(1, $"HasWokenUp : {QSBWorldSync.AllObjectsReady}");
112114
if (WakeUpSync.LocalInstance != null)
113115
{

QSB/manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"author": "Nebula, John, Alek, & Rai",
55
"name": "Quantum Space Buddies",
66
"uniqueName": "Raicuparta.QuantumSpaceBuddies",
7-
"version": "1.1.1",
8-
"owmlVersion": "2.11.1",
7+
"version": "1.2.0",
8+
"owmlVersion": "2.13.0",
99
"dependencies": [ "_nebula.MenuFramework", "JohnCorby.VanillaFix" ],
1010
"pathsToPreserve": [ "debugsettings.json" ],
1111
"conflicts": [

QSBPatcher/QSBPatcher.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
<Description>Copies steamworks into the game for non-steam vendors</Description>
88
<Authors>William Corby, Henry Pointer</Authors>
99
<Company>William Corby, Henry Pointer</Company>
10-
<Copyright>Copyright © William Corby, Henry Pointer 2022-2023</Copyright>
10+
<Copyright>Copyright © William Corby, Henry Pointer 2022-2024</Copyright>
1111
</PropertyGroup>
1212
</Project>

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ Spoilers within!
1616

1717
## Installation
1818

19-
### Easy installation (recommended)
20-
2119
- [Install the Outer Wilds Mod Manager](https://outerwildsmods.com/mod-manager/)
2220
- Install Quantum Space Buddies from the mod list displayed in the application
2321

@@ -152,7 +150,7 @@ See [DEVELOPMENT.md](DEVELOPMENT.md)
152150

153151
## License and legal stuff
154152

155-
Copyright (C) 2020 - 2023 :
153+
Copyright (C) 2020 - 2024 :
156154
- Henry Pointer (_nebula or misternebula)
157155
- Will Corby (JohnCorby)
158156
- Aleksander Waage (AmazingAlek)

SteamRerouter/SteamRerouter.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<Description>Handles game steam interaction, since qsb uses its own app id</Description>
88
<Authors>William Corby, Henry Pointer</Authors>
99
<Company>William Corby, Henry Pointer</Company>
10-
<Copyright>Copyright © William Corby, Henry Pointer 2022-2023</Copyright>
10+
<Copyright>Copyright © William Corby, Henry Pointer 2022-2024</Copyright>
1111
<PackageLicenseFile>LICENSE</PackageLicenseFile>
1212
</PropertyGroup>
1313
<ItemGroup>

0 commit comments

Comments
 (0)