Skip to content

Commit

Permalink
Deps Update, remove all remaining references to Oxide
Browse files Browse the repository at this point in the history
  • Loading branch information
features-not-bugs committed Feb 18, 2021
1 parent d1e1aa7 commit 9d1d210
Show file tree
Hide file tree
Showing 119 changed files with 87 additions and 48 deletions.
Binary file modified deps/Assembly-CSharp-firstpass.dll
Binary file not shown.
Binary file modified deps/Assembly-CSharp.dll
Binary file not shown.
Binary file modified deps/CurvedTextMeshPro.dll
Binary file not shown.
Binary file added deps/DelaunayER.dll
Binary file not shown.
Binary file modified deps/EZhex1991.EZSoftBone.dll
Binary file not shown.
Binary file added deps/EasyRoads3Dv3.dll
Binary file not shown.
Binary file modified deps/Facepunch.Console.dll
Binary file not shown.
Binary file modified deps/Facepunch.GoogleSheets.dll
Binary file not shown.
Binary file modified deps/Facepunch.Input.dll
Binary file not shown.
Binary file modified deps/Facepunch.Network.dll
Binary file not shown.
Binary file modified deps/Facepunch.Raknet.dll
Binary file not shown.
Binary file modified deps/Facepunch.Rcon.dll
Binary file not shown.
Binary file modified deps/Facepunch.Skeleton.dll
Binary file not shown.
Binary file modified deps/Facepunch.Sqlite.dll
Binary file not shown.
Binary file modified deps/Facepunch.SteamNetworking.dll
Binary file not shown.
Binary file removed deps/Facepunch.Steamworks.Posix.dll
Binary file not shown.
Binary file added deps/Facepunch.Steamworks.Win64.dll
Binary file not shown.
Binary file modified deps/Facepunch.System.dll
Binary file not shown.
Binary file modified deps/Facepunch.Unity.dll
Binary file not shown.
Binary file modified deps/Facepunch.UnityEngine.dll
Binary file not shown.
Binary file modified deps/MidiJack.dll
Binary file not shown.
Binary file removed deps/Mono.Data.Tds.dll
Binary file not shown.
Binary file removed deps/MySql.Data.dll
Binary file not shown.
Binary file modified deps/NewAssembly.dll
Binary file not shown.
Binary file removed deps/Oxide.CSharp.dll
Binary file not shown.
Binary file removed deps/Oxide.Core.dll
Binary file not shown.
Binary file removed deps/Oxide.MySql.dll
Binary file not shown.
Binary file removed deps/Oxide.References.dll
Binary file not shown.
4 changes: 0 additions & 4 deletions deps/Oxide.References.dll.config

This file was deleted.

Binary file removed deps/Oxide.Rust.dll
Binary file not shown.
Binary file removed deps/Oxide.SQLite.dll
Binary file not shown.
Binary file removed deps/Oxide.Unity.dll
Binary file not shown.
Binary file modified deps/Rust.Data.dll
Binary file not shown.
Binary file modified deps/Rust.Demo.dll
Binary file not shown.
Binary file modified deps/Rust.Global.dll
Binary file not shown.
Binary file modified deps/Rust.Harmony.dll
Binary file not shown.
Binary file modified deps/Rust.Localization.dll
Binary file not shown.
Binary file modified deps/Rust.Platform.Common.dll
Binary file not shown.
Binary file modified deps/Rust.Platform.Steam.dll
Binary file not shown.
Binary file modified deps/Rust.Platform.dll
Binary file not shown.
Binary file modified deps/Rust.UI.dll
Binary file not shown.
Binary file modified deps/Rust.Workshop.dll
Binary file not shown.
Binary file modified deps/Rust.World.dll
Binary file not shown.
Binary file removed deps/System.Configuration.Install.dll
Binary file not shown.
Binary file removed deps/System.Data.SQLite.dll
Binary file not shown.
4 changes: 0 additions & 4 deletions deps/System.Data.SQLite.dll.config

This file was deleted.

Binary file modified deps/System.Data.dll
Binary file not shown.
Binary file modified deps/System.Drawing.dll
Binary file not shown.
Binary file modified deps/System.Runtime.Serialization.dll
Binary file not shown.
Binary file modified deps/System.Transactions.dll
Binary file not shown.
Binary file modified deps/Unity.TextMeshPro.dll
Binary file not shown.
Binary file modified deps/UnityEngine.AIModule.dll
Binary file not shown.
Binary file added deps/UnityEngine.ARModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.AccessibilityModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.AndroidJNIModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.AnimationModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.AssetBundleModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.AudioModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.ClothModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.ClusterInputModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.ClusterRendererModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.CoreModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.CrashReportingModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.DSPGraphModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.DirectorModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.GameCenterModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.GridModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.HotReloadModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.IMGUIModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.ImageConversionModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.InputLegacyModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.InputModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.JSONSerializeModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.LocalizationModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.ParticleSystemModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.PerformanceReportingModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.Physics2DModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.PhysicsModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.ProfilerModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.ScreenCaptureModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.SharedInternalsModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.SpriteMaskModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.SpriteShapeModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.StreamingModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.SubstanceModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.SubsystemsModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.TLSModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.TerrainModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.TerrainPhysicsModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.TextCoreModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.TextRenderingModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.TilemapModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.UI.dll
Binary file not shown.
Binary file modified deps/UnityEngine.UIElementsModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.UIModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.UNETModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.UmbraModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.UnityAnalyticsModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.UnityConnectModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.UnityTestProtocolModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.UnityWebRequestAssetBundleModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.UnityWebRequestAudioModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.UnityWebRequestModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.UnityWebRequestTextureModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.UnityWebRequestWWWModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.VFXModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.VRModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.VehiclesModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.VideoModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.WindModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.XRModule.dll
Binary file not shown.
Binary file modified deps/UnityEngine.dll
Binary file not shown.
Binary file modified deps/com.unity.postprocessing.Runtime.dll
Binary file not shown.
3 changes: 0 additions & 3 deletions src/RustServerMetrics/Harmony/NetWrite/PacketID_Patch.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using Harmony;
using Network;
using Oxide.Core;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Emit;

namespace RustServerMetrics.Harmony.NetWrite
Expand Down
4 changes: 0 additions & 4 deletions src/RustServerMetrics/Harmony/NetWrite/Send_Patch.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using Harmony;
using Network;
using Oxide.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Emit;

namespace RustServerMetrics.Harmony.NetWrite
Expand Down
28 changes: 28 additions & 0 deletions src/RustServerMetrics/Harmony/TimeWarning/Dispose_Patch.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Harmony;
using System.Collections.Generic;
using System.Reflection.Emit;

namespace RustServerMetrics.Harmony.TimeWarning
{
[HarmonyPatch(typeof(global::TimeWarning), nameof(global::TimeWarning.Dispose))]
public static class Dispose_Patch
{
[HarmonyTranspiler]
public static IEnumerable<CodeInstruction> Transpile(IEnumerable<CodeInstruction> originalInstructions)
{
var fieldInfo = typeof(SingletonComponent<MetricsLogger>)
.GetField(nameof(SingletonComponent<MetricsLogger>.Instance), System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public);

var methodInfo = typeof(MetricsLogger)
.GetMethod(nameof(MetricsLogger.OnDisposeTimeWarning), System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);

return new CodeInstruction[]
{
new CodeInstruction(OpCodes.Ldsfld, fieldInfo),
new CodeInstruction(OpCodes.Ldarg_0),
new CodeInstruction(OpCodes.Call, methodInfo),
new CodeInstruction(OpCodes.Ret)
};
}
}
}
29 changes: 29 additions & 0 deletions src/RustServerMetrics/Harmony/TimeWarning/New_Patch.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using Harmony;
using System.Collections.Generic;
using System.Reflection.Emit;

namespace RustServerMetrics.Harmony.TimeWarning
{
[HarmonyPatch(typeof(global::TimeWarning), nameof(global::TimeWarning.New))]
public static class New_Patch
{
[HarmonyTranspiler]
public static IEnumerable<CodeInstruction> Transpile(IEnumerable<CodeInstruction> originalInstructions)
{
var fieldInfo = typeof(SingletonComponent<MetricsLogger>)
.GetField(nameof(SingletonComponent<MetricsLogger>.Instance), System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public);

var methodInfo = typeof(MetricsLogger)
.GetMethod(nameof(MetricsLogger.OnNewTimeWarning), System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);

return new List<CodeInstruction>
{
new CodeInstruction(OpCodes.Ldsfld, fieldInfo),
new CodeInstruction(OpCodes.Ldarg_0),
new CodeInstruction(OpCodes.Ldarg_1),
new CodeInstruction(OpCodes.Call, methodInfo),
new CodeInstruction(OpCodes.Ret)
};
}
}
}
32 changes: 25 additions & 7 deletions src/RustServerMetrics/MetricsLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@
using Newtonsoft.Json;
using RustServerMetrics.Config;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;

namespace RustServerMetrics
{
public class MetricsLogger : SingletonComponent<MetricsLogger>
{
const string CONFIGURATION_PATH = "HarmonyMods_Data/ServerMetrics/Configuration.json";
const string COMMAND_PREFIX = "servermetrics";
readonly StringBuilder _stringBuilder = new StringBuilder();
readonly Dictionary<ulong, Action> _playerStatsActions = new Dictionary<ulong, Action>();
readonly Dictionary<Message.Type, int> _networkUpdates = new Dictionary<Message.Type, int>();
Expand Down Expand Up @@ -73,17 +70,25 @@ override protected void Awake()

void RegisterCommands()
{
const string commandPrefix = "servermetrics";
ConsoleSystem.Command reloadCommand = new ConsoleSystem.Command()
{
Name = "reload",
Parent = COMMAND_PREFIX,
FullName = COMMAND_PREFIX + "." + "reload",
Parent = commandPrefix,
FullName = commandPrefix + "." + "reload",
ServerAdmin = true,
Variable = false,
Call = new Action<ConsoleSystem.Arg>(ReloadCommand)
};
ConsoleSystem.Index.Server.Dict[COMMAND_PREFIX + "." + "reload"] = reloadCommand;
ConsoleSystem.Index.All = ConsoleSystem.Index.Server.Dict.Values.ToArray();

ConsoleSystem.Index.Server.Dict[commandPrefix + "." + "reload"] = reloadCommand;
var allCommands = ConsoleSystem.Index.All;
Array.Resize(ref allCommands, allCommands.Length + 1);
allCommands[allCommands.Length - 1] = reloadCommand;
// Would be nice if this had a public setter, or better yet, a register command helper
typeof(ConsoleSystem.Index)
.GetProperty(nameof(ConsoleSystem.Index.All), System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static)
.SetValue(null, allCommands);
}

private void ReloadCommand(ConsoleSystem.Arg arg)
Expand Down Expand Up @@ -300,6 +305,19 @@ internal void OnPerformanceReportGenerated()
_reportUploader.AddToSendBuffer(_stringBuilder.ToString());
}

// This method presently does nothing as we are awaiting a Harmony2 upgrade from Facepunch
internal TimeWarning OnNewTimeWarning(string name, int maxmilliseconds)
{
Debug.Log("OnNewTimeWarning: " + name);
return null;
}

// This method presently does nothing as we are awaiting a Harmony2 upgrade from Facepunch
internal void OnDisposeTimeWarning(TimeWarning instance)
{
Debug.Log("OnTimeWarningDispose");
}

bool ValidateConfiguration()
{
if (_configuration == null) return false;
Expand Down
31 changes: 5 additions & 26 deletions src/RustServerMetrics/RustServerMetrics.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@
<Reference Include="CurvedTextMeshPro">
<HintPath>..\..\deps\CurvedTextMeshPro.dll</HintPath>
</Reference>
<Reference Include="DryWetMidi">
<HintPath>..\..\deps\DryWetMidi.dll</HintPath>
</Reference>
<Reference Include="EasyAntiCheat.Client">
<HintPath>..\..\deps\EasyAntiCheat.Client.dll</HintPath>
</Reference>
Expand Down Expand Up @@ -100,9 +97,6 @@
<Reference Include="Facepunch.SteamNetworking">
<HintPath>..\..\deps\Facepunch.SteamNetworking.dll</HintPath>
</Reference>
<Reference Include="Facepunch.Steamworks.Posix">
<HintPath>..\..\deps\Facepunch.Steamworks.Posix.dll</HintPath>
</Reference>
<Reference Include="Facepunch.System">
<HintPath>..\..\deps\Facepunch.System.dll</HintPath>
</Reference>
Expand All @@ -115,26 +109,9 @@
<Reference Include="NewAssembly">
<HintPath>..\..\deps\NewAssembly.dll</HintPath>
</Reference>
<Reference Include="Oxide.Core">
<HintPath>..\..\deps\Oxide.Core.dll</HintPath>
</Reference>
<Reference Include="Oxide.CSharp">
<HintPath>..\..\deps\Oxide.CSharp.dll</HintPath>
</Reference>
<Reference Include="Oxide.MySql">
<HintPath>..\..\deps\Oxide.MySql.dll</HintPath>
</Reference>
<Reference Include="Oxide.References">
<HintPath>..\..\deps\Oxide.References.dll</HintPath>
</Reference>
<Reference Include="Oxide.Rust">
<HintPath>..\..\deps\Oxide.Rust.dll</HintPath>
</Reference>
<Reference Include="Oxide.SQLite">
<HintPath>..\..\deps\Oxide.SQLite.dll</HintPath>
</Reference>
<Reference Include="Oxide.Unity">
<HintPath>..\..\deps\Oxide.Unity.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Vital-Shared\deps\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Rust.Data">
<HintPath>..\..\deps\Rust.Data.dll</HintPath>
Expand Down Expand Up @@ -366,6 +343,8 @@
<Compile Include="Harmony\NetWrite\Send_Patch.cs" />
<Compile Include="Harmony\NetWrite\PacketID_Patch.cs" />
<Compile Include="Harmony\Performance\FPSTimer_Patch.cs" />
<Compile Include="Harmony\TimeWarning\Dispose_Patch.cs" />
<Compile Include="Harmony\TimeWarning\New_Patch.cs" />
<Compile Include="MetricsLogger.cs" />
<Compile Include="ReportUploader.cs" />
</ItemGroup>
Expand Down

0 comments on commit 9d1d210

Please sign in to comment.