mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-06 01:00:16 +00:00
move things around
This commit is contained in:
parent
ad9ad8a676
commit
4f1b2c31c1
@ -1,6 +1,7 @@
|
||||
using OWML.Common;
|
||||
using QSB.Messaging;
|
||||
using QSB.Player;
|
||||
using QSB.Player.TransformSync;
|
||||
using QSB.TransformSync;
|
||||
using QSB.Utility;
|
||||
using QuantumUNET;
|
||||
|
@ -3,7 +3,7 @@ using QSB.WorldSync;
|
||||
using QuantumUNET;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QSB.TransformSync
|
||||
namespace QSB.OrbSync.TransformSync
|
||||
{
|
||||
public class NomaiOrbTransformSync : QNetworkBehaviour
|
||||
{
|
@ -1,6 +1,7 @@
|
||||
using OWML.Common;
|
||||
using QSB.Events;
|
||||
using QSB.SectorSync.WorldObjects;
|
||||
using QSB.TransformSync;
|
||||
using QSB.Utility;
|
||||
using QSB.WorldSync;
|
||||
using QSB.WorldSync.Events;
|
||||
@ -36,7 +37,7 @@ namespace QSB.Player.Events
|
||||
return;
|
||||
}
|
||||
|
||||
var transformSync = QSBPlayerManager.GetSyncObject<TransformSync.TransformSync>(message.AboutId);
|
||||
var transformSync = QSBPlayerManager.GetSyncObject<SyncObjectTransformSync>(message.AboutId);
|
||||
|
||||
QSBCore.UnityEvents.RunWhen(() => transformSync?.SyncedTransform != null,
|
||||
() => transformSync?.SetReferenceSector(sector));
|
||||
|
@ -3,6 +3,7 @@ using QSB.CampfireSync.WorldObjects;
|
||||
using QSB.Events;
|
||||
using QSB.Messaging;
|
||||
using QSB.QuantumSync;
|
||||
using QSB.TransformSync;
|
||||
using QSB.TranslationSync;
|
||||
using QSB.TranslationSync.WorldObjects;
|
||||
using QSB.Utility;
|
||||
@ -30,7 +31,7 @@ namespace QSB.Player.Events
|
||||
{
|
||||
DebugLog.DebugWrite($"Get state request from {message.FromId} - isServer?{server}");
|
||||
QSBEventManager.FireEvent(EventNames.QSBServerSendPlayerStates);
|
||||
foreach (var item in QSBPlayerManager.GetSyncObjects<TransformSync.TransformSync>()
|
||||
foreach (var item in QSBPlayerManager.GetSyncObjects<SyncObjectTransformSync>()
|
||||
.Where(x => x != null && x.IsReady && x.ReferenceSector != null))
|
||||
{
|
||||
QSBEventManager.FireEvent(EventNames.QSBSectorChange, item.NetId.Value, item.ReferenceSector);
|
||||
|
@ -1,5 +1,6 @@
|
||||
using OWML.Common;
|
||||
using QSB.Events;
|
||||
using QSB.TransformSync;
|
||||
using QSB.Utility;
|
||||
|
||||
namespace QSB.Player.Events
|
||||
@ -32,7 +33,7 @@ namespace QSB.Player.Events
|
||||
{
|
||||
DebugLog.DebugWrite($"Received playerstate of player ID {message.AboutId}", MessageType.Info);
|
||||
QSBCore.UnityEvents.RunWhen(
|
||||
() => QSBPlayerManager.GetSyncObject<TransformSync.TransformSync>(message.AboutId) != null,
|
||||
() => QSBPlayerManager.GetSyncObject<SyncObjectTransformSync>(message.AboutId) != null,
|
||||
() => QSBPlayerManager.HandleFullStateMessage(message));
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
using OWML.Common;
|
||||
using QSB.Player.Events;
|
||||
using QSB.Player.TransformSync;
|
||||
using QSB.Tools;
|
||||
using QSB.TransformSync;
|
||||
using QSB.Utility;
|
||||
|
@ -1,12 +1,13 @@
|
||||
using QSB.Events;
|
||||
using QSB.Player;
|
||||
using QSB.Tools;
|
||||
using QSB.TransformSync;
|
||||
using QSB.Utility;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QSB.TransformSync
|
||||
namespace QSB.Player.TransformSync
|
||||
{
|
||||
public class PlayerCameraSync : TransformSync
|
||||
public class PlayerCameraSync : SyncObjectTransformSync
|
||||
{
|
||||
protected override Transform InitLocalTransform()
|
||||
{
|
@ -1,11 +1,12 @@
|
||||
using QSB.Animation;
|
||||
using QSB.Instruments;
|
||||
using QSB.Player;
|
||||
using QSB.TransformSync;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QSB.TransformSync
|
||||
namespace QSB.Player.TransformSync
|
||||
{
|
||||
public class PlayerTransformSync : TransformSync
|
||||
public class PlayerTransformSync : SyncObjectTransformSync
|
||||
{
|
||||
public static PlayerTransformSync LocalInstance { get; private set; }
|
||||
|
@ -1,12 +1,13 @@
|
||||
using OWML.Common;
|
||||
using QSB.Player;
|
||||
using QSB.Tools;
|
||||
using QSB.TransformSync;
|
||||
using QSB.Utility;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QSB.TransformSync
|
||||
namespace QSB.ProbeSync.TransformSync
|
||||
{
|
||||
public class PlayerProbeSync : TransformSync
|
||||
public class PlayerProbeSync : SyncObjectTransformSync
|
||||
{
|
||||
private Transform _disabledSocket;
|
||||
|
@ -228,7 +228,7 @@
|
||||
<Compile Include="StatueSync\Events\StartStatueMessage.cs" />
|
||||
<Compile Include="StatueSync\Patches\StatuePatches.cs" />
|
||||
<Compile Include="StatueSync\StatueManager.cs" />
|
||||
<Compile Include="TransformSync\RoastingStickTransformSync.cs" />
|
||||
<Compile Include="RoastingSync\TransformSync\RoastingStickTransformSync.cs" />
|
||||
<Compile Include="TranslationSync\Events\SetAsTranslatedEvent.cs" />
|
||||
<Compile Include="TranslationSync\Events\SetAsTranslatedMessage.cs" />
|
||||
<Compile Include="TranslationSync\NomaiTextType.cs" />
|
||||
@ -244,7 +244,7 @@
|
||||
<Compile Include="Player\Events\PlayerJoinEvent.cs" />
|
||||
<Compile Include="Tools\Events\PlayerProbeEvent.cs" />
|
||||
<Compile Include="Player\Events\PlayerReadyEvent.cs" />
|
||||
<Compile Include="TransformSync\NomaiOrbTransformSync.cs" />
|
||||
<Compile Include="OrbSync\TransformSync\NomaiOrbTransformSync.cs" />
|
||||
<Compile Include="Player\Events\PlayerSectorEvent.cs" />
|
||||
<Compile Include="Player\Events\PlayerStatesRequestEvent.cs" />
|
||||
<Compile Include="Animation\Events\PlayerSuitEvent.cs" />
|
||||
@ -260,7 +260,7 @@
|
||||
<Compile Include="Messaging\ToggleMessage.cs" />
|
||||
<Compile Include="SectorSync\WorldObjects\QSBSector.cs" />
|
||||
<Compile Include="SectorSync\SectorSync.cs" />
|
||||
<Compile Include="TransformSync\TransformSync.cs" />
|
||||
<Compile Include="TransformSync\SyncObjectTransformSync.cs" />
|
||||
<Compile Include="Utility\CustomCallbacks.cs" />
|
||||
<Compile Include="Utility\DebugBoxManager.cs" />
|
||||
<Compile Include="Utility\DebugZOverride.cs" />
|
||||
@ -289,7 +289,7 @@
|
||||
<Compile Include="Tools\QSBProbe.cs" />
|
||||
<Compile Include="Tools\QSBTool.cs" />
|
||||
<Compile Include="Tools\ToolType.cs" />
|
||||
<Compile Include="TransformSync\PlayerProbeSync.cs" />
|
||||
<Compile Include="ProbeSync\TransformSync\PlayerProbeSync.cs" />
|
||||
<Compile Include="Utility\DebugActions.cs" />
|
||||
<Compile Include="Events\QSBEventManager.cs" />
|
||||
<Compile Include="Player\Events\PlayerStateMessage.cs" />
|
||||
@ -302,19 +302,19 @@
|
||||
<Compile Include="Player\State.cs" />
|
||||
<Compile Include="DeathSync\RespawnOnDeath.cs" />
|
||||
<Compile Include="Player\QSBPlayerManager.cs" />
|
||||
<Compile Include="TransformSync\PlayerCameraSync.cs" />
|
||||
<Compile Include="Player\TransformSync\PlayerCameraSync.cs" />
|
||||
<Compile Include="Utility\FlagsHelper.cs" />
|
||||
<Compile Include="Player\PlayerHUDMarker.cs" />
|
||||
<Compile Include="Tools\PlayerToolsManager.cs" />
|
||||
<Compile Include="Utility\QuaternionHelper.cs" />
|
||||
<Compile Include="TimeSync\PreserveTimeScale.cs" />
|
||||
<Compile Include="TransformSync\ShipTransformSync.cs" />
|
||||
<Compile Include="ShipSync\TransformSync\ShipTransformSync.cs" />
|
||||
<Compile Include="SectorSync\QSBSectorManager.cs" />
|
||||
<Compile Include="TimeSync\Events\ServerTimeMessage.cs" />
|
||||
<Compile Include="TimeSync\WakeUpSync.cs" />
|
||||
<Compile Include="QSBNetworkManager.cs" />
|
||||
<Compile Include="QSBCore.cs" />
|
||||
<Compile Include="TransformSync\PlayerTransformSync.cs" />
|
||||
<Compile Include="Player\TransformSync\PlayerTransformSync.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="WorldSync\FactReveal.cs" />
|
||||
<Compile Include="WorldSync\IWorldObject.cs" />
|
||||
|
@ -9,6 +9,7 @@ using QSB.ItemSync;
|
||||
using QSB.OrbSync;
|
||||
using QSB.Patches;
|
||||
using QSB.Player;
|
||||
using QSB.Player.TransformSync;
|
||||
using QSB.PoolSync;
|
||||
using QSB.QuantumSync;
|
||||
using QSB.QuantumSync.WorldObjects;
|
||||
|
@ -4,9 +4,14 @@ using QSB.Animation;
|
||||
using QSB.DeathSync;
|
||||
using QSB.Events;
|
||||
using QSB.Instruments;
|
||||
using QSB.OrbSync.TransformSync;
|
||||
using QSB.Patches;
|
||||
using QSB.Player;
|
||||
using QSB.Player.TransformSync;
|
||||
using QSB.PoolSync;
|
||||
using QSB.ProbeSync.TransformSync;
|
||||
using QSB.RoastingSync.TransformSync;
|
||||
using QSB.ShipSync.TransformSync;
|
||||
using QSB.TimeSync;
|
||||
using QSB.TransformSync;
|
||||
using QSB.Utility;
|
||||
|
@ -1,13 +1,14 @@
|
||||
using OWML.Utils;
|
||||
using QSB.Player;
|
||||
using QSB.RoastingSync;
|
||||
using QSB.TransformSync;
|
||||
using QSB.Utility;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QSB.TransformSync
|
||||
namespace QSB.RoastingSync.TransformSync
|
||||
{
|
||||
internal class RoastingStickTransformSync : TransformSync
|
||||
internal class RoastingStickTransformSync : SyncObjectTransformSync
|
||||
{
|
||||
private Transform _stickTip;
|
||||
private Transform _networkStickTip => gameObject.transform.GetChild(0);
|
@ -21,7 +21,7 @@ namespace QSB.SectorSync
|
||||
|
||||
public void Invoke()
|
||||
{
|
||||
QSBPlayerManager.GetSyncObjects<TransformSync.TransformSync>()
|
||||
QSBPlayerManager.GetSyncObjects<TransformSync.SyncObjectTransformSync>()
|
||||
.Where(x => x.HasAuthority).ToList().ForEach(CheckTransformSyncSector);
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ namespace QSB.SectorSync
|
||||
IsReady = QSBWorldSync.GetWorldObjects<QSBSector>().Any();
|
||||
}
|
||||
|
||||
private void CheckTransformSyncSector(TransformSync.TransformSync transformSync)
|
||||
private void CheckTransformSyncSector(TransformSync.SyncObjectTransformSync transformSync)
|
||||
{
|
||||
var syncedTransform = transformSync.SyncedTransform;
|
||||
if (syncedTransform == null || syncedTransform.position == Vector3.zero)
|
||||
|
@ -1,9 +1,10 @@
|
||||
using QSB.Player;
|
||||
using QSB.TransformSync;
|
||||
using UnityEngine;
|
||||
|
||||
namespace QSB.TransformSync
|
||||
namespace QSB.ShipSync.TransformSync
|
||||
{
|
||||
public class ShipTransformSync : TransformSync
|
||||
public class ShipTransformSync : SyncObjectTransformSync
|
||||
{
|
||||
private Transform GetShipModel() => Locator.GetShipTransform();
|
||||
|
@ -1,5 +1,6 @@
|
||||
using OWML.Common;
|
||||
using QSB.Player;
|
||||
using QSB.Player.TransformSync;
|
||||
using QSB.SectorSync.WorldObjects;
|
||||
using QSB.Utility;
|
||||
using System.Linq;
|
||||
@ -7,7 +8,7 @@ using UnityEngine;
|
||||
|
||||
namespace QSB.TransformSync
|
||||
{
|
||||
public abstract class TransformSync : PlayerSyncObject
|
||||
public abstract class SyncObjectTransformSync : PlayerSyncObject
|
||||
{
|
||||
public abstract bool IsReady { get; }
|
||||
|
@ -1,5 +1,6 @@
|
||||
using OWML.Utils;
|
||||
using QSB.Player;
|
||||
using QSB.Player.TransformSync;
|
||||
using QSB.TransformSync;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
@ -1,4 +1,5 @@
|
||||
using OWML.Common;
|
||||
using QSB.Player.TransformSync;
|
||||
using QSB.TransformSync;
|
||||
using QuantumUNET;
|
||||
using System;
|
||||
|
@ -1,4 +1,5 @@
|
||||
using OWML.Common;
|
||||
using QSB.OrbSync.TransformSync;
|
||||
using QSB.OrbSync.WorldObjects;
|
||||
using QSB.TransformSync;
|
||||
using QSB.Utility;
|
||||
|
Loading…
Reference in New Issue
Block a user