mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-04 21:39:49 +00:00
commit
aa6b6705eb
61
APITestMod/APITestMod.cs
Normal file
61
APITestMod/APITestMod.cs
Normal file
@ -0,0 +1,61 @@
|
||||
using OWML.Common;
|
||||
using OWML.ModHelper;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace APITestMod;
|
||||
|
||||
public class APITestMod : ModBehaviour
|
||||
{
|
||||
public void Start()
|
||||
{
|
||||
var qsbAPI = ModHelper.Interaction.TryGetModApi<IQSBAPI>("Raicuparta.QuantumSpaceBuddies");
|
||||
var menuFrameworkAPI = ModHelper.Interaction.TryGetModApi<IMenuAPI>("_nebula.MenuFramework");
|
||||
|
||||
LoadManager.OnCompleteSceneLoad += (oldScene, newScene) =>
|
||||
{
|
||||
if (newScene != OWScene.SolarSystem)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var button = menuFrameworkAPI.PauseMenu_MakeSimpleButton("QSB Api Test");
|
||||
|
||||
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));
|
||||
|
||||
button.onClick.AddListener(() =>
|
||||
{
|
||||
ModHelper.Console.WriteLine("TESTING QSB API!");
|
||||
|
||||
ModHelper.Console.WriteLine($"Local Player ID : {qsbAPI.GetLocalPlayerID()}");
|
||||
|
||||
ModHelper.Console.WriteLine("Player IDs :");
|
||||
|
||||
foreach (var playerID in qsbAPI.GetPlayerIDs())
|
||||
{
|
||||
ModHelper.Console.WriteLine($" - id:{playerID} name:{qsbAPI.GetPlayerName(playerID)}");
|
||||
}
|
||||
|
||||
ModHelper.Console.WriteLine("Setting custom data as \"QSB TEST STRING\"");
|
||||
qsbAPI.SetCustomData(qsbAPI.GetLocalPlayerID(), "APITEST.TESTSTRING", "QSB TEST STRING");
|
||||
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", true);
|
||||
|
||||
ModHelper.Console.WriteLine("Sending int message test...");
|
||||
qsbAPI.RegisterHandler<int>("apitest-int", MessageHandler);
|
||||
qsbAPI.SendMessage("apitest-int", 123, true);
|
||||
|
||||
ModHelper.Console.WriteLine("Sending float message test...");
|
||||
qsbAPI.RegisterHandler<float>("apitest-float", MessageHandler);
|
||||
qsbAPI.SendMessage("apitest-float", 3.14f, true);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
private void MessageHandler<T>(uint from, T data)
|
||||
=> ModHelper.Console.WriteLine($"Got : {data}");
|
||||
}
|
22
APITestMod/APITestMod.csproj
Normal file
22
APITestMod/APITestMod.csproj
Normal file
@ -0,0 +1,22 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net48</TargetFramework>
|
||||
<RootNamespace>APITestMod</RootNamespace>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<OutputPath Condition="Exists('$(OwmlDir)')">$(OwmlDir)\Mods\_nebula.QSBAPITest</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="OuterWildsGameLibs" Version="1.1.13.457" IncludeAssets="compile" />
|
||||
<PackageReference Include="OWML" Version="2.9.5" IncludeAssets="compile" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="manifest.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
23
APITestMod/IMenuAPI.cs
Normal file
23
APITestMod/IMenuAPI.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace APITestMod;
|
||||
|
||||
public interface IMenuAPI
|
||||
{
|
||||
// Title screen
|
||||
GameObject TitleScreen_MakeMenuOpenButton(string name, int index, Menu menuToOpen);
|
||||
GameObject TitleScreen_MakeSceneLoadButton(string name, int index, SubmitActionLoadScene.LoadableScenes sceneToLoad, PopupMenu confirmPopup = null);
|
||||
Button TitleScreen_MakeSimpleButton(string name, int index);
|
||||
// Pause menu
|
||||
GameObject PauseMenu_MakeMenuOpenButton(string name, Menu menuToOpen, Menu customMenu = null);
|
||||
GameObject PauseMenu_MakeSceneLoadButton(string name, SubmitActionLoadScene.LoadableScenes sceneToLoad, PopupMenu confirmPopup = null, Menu customMenu = null);
|
||||
Button PauseMenu_MakeSimpleButton(string name, Menu customMenu = null);
|
||||
Menu PauseMenu_MakePauseListMenu(string title);
|
||||
// Misc
|
||||
PopupMenu MakeTwoChoicePopup(string message, string confirmText, string cancelText);
|
||||
PopupInputMenu MakeInputFieldPopup(string message, string placeholderMessage, string confirmText, string cancelText);
|
||||
PopupMenu MakeInfoPopup(string message, string continueButtonText);
|
||||
// Startup Popups
|
||||
void RegisterStartupPopup(string message);
|
||||
}
|
71
APITestMod/IQSBAPI.cs
Normal file
71
APITestMod/IQSBAPI.cs
Normal file
@ -0,0 +1,71 @@
|
||||
using OWML.Common;
|
||||
using UnityEngine.Events;
|
||||
|
||||
public interface IQSBAPI
|
||||
{
|
||||
/// <summary>
|
||||
/// If called, all players connected to YOUR hosted game must have this mod installed.
|
||||
/// </summary>
|
||||
void RegisterRequiredForAllPlayers(IModBehaviour mod);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the player ID of the current player.
|
||||
/// </summary>
|
||||
uint GetLocalPlayerID();
|
||||
|
||||
/// <summary>
|
||||
/// Returns the name of a given player.
|
||||
/// </summary>
|
||||
/// <param name="playerID">The ID of the player you want the name of.</param>
|
||||
string GetPlayerName(uint playerID);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the list of IDs of all connected players.
|
||||
/// </summary>
|
||||
uint[] GetPlayerIDs();
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when a player joins the game.
|
||||
/// </summary>
|
||||
UnityEvent<uint> OnPlayerJoin();
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when a player leaves the game.
|
||||
/// </summary>
|
||||
UnityEvent<uint> OnPlayerLeave();
|
||||
|
||||
/// <summary>
|
||||
/// Sets some arbitrary data for a given player.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the data.</typeparam>
|
||||
/// <param name="playerId">The ID of the player.</param>
|
||||
/// <param name="key">The unique key to access this data by.</param>
|
||||
/// <param name="data">The data to set.</param>
|
||||
void SetCustomData<T>(uint playerId, string key, T data);
|
||||
|
||||
/// <summary>
|
||||
/// Returns some arbitrary data from a given player.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the data.</typeparam>
|
||||
/// <param name="playerId">The ID of the player.</param>
|
||||
/// <param name="key">The unique key of the data you want to access.</param>
|
||||
/// <returns>The data requested. If key is not valid, returns default.</returns>
|
||||
T GetCustomData<T>(uint playerId, string key);
|
||||
|
||||
/// <summary>
|
||||
/// Sends a message containing arbitrary data to every player.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the data being sent. This type must be serializable.</typeparam>
|
||||
/// <param name="messageType">The unique key of the message.</param>
|
||||
/// <param name="data">The data to send.</param>
|
||||
/// <param name="receiveLocally">If true, the action given to <see cref="RegisterHandler{T}"/> will also be called on the same client that is sending the message.</param>
|
||||
void SendMessage<T>(string messageType, T data, bool receiveLocally = false);
|
||||
|
||||
/// <summary>
|
||||
/// Registers an action to be called when a message is received.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the data in the message.</typeparam>
|
||||
/// <param name="messageType">The unique key of the message.</param>
|
||||
/// <param name="handler">The action to be ran when the message is received. The uint is the player ID that sent the messsage.</param>
|
||||
void RegisterHandler<T>(string messageType, Action<uint, T> handler);
|
||||
}
|
9
APITestMod/manifest.json
Normal file
9
APITestMod/manifest.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"filename": "APITestMod.dll",
|
||||
"author": "_nebula",
|
||||
"name": "QSB API Test Mod",
|
||||
"uniqueName": "_nebula.QSBAPITest",
|
||||
"version": "1.0.0",
|
||||
"owmlVersion": "2.9.5",
|
||||
"dependencies": [ "Raicuparta.QuantumSpaceBuddies", "_nebula.MenuFramework" ]
|
||||
}
|
@ -15,6 +15,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="OuterWildsGameLibs" Version="1.1.13.457" IncludeAssets="compile" />
|
||||
<PackageReference Include="OWML" Version="2.9.3" IncludeAssets="compile" />
|
||||
<PackageReference Include="OWML" Version="2.9.5" IncludeAssets="compile" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@ -9,7 +9,7 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="OuterWildsGameLibs" Version="1.1.13.457" />
|
||||
<PackageReference Include="OWML" Version="2.9.3" />
|
||||
<PackageReference Include="OWML" Version="2.9.5" />
|
||||
<Reference Include="../Mirror/*.dll" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
6
QSB.sln
6
QSB.sln
@ -20,6 +20,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EpicOnlineTransport", "Epic
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EpicRerouter", "EpicRerouter\EpicRerouter.csproj", "{639EFAEE-C4A1-4DA2-8457-D0472A9F6343}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "APITestMod", "APITestMod\APITestMod.csproj", "{0A10143E-6C00-409B-B3A5-C54C1B01599D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -42,6 +44,10 @@ Global
|
||||
{639EFAEE-C4A1-4DA2-8457-D0472A9F6343}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{639EFAEE-C4A1-4DA2-8457-D0472A9F6343}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{639EFAEE-C4A1-4DA2-8457-D0472A9F6343}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0A10143E-6C00-409B-B3A5-C54C1B01599D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0A10143E-6C00-409B-B3A5-C54C1B01599D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0A10143E-6C00-409B-B3A5-C54C1B01599D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0A10143E-6C00-409B-B3A5-C54C1B01599D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
27
QSB/API/AddonDataManager.cs
Normal file
27
QSB/API/AddonDataManager.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using QSB.Utility;
|
||||
|
||||
namespace QSB.API;
|
||||
|
||||
public static class AddonDataManager
|
||||
{
|
||||
private static readonly Dictionary<string, Action<uint, object>> _handlers = new();
|
||||
|
||||
public static void OnReceiveDataMessage(string messageType, object data, uint from)
|
||||
{
|
||||
DebugLog.DebugWrite($"Received data message of message type \"{messageType}\" from {from}!");
|
||||
if (!_handlers.TryGetValue(messageType, out var handler))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
handler(from, data);
|
||||
}
|
||||
|
||||
public static void RegisterHandler<T>(string messageType, Action<uint, T> handler)
|
||||
{
|
||||
DebugLog.DebugWrite($"Registering handler for \"{messageType}\" with type of {typeof(T).Name}");
|
||||
_handlers.Add(messageType, (from, data) => handler(from, (T)data));
|
||||
}
|
||||
}
|
72
QSB/API/IQSBAPI.cs
Normal file
72
QSB/API/IQSBAPI.cs
Normal file
@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using OWML.Common;
|
||||
using UnityEngine.Events;
|
||||
|
||||
public interface IQSBAPI
|
||||
{
|
||||
/// <summary>
|
||||
/// If called, all players connected to YOUR hosted game must have this mod installed.
|
||||
/// </summary>
|
||||
void RegisterRequiredForAllPlayers(IModBehaviour mod);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the player ID of the current player.
|
||||
/// </summary>
|
||||
uint GetLocalPlayerID();
|
||||
|
||||
/// <summary>
|
||||
/// Returns the name of a given player.
|
||||
/// </summary>
|
||||
/// <param name="playerID">The ID of the player you want the name of.</param>
|
||||
string GetPlayerName(uint playerID);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the list of IDs of all connected players.
|
||||
/// </summary>
|
||||
uint[] GetPlayerIDs();
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when a player joins the game.
|
||||
/// </summary>
|
||||
UnityEvent<uint> OnPlayerJoin();
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when a player leaves the game.
|
||||
/// </summary>
|
||||
UnityEvent<uint> OnPlayerLeave();
|
||||
|
||||
/// <summary>
|
||||
/// Sets some arbitrary data for a given player.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the data.</typeparam>
|
||||
/// <param name="playerId">The ID of the player.</param>
|
||||
/// <param name="key">The unique key to access this data by.</param>
|
||||
/// <param name="data">The data to set.</param>
|
||||
void SetCustomData<T>(uint playerId, string key, T data);
|
||||
|
||||
/// <summary>
|
||||
/// Returns some arbitrary data from a given player.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the data.</typeparam>
|
||||
/// <param name="playerId">The ID of the player.</param>
|
||||
/// <param name="key">The unique key of the data you want to access.</param>
|
||||
/// <returns>The data requested. If key is not valid, returns default.</returns>
|
||||
T GetCustomData<T>(uint playerId, string key);
|
||||
|
||||
/// <summary>
|
||||
/// Sends a message containing arbitrary data to every player.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the data being sent. This type must be serializable.</typeparam>
|
||||
/// <param name="messageType">The unique key of the message.</param>
|
||||
/// <param name="data">The data to send.</param>
|
||||
/// <param name="receiveLocally">If true, the action given to <see cref="RegisterHandler{T}"/> will also be called on the same client that is sending the message.</param>
|
||||
void SendMessage<T>(string messageType, T data, bool receiveLocally = false);
|
||||
|
||||
/// <summary>
|
||||
/// Registers an action to be called when a message is received.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the data in the message.</typeparam>
|
||||
/// <param name="messageType">The unique key of the message.</param>
|
||||
/// <param name="handler">The action to be ran when the message is received. The uint is the player ID that sent the messsage.</param>
|
||||
void RegisterHandler<T>(string messageType, Action<uint, T> handler);
|
||||
}
|
41
QSB/API/Messages/AddonDataMessage.cs
Normal file
41
QSB/API/Messages/AddonDataMessage.cs
Normal file
@ -0,0 +1,41 @@
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using QSB.Messaging;
|
||||
|
||||
namespace QSB.API.Messages;
|
||||
|
||||
public class AddonDataMessage : QSBMessage<(string messageType, byte[] data, bool receiveLocally)>
|
||||
{
|
||||
public AddonDataMessage(string messageType, object data, bool receiveLocally) : base((messageType, Obj2Bytes(data), receiveLocally)) { }
|
||||
|
||||
private static byte[] Obj2Bytes(object obj)
|
||||
{
|
||||
using var ms = new MemoryStream();
|
||||
var bf = new BinaryFormatter();
|
||||
bf.Serialize(ms, obj);
|
||||
var bytes = ms.ToArray();
|
||||
return bytes;
|
||||
}
|
||||
|
||||
private static object Bytes2Obj(byte[] bytes)
|
||||
{
|
||||
using var ms = new MemoryStream(bytes);
|
||||
var bf = new BinaryFormatter();
|
||||
var obj = bf.Deserialize(ms);
|
||||
return obj;
|
||||
}
|
||||
|
||||
public override void OnReceiveLocal()
|
||||
{
|
||||
if (Data.receiveLocally)
|
||||
{
|
||||
OnReceiveRemote();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnReceiveRemote()
|
||||
{
|
||||
var obj = Bytes2Obj(Data.data);
|
||||
AddonDataManager.OnReceiveDataMessage(Data.messageType, obj, From);
|
||||
}
|
||||
}
|
48
QSB/API/QSBAPI.cs
Normal file
48
QSB/API/QSBAPI.cs
Normal file
@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using OWML.Common;
|
||||
using QSB.API.Messages;
|
||||
using QSB.Messaging;
|
||||
using QSB.Player;
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace QSB.API;
|
||||
|
||||
public class QSBAPI : IQSBAPI
|
||||
{
|
||||
public void RegisterRequiredForAllPlayers(IModBehaviour mod)
|
||||
{
|
||||
var uniqueName = mod.ModHelper.Manifest.UniqueName;
|
||||
QSBCore.Addons.Add(uniqueName, mod);
|
||||
}
|
||||
|
||||
public uint GetLocalPlayerID() => QSBPlayerManager.LocalPlayerId;
|
||||
public string GetPlayerName(uint playerId) => QSBPlayerManager.GetPlayer(playerId).Name;
|
||||
public uint[] GetPlayerIDs() => QSBPlayerManager.PlayerList.Select(x => x.PlayerId).ToArray();
|
||||
|
||||
public UnityEvent<uint> OnPlayerJoin() => QSBAPIEvents.OnPlayerJoinEvent;
|
||||
|
||||
public UnityEvent<uint> OnPlayerLeave() => QSBAPIEvents.OnPlayerLeaveEvent;
|
||||
|
||||
public void SetCustomData<T>(uint playerId, string key, T data) => QSBPlayerManager.GetPlayer(playerId).SetCustomData(key, data);
|
||||
public T GetCustomData<T>(uint playerId, string key) => QSBPlayerManager.GetPlayer(playerId).GetCustomData<T>(key);
|
||||
|
||||
public void SendMessage<T>(string messageType, T data, bool receiveLocally = false)
|
||||
=> new AddonDataMessage(messageType, data, receiveLocally).Send();
|
||||
|
||||
public void RegisterHandler<T>(string messageType, Action<uint, T> handler)
|
||||
=> AddonDataManager.RegisterHandler(messageType, handler);
|
||||
}
|
||||
|
||||
internal static class QSBAPIEvents
|
||||
{
|
||||
static QSBAPIEvents()
|
||||
{
|
||||
QSBPlayerManager.OnAddPlayer += player => OnPlayerJoinEvent.Invoke(player.PlayerId);
|
||||
QSBPlayerManager.OnRemovePlayer += player => OnPlayerLeaveEvent.Invoke(player.PlayerId);
|
||||
}
|
||||
|
||||
internal class PlayerEvent : UnityEvent<uint> { }
|
||||
internal static PlayerEvent OnPlayerJoinEvent = new PlayerEvent();
|
||||
internal static PlayerEvent OnPlayerLeaveEvent = new PlayerEvent();
|
||||
}
|
@ -5,7 +5,7 @@ using System.Threading;
|
||||
|
||||
namespace QSB.Animation.NPC;
|
||||
|
||||
internal class CharacterAnimManager : WorldObjectManager
|
||||
public class CharacterAnimManager : WorldObjectManager
|
||||
{
|
||||
public override WorldObjectScene WorldObjectScene => WorldObjectScene.Both;
|
||||
|
||||
|
@ -108,7 +108,7 @@ public class TravelerControllerPatches : QSBPatch
|
||||
}
|
||||
}
|
||||
|
||||
internal static class TravelerAudioManagerExtensions
|
||||
public static class TravelerAudioManagerExtensions
|
||||
{
|
||||
/// bad, but works great
|
||||
private static SignalName? TravelerToSignalName(TravelerController traveler)
|
||||
|
@ -7,7 +7,7 @@ namespace QSB.Animation.NPC.WorldObjects;
|
||||
/// <summary>
|
||||
/// only used to get QSBSolanumTrigger from SolanumAnimController
|
||||
/// </summary>
|
||||
internal class QSBSolanumAnimController : WorldObject<SolanumAnimController>
|
||||
public class QSBSolanumAnimController : WorldObject<SolanumAnimController>
|
||||
{
|
||||
private QSBSolanumTrigger _trigger;
|
||||
public QSBSolanumTrigger Trigger => _trigger ??= QSBWorldSync.GetWorldObjects<QSBSolanumTrigger>().First();
|
||||
|
@ -6,7 +6,7 @@ using UnityEngine;
|
||||
namespace QSB.Animation.Player.Thrusters;
|
||||
|
||||
[UsedInUnityProject]
|
||||
internal class RemoteThrusterFlameController : MonoBehaviour
|
||||
public class RemoteThrusterFlameController : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private Thruster _thruster;
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine;
|
||||
namespace QSB.Animation.Player.Thrusters;
|
||||
|
||||
[UsedInUnityProject]
|
||||
internal class RemoteThrusterParticlesBehaviour : MonoBehaviour
|
||||
public class RemoteThrusterParticlesBehaviour : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private Thruster _thruster;
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine;
|
||||
namespace QSB.Animation.Player.Thrusters;
|
||||
|
||||
[UsedInUnityProject]
|
||||
internal class RemoteThrusterWashController : MonoBehaviour
|
||||
public class RemoteThrusterWashController : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private float _raycastDistance = 10f;
|
||||
|
@ -4,7 +4,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.Animation.Player.Thrusters;
|
||||
|
||||
internal static class ThrusterManager
|
||||
public static class ThrusterManager
|
||||
{
|
||||
public static void CreateRemotePlayerVFX(PlayerInfo player)
|
||||
{
|
||||
|
@ -3,7 +3,7 @@ using QSB.Player;
|
||||
|
||||
namespace QSB.Audio.Messages;
|
||||
|
||||
internal class PlayerAudioControllerUpdateHazardDamageMessage : QSBMessage<(uint userID, HazardVolume.HazardType latestHazardType)>
|
||||
public class PlayerAudioControllerUpdateHazardDamageMessage : QSBMessage<(uint userID, HazardVolume.HazardType latestHazardType)>
|
||||
{
|
||||
public PlayerAudioControllerUpdateHazardDamageMessage((uint userID, HazardVolume.HazardType latestHazardType) data) : base(data) { }
|
||||
|
||||
|
@ -8,7 +8,7 @@ using UnityEngine;
|
||||
namespace QSB.Audio.Patches;
|
||||
|
||||
[HarmonyPatch]
|
||||
internal class PlayerAudioControllerPatches : QSBPatch
|
||||
public class PlayerAudioControllerPatches : QSBPatch
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
|
@ -6,7 +6,7 @@ using QSB.Player;
|
||||
|
||||
namespace QSB.Audio.Patches;
|
||||
|
||||
internal class PlayerImpactAudioPatches : QSBPatch
|
||||
public class PlayerImpactAudioPatches : QSBPatch
|
||||
{
|
||||
// Since we patch Start we do it when the mod starts, else it won't run
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnModStart;
|
||||
|
@ -6,7 +6,7 @@ using QSB.Player;
|
||||
|
||||
namespace QSB.Audio.Patches;
|
||||
|
||||
internal class PlayerMovementAudioPatches : QSBPatch
|
||||
public class PlayerMovementAudioPatches : QSBPatch
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
|
@ -5,7 +5,7 @@ using QSB.Patches;
|
||||
|
||||
namespace QSB.Audio.Patches;
|
||||
|
||||
internal class ThrusterAudioPatches : QSBPatch
|
||||
public class ThrusterAudioPatches : QSBPatch
|
||||
{
|
||||
// Since we patch Start we do it when the mod starts, else it won't run
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnModStart;
|
||||
|
@ -31,7 +31,7 @@ public class QSBAudioSourceOneShotTracker : MonoBehaviour
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(OWAudioSource))]
|
||||
internal class OneShotTrackerPatches : QSBPatch
|
||||
public class OneShotTrackerPatches : QSBPatch
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine;
|
||||
namespace QSB.Audio;
|
||||
|
||||
[UsedInUnityProject]
|
||||
internal class QSBJetpackThrusterAudio : QSBThrusterAudio
|
||||
public class QSBJetpackThrusterAudio : QSBThrusterAudio
|
||||
{
|
||||
public OWAudioSource _underwaterSource;
|
||||
public OWAudioSource _oxygenSource;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace QSB.Audio;
|
||||
|
||||
internal class QSBThrusterAudio : MonoBehaviour
|
||||
public class QSBThrusterAudio : MonoBehaviour
|
||||
{
|
||||
public OWAudioSource _translationalSource;
|
||||
public OWAudioSource _rotationalSource;
|
||||
|
@ -5,7 +5,7 @@ using System.Threading;
|
||||
|
||||
namespace QSB.CampfireSync;
|
||||
|
||||
internal class CampfireManager : WorldObjectManager
|
||||
public class CampfireManager : WorldObjectManager
|
||||
{
|
||||
public override WorldObjectScene WorldObjectScene => WorldObjectScene.Both;
|
||||
|
||||
|
@ -9,7 +9,7 @@ namespace QSB.CampfireSync.Messages;
|
||||
/// <summary>
|
||||
/// TODO: initial state on campfire and item
|
||||
/// </summary>
|
||||
internal class BurnSlideReelMessage : QSBWorldObjectMessage<QSBSlideReelItem, int>
|
||||
public class BurnSlideReelMessage : QSBWorldObjectMessage<QSBSlideReelItem, int>
|
||||
{
|
||||
public BurnSlideReelMessage(QSBCampfire campfire) : base(campfire.ObjectId) { }
|
||||
|
||||
|
@ -3,7 +3,7 @@ using QSB.Messaging;
|
||||
|
||||
namespace QSB.CampfireSync.Messages;
|
||||
|
||||
internal class CampfireStateMessage : QSBWorldObjectMessage<QSBCampfire, Campfire.State>
|
||||
public class CampfireStateMessage : QSBWorldObjectMessage<QSBCampfire, Campfire.State>
|
||||
{
|
||||
public CampfireStateMessage(Campfire.State state) : base(state) { }
|
||||
|
||||
|
@ -10,7 +10,7 @@ using UnityEngine;
|
||||
namespace QSB.CampfireSync.Patches;
|
||||
|
||||
[HarmonyPatch]
|
||||
internal class CampfirePatches : QSBPatch
|
||||
public class CampfirePatches : QSBPatch
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
|
@ -7,7 +7,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.ClientServerStateSync;
|
||||
|
||||
internal class ClientStateManager : MonoBehaviour
|
||||
public class ClientStateManager : MonoBehaviour
|
||||
{
|
||||
public static ClientStateManager Instance { get; private set; }
|
||||
|
||||
|
@ -8,7 +8,7 @@ namespace QSB.ClientServerStateSync.Messages;
|
||||
/// <summary>
|
||||
/// sets the state both locally and remotely
|
||||
/// </summary>
|
||||
internal class ClientStateMessage : QSBMessage<ClientState>
|
||||
public class ClientStateMessage : QSBMessage<ClientState>
|
||||
{
|
||||
public ClientStateMessage(ClientState state) : base(state) { }
|
||||
|
||||
|
@ -5,7 +5,7 @@ namespace QSB.ClientServerStateSync.Messages;
|
||||
/// <summary>
|
||||
/// sets the state both locally and remotely
|
||||
/// </summary>
|
||||
internal class ServerStateMessage : QSBMessage<ServerState>
|
||||
public class ServerStateMessage : QSBMessage<ServerState>
|
||||
{
|
||||
public ServerStateMessage(ServerState state) : base(state) { }
|
||||
|
||||
|
@ -10,7 +10,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.ClientServerStateSync;
|
||||
|
||||
internal class ServerStateManager : MonoBehaviour
|
||||
public class ServerStateManager : MonoBehaviour
|
||||
{
|
||||
public static ServerStateManager Instance { get; private set; }
|
||||
|
||||
|
@ -3,7 +3,7 @@ using QSB.Messaging;
|
||||
|
||||
namespace QSB.ConversationSync.Messages;
|
||||
|
||||
internal class EnterRemoteDialogueMessage : QSBWorldObjectMessage<QSBRemoteDialogueTrigger, int>
|
||||
public class EnterRemoteDialogueMessage : QSBWorldObjectMessage<QSBRemoteDialogueTrigger, int>
|
||||
{
|
||||
public EnterRemoteDialogueMessage(int dialogueIndex) : base(dialogueIndex) { }
|
||||
|
||||
|
@ -3,7 +3,7 @@ using QSB.WorldSync;
|
||||
|
||||
namespace QSB.ConversationSync.Messages;
|
||||
|
||||
internal class PersistentConditionMessage : QSBMessage<(string Condition, bool State)>
|
||||
public class PersistentConditionMessage : QSBMessage<(string Condition, bool State)>
|
||||
{
|
||||
public PersistentConditionMessage(string condition, bool state) : base((condition, state)) { }
|
||||
|
||||
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||
|
||||
namespace QSB.ConversationSync.Messages;
|
||||
|
||||
internal class RemoteDialogueInitialStateMessage : QSBWorldObjectMessage<QSBRemoteDialogueTrigger>
|
||||
public class RemoteDialogueInitialStateMessage : QSBWorldObjectMessage<QSBRemoteDialogueTrigger>
|
||||
{
|
||||
private bool _inRemoteDialogue;
|
||||
private bool[] _activatedDialogues;
|
||||
|
@ -4,7 +4,7 @@ using QSB.WorldSync;
|
||||
|
||||
namespace QSB.ConversationSync.WorldObjects;
|
||||
|
||||
internal class QSBRemoteDialogueTrigger : WorldObject<RemoteDialogueTrigger>
|
||||
public class QSBRemoteDialogueTrigger : WorldObject<RemoteDialogueTrigger>
|
||||
{
|
||||
public override void SendInitialState(uint to) =>
|
||||
this.SendMessage(new RemoteDialogueInitialStateMessage(AttachedObject) { To = to });
|
||||
|
@ -7,7 +7,7 @@ using QSB.Utility;
|
||||
namespace QSB.DeathSync.Messages;
|
||||
|
||||
// when all players die
|
||||
internal class EndLoopMessage : QSBMessage
|
||||
public class EndLoopMessage : QSBMessage
|
||||
{
|
||||
public override void OnReceiveLocal() => OnReceiveRemote();
|
||||
|
||||
|
@ -6,7 +6,7 @@ using QSB.Utility;
|
||||
|
||||
namespace QSB.DeathSync.Messages;
|
||||
|
||||
internal class StartLoopMessage : QSBMessage
|
||||
public class StartLoopMessage : QSBMessage
|
||||
{
|
||||
public override void OnReceiveLocal() => OnReceiveRemote();
|
||||
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine;
|
||||
namespace QSB.DeathSync.Patches;
|
||||
|
||||
[HarmonyPatch]
|
||||
internal class MapPatches : QSBPatch
|
||||
public class MapPatches : QSBPatch
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.RespawnTime;
|
||||
|
||||
|
@ -5,7 +5,7 @@ using System.Threading;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.AirlockSync;
|
||||
|
||||
internal class AirlockManager : WorldObjectManager
|
||||
public class AirlockManager : WorldObjectManager
|
||||
{
|
||||
public override WorldObjectScene WorldObjectScene => WorldObjectScene.SolarSystem;
|
||||
public override bool DlcOnly => true;
|
||||
|
@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.AirlockSync.Messages;
|
||||
|
||||
internal class AirlockCallToOpenMessage : QSBWorldObjectMessage<QSBAirlockInterface, bool>
|
||||
public class AirlockCallToOpenMessage : QSBWorldObjectMessage<QSBAirlockInterface, bool>
|
||||
{
|
||||
public AirlockCallToOpenMessage(bool front) : base(front) { }
|
||||
|
||||
|
@ -3,7 +3,7 @@ using QSB.Messaging;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.AirlockSync.Messages;
|
||||
|
||||
internal class AirlockInitialStateMessage : QSBWorldObjectMessage<QSBGhostAirlock, (bool innerDoorOpen, bool outerDoorOpen, bool pressurized)>
|
||||
public class AirlockInitialStateMessage : QSBWorldObjectMessage<QSBGhostAirlock, (bool innerDoorOpen, bool outerDoorOpen, bool pressurized)>
|
||||
{
|
||||
public AirlockInitialStateMessage(bool innerDoorOpen, bool outerDoorOpen, bool pressurized) : base((innerDoorOpen, outerDoorOpen, pressurized)) { }
|
||||
|
||||
|
@ -8,7 +8,7 @@ using System.Linq;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.AirlockSync.Patches;
|
||||
|
||||
internal class AirlockPatches : QSBPatch
|
||||
public class AirlockPatches : QSBPatch
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
|
@ -4,7 +4,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.AirlockSync.VariableSync;
|
||||
|
||||
internal class AirlockVariableSyncer : RotatingElementsVariableSyncer<QSBAirlockInterface>
|
||||
public class AirlockVariableSyncer : RotatingElementsVariableSyncer<QSBAirlockInterface>
|
||||
{
|
||||
protected override Transform[] RotatingElements => WorldObject.AttachedObject._rotatingElements;
|
||||
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.AirlockSync.WorldObjects;
|
||||
|
||||
internal class QSBAirlockInterface : QSBRotatingElements<AirlockInterface, AirlockVariableSyncer>
|
||||
public class QSBAirlockInterface : QSBRotatingElements<AirlockInterface, AirlockVariableSyncer>
|
||||
{
|
||||
protected override IEnumerable<SingleLightSensor> LightSensors => AttachedObject._lightSensors;
|
||||
|
||||
|
@ -4,7 +4,7 @@ using QSB.WorldSync;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.AirlockSync.WorldObjects;
|
||||
|
||||
internal class QSBGhostAirlock : WorldObject<GhostAirlock>
|
||||
public class QSBGhostAirlock : WorldObject<GhostAirlock>
|
||||
{
|
||||
public override void SendInitialState(uint to)
|
||||
=> this.SendMessage(
|
||||
|
@ -3,7 +3,7 @@ using QSB.Messaging;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.DreamLantern.Messages;
|
||||
|
||||
internal class SetConcealedMessage : QSBWorldObjectMessage<QSBDreamLanternController, bool>
|
||||
public class SetConcealedMessage : QSBWorldObjectMessage<QSBDreamLanternController, bool>
|
||||
{
|
||||
public SetConcealedMessage(bool concealed) : base(concealed) { }
|
||||
|
||||
|
@ -3,7 +3,7 @@ using QSB.Messaging;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.DreamLantern.Messages;
|
||||
|
||||
internal class SetFocusMessage : QSBWorldObjectMessage<QSBDreamLanternController, float>
|
||||
public class SetFocusMessage : QSBWorldObjectMessage<QSBDreamLanternController, float>
|
||||
{
|
||||
public SetFocusMessage(float focus) : base(focus) { }
|
||||
|
||||
|
@ -3,7 +3,7 @@ using QSB.Messaging;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.DreamLantern.Messages;
|
||||
|
||||
internal class SetLitMessage : QSBWorldObjectMessage<QSBDreamLanternController, bool>
|
||||
public class SetLitMessage : QSBWorldObjectMessage<QSBDreamLanternController, bool>
|
||||
{
|
||||
public SetLitMessage(bool lit) : base(lit) { }
|
||||
|
||||
|
@ -3,7 +3,7 @@ using QSB.Messaging;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.DreamLantern.Messages;
|
||||
|
||||
internal class SetRangeMessage : QSBWorldObjectMessage<QSBDreamLanternController, (float minRange, float maxRange)>
|
||||
public class SetRangeMessage : QSBWorldObjectMessage<QSBDreamLanternController, (float minRange, float maxRange)>
|
||||
{
|
||||
public SetRangeMessage(float minRange, float maxRange) : base((minRange, maxRange)) { }
|
||||
|
||||
|
@ -8,7 +8,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.DreamLantern.Patches;
|
||||
|
||||
internal class DreamLanternPatches : QSBPatch
|
||||
public class DreamLanternPatches : QSBPatch
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
|
@ -3,7 +3,7 @@ using QSB.Messaging;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.DreamObjectProjectors.Messages;
|
||||
|
||||
internal class ProjectorLitMessage : QSBWorldObjectMessage<QSBDreamObjectProjector, bool>
|
||||
public class ProjectorLitMessage : QSBWorldObjectMessage<QSBDreamObjectProjector, bool>
|
||||
{
|
||||
public ProjectorLitMessage(bool lit) : base(lit) { }
|
||||
|
||||
|
@ -7,7 +7,7 @@ using QSB.WorldSync;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.DreamObjectProjectors.Patches;
|
||||
|
||||
internal class ProjectorPatches : QSBPatch
|
||||
public class ProjectorPatches : QSBPatch
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
|
@ -5,7 +5,7 @@ using System.Threading;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.DreamObjectProjectors;
|
||||
|
||||
internal class ProjectorManager : WorldObjectManager
|
||||
public class ProjectorManager : WorldObjectManager
|
||||
{
|
||||
public override WorldObjectScene WorldObjectScene => WorldObjectScene.SolarSystem;
|
||||
public override bool DlcOnly => true;
|
||||
|
@ -11,7 +11,7 @@ namespace QSB.EchoesOfTheEye.DreamWorld.Messages;
|
||||
/// <summary>
|
||||
/// todo SendInitialState
|
||||
/// </summary>
|
||||
internal class EnterDreamWorldMessage : QSBWorldObjectMessage<QSBDreamLanternItem>
|
||||
public class EnterDreamWorldMessage : QSBWorldObjectMessage<QSBDreamLanternItem>
|
||||
{
|
||||
static EnterDreamWorldMessage()
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ namespace QSB.EchoesOfTheEye.DreamWorld.Messages;
|
||||
/// <summary>
|
||||
/// todo SendInitialState
|
||||
/// </summary>
|
||||
internal class ExitDreamWorldMessage : QSBMessage
|
||||
public class ExitDreamWorldMessage : QSBMessage
|
||||
{
|
||||
static ExitDreamWorldMessage()
|
||||
{
|
||||
|
@ -10,7 +10,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.EclipseCodeControllers;
|
||||
|
||||
internal class CodeControllerManager : WorldObjectManager
|
||||
public class CodeControllerManager : WorldObjectManager
|
||||
{
|
||||
public override WorldObjectScene WorldObjectScene => WorldObjectScene.SolarSystem;
|
||||
public override bool DlcOnly => true;
|
||||
|
@ -10,7 +10,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.EclipseCodeControllers;
|
||||
|
||||
internal class CodeControllerRemoteUpdater : MonoBehaviour
|
||||
public class CodeControllerRemoteUpdater : MonoBehaviour
|
||||
{
|
||||
private QSBEclipseCodeController _attachedWorldObject;
|
||||
private EclipseCodeController4 _codeController => _attachedWorldObject.AttachedObject;
|
||||
|
@ -5,7 +5,7 @@ using System.Linq;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.EclipseCodeControllers.Messages;
|
||||
|
||||
internal class InitialStateMessage : QSBWorldObjectMessage<QSBEclipseCodeController>
|
||||
public class InitialStateMessage : QSBWorldObjectMessage<QSBEclipseCodeController>
|
||||
{
|
||||
private int _selectedDial;
|
||||
private int[] _dialSelectedSymbols;
|
||||
|
@ -3,7 +3,7 @@ using QSB.Messaging;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.EclipseCodeControllers.Messages;
|
||||
|
||||
internal class MoveSelectorMessage : QSBWorldObjectMessage<QSBEclipseCodeController, (int newSelectedDial, bool up)>
|
||||
public class MoveSelectorMessage : QSBWorldObjectMessage<QSBEclipseCodeController, (int newSelectedDial, bool up)>
|
||||
{
|
||||
public MoveSelectorMessage(int selectedDial, bool up) : base((selectedDial, up)) { }
|
||||
|
||||
|
@ -4,7 +4,7 @@ using QSB.Utility;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.EclipseCodeControllers.Messages;
|
||||
|
||||
internal class RotateDialMessage : QSBWorldObjectMessage<QSBEclipseCodeController, (bool right, int selectedDial)>
|
||||
public class RotateDialMessage : QSBWorldObjectMessage<QSBEclipseCodeController, (bool right, int selectedDial)>
|
||||
{
|
||||
public RotateDialMessage(bool right, int selectedDial) : base((right, selectedDial)) { }
|
||||
|
||||
|
@ -13,7 +13,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.EclipseCodeControllers.Patches;
|
||||
|
||||
internal class CodeControllerPatches : QSBPatch
|
||||
public class CodeControllerPatches : QSBPatch
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
|
@ -5,7 +5,7 @@ using System.Threading;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.EclipseDoors;
|
||||
|
||||
internal class DoorManager : WorldObjectManager
|
||||
public class DoorManager : WorldObjectManager
|
||||
{
|
||||
public override WorldObjectScene WorldObjectScene => WorldObjectScene.SolarSystem;
|
||||
public override bool DlcOnly => true;
|
||||
|
@ -3,7 +3,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.EclipseDoors.VariableSync;
|
||||
|
||||
internal class EclipseDoorVariableSyncer : RotatingElementsVariableSyncer<QSBEclipseDoorController>
|
||||
public class EclipseDoorVariableSyncer : RotatingElementsVariableSyncer<QSBEclipseDoorController>
|
||||
{
|
||||
protected override Transform[] RotatingElements => WorldObject.AttachedObject._rotatingElements;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.EclipseDoors.WorldObjects;
|
||||
|
||||
internal class QSBEclipseDoorController : QSBRotatingElements<EclipseDoorController, EclipseDoorVariableSyncer>
|
||||
public class QSBEclipseDoorController : QSBRotatingElements<EclipseDoorController, EclipseDoorVariableSyncer>
|
||||
{
|
||||
protected override IEnumerable<SingleLightSensor> LightSensors => AttachedObject._lightSensors;
|
||||
|
||||
|
@ -5,7 +5,7 @@ using System.Threading;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.EclipseElevators;
|
||||
|
||||
internal class EclipseElevatorManager : WorldObjectManager
|
||||
public class EclipseElevatorManager : WorldObjectManager
|
||||
{
|
||||
public override WorldObjectScene WorldObjectScene => WorldObjectScene.SolarSystem;
|
||||
public override bool DlcOnly => true;
|
||||
|
@ -3,7 +3,7 @@ using QSB.Messaging;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.EclipseElevators.Messages;
|
||||
|
||||
internal class CallElevatorMessage : QSBWorldObjectMessage<QSBElevatorDestination>
|
||||
public class CallElevatorMessage : QSBWorldObjectMessage<QSBElevatorDestination>
|
||||
{
|
||||
public override void OnReceiveRemote()
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ using QSB.WorldSync;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.EclipseElevators.Patches;
|
||||
|
||||
internal class EclipseElevatorPatches : QSBPatch
|
||||
public class EclipseElevatorPatches : QSBPatch
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
|
@ -3,7 +3,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.EclipseElevators.VariableSync;
|
||||
|
||||
internal class EclipseElevatorVariableSyncer : RotatingElementsVariableSyncer<QSBEclipseElevatorController>
|
||||
public class EclipseElevatorVariableSyncer : RotatingElementsVariableSyncer<QSBEclipseElevatorController>
|
||||
{
|
||||
protected override Transform[] RotatingElements => WorldObject.AttachedObject._rotatingElements;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.EclipseElevators.WorldObjects;
|
||||
|
||||
internal class QSBEclipseElevatorController : QSBRotatingElements<EclipseElevatorController, EclipseElevatorVariableSyncer>
|
||||
public class QSBEclipseElevatorController : QSBRotatingElements<EclipseElevatorController, EclipseElevatorVariableSyncer>
|
||||
{
|
||||
protected override IEnumerable<SingleLightSensor> LightSensors => AttachedObject._lightSensors;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace QSB.EchoesOfTheEye.EclipseElevators.WorldObjects;
|
||||
|
||||
internal class QSBElevatorDestination : WorldObject<ElevatorDestination>
|
||||
public class QSBElevatorDestination : WorldObject<ElevatorDestination>
|
||||
{
|
||||
public override void SendInitialState(uint to)
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Actions;
|
||||
|
||||
internal class QSBChaseAction : QSBGhostAction
|
||||
public class QSBChaseAction : QSBGhostAction
|
||||
{
|
||||
private float _lastScreamTime;
|
||||
|
||||
|
@ -9,7 +9,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Actions;
|
||||
|
||||
internal class QSBGrabAction : QSBGhostAction
|
||||
public class QSBGrabAction : QSBGhostAction
|
||||
{
|
||||
private bool _playerIsGrabbed;
|
||||
private bool _grabAnimComplete;
|
||||
|
@ -11,7 +11,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts;
|
||||
|
||||
internal class GhostManager : WorldObjectManager
|
||||
public class GhostManager : WorldObjectManager
|
||||
{
|
||||
public override WorldObjectScene WorldObjectScene => WorldObjectScene.SolarSystem;
|
||||
public override bool DlcOnly => true;
|
||||
|
@ -4,7 +4,7 @@ using QSB.Utility;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class ChangeActionMessage : QSBWorldObjectMessage<QSBGhostBrain, GhostAction.Name>
|
||||
public class ChangeActionMessage : QSBWorldObjectMessage<QSBGhostBrain, GhostAction.Name>
|
||||
{
|
||||
public ChangeActionMessage(GhostAction.Name name) : base(name) { }
|
||||
|
||||
|
@ -5,7 +5,7 @@ using QSB.Utility;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class ChangeInterestedPlayerMessage : QSBWorldObjectMessage<QSBGhostSensors, uint>
|
||||
public class ChangeInterestedPlayerMessage : QSBWorldObjectMessage<QSBGhostSensors, uint>
|
||||
{
|
||||
public ChangeInterestedPlayerMessage(uint playerId) : base(playerId) { }
|
||||
|
||||
|
@ -4,7 +4,7 @@ using QSB.WorldSync;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class ChangeNodeMapMessage : QSBWorldObjectMessage<QSBGhostController, int>
|
||||
public class ChangeNodeMapMessage : QSBWorldObjectMessage<QSBGhostController, int>
|
||||
{
|
||||
public ChangeNodeMapMessage(int nodeMapIndex) : base(nodeMapIndex) { }
|
||||
|
||||
|
@ -4,7 +4,7 @@ using QSB.Player;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class ContactTriggerMessage : QSBWorldObjectMessage<QSBGhostSensors, bool>
|
||||
public class ContactTriggerMessage : QSBWorldObjectMessage<QSBGhostSensors, bool>
|
||||
{
|
||||
public ContactTriggerMessage(bool inContact) : base(inContact) { }
|
||||
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class FaceLocalPositionMessage : QSBWorldObjectMessage<QSBGhostController, (Vector3 localPosition, float degreesPerSecond, float turnAcceleration)>
|
||||
public class FaceLocalPositionMessage : QSBWorldObjectMessage<QSBGhostController, (Vector3 localPosition, float degreesPerSecond, float turnAcceleration)>
|
||||
{
|
||||
public FaceLocalPositionMessage(Vector3 localPos, float degPerSecond, float turnAccel) : base((localPos, degPerSecond, turnAccel)) { }
|
||||
|
||||
|
@ -11,7 +11,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class FaceNodeListMessage : QSBWorldObjectMessage<QSBGhostController, (int mapId, int[] nodeIndexes, int numNodes, TurnSpeed turnSpeed, float nodeDelay, bool autoFocusLantern)>
|
||||
public class FaceNodeListMessage : QSBWorldObjectMessage<QSBGhostController, (int mapId, int[] nodeIndexes, int numNodes, TurnSpeed turnSpeed, float nodeDelay, bool autoFocusLantern)>
|
||||
{
|
||||
public FaceNodeListMessage(GhostNode[] nodeList, int numNodes, TurnSpeed turnSpeed, float nodeDelay, bool autoFocus) : base(Process(nodeList, numNodes, turnSpeed, nodeDelay, autoFocus)) { }
|
||||
|
||||
|
@ -8,7 +8,7 @@ using System.Linq;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class FaceNodeMessage : QSBWorldObjectMessage<QSBGhostController, (int mapId, int nodeIndex, TurnSpeed turnSpeed, float nodeDelay, bool autoFocusLantern)>
|
||||
public class FaceNodeMessage : QSBWorldObjectMessage<QSBGhostController, (int mapId, int nodeIndex, TurnSpeed turnSpeed, float nodeDelay, bool autoFocusLantern)>
|
||||
{
|
||||
public FaceNodeMessage(GhostNode node, TurnSpeed turnSpeed, float nodeDelay, bool autoFocusLantern) : base(Process(node, turnSpeed, nodeDelay, autoFocusLantern)) { }
|
||||
|
||||
|
@ -11,7 +11,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class FacePlayerMessage : QSBWorldObjectMessage<QSBGhostController, (uint playerId, TurnSpeed turnSpeed)>
|
||||
public class FacePlayerMessage : QSBWorldObjectMessage<QSBGhostController, (uint playerId, TurnSpeed turnSpeed)>
|
||||
{
|
||||
public FacePlayerMessage(uint playerId, TurnSpeed turnSpeed) : base((playerId, turnSpeed)) { }
|
||||
|
||||
|
@ -4,7 +4,7 @@ using QSB.Utility;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class FaceVelocityMessage : QSBWorldObjectMessage<QSBGhostController>
|
||||
public class FaceVelocityMessage : QSBWorldObjectMessage<QSBGhostController>
|
||||
{
|
||||
public override void OnReceiveRemote()
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class GhostAnimationTriggerMessage : QSBWorldObjectMessage<QSBGhostEffects, GhostAnimationType>
|
||||
public class GhostAnimationTriggerMessage : QSBWorldObjectMessage<QSBGhostEffects, GhostAnimationType>
|
||||
{
|
||||
public GhostAnimationTriggerMessage(GhostAnimationType type) : base(type) { }
|
||||
|
||||
|
@ -10,7 +10,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class GrabRemotePlayerMessage : QSBWorldObjectMessage<QSBGhostGrabController, (float speed, uint playerId)>
|
||||
public class GrabRemotePlayerMessage : QSBWorldObjectMessage<QSBGhostGrabController, (float speed, uint playerId)>
|
||||
{
|
||||
public GrabRemotePlayerMessage(float speed, uint playerId) : base((speed, playerId)) { }
|
||||
|
||||
|
@ -10,7 +10,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class MoveToLocalPositionMessage : QSBWorldObjectMessage<QSBGhostController, (Vector3 localPosition, float speed, float acceleration)>
|
||||
public class MoveToLocalPositionMessage : QSBWorldObjectMessage<QSBGhostController, (Vector3 localPosition, float speed, float acceleration)>
|
||||
{
|
||||
public MoveToLocalPositionMessage(Vector3 localPos, float speed, float accel) : base((localPos, speed, accel)) { }
|
||||
|
||||
|
@ -5,7 +5,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class PathfindLocalPositionMessage : QSBWorldObjectMessage<QSBGhostController,
|
||||
public class PathfindLocalPositionMessage : QSBWorldObjectMessage<QSBGhostController,
|
||||
(Vector3 localPosition, float speed, float acceleration)>
|
||||
{
|
||||
public PathfindLocalPositionMessage(Vector3 localPosition, float speed, float acceleration) :
|
||||
|
@ -7,7 +7,7 @@ using System.Linq;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class PathfindNodeMessage : QSBWorldObjectMessage<QSBGhostController, (int mapId, int nodeIndex, float speed, float acceleration)>
|
||||
public class PathfindNodeMessage : QSBWorldObjectMessage<QSBGhostController, (int mapId, int nodeIndex, float speed, float acceleration)>
|
||||
{
|
||||
public PathfindNodeMessage(GhostNode node, float speed, float acceleration) : base(Process(node, speed, acceleration)) { }
|
||||
|
||||
|
@ -3,7 +3,7 @@ using QSB.Messaging;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class PlayVoiceAudioMessage : QSBWorldObjectMessage<QSBGhostEffects, (AudioType audioType, float volumeScale, bool near)>
|
||||
public class PlayVoiceAudioMessage : QSBWorldObjectMessage<QSBGhostEffects, (AudioType audioType, float volumeScale, bool near)>
|
||||
{
|
||||
public PlayVoiceAudioMessage(AudioType audioType, float volumeScale, bool near) : base((audioType, volumeScale, near)) { }
|
||||
|
||||
|
@ -3,7 +3,7 @@ using QSB.Messaging;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class SetMovementStyleMessage : QSBWorldObjectMessage<QSBGhostEffects, GhostEffects.MovementStyle>
|
||||
public class SetMovementStyleMessage : QSBWorldObjectMessage<QSBGhostEffects, GhostEffects.MovementStyle>
|
||||
{
|
||||
public SetMovementStyleMessage(GhostEffects.MovementStyle style) : base(style) { }
|
||||
|
||||
|
@ -4,7 +4,7 @@ using QSB.Messaging;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class SpinMessage : QSBWorldObjectMessage<QSBGhostController, TurnSpeed>
|
||||
public class SpinMessage : QSBWorldObjectMessage<QSBGhostController, TurnSpeed>
|
||||
{
|
||||
public SpinMessage(TurnSpeed turnSpeed) : base(turnSpeed) { }
|
||||
|
||||
|
@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class StopFacingMessage : QSBWorldObjectMessage<QSBGhostController>
|
||||
public class StopFacingMessage : QSBWorldObjectMessage<QSBGhostController>
|
||||
{
|
||||
public override void OnReceiveRemote()
|
||||
{
|
||||
|
@ -10,7 +10,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class StopMovingMessage : QSBWorldObjectMessage<QSBGhostController, bool>
|
||||
public class StopMovingMessage : QSBWorldObjectMessage<QSBGhostController, bool>
|
||||
{
|
||||
public StopMovingMessage(bool instant) : base(instant) { }
|
||||
|
||||
|
@ -4,7 +4,7 @@ using QSB.WorldSync;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Messages;
|
||||
|
||||
internal class Zone2ElevatorStateMessage : QSBMessage<(int index, Zone2ElevatorState state)>
|
||||
public class Zone2ElevatorStateMessage : QSBMessage<(int index, Zone2ElevatorState state)>
|
||||
{
|
||||
public Zone2ElevatorStateMessage(int index, Zone2ElevatorState state) : base((index, state)) { }
|
||||
|
||||
|
@ -14,7 +14,7 @@ using UnityEngine;
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Patches;
|
||||
|
||||
[HarmonyPatch(typeof(GhostBrain))]
|
||||
internal class GhostBrainPatches : QSBPatch
|
||||
public class GhostBrainPatches : QSBPatch
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
|
@ -16,7 +16,7 @@ using System.Threading.Tasks;
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Patches;
|
||||
|
||||
[HarmonyPatch(typeof(GhostController))]
|
||||
internal class GhostControllerPatches : QSBPatch
|
||||
public class GhostControllerPatches : QSBPatch
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
|
@ -15,7 +15,7 @@ using UnityEngine;
|
||||
namespace QSB.EchoesOfTheEye.Ghosts.Patches;
|
||||
|
||||
[HarmonyPatch(typeof(GhostEffects))]
|
||||
internal class GhostEffectsPatches : QSBPatch
|
||||
public class GhostEffectsPatches : QSBPatch
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user