mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-20 15:41:01 +00:00
cleanup
This commit is contained in:
parent
beb861e53e
commit
bba5fe4a45
@ -130,7 +130,7 @@ namespace QSB.Animation
|
||||
InitCrouchSync();
|
||||
|
||||
var ikSync = body.gameObject.AddComponent<PlayerHeadRotationSync>();
|
||||
QSBCore.Helper.Events.Unity.RunWhen(() => Player.CameraBody != null, () => ikSync.Init(Player.CameraBody.transform));
|
||||
QSBCore.UnityEvents.RunWhen(() => Player.CameraBody != null, () => ikSync.Init(Player.CameraBody.transform));
|
||||
}
|
||||
|
||||
private void InitCrouchSync()
|
||||
|
@ -14,22 +14,22 @@ namespace QSB.ConversationSync.Patches
|
||||
|
||||
public override void DoPatches()
|
||||
{
|
||||
QSBCore.Helper.HarmonyHelper.AddPostfix<DialogueNode>("GetNextPage", typeof(ConversationPatches), nameof(Node_GetNextPage));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<CharacterDialogueTree>("InputDialogueOption", typeof(ConversationPatches), nameof(Tree_InputDialogueOption));
|
||||
QSBCore.Helper.HarmonyHelper.AddPostfix<CharacterDialogueTree>("StartConversation", typeof(ConversationPatches), nameof(Tree_StartConversation));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<CharacterDialogueTree>("EndConversation", typeof(ConversationPatches), nameof(Tree_EndConversation));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<CharacterAnimController>("OnAnimatorIK", typeof(ConversationPatches), nameof(AnimController_OnAnimatorIK));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<CharacterAnimController>("OnZoneExit", typeof(ConversationPatches), nameof(AnimController_OnZoneExit));
|
||||
QSBCore.HarmonyHelper.AddPostfix<DialogueNode>("GetNextPage", typeof(ConversationPatches), nameof(Node_GetNextPage));
|
||||
QSBCore.HarmonyHelper.AddPrefix<CharacterDialogueTree>("InputDialogueOption", typeof(ConversationPatches), nameof(Tree_InputDialogueOption));
|
||||
QSBCore.HarmonyHelper.AddPostfix<CharacterDialogueTree>("StartConversation", typeof(ConversationPatches), nameof(Tree_StartConversation));
|
||||
QSBCore.HarmonyHelper.AddPrefix<CharacterDialogueTree>("EndConversation", typeof(ConversationPatches), nameof(Tree_EndConversation));
|
||||
QSBCore.HarmonyHelper.AddPrefix<CharacterAnimController>("OnAnimatorIK", typeof(ConversationPatches), nameof(AnimController_OnAnimatorIK));
|
||||
QSBCore.HarmonyHelper.AddPrefix<CharacterAnimController>("OnZoneExit", typeof(ConversationPatches), nameof(AnimController_OnZoneExit));
|
||||
}
|
||||
|
||||
public override void DoUnpatches()
|
||||
{
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<DialogueNode>("GetNextPage");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<CharacterDialogueTree>("InputDialogueOption");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<CharacterDialogueTree>("StartConversation");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<CharacterDialogueTree>("EndConversation");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<CharacterAnimController>("OnAnimatorIK");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<CharacterAnimController>("OnZoneExit");
|
||||
QSBCore.HarmonyHelper.Unpatch<DialogueNode>("GetNextPage");
|
||||
QSBCore.HarmonyHelper.Unpatch<CharacterDialogueTree>("InputDialogueOption");
|
||||
QSBCore.HarmonyHelper.Unpatch<CharacterDialogueTree>("StartConversation");
|
||||
QSBCore.HarmonyHelper.Unpatch<CharacterDialogueTree>("EndConversation");
|
||||
QSBCore.HarmonyHelper.Unpatch<CharacterAnimController>("OnAnimatorIK");
|
||||
QSBCore.HarmonyHelper.Unpatch<CharacterAnimController>("OnZoneExit");
|
||||
}
|
||||
|
||||
public static void Tree_StartConversation(CharacterDialogueTree __instance)
|
||||
@ -79,7 +79,7 @@ namespace QSB.ConversationSync.Patches
|
||||
{
|
||||
var key = ____name + ____listPagesToDisplay[____currentPage];
|
||||
// Sending key so translation can be done on client side - should make different language-d clients compatible
|
||||
QSBCore.Helper.Events.Unity.RunWhen(() => QSBPlayerManager.LocalPlayer.CurrentDialogueID != -1,
|
||||
QSBCore.UnityEvents.RunWhen(() => QSBPlayerManager.LocalPlayer.CurrentDialogueID != -1,
|
||||
() => ConversationManager.Instance.SendCharacterDialogue(QSBPlayerManager.LocalPlayer.CurrentDialogueID, key));
|
||||
}
|
||||
|
||||
|
@ -13,23 +13,23 @@ namespace QSB.DeathSync.Patches
|
||||
|
||||
public override void DoPatches()
|
||||
{
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<DeathManager>("KillPlayer", typeof(DeathPatches), nameof(PreFinishDeathSequence));
|
||||
QSBCore.Helper.HarmonyHelper.AddPostfix<DeathManager>("KillPlayer", typeof(DeathPatches), nameof(BroadcastDeath));
|
||||
QSBCore.Helper.HarmonyHelper.Transpile<ShipDetachableLeg>("Detach", typeof(DeathPatches), nameof(ReturnNull));
|
||||
QSBCore.Helper.HarmonyHelper.Transpile<ShipDetachableModule>("Detach", typeof(DeathPatches), nameof(ReturnNull));
|
||||
QSBCore.Helper.HarmonyHelper.EmptyMethod<ShipEjectionSystem>("OnPressInteract");
|
||||
QSBCore.Helper.HarmonyHelper.AddPostfix<ShipDamageController>("Awake", typeof(DeathPatches), nameof(DamageController_Exploded));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<DestructionVolume>("VanishShip", typeof(DeathPatches), nameof(DestructionVolume_VanishShip));
|
||||
QSBCore.HarmonyHelper.AddPrefix<DeathManager>("KillPlayer", typeof(DeathPatches), nameof(PreFinishDeathSequence));
|
||||
QSBCore.HarmonyHelper.AddPostfix<DeathManager>("KillPlayer", typeof(DeathPatches), nameof(BroadcastDeath));
|
||||
QSBCore.HarmonyHelper.Transpile<ShipDetachableLeg>("Detach", typeof(DeathPatches), nameof(ReturnNull));
|
||||
QSBCore.HarmonyHelper.Transpile<ShipDetachableModule>("Detach", typeof(DeathPatches), nameof(ReturnNull));
|
||||
QSBCore.HarmonyHelper.EmptyMethod<ShipEjectionSystem>("OnPressInteract");
|
||||
QSBCore.HarmonyHelper.AddPostfix<ShipDamageController>("Awake", typeof(DeathPatches), nameof(DamageController_Exploded));
|
||||
QSBCore.HarmonyHelper.AddPrefix<DestructionVolume>("VanishShip", typeof(DeathPatches), nameof(DestructionVolume_VanishShip));
|
||||
}
|
||||
|
||||
public override void DoUnpatches()
|
||||
{
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<DeathManager>("KillPlayer");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<ShipDetachableLeg>("Detach");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<ShipDetachableModule>("Detach");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<ShipEjectionSystem>("OnPressInteract");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<ShipDamageController>("Awake");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<DestructionVolume>("VanishShip");
|
||||
QSBCore.HarmonyHelper.Unpatch<DeathManager>("KillPlayer");
|
||||
QSBCore.HarmonyHelper.Unpatch<ShipDetachableLeg>("Detach");
|
||||
QSBCore.HarmonyHelper.Unpatch<ShipDetachableModule>("Detach");
|
||||
QSBCore.HarmonyHelper.Unpatch<ShipEjectionSystem>("OnPressInteract");
|
||||
QSBCore.HarmonyHelper.Unpatch<ShipDamageController>("Awake");
|
||||
QSBCore.HarmonyHelper.Unpatch<DestructionVolume>("VanishShip");
|
||||
}
|
||||
|
||||
public static bool PreFinishDeathSequence(DeathType deathType)
|
||||
|
@ -17,8 +17,8 @@ namespace QSB.ElevatorSync.Patches
|
||||
QSBEventManager.FireEvent(EventNames.QSBStartLift, id, isGoingUp);
|
||||
}
|
||||
|
||||
public override void DoPatches() => QSBCore.Helper.HarmonyHelper.AddPostfix<Elevator>("StartLift", typeof(ElevatorPatches), nameof(StartLift));
|
||||
public override void DoPatches() => QSBCore.HarmonyHelper.AddPostfix<Elevator>("StartLift", typeof(ElevatorPatches), nameof(StartLift));
|
||||
|
||||
public override void DoUnpatches() => QSBCore.Helper.HarmonyHelper.Unpatch<Elevator>("StartLift");
|
||||
public override void DoUnpatches() => QSBCore.HarmonyHelper.Unpatch<Elevator>("StartLift");
|
||||
}
|
||||
}
|
@ -19,7 +19,7 @@ namespace QSB.ElevatorSync.WorldObjects
|
||||
DebugLog.DebugWrite($"init with id {id}");
|
||||
AttachedObject = elevator;
|
||||
ObjectId = id;
|
||||
QSBCore.Helper.Events.Unity.RunWhen(() => AttachedObject.GetValue<SingleInteractionVolume>("_interactVolume") != null, InitValues);
|
||||
QSBCore.UnityEvents.RunWhen(() => AttachedObject.GetValue<SingleInteractionVolume>("_interactVolume") != null, InitValues);
|
||||
}
|
||||
|
||||
private void InitValues()
|
||||
|
@ -35,7 +35,7 @@ namespace QSB.Events
|
||||
public void SendEvent(T message)
|
||||
{
|
||||
message.FromId = QSBPlayerManager.LocalPlayerId;
|
||||
QSBCore.Helper.Events.Unity.RunWhen(
|
||||
QSBCore.UnityEvents.RunWhen(
|
||||
() => PlayerTransformSync.LocalInstance != null,
|
||||
() => _eventHandler.SendToServer(message));
|
||||
}
|
||||
|
@ -9,14 +9,14 @@ namespace QSB.FrequencySync.Patches
|
||||
|
||||
public override void DoPatches()
|
||||
{
|
||||
QSBCore.Helper.HarmonyHelper.AddPostfix<AudioSignal>("IdentifyFrequency", typeof(FrequencyPatches), nameof(IdentifyFrequency));
|
||||
QSBCore.Helper.HarmonyHelper.AddPostfix<AudioSignal>("IdentifySignal", typeof(FrequencyPatches), nameof(IdentifySignal));
|
||||
QSBCore.HarmonyHelper.AddPostfix<AudioSignal>("IdentifyFrequency", typeof(FrequencyPatches), nameof(IdentifyFrequency));
|
||||
QSBCore.HarmonyHelper.AddPostfix<AudioSignal>("IdentifySignal", typeof(FrequencyPatches), nameof(IdentifySignal));
|
||||
}
|
||||
|
||||
public override void DoUnpatches()
|
||||
{
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<AudioSignal>("IdentifyFrequency");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<AudioSignal>("IdentifySignal");
|
||||
QSBCore.HarmonyHelper.Unpatch<AudioSignal>("IdentifyFrequency");
|
||||
QSBCore.HarmonyHelper.Unpatch<AudioSignal>("IdentifySignal");
|
||||
}
|
||||
|
||||
public static void IdentifyFrequency(SignalFrequency ____frequency)
|
||||
|
@ -28,7 +28,7 @@ namespace QSB.GeyserSync
|
||||
{
|
||||
return;
|
||||
}
|
||||
QSBCore.Helper.HarmonyHelper.EmptyMethod<GeyserController>("Update");
|
||||
QSBCore.HarmonyHelper.EmptyMethod<GeyserController>("Update");
|
||||
}
|
||||
}
|
||||
}
|
@ -26,13 +26,13 @@ namespace QSB.Instruments
|
||||
//QSBInputManager.RiebeckTaunt += OnRiebeckTaunt;
|
||||
//QSBInputManager.ExitTaunt += ReturnToPlayer;
|
||||
|
||||
QSBCore.Helper.Events.Unity.RunWhen(() => Locator.GetPlayerBody() != null, SetupInstruments);
|
||||
QSBCore.UnityEvents.RunWhen(() => Locator.GetPlayerBody() != null, SetupInstruments);
|
||||
}
|
||||
|
||||
public void InitRemote(Transform root)
|
||||
{
|
||||
_rootObj = root;
|
||||
QSBCore.Helper.Events.Unity.RunWhen(() => Locator.GetPlayerBody() != null, SetupInstruments);
|
||||
QSBCore.UnityEvents.RunWhen(() => Locator.GetPlayerBody() != null, SetupInstruments);
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
|
@ -13,20 +13,20 @@ namespace QSB.ItemSync.Patches
|
||||
|
||||
public override void DoPatches()
|
||||
{
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<ItemTool>("MoveItemToCarrySocket", typeof(ItemPatches), nameof(ItemTool_MoveItemToCarrySocket));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<ItemTool>("SocketItem", typeof(ItemPatches), nameof(ItemTool_SocketItem));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<ItemTool>("StartUnsocketItem", typeof(ItemPatches), nameof(ItemTool_StartUnsocketItem));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<ItemTool>("CompleteUnsocketItem", typeof(ItemPatches), nameof(ItemTool_CompleteUnsocketItem));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<ItemTool>("DropItem", typeof(ItemPatches), nameof(ItemTool_DropItem));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<NomaiRemoteCameraPlatform>("Update", typeof(ItemPatches), nameof(Platform_ReturnFalse));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<NomaiRemoteCameraPlatform>("OnSocketableRemoved", typeof(ItemPatches), nameof(Platform_ReturnFalse));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<NomaiRemoteCameraPlatform>("OnSocketableDonePlacing", typeof(ItemPatches), nameof(Platform_ReturnFalse));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<NomaiRemoteCameraPlatform>("OnPedestalContact", typeof(ItemPatches), nameof(Platform_ReturnFalse));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<NomaiRemoteCameraStreaming>("FixedUpdate", typeof(ItemPatches), nameof(Platform_ReturnFalse));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<NomaiRemoteCameraStreaming>("OnSectorOccupantAdded", typeof(ItemPatches), nameof(Platform_ReturnFalse));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<NomaiRemoteCameraStreaming>("OnSectorOccupantRemoved", typeof(ItemPatches), nameof(Platform_ReturnFalse));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<NomaiRemoteCameraStreaming>("OnEntry", typeof(ItemPatches), nameof(Platform_ReturnFalse));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<NomaiRemoteCameraStreaming>("OnExit", typeof(ItemPatches), nameof(Platform_ReturnFalse));
|
||||
QSBCore.HarmonyHelper.AddPrefix<ItemTool>("MoveItemToCarrySocket", typeof(ItemPatches), nameof(ItemTool_MoveItemToCarrySocket));
|
||||
QSBCore.HarmonyHelper.AddPrefix<ItemTool>("SocketItem", typeof(ItemPatches), nameof(ItemTool_SocketItem));
|
||||
QSBCore.HarmonyHelper.AddPrefix<ItemTool>("StartUnsocketItem", typeof(ItemPatches), nameof(ItemTool_StartUnsocketItem));
|
||||
QSBCore.HarmonyHelper.AddPrefix<ItemTool>("CompleteUnsocketItem", typeof(ItemPatches), nameof(ItemTool_CompleteUnsocketItem));
|
||||
QSBCore.HarmonyHelper.AddPrefix<ItemTool>("DropItem", typeof(ItemPatches), nameof(ItemTool_DropItem));
|
||||
QSBCore.HarmonyHelper.AddPrefix<NomaiRemoteCameraPlatform>("Update", typeof(ItemPatches), nameof(Platform_ReturnFalse));
|
||||
QSBCore.HarmonyHelper.AddPrefix<NomaiRemoteCameraPlatform>("OnSocketableRemoved", typeof(ItemPatches), nameof(Platform_ReturnFalse));
|
||||
QSBCore.HarmonyHelper.AddPrefix<NomaiRemoteCameraPlatform>("OnSocketableDonePlacing", typeof(ItemPatches), nameof(Platform_ReturnFalse));
|
||||
QSBCore.HarmonyHelper.AddPrefix<NomaiRemoteCameraPlatform>("OnPedestalContact", typeof(ItemPatches), nameof(Platform_ReturnFalse));
|
||||
QSBCore.HarmonyHelper.AddPrefix<NomaiRemoteCameraStreaming>("FixedUpdate", typeof(ItemPatches), nameof(Platform_ReturnFalse));
|
||||
QSBCore.HarmonyHelper.AddPrefix<NomaiRemoteCameraStreaming>("OnSectorOccupantAdded", typeof(ItemPatches), nameof(Platform_ReturnFalse));
|
||||
QSBCore.HarmonyHelper.AddPrefix<NomaiRemoteCameraStreaming>("OnSectorOccupantRemoved", typeof(ItemPatches), nameof(Platform_ReturnFalse));
|
||||
QSBCore.HarmonyHelper.AddPrefix<NomaiRemoteCameraStreaming>("OnEntry", typeof(ItemPatches), nameof(Platform_ReturnFalse));
|
||||
QSBCore.HarmonyHelper.AddPrefix<NomaiRemoteCameraStreaming>("OnExit", typeof(ItemPatches), nameof(Platform_ReturnFalse));
|
||||
}
|
||||
|
||||
public override void DoUnpatches()
|
||||
|
@ -16,8 +16,8 @@ namespace QSB.LogSync.Patches
|
||||
QSBEventManager.FireEvent(EventNames.QSBRevealFact, id, saveGame, showNotification);
|
||||
}
|
||||
|
||||
public override void DoPatches() => QSBCore.Helper.HarmonyHelper.AddPostfix<ShipLogManager>("RevealFact", typeof(LogPatches), nameof(RevealFact));
|
||||
public override void DoPatches() => QSBCore.HarmonyHelper.AddPostfix<ShipLogManager>("RevealFact", typeof(LogPatches), nameof(RevealFact));
|
||||
|
||||
public override void DoUnpatches() => QSBCore.Helper.HarmonyHelper.Unpatch<ShipLogManager>("RevealFact");
|
||||
public override void DoUnpatches() => QSBCore.HarmonyHelper.Unpatch<ShipLogManager>("RevealFact");
|
||||
}
|
||||
}
|
@ -61,7 +61,7 @@ namespace QSB.OrbSync
|
||||
}
|
||||
}
|
||||
|
||||
public void QueueBuildSlots() => QSBCore.Helper.Events.Unity.RunWhen(() => QSBCore.HasWokenUp, BuildOrbSlots);
|
||||
public void QueueBuildOrbs() => QSBCore.Helper.Events.Unity.RunWhen(() => QNetworkServer.active, BuildOrbs);
|
||||
public void QueueBuildSlots() => QSBCore.UnityEvents.RunWhen(() => QSBCore.HasWokenUp, BuildOrbSlots);
|
||||
public void QueueBuildOrbs() => QSBCore.UnityEvents.RunWhen(() => QNetworkServer.active, BuildOrbs);
|
||||
}
|
||||
}
|
@ -57,14 +57,14 @@ namespace QSB.OrbSync.Patches
|
||||
|
||||
public override void DoPatches()
|
||||
{
|
||||
QSBCore.Helper.HarmonyHelper.AddPostfix<NomaiInterfaceOrb>("StartDragFromPosition", typeof(OrbPatches), nameof(StartDragCallEvent));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<NomaiInterfaceSlot>("CheckOrbCollision", typeof(OrbPatches), nameof(CheckOrbCollision));
|
||||
QSBCore.HarmonyHelper.AddPostfix<NomaiInterfaceOrb>("StartDragFromPosition", typeof(OrbPatches), nameof(StartDragCallEvent));
|
||||
QSBCore.HarmonyHelper.AddPrefix<NomaiInterfaceSlot>("CheckOrbCollision", typeof(OrbPatches), nameof(CheckOrbCollision));
|
||||
}
|
||||
|
||||
public override void DoUnpatches()
|
||||
{
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<NomaiInterfaceOrb>("StartDragFromPosition");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<NomaiInterfaceSlot>("CheckOrbCollision");
|
||||
QSBCore.HarmonyHelper.Unpatch<NomaiInterfaceOrb>("StartDragFromPosition");
|
||||
QSBCore.HarmonyHelper.Unpatch<NomaiInterfaceSlot>("CheckOrbCollision");
|
||||
}
|
||||
}
|
||||
}
|
@ -27,7 +27,7 @@ namespace QSB.Player.Events
|
||||
{
|
||||
return;
|
||||
}
|
||||
QSBCore.Helper.Events.Unity.FireInNUpdates(() => KickPlayer(message.AboutId), 10);
|
||||
QSBCore.UnityEvents.FireInNUpdates(() => KickPlayer(message.AboutId), 10);
|
||||
}
|
||||
|
||||
private void KickPlayer(uint id)
|
||||
|
@ -38,7 +38,7 @@ namespace QSB.Player.Events
|
||||
|
||||
var transformSync = QSBPlayerManager.GetSyncObject<TransformSync.TransformSync>(message.AboutId);
|
||||
|
||||
QSBCore.Helper.Events.Unity.RunWhen(() => transformSync?.SyncedTransform != null,
|
||||
QSBCore.UnityEvents.RunWhen(() => transformSync?.SyncedTransform != null,
|
||||
() => transformSync?.SetReferenceSector(sector));
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ namespace QSB.Player.Events
|
||||
public override void OnReceiveRemote(bool server, PlayerStateMessage message)
|
||||
{
|
||||
DebugLog.DebugWrite($"Received playerstate of player ID {message.AboutId}", MessageType.Info);
|
||||
QSBCore.Helper.Events.Unity.RunWhen(
|
||||
QSBCore.UnityEvents.RunWhen(
|
||||
() => QSBPlayerManager.GetSyncObject<TransformSync.TransformSync>(message.AboutId) != null,
|
||||
() => QSBPlayerManager.HandleFullStateMessage(message));
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ namespace QSB.Player
|
||||
Translator?.ChangeEquipState(FlagsHelper.IsSet(State, State.Translator));
|
||||
ProbeLauncher?.ChangeEquipState(FlagsHelper.IsSet(State, State.ProbeLauncher));
|
||||
Signalscope?.ChangeEquipState(FlagsHelper.IsSet(State, State.Signalscope));
|
||||
QSBCore.Helper.Events.Unity.RunWhen(() => QSBPlayerManager.GetSyncObject<AnimationSync>(PlayerId) != null,
|
||||
QSBCore.UnityEvents.RunWhen(() => QSBPlayerManager.GetSyncObject<AnimationSync>(PlayerId) != null,
|
||||
() => QSBPlayerManager.GetSyncObject<AnimationSync>(PlayerId).SetSuitState(FlagsHelper.IsSet(State, State.Suit)));
|
||||
}
|
||||
|
||||
|
@ -47,6 +47,8 @@ namespace QSB
|
||||
public class QSBCore : ModBehaviour
|
||||
{
|
||||
public static IModHelper Helper { get; private set; }
|
||||
public static IHarmonyHelper HarmonyHelper => Helper.HarmonyHelper;
|
||||
public static IModUnityEvents UnityEvents => Helper.Events.Unity;
|
||||
public static string DefaultServerIP { get; private set; }
|
||||
public static int Port { get; private set; }
|
||||
public static bool DebugMode { get; private set; }
|
||||
|
@ -192,12 +192,12 @@ namespace QSB
|
||||
OnNetworkManagerReady?.SafeInvoke();
|
||||
IsReady = true;
|
||||
|
||||
QSBCore.Helper.Events.Unity.RunWhen(() => QSBEventManager.Ready && PlayerTransformSync.LocalInstance != null,
|
||||
QSBCore.UnityEvents.RunWhen(() => QSBEventManager.Ready && PlayerTransformSync.LocalInstance != null,
|
||||
() => QSBEventManager.FireEvent(EventNames.QSBPlayerJoin, _lobby.PlayerName));
|
||||
|
||||
if (!QSBCore.IsServer)
|
||||
{
|
||||
QSBCore.Helper.Events.Unity.RunWhen(() => QSBEventManager.Ready && PlayerTransformSync.LocalInstance != null,
|
||||
QSBCore.UnityEvents.RunWhen(() => QSBEventManager.Ready && PlayerTransformSync.LocalInstance != null,
|
||||
() => QSBEventManager.FireEvent(EventNames.QSBPlayerStatesRequest));
|
||||
}
|
||||
|
||||
|
@ -9,14 +9,14 @@ namespace QSB.QuantumSync.Patches
|
||||
|
||||
public override void DoPatches()
|
||||
{
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<QuantumMoon>("ChangeQuantumState", typeof(ClientQuantumPatches), nameof(ReturnFalsePatch));
|
||||
QSBCore.Helper.HarmonyHelper.AddPostfix<QuantumMoon>("Start", typeof(ClientQuantumPatches), nameof(Moon_CollapseOnStart));
|
||||
QSBCore.HarmonyHelper.AddPrefix<QuantumMoon>("ChangeQuantumState", typeof(ClientQuantumPatches), nameof(ReturnFalsePatch));
|
||||
QSBCore.HarmonyHelper.AddPostfix<QuantumMoon>("Start", typeof(ClientQuantumPatches), nameof(Moon_CollapseOnStart));
|
||||
}
|
||||
|
||||
public override void DoUnpatches()
|
||||
{
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<QuantumMoon>("ChangeQuantumState");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<QuantumMoon>("Start");
|
||||
QSBCore.HarmonyHelper.Unpatch<QuantumMoon>("ChangeQuantumState");
|
||||
QSBCore.HarmonyHelper.Unpatch<QuantumMoon>("Start");
|
||||
}
|
||||
|
||||
public static void Moon_CollapseOnStart(QuantumMoon __instance)
|
||||
|
@ -19,32 +19,32 @@ namespace QSB.QuantumSync.Patches
|
||||
|
||||
public override void DoPatches()
|
||||
{
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<SocketedQuantumObject>("ChangeQuantumState", typeof(QuantumPatches), nameof(Socketed_ChangeQuantumState));
|
||||
QSBCore.Helper.HarmonyHelper.AddPostfix<SocketedQuantumObject>("MoveToSocket", typeof(QuantumPatches), nameof(Socketed_MoveToSocket));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<QuantumShuffleObject>("ChangeQuantumState", typeof(QuantumPatches), nameof(Shuffle_ChangeQuantumState));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<MultiStateQuantumObject>("ChangeQuantumState", typeof(QuantumPatches), nameof(MultiState_ChangeQuantumState));
|
||||
QSBCore.Helper.HarmonyHelper.AddPostfix<QuantumState>("SetVisible", typeof(QuantumPatches), nameof(QuantumState_SetVisible));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<QuantumShrine>("IsPlayerInDarkness", typeof(QuantumPatches), nameof(Shrine_IsPlayerInDarkness));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<QuantumShrine>("ChangeQuantumState", typeof(QuantumPatches), nameof(Shrine_ChangeQuantumState));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<QuantumShrine>("OnEntry", typeof(QuantumPatches), nameof(Shrine_OnEntry));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<QuantumShrine>("OnExit", typeof(QuantumPatches), nameof(Shrine_OnExit));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<QuantumMoon>("CheckPlayerFogProximity", typeof(QuantumPatches), nameof(Moon_CheckPlayerFogProximity));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<QuantumObject>("IsLockedByPlayerContact", typeof(QuantumPatches), nameof(Object_IsLockedByPlayerContact));
|
||||
QSBCore.HarmonyHelper.AddPrefix<SocketedQuantumObject>("ChangeQuantumState", typeof(QuantumPatches), nameof(Socketed_ChangeQuantumState));
|
||||
QSBCore.HarmonyHelper.AddPostfix<SocketedQuantumObject>("MoveToSocket", typeof(QuantumPatches), nameof(Socketed_MoveToSocket));
|
||||
QSBCore.HarmonyHelper.AddPrefix<QuantumShuffleObject>("ChangeQuantumState", typeof(QuantumPatches), nameof(Shuffle_ChangeQuantumState));
|
||||
QSBCore.HarmonyHelper.AddPrefix<MultiStateQuantumObject>("ChangeQuantumState", typeof(QuantumPatches), nameof(MultiState_ChangeQuantumState));
|
||||
QSBCore.HarmonyHelper.AddPostfix<QuantumState>("SetVisible", typeof(QuantumPatches), nameof(QuantumState_SetVisible));
|
||||
QSBCore.HarmonyHelper.AddPrefix<QuantumShrine>("IsPlayerInDarkness", typeof(QuantumPatches), nameof(Shrine_IsPlayerInDarkness));
|
||||
QSBCore.HarmonyHelper.AddPrefix<QuantumShrine>("ChangeQuantumState", typeof(QuantumPatches), nameof(Shrine_ChangeQuantumState));
|
||||
QSBCore.HarmonyHelper.AddPrefix<QuantumShrine>("OnEntry", typeof(QuantumPatches), nameof(Shrine_OnEntry));
|
||||
QSBCore.HarmonyHelper.AddPrefix<QuantumShrine>("OnExit", typeof(QuantumPatches), nameof(Shrine_OnExit));
|
||||
QSBCore.HarmonyHelper.AddPrefix<QuantumMoon>("CheckPlayerFogProximity", typeof(QuantumPatches), nameof(Moon_CheckPlayerFogProximity));
|
||||
QSBCore.HarmonyHelper.AddPrefix<QuantumObject>("IsLockedByPlayerContact", typeof(QuantumPatches), nameof(Object_IsLockedByPlayerContact));
|
||||
}
|
||||
|
||||
public override void DoUnpatches()
|
||||
{
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<SocketedQuantumObject>("ChangeQuantumState");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<SocketedQuantumObject>("MoveToSocket");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<QuantumShuffleObject>("ChangeQuantumState");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<MultiStateQuantumObject>("ChangeQuantumState");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<QuantumState>("SetVisible");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<QuantumShrine>("IsPlayerInDarkness");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<QuantumShrine>("ChangeQuantumState");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<QuantumShrine>("OnEntry");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<QuantumShrine>("OnExit");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<QuantumMoon>("CheckPlayerFogProximity");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<QuantumObject>("IsLockedByPlayerContact");
|
||||
QSBCore.HarmonyHelper.Unpatch<SocketedQuantumObject>("ChangeQuantumState");
|
||||
QSBCore.HarmonyHelper.Unpatch<SocketedQuantumObject>("MoveToSocket");
|
||||
QSBCore.HarmonyHelper.Unpatch<QuantumShuffleObject>("ChangeQuantumState");
|
||||
QSBCore.HarmonyHelper.Unpatch<MultiStateQuantumObject>("ChangeQuantumState");
|
||||
QSBCore.HarmonyHelper.Unpatch<QuantumState>("SetVisible");
|
||||
QSBCore.HarmonyHelper.Unpatch<QuantumShrine>("IsPlayerInDarkness");
|
||||
QSBCore.HarmonyHelper.Unpatch<QuantumShrine>("ChangeQuantumState");
|
||||
QSBCore.HarmonyHelper.Unpatch<QuantumShrine>("OnEntry");
|
||||
QSBCore.HarmonyHelper.Unpatch<QuantumShrine>("OnExit");
|
||||
QSBCore.HarmonyHelper.Unpatch<QuantumMoon>("CheckPlayerFogProximity");
|
||||
QSBCore.HarmonyHelper.Unpatch<QuantumObject>("IsLockedByPlayerContact");
|
||||
}
|
||||
|
||||
public static bool Object_IsLockedByPlayerContact(ref bool __result, QuantumObject __instance)
|
||||
|
@ -13,22 +13,22 @@ namespace QSB.QuantumSync.Patches
|
||||
|
||||
public override void DoPatches()
|
||||
{
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<ShapeVisibilityTracker>("IsVisibleUsingCameraFrustum", typeof(QuantumVisibilityPatches), nameof(ShapeIsVisibleUsingCameraFrustum));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<ShapeVisibilityTracker>("IsVisible", typeof(QuantumVisibilityPatches), nameof(ShapeIsVisible));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<RendererVisibilityTracker>("IsVisibleUsingCameraFrustum", typeof(QuantumVisibilityPatches), nameof(RenderIsVisibleUsingCameraFrustum));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<VisibilityObject>("CheckIllumination", typeof(QuantumVisibilityPatches), nameof(CheckIllumination));
|
||||
QSBCore.Helper.HarmonyHelper.AddPostfix<Shape>("OnEnable", typeof(QuantumVisibilityPatches), nameof(Shape_OnEnable));
|
||||
QSBCore.Helper.HarmonyHelper.AddPostfix<Shape>("OnDisable", typeof(QuantumVisibilityPatches), nameof(Shape_OnDisable));
|
||||
QSBCore.HarmonyHelper.AddPrefix<ShapeVisibilityTracker>("IsVisibleUsingCameraFrustum", typeof(QuantumVisibilityPatches), nameof(ShapeIsVisibleUsingCameraFrustum));
|
||||
QSBCore.HarmonyHelper.AddPrefix<ShapeVisibilityTracker>("IsVisible", typeof(QuantumVisibilityPatches), nameof(ShapeIsVisible));
|
||||
QSBCore.HarmonyHelper.AddPrefix<RendererVisibilityTracker>("IsVisibleUsingCameraFrustum", typeof(QuantumVisibilityPatches), nameof(RenderIsVisibleUsingCameraFrustum));
|
||||
QSBCore.HarmonyHelper.AddPrefix<VisibilityObject>("CheckIllumination", typeof(QuantumVisibilityPatches), nameof(CheckIllumination));
|
||||
QSBCore.HarmonyHelper.AddPostfix<Shape>("OnEnable", typeof(QuantumVisibilityPatches), nameof(Shape_OnEnable));
|
||||
QSBCore.HarmonyHelper.AddPostfix<Shape>("OnDisable", typeof(QuantumVisibilityPatches), nameof(Shape_OnDisable));
|
||||
}
|
||||
|
||||
public override void DoUnpatches()
|
||||
{
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<ShapeVisibilityTracker>("IsVisibleUsingCameraFrustum");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<ShapeVisibilityTracker>("IsVisible");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<RendererVisibilityTracker>("IsVisibleUsingCameraFrustum");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<VisibilityObject>("CheckIllumination");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<Shape>("OnEnable");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<Shape>("OnDisable");
|
||||
QSBCore.HarmonyHelper.Unpatch<ShapeVisibilityTracker>("IsVisibleUsingCameraFrustum");
|
||||
QSBCore.HarmonyHelper.Unpatch<ShapeVisibilityTracker>("IsVisible");
|
||||
QSBCore.HarmonyHelper.Unpatch<RendererVisibilityTracker>("IsVisibleUsingCameraFrustum");
|
||||
QSBCore.HarmonyHelper.Unpatch<VisibilityObject>("CheckIllumination");
|
||||
QSBCore.HarmonyHelper.Unpatch<Shape>("OnEnable");
|
||||
QSBCore.HarmonyHelper.Unpatch<Shape>("OnDisable");
|
||||
}
|
||||
|
||||
public static void Shape_OnEnable(Shape __instance)
|
||||
|
@ -13,10 +13,10 @@ namespace QSB.QuantumSync.Patches
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnServerClientConnect;
|
||||
|
||||
public override void DoPatches()
|
||||
=> QSBCore.Helper.HarmonyHelper.AddPrefix<QuantumMoon>("ChangeQuantumState", typeof(ServerQuantumPatches), nameof(Moon_ChangeQuantumState));
|
||||
=> QSBCore.HarmonyHelper.AddPrefix<QuantumMoon>("ChangeQuantumState", typeof(ServerQuantumPatches), nameof(Moon_ChangeQuantumState));
|
||||
|
||||
public override void DoUnpatches()
|
||||
=> QSBCore.Helper.HarmonyHelper.Unpatch<QuantumMoon>("ChangeQuantumState");
|
||||
=> QSBCore.HarmonyHelper.Unpatch<QuantumMoon>("ChangeQuantumState");
|
||||
|
||||
public static bool Moon_ChangeQuantumState(
|
||||
QuantumMoon __instance,
|
||||
|
@ -10,10 +10,10 @@ namespace QSB.StatueSync.Patches
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
public override void DoPatches()
|
||||
=> QSBCore.Helper.HarmonyHelper.AddPrefix<MemoryUplinkTrigger>("Update", typeof(StatuePatches), nameof(Statue_Update));
|
||||
=> QSBCore.HarmonyHelper.AddPrefix<MemoryUplinkTrigger>("Update", typeof(StatuePatches), nameof(Statue_Update));
|
||||
|
||||
public override void DoUnpatches()
|
||||
=> QSBCore.Helper.HarmonyHelper.Unpatch<MemoryUplinkTrigger>("Update");
|
||||
=> QSBCore.HarmonyHelper.Unpatch<MemoryUplinkTrigger>("Update");
|
||||
|
||||
public static bool Statue_Update(bool ____waitForPlayerGrounded)
|
||||
{
|
||||
|
@ -16,8 +16,8 @@ namespace QSB.TimeSync.Patches
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void DoPatches() => QSBCore.Helper.HarmonyHelper.AddPrefix<PlayerCameraEffectController>("OnStartOfTimeLoop", typeof(WakeUpPatches), nameof(OnStartOfTimeLoopPrefix));
|
||||
public override void DoPatches() => QSBCore.HarmonyHelper.AddPrefix<PlayerCameraEffectController>("OnStartOfTimeLoop", typeof(WakeUpPatches), nameof(OnStartOfTimeLoopPrefix));
|
||||
|
||||
public override void DoUnpatches() => QSBCore.Helper.HarmonyHelper.Unpatch<PlayerCameraEffectController>("OnStartOfTimeLoop");
|
||||
public override void DoUnpatches() => QSBCore.HarmonyHelper.Unpatch<PlayerCameraEffectController>("OnStartOfTimeLoop");
|
||||
}
|
||||
}
|
@ -44,10 +44,10 @@ namespace QSB.TimeSync
|
||||
}
|
||||
|
||||
public static void Start(TimeSyncType type) =>
|
||||
QSBCore.Helper.Events.Unity.RunWhen(() => Instance._isSetUp, () => Instance.StartTimeSync(type));
|
||||
QSBCore.UnityEvents.RunWhen(() => Instance._isSetUp, () => Instance.StartTimeSync(type));
|
||||
|
||||
public static void Stop() =>
|
||||
QSBCore.Helper.Events.Unity.RunWhen(() => Instance._isSetUp, () => Instance.EndTimeSync());
|
||||
QSBCore.UnityEvents.RunWhen(() => Instance._isSetUp, () => Instance.EndTimeSync());
|
||||
|
||||
private void StartTimeSync(TimeSyncType type)
|
||||
{
|
||||
|
@ -167,7 +167,7 @@ namespace QSB.Tools
|
||||
translatorRoot.transform.parent = cameraBody;
|
||||
translatorRoot.transform.localPosition = Vector3.zero;
|
||||
translatorRoot.transform.localScale = TranslatorScale;
|
||||
QSBCore.Helper.Events.Unity.FireOnNextUpdate(() => translatorRoot.SetActive(true));
|
||||
QSBCore.UnityEvents.FireOnNextUpdate(() => translatorRoot.SetActive(true));
|
||||
}
|
||||
|
||||
private static void CreateProbeLauncher(Transform cameraBody)
|
||||
|
@ -20,7 +20,7 @@ namespace QSB.TransformSync
|
||||
DontDestroyOnLoad(this);
|
||||
QSBWorldSync.OrbSyncList.Add(this);
|
||||
|
||||
QSBCore.Helper.Events.Unity.RunWhen(() => QSBCore.HasWokenUp, () => QSBCore.Helper.Events.Unity.FireOnNextUpdate(OnReady));
|
||||
QSBCore.UnityEvents.RunWhen(() => QSBCore.HasWokenUp, () => QSBCore.UnityEvents.FireOnNextUpdate(OnReady));
|
||||
}
|
||||
|
||||
private void OnReady()
|
||||
|
@ -41,7 +41,7 @@ namespace QSB.TransformSync
|
||||
|
||||
PlayerToolsManager.CreateProbe(body, Player);
|
||||
|
||||
QSBCore.Helper.Events.Unity.RunWhen(
|
||||
QSBCore.UnityEvents.RunWhen(
|
||||
() => Player.ProbeLauncher != null,
|
||||
() => SetSocket(Player.ProbeLauncher.ToolGameObject.transform));
|
||||
Player.ProbeBody = body.gameObject;
|
||||
|
@ -11,16 +11,16 @@ namespace QSB.TranslationSync.Patches
|
||||
|
||||
public override void DoPatches()
|
||||
{
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<NomaiWallText>("SetAsTranslated", typeof(SpiralPatches), nameof(Wall_SetAsTranslated));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<NomaiComputer>("SetAsTranslated", typeof(SpiralPatches), nameof(Computer_SetAsTranslated));
|
||||
QSBCore.Helper.HarmonyHelper.AddPrefix<NomaiVesselComputer>("SetAsTranslated", typeof(SpiralPatches), nameof(VesselComputer_SetAsTranslated));
|
||||
QSBCore.HarmonyHelper.AddPrefix<NomaiWallText>("SetAsTranslated", typeof(SpiralPatches), nameof(Wall_SetAsTranslated));
|
||||
QSBCore.HarmonyHelper.AddPrefix<NomaiComputer>("SetAsTranslated", typeof(SpiralPatches), nameof(Computer_SetAsTranslated));
|
||||
QSBCore.HarmonyHelper.AddPrefix<NomaiVesselComputer>("SetAsTranslated", typeof(SpiralPatches), nameof(VesselComputer_SetAsTranslated));
|
||||
}
|
||||
|
||||
public override void DoUnpatches()
|
||||
{
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<NomaiWallText>("SetAsTranslated");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<NomaiComputer>("SetAsTranslated");
|
||||
QSBCore.Helper.HarmonyHelper.Unpatch<NomaiVesselComputer>("SetAsTranslated");
|
||||
QSBCore.HarmonyHelper.Unpatch<NomaiWallText>("SetAsTranslated");
|
||||
QSBCore.HarmonyHelper.Unpatch<NomaiComputer>("SetAsTranslated");
|
||||
QSBCore.HarmonyHelper.Unpatch<NomaiVesselComputer>("SetAsTranslated");
|
||||
}
|
||||
|
||||
public static bool Wall_SetAsTranslated(NomaiWallText __instance, int id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user