Cleanup and update installer

This commit is contained in:
sardelka9515
2022-11-30 20:17:06 +08:00
parent 952ab4f7b3
commit a9b05c62ff
22 changed files with 248 additions and 233 deletions

View File

@ -54,6 +54,7 @@ namespace RageCoop.Client.Installer
{
UpdateStatus("Checking requirements");
var shvPath = Path.Combine(root, "ScriptHookV.dll");
var shvdnPath = Path.Combine(root, "ScriptHookVDotNet3.dll");
var scriptsPath = Path.Combine(root, "Scripts");
var installPath = Path.Combine(root, "RageCoop", "Scripts");
var legacyPath = Path.Combine(scriptsPath, "RageCoop");
@ -68,8 +69,19 @@ namespace RageCoop.Client.Installer
Directory.CreateDirectory(installPath);
File.Copy("ScriptHookVDotNet.dll", Path.Combine(root, "ScriptHookVDotNet.asi"), true);
File.Copy("ScriptHookVDotNet3.dll", Path.Combine(root, "ScriptHookVDotNet3.dll"), true);
if (!File.Exists(shvdnPath))
{
MessageBox.Show("Please install ScriptHookVDotNet first!");
Environment.Exit(1);
}
var shvdnVer = GetVer(shvdnPath);
if (shvdnVer < new Version(3, 5, 1))
{
MessageBox.Show("Please update ScriptHookVDotNet to latest version!" +
$"\nCurrent version is {shvdnVer}, 3.5.1 or higher is required");
Environment.Exit(1);
}
UpdateStatus("Removing old versions");
@ -77,18 +89,19 @@ namespace RageCoop.Client.Installer
foreach (var f in Directory.GetFiles(scriptsPath, "RageCoop.*", SearchOption.AllDirectories))
File.Delete(f);
// 1.5 installation check
// <= 1.5 installation check
if (Directory.Exists(legacyPath)) Directory.Delete(legacyPath, true);
foreach (var f in Directory.GetFiles(installPath, "*.dll", SearchOption.AllDirectories)) File.Delete(f);
if (File.Exists("RageCoop.Core.dll") && File.Exists("RageCoop.Client.dll") &&
File.Exists("RageCoop.Client.Loader.dll"))
if (File.Exists("Scripts/RageCoop.Core.dll") && File.Exists("Scripts/RageCoop.Client.dll") &&
File.Exists("Loader/RageCoop.Client.Loader.dll"))
{
UpdateStatus("Installing...");
CoreUtils.CopyFilesRecursively(new DirectoryInfo(Directory.GetCurrentDirectory()),
new DirectoryInfo(installPath));
File.Copy("RageCoop.Client.Loader.dll", Path.Combine(scriptsPath, "RageCoop.Client.Loader.dll"), true);
File.Copy("Loader/RageCoop.Client.Loader.dll", Path.Combine(scriptsPath, "RageCoop.Client.Loader.dll"),
true);
Finish();
}
else
@ -165,7 +178,7 @@ namespace RageCoop.Client.Installer
}
catch
{
MessageBox.Show("Failed to download ZeroTier, please download it from officail website");
MessageBox.Show("Failed to download ZeroTier, please download it from official website");
Process.Start(url);
}
}
@ -181,5 +194,10 @@ namespace RageCoop.Client.Installer
{
Dispatcher.BeginInvoke(new Action(() => Status.Content = status));
}
private Version GetVer(string location)
{
return Version.Parse(FileVersionInfo.GetVersionInfo(location).FileVersion);
}
}
}

View File

@ -5,14 +5,17 @@ namespace GTA
internal class Console
{
private static readonly SHVDN.Console console = AppDomain.CurrentDomain.GetData("Console") as SHVDN.Console;
public static void Warning(object format, params object[] objects)
{
console.PrintInfo("[~o~WARNING~w~] ", format.ToString(), objects);
}
public static void Error(object format, params object[] objects)
{
console.PrintError("[~r~ERROR~w~] ", format.ToString(), objects);
}
public static void Info(object format, params object[] objects)
{
console.PrintWarning("[~b~INFO~w~] ", format.ToString(), objects);

View File

@ -7,7 +7,6 @@ using System.Windows.Forms;
using GTA.UI;
using SHVDN;
using Console = GTA.Console;
using Script = GTA.Script;
namespace RageCoop.Client.Loader
{
@ -68,10 +67,7 @@ namespace RageCoop.Client.Loader
// Copy to target domain base directory
// Delete loader assembly
var loaderPath = Path.Combine(dir, Path.GetFileName(typeof(LoaderContext).Assembly.Location));
if (File.Exists(loaderPath))
{
File.Delete(loaderPath);
}
if (File.Exists(loaderPath)) File.Delete(loaderPath);
var context = (LoaderContext)newDomain.AppDomain.CreateInstanceFromAndUnwrap(
typeof(LoaderContext).Assembly.Location,
@ -130,10 +126,7 @@ namespace RageCoop.Client.Loader
{
lock (_loadedDomains)
{
foreach (var c in _loadedDomains.Values)
{
c.DoTick();
}
foreach (var c in _loadedDomains.Values) c.DoTick();
}
}
@ -141,10 +134,7 @@ namespace RageCoop.Client.Loader
{
lock (_loadedDomains)
{
foreach (var c in _loadedDomains.Values)
{
c.DoKeyEvent(keys, status);
}
foreach (var c in _loadedDomains.Values) c.DoKeyEvent(keys, status);
}
}
@ -162,16 +152,20 @@ namespace RageCoop.Client.Loader
private readonly Action _domainDoTick;
private readonly Action<Keys, bool> _domainDoKeyEvent;
private LoaderContext()
{
AppDomain.CurrentDomain.DomainUnload += (s, e) => Dispose();
var tickMethod = typeof(ScriptDomain).GetMethod("DoTick", BindingFlags.Instance | BindingFlags.NonPublic);
var doKeyEventMethod = typeof(ScriptDomain).GetMethod("DoKeyEvent", BindingFlags.Instance | BindingFlags.NonPublic);
var doKeyEventMethod =
typeof(ScriptDomain).GetMethod("DoKeyEvent", BindingFlags.Instance | BindingFlags.NonPublic);
// Create delegates to avoid using reflection to call method each time, which is slow
_domainDoTick = (Action)Delegate.CreateDelegate(typeof(Action), CurrentDomain, tickMethod);
_domainDoKeyEvent = (Action<Keys, bool>)Delegate.CreateDelegate(typeof(Action<Keys, bool>), CurrentDomain, doKeyEventMethod);
_domainDoKeyEvent =
(Action<Keys, bool>)Delegate.CreateDelegate(typeof(Action<Keys, bool>), CurrentDomain,
doKeyEventMethod);
Console.Info(
$"Loaded domain: {AppDomain.CurrentDomain.FriendlyName}, {AppDomain.CurrentDomain.BaseDirectory}");
@ -193,11 +187,20 @@ namespace RageCoop.Client.Loader
CurrentContext.UnloadRequested = true;
}
public override object InitializeLifetimeService() => null;
public override object InitializeLifetimeService()
{
return null;
}
public void DoTick() => _domainDoTick();
public void DoTick()
{
_domainDoTick();
}
public void DoKeyEvent(Keys key, bool status) => _domainDoKeyEvent(key, status);
public void DoKeyEvent(Keys key, bool status)
{
_domainDoKeyEvent(key, status);
}
public void Dispose()
{

View File

@ -1,12 +1,8 @@
using System;
using System.Collections.Concurrent;
using System.IO;
using System.Threading;
using System.Windows.Forms;
using GTA;
using GTA.UI;
using SHVDN;
using Console = GTA.Console;
using Script = GTA.Script;
namespace RageCoop.Client.Loader
@ -30,7 +26,12 @@ namespace RageCoop.Client.Loader
private void OnTick(object sender, EventArgs e)
{
if (!_loaded) { _loaded = !Game.IsLoading; return; }
if (!_loaded)
{
_loaded = !Game.IsLoading;
return;
}
LoaderContext.CheckForUnloadRequest();
if (!LoaderContext.IsLoaded(ScriptsLocation))
{
@ -40,8 +41,10 @@ namespace RageCoop.Client.Loader
Abort();
return;
}
LoaderContext.Load(ScriptsLocation);
}
LoaderContext.TickAll();
}
}

View File

@ -3,19 +3,22 @@
namespace GTA
{
/// <summary>
/// Wrapper that provides access to SHVDN's in-game console
/// Wrapper that provides access to SHVDN's in-game console
/// </summary>
public class Console
{
private static SHVDN.Console console => (SHVDN.Console)AppDomain.CurrentDomain.GetData("Console");
public static void Warning(object format, params object[] objects)
{
console.PrintInfo("[~o~WARNING~w~] ", format.ToString(), objects);
}
public static void Error(object format, params object[] objects)
{
console.PrintError("[~r~ERROR~w~] ", format.ToString(), objects);
}
public static void Info(object format, params object[] objects)
{
console.PrintWarning("[~b~INFO~w~] ", format.ToString(), objects);

View File

@ -16,12 +16,10 @@ using RageCoop.Client.GUI;
using RageCoop.Client.Menus;
using RageCoop.Client.Scripting;
using RageCoop.Core;
using SHVDN;
using static RageCoop.Client.Shared;
using Console = GTA.Console;
using Control = GTA.Control;
using Screen = System.Windows.Forms.Screen;
using Script = GTA.Script;
namespace RageCoop.Client
{
@ -120,6 +118,7 @@ namespace RageCoop.Client
};
return;
}
Logger.Info(
$"Starting {typeof(Main).FullName}, domain: {AppDomain.CurrentDomain.Id} {AppDomain.CurrentDomain.FriendlyName}");
@ -153,6 +152,7 @@ namespace RageCoop.Client
Logger.Error(ex);
}
}
/// <summary>
/// Queue an action to main thread and wait for execution to complete, must be called from script thread.
/// </summary>
@ -187,6 +187,7 @@ namespace RageCoop.Client
{
return;
}
if (!_gameLoaded && (_gameLoaded = true))
{
#if !NON_INTERACTIVE
@ -235,13 +236,13 @@ namespace RageCoop.Client
{
new ScaledText(new PointF(Screen.PrimaryScreen.Bounds.Width / 2, 0),
$"L: {Networking.Latency * 1000:N0}ms", 0.5f)
{ Alignment = Alignment.Center }.Draw();
{ Alignment = Alignment.Center }.Draw();
new ScaledText(new PointF(Screen.PrimaryScreen.Bounds.Width / 2, 30),
$"R: {NetUtility.ToHumanReadable(Statistics.BytesDownPerSecond)}/s", 0.5f)
{ Alignment = Alignment.Center }.Draw();
{ Alignment = Alignment.Center }.Draw();
new ScaledText(new PointF(Screen.PrimaryScreen.Bounds.Width / 2, 60),
$"S: {NetUtility.ToHumanReadable(Statistics.BytesUpPerSecond)}/s", 0.5f)
{ Alignment = Alignment.Center }.Draw();
{ Alignment = Alignment.Center }.Draw();
}
MainChat.Tick();

View File

@ -1,7 +1,4 @@

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Reflection;
using System.Resources;
// General Information
@ -16,7 +13,6 @@ using System.Resources;
// Version information
[assembly: AssemblyVersion("1.6.0.1")]
[assembly: AssemblyFileVersion("1.6.0.1")]
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]
[assembly: AssemblyVersion("1.6.0.21")]
[assembly: AssemblyFileVersion("1.6.0.21")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]

View File

@ -204,6 +204,4 @@
dotnet build -c $(Configuration) "$(SolutionDir)Client\CefHost\RageCoop.Client.CefHost.csproj"
</PreBuildEvent>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' != 'API'">
</PropertyGroup>
</Project>

View File

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using GTA;

View File

@ -81,12 +81,12 @@ namespace RageCoop.Client
public bool ShowEntityOwnerName { get; set; } = false;
/// <summary>
/// Show other player's nametag on your screen, only effective if server didn't disable nametag display
/// Show other player's nametag on your screen, only effective if server didn't disable nametag display
/// </summary>
public bool ShowPlayerNameTag { get; set; } = true;
/// <summary>
/// Show other player's blip on map, can be overridden by server resource
/// Show other player's blip on map, can be overridden by server resource
/// </summary>
public bool ShowPlayerBlip { get; set; } = true;
}

View File

@ -15,6 +15,8 @@ namespace RageCoop.Client
private bool _lastDriveBy;
private bool _lastInCover;
private bool _lastIsJumping;
private bool _lastMoving;
private bool _lastRagdoll;
private ulong _lastRagdollTime;
private Dictionary<uint, bool> _lastWeaponComponents;
@ -23,8 +25,6 @@ namespace RageCoop.Client
internal float BlipScale = 1;
internal BlipSprite BlipSprite = 0;
internal PedDataFlags Flags;
private bool _lastMoving;
internal Blip PedBlip = null;
internal VehicleSeat Seat;

View File

@ -67,10 +67,7 @@ namespace RageCoop.Client
if (!CreateCharacter())
return;
if (!Main.Settings.ShowPlayerBlip && (byte)BlipColor != 255)
{
BlipColor = (BlipColor)255;
}
if (!Main.Settings.ShowPlayerBlip && (byte)BlipColor != 255) BlipColor = (BlipColor)255;
if ((byte)BlipColor == 255 && PedBlip != null)
{
PedBlip.Delete();
@ -551,10 +548,8 @@ namespace RageCoop.Client
MainPed.Task.StandStill(2000);
_lastMoving = false;
}
if (MainPed.IsTaskActive(TaskType.CTaskDiveToGround))
{
MainPed.Task.ClearAll();
}
if (MainPed.IsTaskActive(TaskType.CTaskDiveToGround)) MainPed.Task.ClearAll();
break;
}

View File

@ -64,6 +64,7 @@ namespace RageCoop.Client
internal Vector3 FrontExtent;
internal Vector3 LeftExtent;
internal Vector3 RightExtent;
#endregion
#region PRIVATE

View File

@ -13,7 +13,6 @@ namespace RageCoop.Client
{
internal override void Update()
{
// Check if all data available
if (!IsReady || Owner == null) return;
@ -162,7 +161,7 @@ namespace RageCoop.Client
var current = MainVehicle.ReadPosition();
var distSquared = current.DistanceToSquared(_predictedPosition);
var cali = _predictedPosition - current;
if (!IsTrain) { cali += 0.5f * (Velocity - MainVehicle.Velocity); }
if (!IsTrain) cali += 0.5f * (Velocity - MainVehicle.Velocity);
if (distSquared > 10 * 10)
{
MainVehicle.Position = _predictedPosition;

View File

@ -291,9 +291,6 @@ namespace RageCoop.Client
private static int vehStatesPerFrame;
private static int pedStatesPerFrame;
private static int i;
public static Ped[] allPeds = new Ped[0];
public static Vehicle[] allVehicles = new Vehicle[0];
public static Projectile[] allProjectiles = new Projectile[0];
public static void DoSync()
{
@ -302,9 +299,9 @@ namespace RageCoop.Client
PerfCounter.Restart();
Debug.TimeStamps[TimeStamp.CheckProjectiles] = PerfCounter.ElapsedTicks;
#endif
allPeds = World.GetAllPeds();
allVehicles = World.GetAllVehicles();
allProjectiles = World.GetAllProjectiles();
var allPeds = World.GetAllPeds();
var allVehicles = World.GetAllVehicles();
var allProjectiles = World.GetAllProjectiles();
vehStatesPerFrame = allVehicles.Length * 2 / (int)Game.FPS + 1;
pedStatesPerFrame = allPeds.Length * 2 / (int)Game.FPS + 1;
#if BENCHMARK

View File

@ -1,72 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net48" />
<package id="Microsoft.Extensions.ObjectPool" version="6.0.8" targetFramework="net48" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net48" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net48" />
<package id="Microsoft.Win32.Registry" version="4.7.0" targetFramework="net481" />
<package id="NativeInvoker" version="1.0.0.1" targetFramework="net48" />
<package id="NAudio" version="2.1.0" targetFramework="net48" />
<package id="NAudio.Asio" version="2.1.0" targetFramework="net48" />
<package id="NAudio.Core" version="2.1.0" targetFramework="net48" />
<package id="NAudio.Midi" version="2.1.0" targetFramework="net48" />
<package id="NAudio.Wasapi" version="2.1.0" targetFramework="net48" />
<package id="NAudio.WinForms" version="2.1.0" targetFramework="net48" />
<package id="NAudio.WinMM" version="2.1.0" targetFramework="net48" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="ScriptHookVDotNet3" version="3.5.1" targetFramework="net48" />
<package id="SharpZipLib" version="1.4.0" targetFramework="net48" />
<package id="System.AppContext" version="4.3.0" targetFramework="net48" />
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
<package id="System.Collections" version="4.3.0" targetFramework="net48" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net48" />
<package id="System.Console" version="4.3.0" targetFramework="net48" />
<package id="System.Data.DataSetExtensions" version="4.5.0" targetFramework="net48" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net48" />
<package id="System.Diagnostics.DiagnosticSource" version="4.3.0" targetFramework="net48" />
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net48" />
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net48" />
<package id="System.Drawing.Common" version="4.5.0" targetFramework="net48" />
<package id="System.Globalization" version="4.3.0" targetFramework="net48" />
<package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net48" />
<package id="System.IO" version="4.3.0" targetFramework="net48" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net48" />
<package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net48" />
<package id="System.IO.FileSystem" version="4.3.0" targetFramework="net48" />
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net48" />
<package id="System.Linq" version="4.3.0" targetFramework="net48" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net48" />
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
<package id="System.Net.Http" version="4.3.0" targetFramework="net48" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="net48" />
<package id="System.Net.Sockets" version="4.3.0" targetFramework="net48" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
<package id="System.ObjectModel" version="4.3.0" targetFramework="net48" />
<package id="System.Reflection" version="4.3.0" targetFramework="net48" />
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net48" />
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net48" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime.Handles" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net48" />
<package id="System.Security.AccessControl" version="4.7.0" targetFramework="net481" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net48" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net48" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net48" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net48" />
<package id="System.Security.Principal.Windows" version="4.7.0" targetFramework="net481" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net48" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net48" />
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net48" />
<package id="System.Threading" version="4.3.0" targetFramework="net48" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net48" />
<package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="net48" />
<package id="System.Threading.Timer" version="4.3.0" targetFramework="net48" />
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net48" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net48" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net48" />
<package id="Microsoft.Extensions.ObjectPool" version="6.0.8" targetFramework="net48" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net48" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net48" />
<package id="Microsoft.Win32.Registry" version="4.7.0" targetFramework="net481" />
<package id="NativeInvoker" version="1.0.0.1" targetFramework="net48" />
<package id="NAudio" version="2.1.0" targetFramework="net48" />
<package id="NAudio.Asio" version="2.1.0" targetFramework="net48" />
<package id="NAudio.Core" version="2.1.0" targetFramework="net48" />
<package id="NAudio.Midi" version="2.1.0" targetFramework="net48" />
<package id="NAudio.Wasapi" version="2.1.0" targetFramework="net48" />
<package id="NAudio.WinForms" version="2.1.0" targetFramework="net48" />
<package id="NAudio.WinMM" version="2.1.0" targetFramework="net48" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="ScriptHookVDotNet3" version="3.5.1" targetFramework="net48" />
<package id="SharpZipLib" version="1.4.0" targetFramework="net48" />
<package id="System.AppContext" version="4.3.0" targetFramework="net48" />
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
<package id="System.Collections" version="4.3.0" targetFramework="net48" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net48" />
<package id="System.Console" version="4.3.0" targetFramework="net48" />
<package id="System.Data.DataSetExtensions" version="4.5.0" targetFramework="net48" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net48" />
<package id="System.Diagnostics.DiagnosticSource" version="4.3.0" targetFramework="net48" />
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net48" />
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net48" />
<package id="System.Drawing.Common" version="4.5.0" targetFramework="net48" />
<package id="System.Globalization" version="4.3.0" targetFramework="net48" />
<package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net48" />
<package id="System.IO" version="4.3.0" targetFramework="net48" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net48" />
<package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net48" />
<package id="System.IO.FileSystem" version="4.3.0" targetFramework="net48" />
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net48" />
<package id="System.Linq" version="4.3.0" targetFramework="net48" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net48" />
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
<package id="System.Net.Http" version="4.3.0" targetFramework="net48" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="net48" />
<package id="System.Net.Sockets" version="4.3.0" targetFramework="net48" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
<package id="System.ObjectModel" version="4.3.0" targetFramework="net48" />
<package id="System.Reflection" version="4.3.0" targetFramework="net48" />
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net48" />
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net48" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime.Handles" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net48" />
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net48" />
<package id="System.Security.AccessControl" version="4.7.0" targetFramework="net481" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net48" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net48" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net48" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net48" />
<package id="System.Security.Principal.Windows" version="4.7.0" targetFramework="net481" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net48" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net48" />
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net48" />
<package id="System.Threading" version="4.3.0" targetFramework="net48" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net48" />
<package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="net48" />
<package id="System.Threading.Timer" version="4.3.0" targetFramework="net48" />
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net48" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net48" />
</packages>

View File

@ -17,7 +17,6 @@ using GTA.Math;
using Lidgren.Network;
using Newtonsoft.Json;
using RageCoop.Core.Scripting;
using Console = System.Console;
[assembly: InternalsVisibleTo("RageCoop.Server")]
[assembly: InternalsVisibleTo("RageCoop.Client")]

View File

@ -102,6 +102,7 @@ namespace RageCoop.Core
}
#region ===== VEHICLE DATA =====
[Flags]
internal enum VehicleDataFlags : ushort
{

View File

@ -1,2 +1,3 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=Joaat/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Joaat/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=RAGECOOP/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View File

@ -35,7 +35,7 @@ internal class Program
Environment.Exit(i);
}
AppDomain.CurrentDomain.UnhandledException += UnhandledException;
mainLogger = new Logger
{

View File

@ -1,7 +1,4 @@

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Reflection;
using System.Resources;
// General Information
@ -15,7 +12,6 @@ using System.Resources;
[assembly: AssemblyCulture("")]
// Version information
[assembly: AssemblyVersion("1.6.0.20")]
[assembly: AssemblyFileVersion("1.6.0.20")]
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]
[assembly: AssemblyVersion("1.6.0.21")]
[assembly: AssemblyFileVersion("1.6.0.21")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]

View File

@ -1,29 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<AssemblyVersion></AssemblyVersion>
<FileVersion></FileVersion>
<RepositoryUrl>https://github.com/RAGECOOP/RAGECOOP-V</RepositoryUrl>
<PackageProjectUrl>https://ragecoop.online/</PackageProjectUrl>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Product>$(AssemblyName)</Product>
<PackageId>RageCoop.Server</PackageId>
<Authors>RAGECOOP</Authors>
<Version></Version>
<DebugType>embedded</DebugType>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Description>An library for hosting a RAGECOOP server or API reference for developing a resource.</Description>
<ApplicationIcon>icon.ico</ApplicationIcon>
<PackageIcon>icon.png</PackageIcon>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Configurations>Debug;Release;API</Configurations>
<OutDir>..\bin\$(Configuration)\Server</OutDir>
</PropertyGroup>
<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<AssemblyVersion></AssemblyVersion>
<FileVersion></FileVersion>
<RepositoryUrl>https://github.com/RAGECOOP/RAGECOOP-V</RepositoryUrl>
<PackageProjectUrl>https://ragecoop.online/</PackageProjectUrl>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Product>$(AssemblyName)</Product>
<PackageId>RageCoop.Server</PackageId>
<Authors>RAGECOOP</Authors>
<Version></Version>
<DebugType>embedded</DebugType>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Description>An library for hosting a RAGECOOP server or API reference for developing a resource.</Description>
<ApplicationIcon>icon.ico</ApplicationIcon>
<PackageIcon>icon.png</PackageIcon>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Configurations>Debug;Release;API</Configurations>
<OutDir>..\bin\$(Configuration)\Server</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'API'">
<OutDir>..\bin\API</OutDir>
<Deterministic>true</Deterministic>
@ -31,78 +31,79 @@
<ProduceOnlyReferenceAssembly>true</ProduceOnlyReferenceAssembly>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702;1591</NoWarn>
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<NoWarn>1701;1702;1591</NoWarn>
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<Content Include="icon.ico" />
</ItemGroup>
<ItemGroup>
<Content Include="icon.ico" />
</ItemGroup>
<ItemGroup>
<None Include="..\images\icon.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="Properties\AssemblyInfo.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>AssemblyInfo.tt</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<None Include="..\images\icon.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="Properties\AssemblyInfo.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>AssemblyInfo.tt</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Costura.Fody" Version="5.7.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="DiscUtils.Iso9660" Version="0.16.13" />
<PackageReference Include="Fody" Version="6.6.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="McMaster.NETCore.Plugins" Version="1.4.0" />
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="6.0.8" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="SharpZipLib" Version="1.4.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Costura.Fody" Version="5.7.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="DiscUtils.Iso9660" Version="0.16.13" />
<PackageReference Include="Fody" Version="6.6.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="McMaster.NETCore.Plugins" Version="1.4.0" />
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="6.0.8" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="SharpZipLib" Version="1.4.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Core\RageCoop.Core.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Core\RageCoop.Core.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="Lidgren.Network">
<HintPath>..\libs\Lidgren.Network.dll</HintPath>
</Reference>
<Reference Include="ScriptHookVDotNet3">
<HintPath>..\libs\ScriptHookVDotNet3.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Reference Include="Lidgren.Network">
<HintPath>..\libs\Lidgren.Network.dll</HintPath>
</Reference>
<Reference Include="ScriptHookVDotNet3">
<HintPath>..\libs\ScriptHookVDotNet3.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Update="Properties\AssemblyInfo.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>AssemblyInfo.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<None Update="Properties\AssemblyInfo.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>AssemblyInfo.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
</ItemGroup>
<ItemGroup>
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\AssemblyInfo.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>AssemblyInfo.tt</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\AssemblyInfo.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>AssemblyInfo.tt</DependentUpon>
</Compile>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition=" '$(DevEnvDir)' != '*Undefined*'">
<Exec Command="&quot;$(DevEnvDir)TextTransform.exe&quot; -a !!BuildConfiguration!$(Configuration) &quot;$(ProjectDir)Properties\AssemblyInfo.tt&quot;" />
</Target>
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition=" '$(DevEnvDir)' != '*Undefined*'">
<Exec
Command="&quot;$(DevEnvDir)TextTransform.exe&quot; -a !!BuildConfiguration!$(Configuration) &quot;$(ProjectDir)Properties\AssemblyInfo.tt&quot;" />
</Target>
</Project>
</Project>