Skip to content

Commit

Permalink
Merge pull request #646 from qsb-dev/dev
Browse files Browse the repository at this point in the history
0.31.0
  • Loading branch information
JohnCorby committed Sep 18, 2023
2 parents 59b5e2b + 74e68f5 commit e8e7be7
Show file tree
Hide file tree
Showing 84 changed files with 2,256 additions and 2,299 deletions.
11 changes: 8 additions & 3 deletions APITestMod/APITestMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ public void Start()
qsbAPI.OnPlayerJoin().AddListener((uint playerId) => ModHelper.Console.WriteLine($"{playerId} joined the game!", MessageType.Success));
qsbAPI.OnPlayerLeave().AddListener((uint playerId) => ModHelper.Console.WriteLine($"{playerId} left the game!", MessageType.Success));
qsbAPI.OnChatMessage().AddListener((string message, uint from) => ModHelper.Console.WriteLine($"Chat message \"{message}\" from {from} ({(from == uint.MaxValue ? "QSB" : qsbAPI.GetPlayerName(from))})"));
qsbAPI.RegisterHandler<string>("apitest-string", MessageHandler);
qsbAPI.RegisterHandler<int>("apitest-int", MessageHandler);
qsbAPI.RegisterHandler<float>("apitest-float", MessageHandler);
button.onClick.AddListener(() =>
{
Expand All @@ -42,16 +47,16 @@ public void Start()
ModHelper.Console.WriteLine($"Retreiving custom data : {qsbAPI.GetCustomData<string>(qsbAPI.GetLocalPlayerID(), "APITEST.TESTSTRING")}");
ModHelper.Console.WriteLine("Sending string message test...");
qsbAPI.RegisterHandler<string>("apitest-string", MessageHandler);
qsbAPI.SendMessage("apitest-string", "STRING MESSAGE", receiveLocally: true);
ModHelper.Console.WriteLine("Sending int message test...");
qsbAPI.RegisterHandler<int>("apitest-int", MessageHandler);
qsbAPI.SendMessage("apitest-int", 123, receiveLocally: true);
ModHelper.Console.WriteLine("Sending float message test...");
qsbAPI.RegisterHandler<float>("apitest-float", MessageHandler);
qsbAPI.SendMessage("apitest-float", 3.14f, receiveLocally: true);
qsbAPI.SendChatMessage("Non-system chat message", false, Color.white);
qsbAPI.SendChatMessage("System chat message", true, Color.cyan);
});
};
}
Expand Down
2 changes: 1 addition & 1 deletion APITestMod/APITestMod.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<ItemGroup>
<PackageReference Include="OuterWildsGameLibs" Version="1.1.13.457" IncludeAssets="compile" />
<PackageReference Include="OWML" Version="2.9.5" IncludeAssets="compile" />
<PackageReference Include="OWML" Version="2.9.7" IncludeAssets="compile" />
</ItemGroup>

<ItemGroup>
Expand Down
20 changes: 20 additions & 0 deletions APITestMod/IQSBAPI.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using OWML.Common;
using UnityEngine;
using UnityEngine.Events;

public interface IQSBAPI
Expand Down Expand Up @@ -96,4 +97,23 @@ public interface IQSBAPI
void RegisterHandler<T>(string messageType, Action<uint, T> handler);

#endregion

#region Chat

/// <summary>
/// Invoked when a chat message is received.
/// The string is the message body.
/// The uint is the player who sent the message. If it's a system message, this is uint.MaxValue.
/// </summary>
UnityEvent<string, uint> OnChatMessage();

/// <summary>
/// Sends a message in chat.
/// </summary>
/// <param name="message">The text of the message.</param>
/// <param name="systemMessage">If false, the message is sent as if the local player wrote it manually. If true, the message has no player attached to it, like the player join messages.</param>
/// <param name="color">The color of the message.</param>
void SendChatMessage(string message, bool systemMessage, Color color);

#endregion
}
2 changes: 1 addition & 1 deletion APITestMod/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"name": "QSB API Test Mod",
"uniqueName": "_nebula.QSBAPITest",
"version": "1.0.0",
"owmlVersion": "2.9.5",
"owmlVersion": "2.9.7",
"dependencies": [ "Raicuparta.QuantumSpaceBuddies", "_nebula.MenuFramework" ]
}
16 changes: 9 additions & 7 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ We recommend using the Outer Wilds Mod Manager, but you can use OWML on its own
- New Manager : Press the "..." button at the top, and select "Show OWML Folder".
- `QSB.sln` should now be ready to open. ***This solution needs to be opened with Visual Studio 2022 or higher!***

## Steam
## Multiple instances on Steam
If using the Steam version of Outer Wilds, you will need to create a file to allow you to run multiple instances of the game.
- Navigate to your game install folder. You can find this by right-clicking on the game in Steam, and going `Manage > Browse local files`.
- Create a file named `steam_appid.txt`.
- In this file, write `753640` and save.
This file will override some Steam DRM features and allow the game to be ran multiple times at once.
- In this file, write `753640` and save. This file will override some Steam DRM features and allow the game to be ran multiple times at once.
- Either turn on "Force Exe" in the mod manager, or run OuterWilds.exe directly.

## Building
Simply build the solution normally. (`Build > Build Solution` or CTRL-SHIFT-B)
Expand All @@ -48,22 +48,24 @@ Use the API by copying [the API definition](https://github.com/misternebula/quan
## Debugging
### Debug Actions :

Press Q + Numpad Enter to toggle debug mode in game (corresponds with the debug setting "debugMode" in the section below).

Hold Q and press :

- Numpad 1 - Teleport to nearest player.
- Numpad 2 - If holding LeftShift, warp to the dreamworld Vault fire. If not, warp to the Endless Canyon.
- Numpad 2 - If holding LeftShift, warp to the dreamworld Vault fire. If not, warp to the Endless Canyon. If already in dreamworld, pick up lantern.
- Numpad 3 - Unlock the Sealed Vault.
- Numpad 4 - Damage the ship's electrical system.
- Numpad 5 - Trigger the supernova.
- Numpad 6 - Set the flags for having met Solanum and the Prisoner.
- Numpad 7 - Warp to the Vessel.
- Numpad 8 - Insert the Advanced Warp Core into the Vessel.
- Numpad 7 - Warp to the Vessel and insert the warp core.
- Numpad 8 - Spawn a fake player. For Ghostbuster testing.
- Numpad 9 - If holding LeftShift, load the SolarSystem scene. If not, load the EyeOfTheUniverse scene.
- Numpad 0 - Revive a random dead player.

### Debug Settings :

Create a file called `debugsettings.json` in the mod folder.
Create a file called `debugsettings.json` in the QSB folder.
The template for this file is this :

```json
Expand Down
5 changes: 2 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@

<PropertyGroup Label="Common Properties">
<TargetFramework>net48</TargetFramework>
<LangVersion>default</LangVersion>
<LangVersion>latest</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<Company>Henry Pointer, Aleksander Waage, Ricardo Lopes</Company>
<Copyright>Copyright © Henry Pointer, Aleksander Waage, Ricardo Lopes 2020-2021</Copyright>
<NoWarn>MSB3270</NoWarn>
</PropertyGroup>

<PropertyGroup Label="Default Locations" Condition="!Exists('$(DevEnvLoc)')">
Expand Down
120 changes: 0 additions & 120 deletions EpicOnlineTransport/BidirectionalDictionary.cs

This file was deleted.

Loading

0 comments on commit e8e7be7

Please sign in to comment.