mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-22 03:40:54 +00:00
cleanup
This commit is contained in:
parent
728baa1bcd
commit
274cf180c6
@ -1,9 +1,9 @@
|
|||||||
using System;
|
using OWML.ModHelper.Events;
|
||||||
using System.Linq;
|
|
||||||
using OWML.ModHelper.Events;
|
|
||||||
using QSB.Events;
|
using QSB.Events;
|
||||||
using QSB.Messaging;
|
using QSB.Messaging;
|
||||||
using QSB.Utility;
|
using QSB.Utility;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
using UnityEngine.Networking;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
using System.Linq;
|
using QSB.Events;
|
||||||
using QSB.Events;
|
using System.Linq;
|
||||||
|
|
||||||
namespace QSB.DeathSync
|
namespace QSB.DeathSync
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using Harmony;
|
||||||
using System.Reflection.Emit;
|
|
||||||
using Harmony;
|
|
||||||
using OWML.ModHelper.Events;
|
using OWML.ModHelper.Events;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Reflection.Emit;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace QSB.DeathSync
|
namespace QSB.DeathSync
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System.Linq;
|
using OWML.ModHelper.Events;
|
||||||
using OWML.ModHelper.Events;
|
|
||||||
using QSB.Events;
|
using QSB.Events;
|
||||||
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace QSB.DeathSync
|
namespace QSB.DeathSync
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using QSB.WorldSync;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using QSB.WorldSync;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace QSB.ElevatorSync
|
namespace QSB.ElevatorSync
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using OWML.ModHelper.Events;
|
using OWML.ModHelper.Events;
|
||||||
using QSB.Utility;
|
|
||||||
using QSB.WorldSync;
|
using QSB.WorldSync;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using QSB.Messaging;
|
using QSB.Messaging;
|
||||||
using QSB.Utility;
|
|
||||||
|
|
||||||
namespace QSB.Events
|
namespace QSB.Events
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using QSB.Messaging;
|
using QSB.Messaging;
|
||||||
using QSB.Utility;
|
|
||||||
using UnityEngine.Networking;
|
using UnityEngine.Networking;
|
||||||
|
|
||||||
namespace QSB.Events
|
namespace QSB.Events
|
||||||
@ -24,7 +23,7 @@ namespace QSB.Events
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QSB.Helper.Events.Unity.RunWhen(() => PlayerRegistry.GetTransformSync(message.AboutId) != null,
|
QSB.Helper.Events.Unity.RunWhen(() => PlayerRegistry.GetTransformSync(message.AboutId) != null,
|
||||||
() => PlayerRegistry.HandleFullStateMessage(message));
|
() => PlayerRegistry.HandleFullStateMessage(message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
using QSB.Messaging;
|
using QSB.Messaging;
|
||||||
using QSB.TransformSync;
|
using QSB.TransformSync;
|
||||||
using QSB.Utility;
|
|
||||||
|
|
||||||
namespace QSB.Events
|
namespace QSB.Events
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@ namespace QSB.GeyserSync
|
|||||||
WorldRegistry.AddObject(qsbGeyser);
|
WorldRegistry.AddObject(qsbGeyser);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void EmptyUpdate()
|
public void EmptyUpdate()
|
||||||
{
|
{
|
||||||
QSB.Helper.HarmonyHelper.EmptyMethod<GeyserController>("Update");
|
QSB.Helper.HarmonyHelper.EmptyMethod<GeyserController>("Update");
|
||||||
|
@ -6,7 +6,7 @@ namespace QSB.Messaging
|
|||||||
{
|
{
|
||||||
public uint FromId { get; set; }
|
public uint FromId { get; set; }
|
||||||
public uint AboutId { get; set; }
|
public uint AboutId { get; set; }
|
||||||
|
|
||||||
public override void Deserialize(NetworkReader reader)
|
public override void Deserialize(NetworkReader reader)
|
||||||
{
|
{
|
||||||
FromId = reader.ReadUInt32();
|
FromId = reader.ReadUInt32();
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System;
|
using QSB.Tools;
|
||||||
using System.Linq;
|
|
||||||
using QSB.Tools;
|
|
||||||
using QSB.TransformSync;
|
using QSB.TransformSync;
|
||||||
using QSB.Utility;
|
using QSB.Utility;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace QSB
|
namespace QSB
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
using System.Collections.Generic;
|
using QSB.Animation;
|
||||||
using System.Linq;
|
|
||||||
using QSB.TransformSync;
|
|
||||||
using QSB.Animation;
|
|
||||||
using QSB.Messaging;
|
using QSB.Messaging;
|
||||||
using System;
|
using QSB.TransformSync;
|
||||||
using QSB.Utility;
|
using QSB.Utility;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace QSB
|
namespace QSB
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@ namespace QSB
|
|||||||
{
|
{
|
||||||
Helper = ModHelper;
|
Helper = ModHelper;
|
||||||
DebugLog.ToConsole($"* Start of QSB version {Helper.Manifest.Version} - authored by {Helper.Manifest.Author}", MessageType.Info);
|
DebugLog.ToConsole($"* Start of QSB version {Helper.Manifest.Version} - authored by {Helper.Manifest.Author}", MessageType.Info);
|
||||||
|
|
||||||
NetworkAssetBundle = Helper.Assets.LoadBundle("assets/network");
|
NetworkAssetBundle = Helper.Assets.LoadBundle("assets/network");
|
||||||
DebugLog.OkayState("NetworkBundle", NetworkAssetBundle);
|
DebugLog.OkayState("NetworkBundle", NetworkAssetBundle);
|
||||||
Patches.DoPatches();
|
Patches.DoPatches();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System;
|
using OWML.ModHelper.Events;
|
||||||
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OWML.ModHelper.Events;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
using UnityEngine.Networking;
|
||||||
|
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
using System;
|
using QSB.Animation;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using QSB.Animation;
|
|
||||||
using QSB.DeathSync;
|
using QSB.DeathSync;
|
||||||
using QSB.Events;
|
using QSB.Events;
|
||||||
using QSB.GeyserSync;
|
using QSB.GeyserSync;
|
||||||
using QSB.TimeSync;
|
using QSB.TimeSync;
|
||||||
using QSB.TransformSync;
|
using QSB.TransformSync;
|
||||||
using QSB.Utility;
|
using QSB.Utility;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
using UnityEngine.Networking;
|
||||||
|
|
||||||
@ -116,7 +115,7 @@ namespace QSB
|
|||||||
Destroy(GetComponent<PreventShipDestruction>());
|
Destroy(GetComponent<PreventShipDestruction>());
|
||||||
EventList.Reset();
|
EventList.Reset();
|
||||||
PlayerRegistry.PlayerList.ForEach(player => player.HudMarker?.Remove());
|
PlayerRegistry.PlayerList.ForEach(player => player.HudMarker?.Remove());
|
||||||
|
|
||||||
foreach (var player in PlayerRegistry.PlayerList.Where(x => x.NetId != PlayerRegistry.LocalPlayerId))
|
foreach (var player in PlayerRegistry.PlayerList.Where(x => x.NetId != PlayerRegistry.LocalPlayerId))
|
||||||
{
|
{
|
||||||
for (uint i = 0; i < QSB.NETWORK_OBJECT_COUNT; i++)
|
for (uint i = 0; i < QSB.NETWORK_OBJECT_COUNT; i++)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
using System.Linq;
|
using OWML.ModHelper.Events;
|
||||||
using OWML.ModHelper.Events;
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace QSB.Tools
|
namespace QSB.Tools
|
||||||
@ -28,7 +28,7 @@ namespace QSB.Tools
|
|||||||
CreateFlashlight();
|
CreateFlashlight();
|
||||||
CreateSignalscope();
|
CreateSignalscope();
|
||||||
CreateProbeLauncher();
|
CreateProbeLauncher();
|
||||||
CreateTranslator();
|
CreateTranslator();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void CreateProbe(Transform body, PlayerInfo player)
|
public static void CreateProbe(Transform body, PlayerInfo player)
|
||||||
|
@ -9,12 +9,12 @@ namespace QSB.TransformSync
|
|||||||
public static PlayerCameraSync LocalInstance { get; private set; }
|
public static PlayerCameraSync LocalInstance { get; private set; }
|
||||||
|
|
||||||
protected override uint PlayerIdOffset => 2;
|
protected override uint PlayerIdOffset => 2;
|
||||||
|
|
||||||
public override void OnStartLocalPlayer()
|
public override void OnStartLocalPlayer()
|
||||||
{
|
{
|
||||||
LocalInstance = this;
|
LocalInstance = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Transform InitLocalTransform()
|
protected override Transform InitLocalTransform()
|
||||||
{
|
{
|
||||||
var body = Locator.GetPlayerCamera().gameObject.transform;
|
var body = Locator.GetPlayerCamera().gameObject.transform;
|
||||||
|
@ -8,7 +8,7 @@ namespace QSB.TransformSync
|
|||||||
public static PlayerProbeSync LocalInstance { get; private set; }
|
public static PlayerProbeSync LocalInstance { get; private set; }
|
||||||
|
|
||||||
protected override uint PlayerIdOffset => 3;
|
protected override uint PlayerIdOffset => 3;
|
||||||
|
|
||||||
public Transform bodyTransform;
|
public Transform bodyTransform;
|
||||||
|
|
||||||
public override void OnStartLocalPlayer()
|
public override void OnStartLocalPlayer()
|
||||||
|
@ -43,7 +43,7 @@ namespace QSB.TransformSync
|
|||||||
|
|
||||||
var transformSync = PlayerRegistry.GetTransformSync(message.AboutId);
|
var transformSync = PlayerRegistry.GetTransformSync(message.AboutId);
|
||||||
|
|
||||||
QSB.Helper.Events.Unity.RunWhen(() => transformSync.SyncedTransform != null,
|
QSB.Helper.Events.Unity.RunWhen(() => transformSync.SyncedTransform != null,
|
||||||
() => transformSync.SetReferenceSector(sector));
|
() => transformSync.SetReferenceSector(sector));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ namespace QSB.TransformSync
|
|||||||
public string Name => Sector.name;
|
public string Name => Sector.name;
|
||||||
public Transform Transform => Sector.transform;
|
public Transform Transform => Sector.transform;
|
||||||
public Vector3 Position => Transform.position;
|
public Vector3 Position => Transform.position;
|
||||||
|
|
||||||
public void Init(Sector sector, int id)
|
public void Init(Sector sector, int id)
|
||||||
{
|
{
|
||||||
Sector = sector;
|
Sector = sector;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
using System.Linq;
|
using QSB.WorldSync;
|
||||||
using QSB.WorldSync;
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace QSB.TransformSync
|
namespace QSB.TransformSync
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
using UnityEngine;
|
using QSB.Events;
|
||||||
using QSB.Events;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace QSB.TransformSync
|
namespace QSB.TransformSync
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System;
|
using OWML.Common;
|
||||||
using OWML.Common;
|
|
||||||
using QSB.Utility;
|
using QSB.Utility;
|
||||||
|
using System;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Networking;
|
using UnityEngine.Networking;
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ namespace QSB.TransformSync
|
|||||||
{
|
{
|
||||||
Show();
|
Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
SyncedTransform.localPosition = Vector3.SmoothDamp(SyncedTransform.localPosition, transform.position, ref _positionSmoothVelocity, SmoothTime);
|
SyncedTransform.localPosition = Vector3.SmoothDamp(SyncedTransform.localPosition, transform.position, ref _positionSmoothVelocity, SmoothTime);
|
||||||
SyncedTransform.localRotation = QuaternionHelper.SmoothDamp(SyncedTransform.localRotation, transform.rotation, ref _rotationSmoothVelocity, Time.deltaTime);
|
SyncedTransform.localRotation = QuaternionHelper.SmoothDamp(SyncedTransform.localRotation, transform.rotation, ref _rotationSmoothVelocity, Time.deltaTime);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using OWML.Common;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OWML.Common;
|
|
||||||
|
|
||||||
namespace QSB.Utility
|
namespace QSB.Utility
|
||||||
{
|
{
|
||||||
|
@ -15,7 +15,7 @@ namespace QSB.Utility
|
|||||||
if (!____isRetrieving)
|
if (!____isRetrieving)
|
||||||
{
|
{
|
||||||
GlobalMessenger.FireEvent(EventNames.QSBOnProbeWarp);
|
GlobalMessenger.FireEvent(EventNames.QSBOnProbeWarp);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user