diff --git a/QSB.sln b/QSB.sln index a228a92f..95d71f00 100644 --- a/QSB.sln +++ b/QSB.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.29613.14 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QSB", "QSB\QSB.csproj", "{1F00090A-C697-4C55-B401-192F3CFB9DC2}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuantumUNET", "QuantumUNET\QuantumUNET.csproj", "{C8C53004-1508-4F86-A419-4292C188DC2A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +17,10 @@ Global {1F00090A-C697-4C55-B401-192F3CFB9DC2}.Debug|Any CPU.Build.0 = Debug|Any CPU {1F00090A-C697-4C55-B401-192F3CFB9DC2}.Release|Any CPU.ActiveCfg = Release|Any CPU {1F00090A-C697-4C55-B401-192F3CFB9DC2}.Release|Any CPU.Build.0 = Release|Any CPU + {C8C53004-1508-4F86-A419-4292C188DC2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C8C53004-1508-4F86-A419-4292C188DC2A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C8C53004-1508-4F86-A419-4292C188DC2A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C8C53004-1508-4F86-A419-4292C188DC2A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/QSB/Animation/AnimationSync.cs b/QSB/Animation/AnimationSync.cs index 7ec1df7c..816bd1a0 100644 --- a/QSB/Animation/AnimationSync.cs +++ b/QSB/Animation/AnimationSync.cs @@ -5,6 +5,7 @@ using QSB.Player; using QSB.Utility; using System.Linq; using UnityEngine; +using QuantumUNET; namespace QSB.Animation { diff --git a/QSB/Animation/CrouchSync.cs b/QSB/Animation/CrouchSync.cs index 55c9699d..f1c0dfbd 100644 --- a/QSB/Animation/CrouchSync.cs +++ b/QSB/Animation/CrouchSync.cs @@ -1,4 +1,4 @@ -using QSB.QuantumUNET; +using QuantumUNET; using System; using UnityEngine; diff --git a/QSB/ConversationSync/Events/ConversationMessage.cs b/QSB/ConversationSync/Events/ConversationMessage.cs index c41c0c8a..206072c0 100644 --- a/QSB/ConversationSync/Events/ConversationMessage.cs +++ b/QSB/ConversationSync/Events/ConversationMessage.cs @@ -1,5 +1,5 @@ using QSB.Messaging; -using QSB.QuantumUNET; +using QuantumUNET; namespace QSB.ConversationSync.Events { diff --git a/QSB/ConversationSync/Events/ConversationStartEndMessage.cs b/QSB/ConversationSync/Events/ConversationStartEndMessage.cs index 8b117569..75db950d 100644 --- a/QSB/ConversationSync/Events/ConversationStartEndMessage.cs +++ b/QSB/ConversationSync/Events/ConversationStartEndMessage.cs @@ -1,5 +1,5 @@ using QSB.Messaging; -using QSB.QuantumUNET; +using QuantumUNET; namespace QSB.ConversationSync.Events { diff --git a/QSB/EventsCore/QSBEvent.cs b/QSB/EventsCore/QSBEvent.cs index f49dfeb8..fe8bcb0c 100644 --- a/QSB/EventsCore/QSBEvent.cs +++ b/QSB/EventsCore/QSBEvent.cs @@ -1,6 +1,6 @@ using QSB.Messaging; using QSB.Player; -using QSB.QuantumUNET; +using QuantumUNET; using QSB.TransformSync; namespace QSB.EventsCore diff --git a/QSB/GeyserSync/QSBGeyser.cs b/QSB/GeyserSync/QSBGeyser.cs index 0b5e6fcd..484898e5 100644 --- a/QSB/GeyserSync/QSBGeyser.cs +++ b/QSB/GeyserSync/QSBGeyser.cs @@ -1,5 +1,5 @@ using QSB.EventsCore; -using QSB.QuantumUNET; +using QuantumUNET; using QSB.WorldSync; namespace QSB.GeyserSync diff --git a/QSB/MessagesCore/EnumMessage.cs b/QSB/MessagesCore/EnumMessage.cs index 1a009f74..e970fb60 100644 --- a/QSB/MessagesCore/EnumMessage.cs +++ b/QSB/MessagesCore/EnumMessage.cs @@ -1,5 +1,5 @@ using QSB.Messaging; -using QSB.QuantumUNET; +using QuantumUNET; namespace QSB.MessagesCore { diff --git a/QSB/MessagesCore/FloatMessage.cs b/QSB/MessagesCore/FloatMessage.cs index 46bab71c..d2e08802 100644 --- a/QSB/MessagesCore/FloatMessage.cs +++ b/QSB/MessagesCore/FloatMessage.cs @@ -1,5 +1,5 @@ using QSB.Messaging; -using QSB.QuantumUNET; +using QuantumUNET; namespace QSB.MessagesCore { diff --git a/QSB/MessagesCore/MessageHandler.cs b/QSB/MessagesCore/MessageHandler.cs index ed8dd5f5..c820c065 100644 --- a/QSB/MessagesCore/MessageHandler.cs +++ b/QSB/MessagesCore/MessageHandler.cs @@ -1,6 +1,6 @@ using OWML.Common; using QSB.EventsCore; -using QSB.QuantumUNET; +using QuantumUNET; using QSB.Utility; using System; using System.Linq; diff --git a/QSB/MessagesCore/PlayerMessage.cs b/QSB/MessagesCore/PlayerMessage.cs index 83e611cd..51609d9e 100644 --- a/QSB/MessagesCore/PlayerMessage.cs +++ b/QSB/MessagesCore/PlayerMessage.cs @@ -1,4 +1,4 @@ -using QSB.QuantumUNET; +using QuantumUNET; namespace QSB.Messaging { diff --git a/QSB/MessagesCore/ToggleMessage.cs b/QSB/MessagesCore/ToggleMessage.cs index 538c73e7..0956b3b2 100644 --- a/QSB/MessagesCore/ToggleMessage.cs +++ b/QSB/MessagesCore/ToggleMessage.cs @@ -1,4 +1,4 @@ -using QSB.QuantumUNET; +using QuantumUNET; namespace QSB.Messaging { diff --git a/QSB/OrbSync/Events/OrbUserEvent.cs b/QSB/OrbSync/Events/OrbUserEvent.cs index 675cc3a9..bfa741f2 100644 --- a/QSB/OrbSync/Events/OrbUserEvent.cs +++ b/QSB/OrbSync/Events/OrbUserEvent.cs @@ -1,6 +1,6 @@ using OWML.Common; using QSB.EventsCore; -using QSB.QuantumUNET; +using QuantumUNET; using QSB.Utility; using QSB.WorldSync; using QSB.WorldSync.Events; diff --git a/QSB/OrbSync/OrbManager.cs b/QSB/OrbSync/OrbManager.cs index 3108b184..1cd50563 100644 --- a/QSB/OrbSync/OrbManager.cs +++ b/QSB/OrbSync/OrbManager.cs @@ -1,5 +1,5 @@ using OWML.Common; -using QSB.QuantumUNET; +using QuantumUNET; using QSB.Utility; using QSB.WorldSync; using System.Linq; diff --git a/QSB/Player/Events/PlayerJoinMessage.cs b/QSB/Player/Events/PlayerJoinMessage.cs index 21b79d0c..0e695424 100644 --- a/QSB/Player/Events/PlayerJoinMessage.cs +++ b/QSB/Player/Events/PlayerJoinMessage.cs @@ -1,5 +1,5 @@ using QSB.Messaging; -using QSB.QuantumUNET; +using QuantumUNET; namespace QSB.Player.Events { diff --git a/QSB/Player/Events/PlayerLeaveMessage.cs b/QSB/Player/Events/PlayerLeaveMessage.cs index b05b6cb2..08d3126b 100644 --- a/QSB/Player/Events/PlayerLeaveMessage.cs +++ b/QSB/Player/Events/PlayerLeaveMessage.cs @@ -1,5 +1,5 @@ using QSB.Messaging; -using QSB.QuantumUNET; +using QuantumUNET; using System; using System.Linq; diff --git a/QSB/Player/Events/PlayerStateMessage.cs b/QSB/Player/Events/PlayerStateMessage.cs index 719f4ca7..bcf5cd61 100644 --- a/QSB/Player/Events/PlayerStateMessage.cs +++ b/QSB/Player/Events/PlayerStateMessage.cs @@ -1,5 +1,5 @@ using QSB.Messaging; -using QSB.QuantumUNET; +using QuantumUNET; namespace QSB.Player.Events { diff --git a/QSB/Player/PlayerSyncObject.cs b/QSB/Player/PlayerSyncObject.cs index 73fed646..7cd9145e 100644 --- a/QSB/Player/PlayerSyncObject.cs +++ b/QSB/Player/PlayerSyncObject.cs @@ -1,4 +1,4 @@ -using QSB.QuantumUNET; +using QuantumUNET; namespace QSB.Player { diff --git a/QSB/Player/QSBPlayerManager.cs b/QSB/Player/QSBPlayerManager.cs index c4fc4dc4..093b43a0 100644 --- a/QSB/Player/QSBPlayerManager.cs +++ b/QSB/Player/QSBPlayerManager.cs @@ -1,6 +1,6 @@ using OWML.Common; using QSB.Player.Events; -using QSB.QuantumUNET; +using QuantumUNET; using QSB.TransformSync; using QSB.Utility; using System.Collections.Generic; diff --git a/QSB/QSB.cs b/QSB/QSB.cs index bc56b8e7..31ed7f39 100644 --- a/QSB/QSB.cs +++ b/QSB/QSB.cs @@ -6,7 +6,7 @@ using QSB.ElevatorSync; using QSB.GeyserSync; using QSB.OrbSync; using QSB.Patches; -using QSB.QuantumUNET; +using QuantumUNET; using QSB.SectorSync; using QSB.TimeSync; using QSB.Utility; diff --git a/QSB/QSB.csproj b/QSB/QSB.csproj index 033077b8..fb321ef5 100644 --- a/QSB/QSB.csproj +++ b/QSB/QSB.csproj @@ -127,21 +127,7 @@ - - - - - - - - - - - - - - @@ -172,48 +158,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -286,7 +235,12 @@ - + + + {C8C53004-1508-4F86-A419-4292C188DC2A} + QuantumUNET + + md "$(OwmlDir)\Mods\$(ProjectName)" diff --git a/QSB/QSBNetworkManager.cs b/QSB/QSBNetworkManager.cs index 33d94e1f..afdffc7a 100644 --- a/QSB/QSBNetworkManager.cs +++ b/QSB/QSBNetworkManager.cs @@ -9,7 +9,7 @@ using QSB.Instruments; using QSB.OrbSync; using QSB.Patches; using QSB.Player; -using QSB.QuantumUNET; +using QuantumUNET; using QSB.SectorSync; using QSB.TimeSync; using QSB.TransformSync; @@ -156,13 +156,6 @@ namespace QSB { WorldRegistry.OldDialogueTrees = Resources.FindObjectsOfTypeAll().ToList(); } - - QSBNetworkServer.UnregisterHandler(40); - QSBNetworkServer.UnregisterHandler(41); - QSBNetworkServer.UnregisterHandler(42); - QSBNetworkServer.RegisterHandler(40, new QSBNetworkMessageDelegate(QSBNetworkAnimator.OnAnimationServerMessage)); - QSBNetworkServer.RegisterHandler(41, new QSBNetworkMessageDelegate(QSBNetworkAnimator.OnAnimationParametersServerMessage)); - QSBNetworkServer.RegisterHandler(42, new QSBNetworkMessageDelegate(QSBNetworkAnimator.OnAnimationTriggerServerMessage)); } public override void OnServerAddPlayer(QSBNetworkConnection connection, short playerControllerId) // Called on the server when a client joins @@ -193,13 +186,7 @@ namespace QSB if (!QSBNetworkServer.localClientActive) { QSBPatchManager.DoPatchType(QSBPatchTypes.OnNonServerClientConnect); - singleton.client.UnregisterHandler(40); - singleton.client.UnregisterHandler(41); - singleton.client.RegisterHandlerSafe(40, new QSBNetworkMessageDelegate(QSBNetworkAnimator.OnAnimationClientMessage)); - singleton.client.RegisterHandlerSafe(41, new QSBNetworkMessageDelegate(QSBNetworkAnimator.OnAnimationParametersClientMessage)); } - singleton.client.UnregisterHandler(42); - singleton.client.RegisterHandlerSafe(42, new QSBNetworkMessageDelegate(QSBNetworkAnimator.OnAnimationTriggerClientMessage)); QSBPatchManager.DoPatchType(QSBPatchTypes.OnClientConnect); diff --git a/QSB/TimeSync/Events/ServerTimeMessage.cs b/QSB/TimeSync/Events/ServerTimeMessage.cs index 9054e6fe..407d2bfc 100644 --- a/QSB/TimeSync/Events/ServerTimeMessage.cs +++ b/QSB/TimeSync/Events/ServerTimeMessage.cs @@ -1,5 +1,5 @@ using QSB.Messaging; -using QSB.QuantumUNET; +using QuantumUNET; namespace QSB.TimeSync.Events { diff --git a/QSB/TimeSync/PreserveTimeScale.cs b/QSB/TimeSync/PreserveTimeScale.cs index c24cf74c..c0f08628 100644 --- a/QSB/TimeSync/PreserveTimeScale.cs +++ b/QSB/TimeSync/PreserveTimeScale.cs @@ -1,5 +1,5 @@ using OWML.ModHelper.Events; -using QSB.QuantumUNET; +using QuantumUNET; namespace QSB.TimeSync { diff --git a/QSB/TimeSync/WakeUpSync.cs b/QSB/TimeSync/WakeUpSync.cs index 5a033b58..01b3b4ec 100644 --- a/QSB/TimeSync/WakeUpSync.cs +++ b/QSB/TimeSync/WakeUpSync.cs @@ -1,6 +1,6 @@ using QSB.DeathSync; using QSB.EventsCore; -using QSB.QuantumUNET; +using QuantumUNET; using QSB.TimeSync.Events; using QSB.Utility; using UnityEngine; diff --git a/QSB/TransformSync/NomaiOrbTransformSync.cs b/QSB/TransformSync/NomaiOrbTransformSync.cs index 20513639..03c2cff4 100644 --- a/QSB/TransformSync/NomaiOrbTransformSync.cs +++ b/QSB/TransformSync/NomaiOrbTransformSync.cs @@ -1,4 +1,4 @@ -using QSB.QuantumUNET; +using QuantumUNET; using QSB.Utility; using QSB.WorldSync; using UnityEngine; diff --git a/QSB/Utility/UnetExtensions.cs b/QSB/Utility/UnetExtensions.cs index 921ab957..60fdfad7 100644 --- a/QSB/Utility/UnetExtensions.cs +++ b/QSB/Utility/UnetExtensions.cs @@ -1,6 +1,6 @@ using QSB.Player; -using QSB.QuantumUNET; using QSB.TransformSync; +using QuantumUNET; namespace QSB.Utility { diff --git a/QSB/WorldSync/Events/BoolWorldObjectMessage.cs b/QSB/WorldSync/Events/BoolWorldObjectMessage.cs index 0987fb78..99f820cf 100644 --- a/QSB/WorldSync/Events/BoolWorldObjectMessage.cs +++ b/QSB/WorldSync/Events/BoolWorldObjectMessage.cs @@ -1,4 +1,4 @@ -using QSB.QuantumUNET; +using QuantumUNET; namespace QSB.WorldSync.Events { diff --git a/QSB/WorldSync/Events/WorldObjectMessage.cs b/QSB/WorldSync/Events/WorldObjectMessage.cs index 1dc3c58a..12ec48f8 100644 --- a/QSB/WorldSync/Events/WorldObjectMessage.cs +++ b/QSB/WorldSync/Events/WorldObjectMessage.cs @@ -1,5 +1,5 @@ using QSB.Messaging; -using QSB.QuantumUNET; +using QuantumUNET; namespace QSB.WorldSync.Events { diff --git a/QuantumUNET/Properties/AssemblyInfo.cs b/QuantumUNET/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..a4d9e4f8 --- /dev/null +++ b/QuantumUNET/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("QuantumUNET")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("HP Inc.")] +[assembly: AssemblyProduct("QuantumUNET")] +[assembly: AssemblyCopyright("Copyright © HP Inc. 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c8c53004-1508-4f86-a419-4292c188dc2a")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/QSB/QuantumUNET/QSBAddPlayerMessage.cs b/QuantumUNET/QSBAddPlayerMessage.cs similarity index 95% rename from QSB/QuantumUNET/QSBAddPlayerMessage.cs rename to QuantumUNET/QSBAddPlayerMessage.cs index adf7bbea..02f07d3b 100644 --- a/QSB/QuantumUNET/QSBAddPlayerMessage.cs +++ b/QuantumUNET/QSBAddPlayerMessage.cs @@ -1,4 +1,4 @@ -namespace QSB.QuantumUNET +namespace QuantumUNET { internal class QSBAddPlayerMessage : QSBMessageBase { diff --git a/QSB/Animation/Events/QSBAnimationMessage.cs b/QuantumUNET/QSBAnimationMessage.cs similarity index 89% rename from QSB/Animation/Events/QSBAnimationMessage.cs rename to QuantumUNET/QSBAnimationMessage.cs index 1f292673..b5bc2de0 100644 --- a/QSB/Animation/Events/QSBAnimationMessage.cs +++ b/QuantumUNET/QSBAnimationMessage.cs @@ -1,7 +1,6 @@ -using QSB.QuantumUNET; -using UnityEngine.Networking; +using UnityEngine.Networking; -namespace QSB.Animation.Events +namespace QuantumUNET { internal class QSBAnimationMessage : QSBMessageBase { diff --git a/QSB/Animation/Events/QSBAnimationParametersMessage.cs b/QuantumUNET/QSBAnimationParametersMessage.cs similarity index 85% rename from QSB/Animation/Events/QSBAnimationParametersMessage.cs rename to QuantumUNET/QSBAnimationParametersMessage.cs index 08adf4ce..0ff4098e 100644 --- a/QSB/Animation/Events/QSBAnimationParametersMessage.cs +++ b/QuantumUNET/QSBAnimationParametersMessage.cs @@ -1,7 +1,6 @@ -using QSB.QuantumUNET; -using UnityEngine.Networking; +using UnityEngine.Networking; -namespace QSB.Animation.Events +namespace QuantumUNET { internal class QSBAnimationParametersMessage : QSBMessageBase { diff --git a/QSB/Animation/Events/QSBAnimationTriggerMessage.cs b/QuantumUNET/QSBAnimationTriggerMessage.cs similarity index 82% rename from QSB/Animation/Events/QSBAnimationTriggerMessage.cs rename to QuantumUNET/QSBAnimationTriggerMessage.cs index 8890207c..a4497280 100644 --- a/QSB/Animation/Events/QSBAnimationTriggerMessage.cs +++ b/QuantumUNET/QSBAnimationTriggerMessage.cs @@ -1,7 +1,6 @@ -using QSB.QuantumUNET; -using UnityEngine.Networking; +using UnityEngine.Networking; -namespace QSB.Animation.Events +namespace QuantumUNET { internal class QSBAnimationTriggerMessage : QSBMessageBase { diff --git a/QSB/QuantumUNET/QSBCRCMessage.cs b/QuantumUNET/QSBCRCMessage.cs similarity index 96% rename from QSB/QuantumUNET/QSBCRCMessage.cs rename to QuantumUNET/QSBCRCMessage.cs index d551a15e..59462ef1 100644 --- a/QSB/QuantumUNET/QSBCRCMessage.cs +++ b/QuantumUNET/QSBCRCMessage.cs @@ -1,4 +1,4 @@ -namespace QSB.QuantumUNET +namespace QuantumUNET { internal class QSBCRCMessage : QSBMessageBase { diff --git a/QSB/QuantumUNET/QSBCRCMessageEntry.cs b/QuantumUNET/QSBCRCMessageEntry.cs similarity index 75% rename from QSB/QuantumUNET/QSBCRCMessageEntry.cs rename to QuantumUNET/QSBCRCMessageEntry.cs index b3f3ffe3..1d9c7895 100644 --- a/QSB/QuantumUNET/QSBCRCMessageEntry.cs +++ b/QuantumUNET/QSBCRCMessageEntry.cs @@ -1,4 +1,4 @@ -namespace QSB.QuantumUNET +namespace QuantumUNET { internal struct QSBCRCMessageEntry { diff --git a/QSB/QuantumUNET/QSBChannelBuffer.cs b/QuantumUNET/QSBChannelBuffer.cs similarity index 99% rename from QSB/QuantumUNET/QSBChannelBuffer.cs rename to QuantumUNET/QSBChannelBuffer.cs index cfde98e2..d3d91149 100644 --- a/QSB/QuantumUNET/QSBChannelBuffer.cs +++ b/QuantumUNET/QSBChannelBuffer.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using UnityEngine; using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { internal class QSBChannelBuffer : IDisposable { diff --git a/QSB/QuantumUNET/QSBChannelPacket.cs b/QuantumUNET/QSBChannelPacket.cs similarity index 98% rename from QSB/QuantumUNET/QSBChannelPacket.cs rename to QuantumUNET/QSBChannelPacket.cs index a5ee07ee..f6001ad6 100644 --- a/QSB/QuantumUNET/QSBChannelPacket.cs +++ b/QuantumUNET/QSBChannelPacket.cs @@ -2,7 +2,7 @@ using UnityEngine; using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { internal struct QSBChannelPacket { diff --git a/QSB/QuantumUNET/QSBClientAuthorityMessage.cs b/QuantumUNET/QSBClientAuthorityMessage.cs similarity index 94% rename from QSB/QuantumUNET/QSBClientAuthorityMessage.cs rename to QuantumUNET/QSBClientAuthorityMessage.cs index 779f1909..66889b3d 100644 --- a/QSB/QuantumUNET/QSBClientAuthorityMessage.cs +++ b/QuantumUNET/QSBClientAuthorityMessage.cs @@ -1,6 +1,6 @@ using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { internal class QSBClientAuthorityMessage : QSBMessageBase { diff --git a/QSB/QuantumUNET/QSBClientScene.cs b/QuantumUNET/QSBClientScene.cs similarity index 99% rename from QSB/QuantumUNET/QSBClientScene.cs rename to QuantumUNET/QSBClientScene.cs index f7e562ab..2052c805 100644 --- a/QSB/QuantumUNET/QSBClientScene.cs +++ b/QuantumUNET/QSBClientScene.cs @@ -1,10 +1,8 @@ -using QSB.Animation; -using QSB.Utility; -using System.Collections.Generic; +using System.Collections.Generic; using UnityEngine; using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBClientScene { diff --git a/QSB/QuantumUNET/QSBEmptyMessage.cs b/QuantumUNET/QSBEmptyMessage.cs similarity index 86% rename from QSB/QuantumUNET/QSBEmptyMessage.cs rename to QuantumUNET/QSBEmptyMessage.cs index 6a1c0bc8..00d1ce19 100644 --- a/QSB/QuantumUNET/QSBEmptyMessage.cs +++ b/QuantumUNET/QSBEmptyMessage.cs @@ -1,4 +1,4 @@ -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBEmptyMessage : QSBMessageBase { diff --git a/QSB/QuantumUNET/QSBErrorMessage.cs b/QuantumUNET/QSBErrorMessage.cs similarity index 91% rename from QSB/QuantumUNET/QSBErrorMessage.cs rename to QuantumUNET/QSBErrorMessage.cs index 9169152f..ebb436db 100644 --- a/QSB/QuantumUNET/QSBErrorMessage.cs +++ b/QuantumUNET/QSBErrorMessage.cs @@ -1,4 +1,4 @@ -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBErrorMessage : QSBMessageBase { diff --git a/QSB/QuantumUNET/QSBLocalClient.cs b/QuantumUNET/QSBLocalClient.cs similarity index 99% rename from QSB/QuantumUNET/QSBLocalClient.cs rename to QuantumUNET/QSBLocalClient.cs index 736676d1..f6e546c8 100644 --- a/QSB/QuantumUNET/QSBLocalClient.cs +++ b/QuantumUNET/QSBLocalClient.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using UnityEngine; -namespace QSB.QuantumUNET +namespace QuantumUNET { internal class QSBLocalClient : QSBNetworkClient { diff --git a/QSB/QuantumUNET/QSBMessageBase.cs b/QuantumUNET/QSBMessageBase.cs similarity index 86% rename from QSB/QuantumUNET/QSBMessageBase.cs rename to QuantumUNET/QSBMessageBase.cs index 7ec1a3e3..dce35c36 100644 --- a/QSB/QuantumUNET/QSBMessageBase.cs +++ b/QuantumUNET/QSBMessageBase.cs @@ -1,4 +1,4 @@ -namespace QSB.QuantumUNET +namespace QuantumUNET { public abstract class QSBMessageBase { diff --git a/QSB/QuantumUNET/QSBNetBuffer.cs b/QuantumUNET/QSBNetBuffer.cs similarity index 99% rename from QSB/QuantumUNET/QSBNetBuffer.cs rename to QuantumUNET/QSBNetBuffer.cs index 9153d875..8f879800 100644 --- a/QSB/QuantumUNET/QSBNetBuffer.cs +++ b/QuantumUNET/QSBNetBuffer.cs @@ -1,7 +1,7 @@ using System; using UnityEngine; -namespace QSB.QuantumUNET +namespace QuantumUNET { internal class QSBNetBuffer { diff --git a/QSB/Animation/QSBNetworkAnimator.cs b/QuantumUNET/QSBNetworkAnimator.cs similarity index 97% rename from QSB/Animation/QSBNetworkAnimator.cs rename to QuantumUNET/QSBNetworkAnimator.cs index 86845272..542fd693 100644 --- a/QSB/Animation/QSBNetworkAnimator.cs +++ b/QuantumUNET/QSBNetworkAnimator.cs @@ -1,12 +1,8 @@ -using QSB.Animation.Events; -using QSB.QuantumUNET; -using UnityEngine; +using UnityEngine; -namespace QSB.Animation +namespace QuantumUNET { - // Cleaned up unity code. UNET is so broken I gave up and fixed it myself. - - internal class QSBNetworkAnimator : QSBNetworkBehaviour + public class QSBNetworkAnimator : QSBNetworkBehaviour { private static QSBAnimationMessage AnimationMessage = new QSBAnimationMessage(); private static QSBAnimationParametersMessage ParametersMessage = new QSBAnimationParametersMessage(); diff --git a/QSB/QuantumUNET/QSBNetworkBehaviour.cs b/QuantumUNET/QSBNetworkBehaviour.cs similarity index 98% rename from QSB/QuantumUNET/QSBNetworkBehaviour.cs rename to QuantumUNET/QSBNetworkBehaviour.cs index 9b5c6db0..02855c31 100644 --- a/QSB/QuantumUNET/QSBNetworkBehaviour.cs +++ b/QuantumUNET/QSBNetworkBehaviour.cs @@ -1,12 +1,12 @@ using OWML.Common; -using QSB.Utility; +using OWML.Logging; using System; using System.Collections.Generic; using System.Net.Sockets; using UnityEngine; using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBNetworkBehaviour : MonoBehaviour { @@ -97,7 +97,7 @@ namespace QSB.QuantumUNET { if (!QSBNetworkServer.active) { - DebugLog.ToConsole($"Error - Tried to send event {eventName} on channel {channelId} but QSBNetworkServer isn't active.", MessageType.Error); + ModConsole.OwmlConsole.WriteLine($"Error - Tried to send event {eventName} on channel {channelId} but QSBNetworkServer isn't active."); return; } writer.FinishMessage(); diff --git a/QSB/QuantumUNET/QSBNetworkCRC.cs b/QuantumUNET/QSBNetworkCRC.cs similarity index 99% rename from QSB/QuantumUNET/QSBNetworkCRC.cs rename to QuantumUNET/QSBNetworkCRC.cs index 1c22ce23..0bf0643f 100644 --- a/QSB/QuantumUNET/QSBNetworkCRC.cs +++ b/QuantumUNET/QSBNetworkCRC.cs @@ -4,7 +4,7 @@ using System.Reflection; using UnityEngine; using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBNetworkCRC { diff --git a/QSB/QuantumUNET/QSBNetworkClient.cs b/QuantumUNET/QSBNetworkClient.cs similarity index 98% rename from QSB/QuantumUNET/QSBNetworkClient.cs rename to QuantumUNET/QSBNetworkClient.cs index ba5dd6b2..7d8ade9f 100644 --- a/QSB/QuantumUNET/QSBNetworkClient.cs +++ b/QuantumUNET/QSBNetworkClient.cs @@ -1,4 +1,5 @@ -using QSB.Utility; +using OWML.Common; +using OWML.Logging; using System; using System.Collections.Generic; using System.Net; @@ -8,7 +9,7 @@ using UnityEngine.Networking; using UnityEngine.Networking.Match; using UnityEngine.Networking.NetworkSystem; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBNetworkClient { @@ -366,7 +367,7 @@ namespace QSB.QuantumUNET public void Connect(string serverIp, int serverPort) { PrepareForConnect(); - DebugLog.DebugWrite(string.Concat(new object[] + ModConsole.OwmlConsole.WriteLine(string.Concat(new object[] { "Client Connect: ", serverIp, @@ -391,7 +392,7 @@ namespace QSB.QuantumUNET } else { - DebugLog.DebugWrite("Async DNS START:" + serverIp); + ModConsole.OwmlConsole.WriteLine("Async DNS START:" + serverIp); m_RequestedServerHost = serverIp; m_AsyncConnect = ConnectState.Resolving; Dns.BeginGetHostAddresses(serverIp, new AsyncCallback(GetHostAddressesCallback), this); @@ -482,7 +483,6 @@ namespace QSB.QuantumUNET private void PrepareForConnect(bool usePlatformSpecificProtocols) { - DebugLog.DebugWrite("prepare for connect"); SetActive(true); RegisterSystemHandlers(false); if (m_HostTopology == null) @@ -501,7 +501,7 @@ namespace QSB.QuantumUNET num = 1; } int num2 = m_SimulatedLatency * 3; - DebugLog.DebugWrite(string.Concat(new object[] + ModConsole.OwmlConsole.WriteLine(string.Concat(new object[] { "AddHost Using Simulator ", num, @@ -560,7 +560,7 @@ namespace QSB.QuantumUNET { num = 1; } - DebugLog.DebugWrite(string.Concat(new object[] + ModConsole.OwmlConsole.WriteLine(string.Concat(new object[] { "Connect Using Simulator ", m_SimulatedLatency / 3, diff --git a/QSB/QuantumUNET/QSBNetworkConnection.cs b/QuantumUNET/QSBNetworkConnection.cs similarity index 99% rename from QSB/QuantumUNET/QSBNetworkConnection.cs rename to QuantumUNET/QSBNetworkConnection.cs index 80553f42..6f52a366 100644 --- a/QSB/QuantumUNET/QSBNetworkConnection.cs +++ b/QuantumUNET/QSBNetworkConnection.cs @@ -1,11 +1,12 @@ -using QSB.Utility; +using OWML.Common; +using OWML.Logging; using System; using System.Collections.Generic; using System.Text; using UnityEngine; using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBNetworkConnection : IDisposable { @@ -367,7 +368,7 @@ namespace QSB.QuantumUNET } if (networkMessageDelegate == null) { - DebugLog.ToConsole(string.Concat(new object[] + ModConsole.OwmlConsole.WriteLine(string.Concat(new object[] { "Unknown message ID ", num2, diff --git a/QSB/QuantumUNET/QSBNetworkIdentity.cs b/QuantumUNET/QSBNetworkIdentity.cs similarity index 96% rename from QSB/QuantumUNET/QSBNetworkIdentity.cs rename to QuantumUNET/QSBNetworkIdentity.cs index ab522f68..d8e5a37d 100644 --- a/QSB/QuantumUNET/QSBNetworkIdentity.cs +++ b/QuantumUNET/QSBNetworkIdentity.cs @@ -1,12 +1,12 @@ using OWML.Common; -using QSB.Utility; +using OWML.Logging; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using UnityEngine; using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { public sealed class QSBNetworkIdentity : MonoBehaviour { @@ -191,8 +191,7 @@ namespace QSB.QuantumUNET } else if (!allowNonZeroNetId) { - DebugLog.DebugWrite($"netid is {NetId}"); - Debug.LogError(string.Concat(new object[] + ModConsole.OwmlConsole.WriteLine(string.Concat(new object[] { "Object has non-zero netId ", NetId, @@ -648,7 +647,7 @@ namespace QSB.QuantumUNET internal void SetLocalPlayer(short localPlayerControllerId) { - DebugLog.DebugWrite($"SetLocalPlayer {localPlayerControllerId}", OWML.Common.MessageType.Warning); + ModConsole.OwmlConsole.WriteLine($"SetLocalPlayer {localPlayerControllerId}"); IsLocalPlayer = true; PlayerControllerId = localPlayerControllerId; var hasAuthority = this.HasAuthority; @@ -856,7 +855,7 @@ namespace QSB.QuantumUNET { if (!IsServer) { - DebugLog.ToConsole($"Warning - Cannot remove authority on client-side. (NetId:{NetId}, Gameobject:{gameObject.name})", MessageType.Warning); + ModConsole.OwmlConsole.WriteLine($"Warning - Cannot remove authority on client-side. (NetId:{NetId}, Gameobject:{gameObject.name})"); return false; } else if (ConnectionToClient != null) @@ -890,12 +889,12 @@ namespace QSB.QuantumUNET { if (!IsServer) { - DebugLog.ToConsole($"Warning - Cannot assign authority on client-side. (NetId:{NetId}, Gameobject:{gameObject.name})", MessageType.Warning); + ModConsole.OwmlConsole.WriteLine($"Warning - Cannot assign authority on client-side. (NetId:{NetId}, Gameobject:{gameObject.name})"); return false; } else if (!LocalPlayerAuthority) { - DebugLog.ToConsole($"Warning - Cannot assign authority on object without LocalPlayerAuthority. (NetId:{NetId}, Gameobject:{gameObject.name})", MessageType.Warning); + ModConsole.OwmlConsole.WriteLine($"Warning - Cannot assign authority on object without LocalPlayerAuthority. (NetId:{NetId}, Gameobject:{gameObject.name})"); return false; } else if (ClientAuthorityOwner != null && conn != ClientAuthorityOwner) @@ -942,7 +941,7 @@ namespace QSB.QuantumUNET } } - internal static void UNetStaticUpdate() + public static void UNetStaticUpdate() { QSBNetworkServer.Update(); QSBNetworkClient.UpdateClients(); diff --git a/QSB/QuantumUNET/QSBNetworkManagerHUD.cs b/QuantumUNET/QSBNetworkManagerHUD.cs similarity index 98% rename from QSB/QuantumUNET/QSBNetworkManagerHUD.cs rename to QuantumUNET/QSBNetworkManagerHUD.cs index 03efec60..7b6c6432 100644 --- a/QSB/QuantumUNET/QSBNetworkManagerHUD.cs +++ b/QuantumUNET/QSBNetworkManagerHUD.cs @@ -2,13 +2,13 @@ using UnityEngine; using UnityEngine.Networking.Match; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBNetworkManagerHUD : MonoBehaviour { private void Awake() { - this.manager = base.GetComponent(); + this.manager = base.GetComponent(); } private void Update() @@ -243,7 +243,7 @@ namespace QSB.QuantumUNET } } - public QSBNetworkManager manager; + public QSBNetworkManagerUNET manager; [SerializeField] public bool showGUI = true; diff --git a/QSB/QuantumUNET/QSBNetworkManagerUNET.cs b/QuantumUNET/QSBNetworkManagerUNET.cs similarity index 97% rename from QSB/QuantumUNET/QSBNetworkManagerUNET.cs rename to QuantumUNET/QSBNetworkManagerUNET.cs index cb6d7ed2..ef3a109e 100644 --- a/QSB/QuantumUNET/QSBNetworkManagerUNET.cs +++ b/QuantumUNET/QSBNetworkManagerUNET.cs @@ -1,5 +1,5 @@ using OWML.Common; -using QSB.Utility; +using OWML.Logging; using System; using System.Collections.Generic; using System.Net; @@ -9,7 +9,7 @@ using UnityEngine.Networking.Match; using UnityEngine.Networking.Types; using UnityEngine.SceneManagement; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBNetworkManagerUNET : MonoBehaviour { @@ -697,22 +697,22 @@ namespace QSB.QuantumUNET this.RegisterClientMessages(client); if (matchInfo != null) { - DebugLog.DebugWrite("NetworkManager StartClient match: " + matchInfo); + ModConsole.OwmlConsole.WriteLine("NetworkManager StartClient match: " + matchInfo); client.Connect(matchInfo); } else if (m_EndPoint != null) { - DebugLog.DebugWrite("NetworkManager StartClient using provided SecureTunnel"); + ModConsole.OwmlConsole.WriteLine("NetworkManager StartClient using provided SecureTunnel"); client.Connect(m_EndPoint); } else { if (string.IsNullOrEmpty(m_NetworkAddress)) { - DebugLog.DebugWrite("Must set the Network Address field in the manager"); + ModConsole.OwmlConsole.WriteLine("Must set the Network Address field in the manager"); return null; } - DebugLog.DebugWrite(string.Concat(new object[] + ModConsole.OwmlConsole.WriteLine(string.Concat(new object[] { "NetworkManager StartClient address:", m_NetworkAddress, @@ -721,12 +721,12 @@ namespace QSB.QuantumUNET })); if (m_UseSimulator) { - DebugLog.DebugWrite("connecting with simulator"); + ModConsole.OwmlConsole.WriteLine("connecting with simulator"); client.ConnectWithSimulator(m_NetworkAddress, m_NetworkPort, m_SimulatedLatency, m_PacketLossPercentage); } else { - DebugLog.DebugWrite("connecting"); + ModConsole.OwmlConsole.WriteLine("connecting"); client.Connect(m_NetworkAddress, m_NetworkPort); } } @@ -982,7 +982,7 @@ namespace QSB.QuantumUNET { if (s_LoadingSceneAsync.isDone) { - DebugLog.DebugWrite("ClientChangeScene done readyCon:" + s_ClientReadyConnection); + ModConsole.OwmlConsole.WriteLine("ClientChangeScene done readyCon:" + s_ClientReadyConnection); singleton.FinishLoadScene(); s_LoadingSceneAsync.allowSceneActivation = true; s_LoadingSceneAsync = null; @@ -1267,21 +1267,21 @@ namespace QSB.QuantumUNET { if (LogFilter.logError) { - DebugLog.ToConsole("Error - The PlayerPrefab is empty on the QSBNetworkManager. Please setup a PlayerPrefab object.", MessageType.Error); + ModConsole.OwmlConsole.WriteLine("Error - The PlayerPrefab is empty on the QSBNetworkManager. Please setup a PlayerPrefab object."); } } else if (m_PlayerPrefab.GetComponent() == null) { if (LogFilter.logError) { - DebugLog.ToConsole("Error - The PlayerPrefab does not have a QSBNetworkIdentity. Please add a QSBNetworkIdentity to the player prefab.", MessageType.Error); + ModConsole.OwmlConsole.WriteLine("Error - The PlayerPrefab does not have a QSBNetworkIdentity. Please add a QSBNetworkIdentity to the player prefab."); } } else if ((int)playerControllerId < conn.PlayerControllers.Count && conn.PlayerControllers[(int)playerControllerId].IsValid && conn.PlayerControllers[(int)playerControllerId].Gameobject != null) { if (LogFilter.logError) { - Debug.LogError("There is already a player at that playerControllerId for this connections."); + ModConsole.OwmlConsole.WriteLine("Warning - There is already a player at that playerControllerId for this connections."); } } else diff --git a/QSB/QuantumUNET/QSBNetworkMessage.cs b/QuantumUNET/QSBNetworkMessage.cs similarity index 95% rename from QSB/QuantumUNET/QSBNetworkMessage.cs rename to QuantumUNET/QSBNetworkMessage.cs index db5d7a4c..8628bcf7 100644 --- a/QSB/QuantumUNET/QSBNetworkMessage.cs +++ b/QuantumUNET/QSBNetworkMessage.cs @@ -1,6 +1,6 @@ using System; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBNetworkMessage { diff --git a/QSB/QuantumUNET/QSBNetworkMessageDelegate.cs b/QuantumUNET/QSBNetworkMessageDelegate.cs similarity index 72% rename from QSB/QuantumUNET/QSBNetworkMessageDelegate.cs rename to QuantumUNET/QSBNetworkMessageDelegate.cs index 14ddcf5a..1add490e 100644 --- a/QSB/QuantumUNET/QSBNetworkMessageDelegate.cs +++ b/QuantumUNET/QSBNetworkMessageDelegate.cs @@ -1,4 +1,4 @@ -namespace QSB.QuantumUNET +namespace QuantumUNET { public delegate void QSBNetworkMessageDelegate(QSBNetworkMessage netMsg); } \ No newline at end of file diff --git a/QSB/QuantumUNET/QSBNetworkMessageHandlers.cs b/QuantumUNET/QSBNetworkMessageHandlers.cs similarity index 98% rename from QSB/QuantumUNET/QSBNetworkMessageHandlers.cs rename to QuantumUNET/QSBNetworkMessageHandlers.cs index 092b82ce..d0c65120 100644 --- a/QSB/QuantumUNET/QSBNetworkMessageHandlers.cs +++ b/QuantumUNET/QSBNetworkMessageHandlers.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using UnityEngine; -namespace QSB.QuantumUNET +namespace QuantumUNET { internal class QSBNetworkMessageHandlers { diff --git a/QSB/QuantumUNET/QSBNetworkMigrationManager.cs b/QuantumUNET/QSBNetworkMigrationManager.cs similarity index 98% rename from QSB/QuantumUNET/QSBNetworkMigrationManager.cs rename to QuantumUNET/QSBNetworkMigrationManager.cs index 8988f73d..90905986 100644 --- a/QSB/QuantumUNET/QSBNetworkMigrationManager.cs +++ b/QuantumUNET/QSBNetworkMigrationManager.cs @@ -4,7 +4,7 @@ using UnityEngine.Networking; using UnityEngine.Networking.Match; using UnityEngine.Networking.Types; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBNetworkMigrationManager : MonoBehaviour { @@ -197,9 +197,9 @@ namespace QSB.QuantumUNET this.m_DisconnectedFromHost = false; this.m_HostWasShutdown = false; QSBClientScene.SetReconnectId(reconnectId, this.m_Peers); - if (QSBNetworkManager.singleton != null) + if (QSBNetworkManagerUNET.singleton != null) { - QSBNetworkManager.singleton.SetupMigrationManager(this); + QSBNetworkManagerUNET.singleton.SetupMigrationManager(this); } } @@ -711,10 +711,10 @@ namespace QSB.QuantumUNET bool result; if (networkClient != null) { - if (QSBNetworkManager.singleton != null) + if (QSBNetworkManagerUNET.singleton != null) { - QSBNetworkManager.singleton.RegisterServerMessages(); - QSBNetworkManager.singleton.UseExternalClient(networkClient); + QSBNetworkManagerUNET.singleton.RegisterServerMessages(); + QSBNetworkManagerUNET.singleton.UseExternalClient(networkClient); } else { diff --git a/QSB/QuantumUNET/QSBNetworkReader.cs b/QuantumUNET/QSBNetworkReader.cs similarity index 99% rename from QSB/QuantumUNET/QSBNetworkReader.cs rename to QuantumUNET/QSBNetworkReader.cs index 32d9d625..552596e5 100644 --- a/QSB/QuantumUNET/QSBNetworkReader.cs +++ b/QuantumUNET/QSBNetworkReader.cs @@ -3,7 +3,7 @@ using System.Text; using UnityEngine; using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBNetworkReader { diff --git a/QSB/QuantumUNET/QSBNetworkScene.cs b/QuantumUNET/QSBNetworkScene.cs similarity index 99% rename from QSB/QuantumUNET/QSBNetworkScene.cs rename to QuantumUNET/QSBNetworkScene.cs index 457e1cf8..31346daa 100644 --- a/QSB/QuantumUNET/QSBNetworkScene.cs +++ b/QuantumUNET/QSBNetworkScene.cs @@ -2,7 +2,7 @@ using UnityEngine; using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { internal class QSBNetworkScene { diff --git a/QSB/QuantumUNET/QSBNetworkServer.cs b/QuantumUNET/QSBNetworkServer.cs similarity index 99% rename from QSB/QuantumUNET/QSBNetworkServer.cs rename to QuantumUNET/QSBNetworkServer.cs index 62350cdd..e6e7c1f8 100644 --- a/QSB/QuantumUNET/QSBNetworkServer.cs +++ b/QuantumUNET/QSBNetworkServer.cs @@ -1,6 +1,5 @@ using OWML.Common; -using QSB.Animation; -using QSB.Utility; +using OWML.Logging; using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -9,7 +8,7 @@ using UnityEngine.Networking; using UnityEngine.Networking.Match; using UnityEngine.Networking.Types; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBNetworkServer { @@ -548,7 +547,7 @@ namespace QSB.QuantumUNET } if (!flag) { - DebugLog.DebugWrite("SendBytesToReady failed"); + ModConsole.OwmlConsole.WriteLine("SendBytesToReady failed"); } } else @@ -571,12 +570,12 @@ namespace QSB.QuantumUNET } if (!flag2) { - DebugLog.DebugWrite("SendBytesToReady failed for " + contextObj); + ModConsole.OwmlConsole.WriteLine("SendBytesToReady failed for " + contextObj); } } catch (NullReferenceException) { - DebugLog.DebugWrite("SendBytesToReady object " + contextObj + " has not been spawned"); + ModConsole.OwmlConsole.WriteLine("SendBytesToReady object " + contextObj + " has not been spawned"); } } } @@ -1443,7 +1442,7 @@ namespace QSB.QuantumUNET QSBNetworkIdentity networkIdentity; if (!active) { - DebugLog.ToConsole("Error - SpawnObject for " + obj + ", NetworkServer is not active. Cannot spawn objects without an active server.", MessageType.Error); + ModConsole.OwmlConsole.WriteLine("Error - SpawnObject for " + obj + ", NetworkServer is not active. Cannot spawn objects without an active server."); } else if (!GetNetworkIdentity(obj, out networkIdentity)) { diff --git a/QSB/QuantumUNET/QSBNetworkServerSimple.cs b/QuantumUNET/QSBNetworkServerSimple.cs similarity index 99% rename from QSB/QuantumUNET/QSBNetworkServerSimple.cs rename to QuantumUNET/QSBNetworkServerSimple.cs index bf8bd61e..3b670cbc 100644 --- a/QSB/QuantumUNET/QSBNetworkServerSimple.cs +++ b/QuantumUNET/QSBNetworkServerSimple.cs @@ -1,12 +1,11 @@ -using QSB.Utility; -using System; +using System; using System.Collections.Generic; using System.Collections.ObjectModel; using UnityEngine; using UnityEngine.Networking; using UnityEngine.Networking.Types; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBNetworkServerSimple { diff --git a/QSB/QuantumUNET/QSBNetworkTransform.cs b/QuantumUNET/QSBNetworkTransform.cs similarity index 95% rename from QSB/QuantumUNET/QSBNetworkTransform.cs rename to QuantumUNET/QSBNetworkTransform.cs index 4ccfde7d..0bad199d 100644 --- a/QSB/QuantumUNET/QSBNetworkTransform.cs +++ b/QuantumUNET/QSBNetworkTransform.cs @@ -1,8 +1,9 @@ -using QSB.Utility; +using OWML.Common; +using OWML.Logging; using UnityEngine; using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBNetworkTransform : QSBNetworkBehaviour { @@ -107,7 +108,6 @@ namespace QSB.QuantumUNET { if (SyncVarDirtyBits == 0U) { - DebugLog.DebugWrite("dirty bits = 0, abort"); writer.WritePackedUInt32(0U); return false; } @@ -272,22 +272,22 @@ namespace QSB.QuantumUNET var gameObject = QSBNetworkServer.FindLocalObject(networkInstanceId); if (gameObject == null) { - DebugLog.DebugWrite("Received NetworkTransform data for GameObject that doesn't exist"); + ModConsole.OwmlConsole.WriteLine("Warning - Received NetworkTransform data for GameObject that doesn't exist"); } else { var component = gameObject.GetComponent(); if (component == null) { - DebugLog.DebugWrite("HandleTransform null target"); + ModConsole.OwmlConsole.WriteLine("Warning - HandleTransform null target"); } else if (!component.LocalPlayerAuthority) { - DebugLog.DebugWrite("HandleTransform no localPlayerAuthority"); + ModConsole.OwmlConsole.WriteLine("Warning - HandleTransform no localPlayerAuthority"); } else if (netMsg.Connection.ClientOwnedObjects == null) { - DebugLog.DebugWrite("HandleTransform object not owned by connection"); + ModConsole.OwmlConsole.WriteLine("Warning - HandleTransform object not owned by connection"); } else if (netMsg.Connection.ClientOwnedObjects.Contains(networkInstanceId)) { @@ -296,7 +296,7 @@ namespace QSB.QuantumUNET } else if (LogFilter.logWarn) { - DebugLog.DebugWrite("HandleTransform netId:" + networkInstanceId + " is not for a valid player"); + ModConsole.OwmlConsole.WriteLine("Warning - HandleTransform netId:" + networkInstanceId + " is not for a valid player"); } } } diff --git a/QSB/QuantumUNET/QSBNetworkWriter.cs b/QuantumUNET/QSBNetworkWriter.cs similarity index 99% rename from QSB/QuantumUNET/QSBNetworkWriter.cs rename to QuantumUNET/QSBNetworkWriter.cs index 5e6d23e6..1e32bdac 100644 --- a/QSB/QuantumUNET/QSBNetworkWriter.cs +++ b/QuantumUNET/QSBNetworkWriter.cs @@ -3,7 +3,7 @@ using System.Text; using UnityEngine; using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBNetworkWriter { diff --git a/QSB/QuantumUNET/QSBNotReadyMessage.cs b/QuantumUNET/QSBNotReadyMessage.cs similarity index 67% rename from QSB/QuantumUNET/QSBNotReadyMessage.cs rename to QuantumUNET/QSBNotReadyMessage.cs index e135dbda..b8bcc65e 100644 --- a/QSB/QuantumUNET/QSBNotReadyMessage.cs +++ b/QuantumUNET/QSBNotReadyMessage.cs @@ -1,4 +1,4 @@ -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBNotReadyMessage : QSBEmptyMessage { diff --git a/QSB/QuantumUNET/QSBObjectDestroyMessage.cs b/QuantumUNET/QSBObjectDestroyMessage.cs similarity index 92% rename from QSB/QuantumUNET/QSBObjectDestroyMessage.cs rename to QuantumUNET/QSBObjectDestroyMessage.cs index f4aefd3f..0bd94521 100644 --- a/QSB/QuantumUNET/QSBObjectDestroyMessage.cs +++ b/QuantumUNET/QSBObjectDestroyMessage.cs @@ -1,6 +1,6 @@ using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { internal class QSBObjectDestroyMessage : QSBMessageBase { diff --git a/QSB/QuantumUNET/QSBObjectSpawnFinishedMessage.cs b/QuantumUNET/QSBObjectSpawnFinishedMessage.cs similarity index 91% rename from QSB/QuantumUNET/QSBObjectSpawnFinishedMessage.cs rename to QuantumUNET/QSBObjectSpawnFinishedMessage.cs index d20827cc..3ceb71a1 100644 --- a/QSB/QuantumUNET/QSBObjectSpawnFinishedMessage.cs +++ b/QuantumUNET/QSBObjectSpawnFinishedMessage.cs @@ -1,4 +1,4 @@ -namespace QSB.QuantumUNET +namespace QuantumUNET { internal class QSBObjectSpawnFinishedMessage : QSBMessageBase { diff --git a/QSB/QuantumUNET/QSBObjectSpawnMessage.cs b/QuantumUNET/QSBObjectSpawnMessage.cs similarity index 96% rename from QSB/QuantumUNET/QSBObjectSpawnMessage.cs rename to QuantumUNET/QSBObjectSpawnMessage.cs index fa077d43..32b5c9d7 100644 --- a/QSB/QuantumUNET/QSBObjectSpawnMessage.cs +++ b/QuantumUNET/QSBObjectSpawnMessage.cs @@ -1,7 +1,7 @@ using UnityEngine; using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { internal class QSBObjectSpawnMessage : QSBMessageBase { diff --git a/QSB/QuantumUNET/QSBObjectSpawnSceneMessage.cs b/QuantumUNET/QSBObjectSpawnSceneMessage.cs similarity index 96% rename from QSB/QuantumUNET/QSBObjectSpawnSceneMessage.cs rename to QuantumUNET/QSBObjectSpawnSceneMessage.cs index 99b4a6ca..cf49fe77 100644 --- a/QSB/QuantumUNET/QSBObjectSpawnSceneMessage.cs +++ b/QuantumUNET/QSBObjectSpawnSceneMessage.cs @@ -1,7 +1,7 @@ using UnityEngine; using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { internal class QSBObjectSpawnSceneMessage : QSBMessageBase { diff --git a/QSB/QuantumUNET/QSBOwnerMessage.cs b/QuantumUNET/QSBOwnerMessage.cs similarity index 94% rename from QSB/QuantumUNET/QSBOwnerMessage.cs rename to QuantumUNET/QSBOwnerMessage.cs index 4a081030..b5aafc2e 100644 --- a/QSB/QuantumUNET/QSBOwnerMessage.cs +++ b/QuantumUNET/QSBOwnerMessage.cs @@ -1,6 +1,6 @@ using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { internal class QSBOwnerMessage : QSBMessageBase { diff --git a/QSB/QuantumUNET/QSBPeerAuthorityMessage.cs b/QuantumUNET/QSBPeerAuthorityMessage.cs similarity index 95% rename from QSB/QuantumUNET/QSBPeerAuthorityMessage.cs rename to QuantumUNET/QSBPeerAuthorityMessage.cs index 0cdd08ff..1ef5ec75 100644 --- a/QSB/QuantumUNET/QSBPeerAuthorityMessage.cs +++ b/QuantumUNET/QSBPeerAuthorityMessage.cs @@ -1,6 +1,6 @@ using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBPeerAuthorityMessage : QSBMessageBase { diff --git a/QSB/QuantumUNET/QSBPeerInfoMessage.cs b/QuantumUNET/QSBPeerInfoMessage.cs similarity index 98% rename from QSB/QuantumUNET/QSBPeerInfoMessage.cs rename to QuantumUNET/QSBPeerInfoMessage.cs index b9894271..a564670d 100644 --- a/QSB/QuantumUNET/QSBPeerInfoMessage.cs +++ b/QuantumUNET/QSBPeerInfoMessage.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBPeerInfoMessage : QSBMessageBase { diff --git a/QSB/QuantumUNET/QSBPeerInfoPlayer.cs b/QuantumUNET/QSBPeerInfoPlayer.cs similarity index 84% rename from QSB/QuantumUNET/QSBPeerInfoPlayer.cs rename to QuantumUNET/QSBPeerInfoPlayer.cs index 19a5f81d..77394469 100644 --- a/QSB/QuantumUNET/QSBPeerInfoPlayer.cs +++ b/QuantumUNET/QSBPeerInfoPlayer.cs @@ -1,6 +1,6 @@ using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { public struct QSBPeerInfoPlayer { diff --git a/QSB/QuantumUNET/QSBPeerListMessage.cs b/QuantumUNET/QSBPeerListMessage.cs similarity index 96% rename from QSB/QuantumUNET/QSBPeerListMessage.cs rename to QuantumUNET/QSBPeerListMessage.cs index 8482446d..17ab9241 100644 --- a/QSB/QuantumUNET/QSBPeerListMessage.cs +++ b/QuantumUNET/QSBPeerListMessage.cs @@ -1,4 +1,4 @@ -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBPeerListMessage : QSBMessageBase { diff --git a/QSB/QuantumUNET/QSBPlayerController.cs b/QuantumUNET/QSBPlayerController.cs similarity index 96% rename from QSB/QuantumUNET/QSBPlayerController.cs rename to QuantumUNET/QSBPlayerController.cs index 617a0667..88b8ac0f 100644 --- a/QSB/QuantumUNET/QSBPlayerController.cs +++ b/QuantumUNET/QSBPlayerController.cs @@ -1,6 +1,6 @@ using UnityEngine; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBPlayerController { diff --git a/QSB/QuantumUNET/QSBReadyMessage.cs b/QuantumUNET/QSBReadyMessage.cs similarity index 66% rename from QSB/QuantumUNET/QSBReadyMessage.cs rename to QuantumUNET/QSBReadyMessage.cs index 11adb735..0403fe81 100644 --- a/QSB/QuantumUNET/QSBReadyMessage.cs +++ b/QuantumUNET/QSBReadyMessage.cs @@ -1,4 +1,4 @@ -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBReadyMessage : QSBEmptyMessage { diff --git a/QSB/QuantumUNET/QSBReconnectMessage.cs b/QuantumUNET/QSBReconnectMessage.cs similarity index 96% rename from QSB/QuantumUNET/QSBReconnectMessage.cs rename to QuantumUNET/QSBReconnectMessage.cs index b98a5a21..4cfa14ef 100644 --- a/QSB/QuantumUNET/QSBReconnectMessage.cs +++ b/QuantumUNET/QSBReconnectMessage.cs @@ -1,6 +1,6 @@ using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBReconnectMessage : QSBMessageBase { diff --git a/QSB/QuantumUNET/QSBRemovePlayerMessage.cs b/QuantumUNET/QSBRemovePlayerMessage.cs similarity index 91% rename from QSB/QuantumUNET/QSBRemovePlayerMessage.cs rename to QuantumUNET/QSBRemovePlayerMessage.cs index eb4d1a96..1399e1fa 100644 --- a/QSB/QuantumUNET/QSBRemovePlayerMessage.cs +++ b/QuantumUNET/QSBRemovePlayerMessage.cs @@ -1,4 +1,4 @@ -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBRemovePlayerMessage : QSBMessageBase { diff --git a/QSB/QuantumUNET/QSBStringMessage.cs b/QuantumUNET/QSBStringMessage.cs similarity index 92% rename from QSB/QuantumUNET/QSBStringMessage.cs rename to QuantumUNET/QSBStringMessage.cs index a13fb42e..5b352d9d 100644 --- a/QSB/QuantumUNET/QSBStringMessage.cs +++ b/QuantumUNET/QSBStringMessage.cs @@ -1,4 +1,4 @@ -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBStringMessage : QSBMessageBase { diff --git a/QSB/QuantumUNET/QSBULocalConnectionToClient.cs b/QuantumUNET/QSBULocalConnectionToClient.cs similarity index 98% rename from QSB/QuantumUNET/QSBULocalConnectionToClient.cs rename to QuantumUNET/QSBULocalConnectionToClient.cs index ec41ead9..312647d1 100644 --- a/QSB/QuantumUNET/QSBULocalConnectionToClient.cs +++ b/QuantumUNET/QSBULocalConnectionToClient.cs @@ -1,4 +1,4 @@ -namespace QSB.QuantumUNET +namespace QuantumUNET { internal class QSBULocalConnectionToClient : QSBNetworkConnection { diff --git a/QSB/QuantumUNET/QSBULocalConnectionToServer.cs b/QuantumUNET/QSBULocalConnectionToServer.cs similarity index 98% rename from QSB/QuantumUNET/QSBULocalConnectionToServer.cs rename to QuantumUNET/QSBULocalConnectionToServer.cs index 9bf4bedb..f1aa485a 100644 --- a/QSB/QuantumUNET/QSBULocalConnectionToServer.cs +++ b/QuantumUNET/QSBULocalConnectionToServer.cs @@ -1,7 +1,7 @@ using UnityEngine; using UnityEngine.Networking; -namespace QSB.QuantumUNET +namespace QuantumUNET { internal class QSBULocalConnectionToServer : QSBNetworkConnection { diff --git a/QSB/QuantumUNET/QSBUtility.cs b/QuantumUNET/QSBUtility.cs similarity index 96% rename from QSB/QuantumUNET/QSBUtility.cs rename to QuantumUNET/QSBUtility.cs index 86fc1b14..57c80609 100644 --- a/QSB/QuantumUNET/QSBUtility.cs +++ b/QuantumUNET/QSBUtility.cs @@ -2,7 +2,7 @@ using UnityEngine; using UnityEngine.Networking.Types; -namespace QSB.QuantumUNET +namespace QuantumUNET { public class QSBUtility { diff --git a/QuantumUNET/QuantumUNET.csproj b/QuantumUNET/QuantumUNET.csproj new file mode 100644 index 00000000..bd737170 --- /dev/null +++ b/QuantumUNET/QuantumUNET.csproj @@ -0,0 +1,156 @@ + + + + + Debug + AnyCPU + {C8C53004-1508-4F86-A419-4292C188DC2A} + Library + Properties + QuantumUNET + QuantumUNET + v3.5 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Lib.Harmony.1.2.0.1\lib\net35\0Harmony.dll + + + ..\packages\OWML.0.7.3\lib\net35\NAudio-Unity.dll + + + ..\packages\Json.Net.Unity3D.9.0.1\lib\net35\Newtonsoft.Json.dll + + + ..\packages\OWML.0.7.3\lib\net35\OWML.dll + + + ..\packages\OWML.0.7.3\lib\net35\OWML.Common.dll + + + ..\packages\OWML.0.7.3\lib\net35\OWML.Logging.dll + + + ..\packages\OWML.0.7.3\lib\net35\OWML.ModHelper.dll + + + ..\packages\OWML.0.7.3\lib\net35\OWML.ModHelper.Assets.dll + + + ..\packages\OWML.0.7.3\lib\net35\OWML.ModHelper.Events.dll + + + ..\packages\OWML.0.7.3\lib\net35\OWML.ModHelper.Input.dll + + + ..\packages\OWML.0.7.3\lib\net35\OWML.ModHelper.Interaction.dll + + + ..\packages\OWML.0.7.3\lib\net35\OWML.ModHelper.Menus.dll + + + + + + + + + D:\EpicGames\OuterWilds\OuterWilds_Data\Managed\UnityEngine.dll + + + D:\EpicGames\OuterWilds\OuterWilds_Data\Managed\UnityEngine.AnimationModule.dll + + + D:\EpicGames\OuterWilds\OuterWilds_Data\Managed\UnityEngine.CoreModule.dll + + + D:\EpicGames\OuterWilds\OuterWilds_Data\Managed\UnityEngine.IMGUIModule.dll + + + D:\EpicGames\OuterWilds\OuterWilds_Data\Managed\UnityEngine.Networking.dll + + + D:\EpicGames\OuterWilds\OuterWilds_Data\Managed\UnityEngine.UNETModule.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + copy /y "$(TargetPath)" "$(OwmlDir)\Mods\QSB" + + \ No newline at end of file diff --git a/QuantumUNET/QuantumUNET.csproj.user b/QuantumUNET/QuantumUNET.csproj.user new file mode 100644 index 00000000..c8a11e84 --- /dev/null +++ b/QuantumUNET/QuantumUNET.csproj.user @@ -0,0 +1,8 @@ + + + + D:\EpicGames\OuterWilds + C:\Users\Henry\AppData\Roaming\OuterWildsModManager\OWML + ShowAllFiles + + \ No newline at end of file diff --git a/QuantumUNET/packages.config b/QuantumUNET/packages.config new file mode 100644 index 00000000..c2d105a6 --- /dev/null +++ b/QuantumUNET/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file