Change package format to iso9660

This commit is contained in:
sardelka9515
2022-10-15 17:06:19 +08:00
parent d7c0abdfc2
commit 8d27c072ca
19 changed files with 101 additions and 116 deletions

View File

@ -1,6 +1,5 @@
using GTA;
using GTA.Math;
using RageCoop.Client.Scripting;
using System;
using System.Drawing;
using System.Threading;

View File

@ -5,17 +5,15 @@ using RageCoop.Client.Menus;
using RageCoop.Client.Scripting;
using RageCoop.Core;
using SHVDN;
using Script = GTA.Script;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Console = GTA.Console;
using Script = GTA.Script;
namespace RageCoop.Client
{
@ -33,7 +31,6 @@ namespace RageCoop.Client
internal static RelationshipGroup SyncedPedsGroup;
internal static new Settings Settings = null;
internal static BaseScript BaseScript = new BaseScript();
#if !NON_INTERACTIVE
#endif

View File

@ -1,9 +1,7 @@
using GTA;
using LemonUI.Menus;
using RageCoop.Client.Scripting;
using System;
using System.Drawing;
using System.IO;
namespace RageCoop.Client
{
@ -19,7 +17,7 @@ namespace RageCoop.Client
UseMouse = false,
Alignment = Main.Settings.FlipMenu ? GTA.UI.Alignment.Right : GTA.UI.Alignment.Left
};
public static NativeItem ReloadItem = new NativeItem("Reload","Reload RAGECOOP and associated scripts");
public static NativeItem ReloadItem = new NativeItem("Reload", "Reload RAGECOOP and associated scripts");
public static NativeItem SimulatedLatencyItem = new NativeItem("Simulated network latency", "Simulated network latency in ms (one way)", "0");
public static NativeCheckboxItem ShowOwnerItem = new NativeCheckboxItem("Show entity owner", "Show the owner name of the entity you're aiming at", false);
private static readonly NativeCheckboxItem ShowNetworkInfoItem = new NativeCheckboxItem("Show Network Info", Networking.ShowNetworkInfo);

View File

@ -2,8 +2,8 @@
using GTA.Math;
using GTA.Native;
using Lidgren.Network;
using RageCoop.Core;
using RageCoop.Client.Scripting;
using RageCoop.Core;
using System;
using System.Collections.Generic;

View File

@ -16,7 +16,7 @@ using System.Resources;
// Version informationr(
[assembly: AssemblyVersion("1.5.4.334")]
[assembly: AssemblyFileVersion("1.5.4.334")]
[assembly: AssemblyVersion("1.5.4.341")]
[assembly: AssemblyFileVersion("1.5.4.341")]
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]

View File

@ -6,7 +6,6 @@ using RageCoop.Core.Scripting;
using SHVDN;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Windows.Forms;

View File

@ -9,11 +9,10 @@ using System.Threading.Tasks;
namespace RageCoop.Client.Scripting
{
[ScriptAttributes(Author = "RageCoop", NoDefaultInstance = true, SupportURL = "https://github.com/RAGECOOP/RAGECOOP-V")]
internal class BaseScript : ClientScript
internal static class BaseScript
{
private bool _isHost = false;
public override void OnStart()
private static bool _isHost = false;
public static void OnStart()
{
API.Events.OnPedDeleted += (s, p) => { API.SendCustomEvent(CustomEvents.OnPedDeleted, p.ID); };
API.Events.OnVehicleDeleted += (s, p) => { API.SendCustomEvent(CustomEvents.OnVehicleDeleted, p.ID); };
@ -58,19 +57,19 @@ namespace RageCoop.Client.Scripting
});
}
private void WeatherTimeSync(CustomEventReceivedArgs e)
private static void WeatherTimeSync(CustomEventReceivedArgs e)
{
World.CurrentTimeOfDay = new TimeSpan((int)e.Args[0], (int)e.Args[1], (int)e.Args[2]);
Function.Call(Hash._SET_WEATHER_TYPE_TRANSITION, (int)e.Args[3], (int)e.Args[4], (float)e.Args[5]);
}
private void SetDisplayNameTag(CustomEventReceivedArgs e)
private static void SetDisplayNameTag(CustomEventReceivedArgs e)
{
var p = PlayerList.GetPlayer((int)e.Args[0]);
if (p != null) { p.DisplayNameTag = (bool)e.Args[1]; }
}
private void UpdatePedBlip(CustomEventReceivedArgs e)
private static void UpdatePedBlip(CustomEventReceivedArgs e)
{
var p = Entity.FromHandle((int)e.Args[0]);
if (p == null) { return; }
@ -90,7 +89,7 @@ namespace RageCoop.Client.Scripting
}
}
private void CreateVehicle(CustomEventReceivedArgs e)
private static void CreateVehicle(CustomEventReceivedArgs e)
{
var vehicleModel = (Model)e.Args[1];
vehicleModel.Request(1000);
@ -109,7 +108,7 @@ namespace RageCoop.Client.Scripting
EntityPool.Add(v);
}
private void DeleteServerBlip(CustomEventReceivedArgs e)
private static void DeleteServerBlip(CustomEventReceivedArgs e)
{
if (EntityPool.ServerBlips.TryGetValue((int)e.Args[0], out var blip))
{
@ -118,7 +117,7 @@ namespace RageCoop.Client.Scripting
}
}
private void ServerBlipSync(CustomEventReceivedArgs obj)
private static void ServerBlipSync(CustomEventReceivedArgs obj)
{
int id = (int)obj.Args[0];
var sprite = (BlipSprite)(ushort)obj.Args[1];
@ -140,15 +139,12 @@ namespace RageCoop.Client.Scripting
}
private void DeleteEntity(CustomEventReceivedArgs e)
private static void DeleteEntity(CustomEventReceivedArgs e)
{
Entity.FromHandle((int)e.Args[0])?.Delete();
}
public override void OnStop()
{
}
private void SetNameTag(CustomEventReceivedArgs e)
private static void SetNameTag(CustomEventReceivedArgs e)
{
var p = PlayerList.GetPlayer((int)e.Args[0]);
if (p != null)
@ -156,11 +152,11 @@ namespace RageCoop.Client.Scripting
p.DisplayNameTag = (bool)e.Args[1];
}
}
private void SetAutoRespawn(CustomEventReceivedArgs args)
private static void SetAutoRespawn(CustomEventReceivedArgs args)
{
API.Config.EnableAutoRespawn = (bool)args.Args[0];
}
private void DeleteServerProp(CustomEventReceivedArgs e)
private static void DeleteServerProp(CustomEventReceivedArgs e)
{
var id = (int)e.Args[0];
if (EntityPool.ServerProps.TryGetValue(id, out var prop))
@ -170,7 +166,7 @@ namespace RageCoop.Client.Scripting
}
}
private void ServerObjectSync(CustomEventReceivedArgs e)
private static void ServerObjectSync(CustomEventReceivedArgs e)
{
SyncedProp prop;
var id = (int)e.Args[0];
@ -188,7 +184,7 @@ namespace RageCoop.Client.Scripting
prop.Model.Request(1000);
prop.Update();
}
private void NativeCall(CustomEventReceivedArgs e)
private static void NativeCall(CustomEventReceivedArgs e)
{
List<InputArgument> arguments = new List<InputArgument>();
int i;
@ -272,7 +268,7 @@ namespace RageCoop.Client.Scripting
}
}
private InputArgument GetInputArgument(object obj)
private static InputArgument GetInputArgument(object obj)
{
// Implicit conversion
switch (obj)

View File

@ -1,5 +1,4 @@
using RageCoop.Core.Scripting;
using System;
namespace RageCoop.Client.Scripting
{

View File

@ -8,7 +8,6 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
namespace RageCoop.Client.Scripting
{
@ -135,7 +134,7 @@ namespace RageCoop.Client.Scripting
LoadedResources.TryAdd(r.Name, r);
}
void SetupScripts()
private void SetupScripts()
{
foreach (var s in GetClientScripts())
{
@ -165,7 +164,8 @@ namespace RageCoop.Client.Scripting
API.Logger.Debug("Started script: " + s.GetType().FullName);
}
}
void StopScripts()
private void StopScripts()
{
foreach (var s in GetClientScripts())
{

View File

@ -1,20 +1,13 @@
using GTA;
using Console = GTA.Console;
using GTA.Math;
using GTA.Native;
using Newtonsoft.Json;
using RageCoop.Core;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using System.Xml.Serialization;
using Newtonsoft.Json;
using SHVDN;
using System.Runtime.InteropServices.ComTypes;
[assembly: InternalsVisibleTo("RageCoop.Client.Installer")]
namespace RageCoop.Client

View File

@ -1,11 +1,9 @@
using GTA;
using GTA.Native;
using RageCoop.Client.Scripting;
using RageCoop.Core;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Threading;
using System.Threading.Tasks;
namespace RageCoop.Client
{
@ -23,7 +21,7 @@ namespace RageCoop.Client
public WorldThread()
{
Util.StartUpCheck();
Instance = this;
Instance = this;
Tick += OnTick;
Aborted += (sender, e) =>
{