diff --git a/Client/Chat.cs b/Client/Chat.cs
index b5606a3..4975ca3 100644
--- a/Client/Chat.cs
+++ b/Client/Chat.cs
@@ -8,14 +8,17 @@ using GTA.Native;
namespace CoopClient
{
- internal class Chat
+ ///
+ /// Don't use it!
+ ///
+ public class Chat
{
private readonly Scaleform MainScaleForm;
- public string CurrentInput { get; set; }
+ internal string CurrentInput { get; set; }
private bool CurrentFocused { get; set; }
- public bool Focused
+ internal bool Focused
{
get { return CurrentFocused; }
set
@@ -55,23 +58,26 @@ namespace CoopClient
}
}
+ ///
+ /// Don't use it!
+ ///
public Chat()
{
MainScaleForm = new Scaleform("multiplayer_chat");
}
- public void Init()
+ internal void Init()
{
MainScaleForm.CallFunction("SET_FOCUS", 2, 2, "ALL");
MainScaleForm.CallFunction("SET_FOCUS", 1, 2, "ALL");
}
- public void Clear()
+ internal void Clear()
{
MainScaleForm.CallFunction("RESET");
}
- public void Tick()
+ internal void Tick()
{
if ((Util.GetTickCount64() - LastMessageTime) > 15000 && !Focused && !Hidden)
{
@@ -91,14 +97,14 @@ namespace CoopClient
Function.Call(Hash.DISABLE_ALL_CONTROL_ACTIONS, 0);
}
- public void AddMessage(string sender, string msg)
+ internal void AddMessage(string sender, string msg)
{
MainScaleForm.CallFunction("ADD_MESSAGE", sender + ":", msg);
LastMessageTime = Util.GetTickCount64();
Hidden = false;
}
- public void OnKeyDown(Keys key)
+ internal void OnKeyDown(Keys key)
{
if (key == Keys.Escape)
{
@@ -151,12 +157,12 @@ namespace CoopClient
}
[DllImport("user32.dll")]
- public static extern int ToUnicodeEx(uint virtualKeyCode, uint scanCode, byte[] keyboardState,
+ internal static extern int ToUnicodeEx(uint virtualKeyCode, uint scanCode, byte[] keyboardState,
[Out, MarshalAs(UnmanagedType.LPWStr, SizeConst = 64)]
StringBuilder receivingBuffer,
int bufferSize, uint flags, IntPtr kblayout);
- public static string GetCharFromKey(Keys key, bool shift, bool altGr)
+ internal static string GetCharFromKey(Keys key, bool shift, bool altGr)
{
StringBuilder buf = new StringBuilder(256);
byte[] keyboardState = new byte[256];
diff --git a/Client/Entities/EntitiesThread.cs b/Client/Entities/EntitiesThread.cs
index cc43455..387b6ab 100644
--- a/Client/Entities/EntitiesThread.cs
+++ b/Client/Entities/EntitiesThread.cs
@@ -6,8 +6,14 @@ using GTA;
namespace CoopClient.Entities
{
- internal class EntitiesThread : Script
+ ///
+ /// Don't use it!
+ ///
+ public class EntitiesThread : Script
{
+ ///
+ /// Don't use it!
+ ///
public EntitiesThread()
{
Tick += OnTick;
diff --git a/Client/Main.cs b/Client/Main.cs
index ec1cad5..5dac2f7 100644
--- a/Client/Main.cs
+++ b/Client/Main.cs
@@ -12,31 +12,49 @@ using GTA.Native;
namespace CoopClient
{
- internal class Main : Script
+ ///
+ /// Don't use it!
+ ///
+ public class Main : Script
{
- public static RelationshipGroup RelationshipGroup;
+ internal static RelationshipGroup RelationshipGroup;
private bool GameLoaded = false;
- public static readonly string CurrentVersion = "V0_8_0_1";
+ internal static readonly string CurrentVersion = "V0_8_0_1";
- public static bool ShareNpcsWithPlayers = false;
- public static bool DisableTraffic = false;
- public static bool NpcsAllowed = false;
+ internal static bool ShareNpcsWithPlayers = false;
+ internal static bool DisableTraffic = false;
+ internal static bool NpcsAllowed = false;
private static bool IsGoingToCar = false;
+ ///
+ /// Don't use it!
+ ///
public static Settings MainSettings = Util.ReadSettings();
+ ///
+ /// Don't use it!
+ ///
public static Networking MainNetworking = new Networking();
#if !NON_INTERACTIVE
+ ///
+ /// Don't use it!
+ ///
public static MenusMain MainMenu = new MenusMain();
#endif
+ ///
+ /// Don't use it!
+ ///
public static Chat MainChat = new Chat();
- public static long LocalClientID = 0;
- public static readonly Dictionary Players = new Dictionary();
- public static readonly Dictionary Npcs = new Dictionary();
+ internal static long LocalClientID = 0;
+ internal static readonly Dictionary Players = new Dictionary();
+ internal static readonly Dictionary Npcs = new Dictionary();
+ ///
+ /// Don't use it!
+ ///
public Main()
{
Function.Call((Hash)0x0888C3502DBBEEF5); // _LOAD_MP_DLC_MAPS
@@ -184,7 +202,7 @@ namespace CoopClient
}
#endif
- public static void CleanUp()
+ internal static void CleanUp()
{
MainChat.Clear();
@@ -209,9 +227,9 @@ namespace CoopClient
#if DEBUG
private ulong ArtificialLagCounter;
- public static EntitiesPlayer DebugSyncPed;
- public static ulong LastFullDebugSync = 0;
- public static bool UseDebug = false;
+ internal static EntitiesPlayer DebugSyncPed;
+ internal static ulong LastFullDebugSync = 0;
+ internal static bool UseDebug = false;
private void Debug()
{
diff --git a/Client/Menus/MenusMain.cs b/Client/Menus/MenusMain.cs
index 51ec7c9..f4e6d10 100644
--- a/Client/Menus/MenusMain.cs
+++ b/Client/Menus/MenusMain.cs
@@ -5,16 +5,22 @@ using LemonUI.Menus;
namespace CoopClient.Menus
{
- internal class MenusMain
+ ///
+ /// Don't use it!
+ ///
+ public class MenusMain
{
- public ObjectPool MenuPool = new ObjectPool();
+ internal ObjectPool MenuPool = new ObjectPool();
- public NativeMenu MainMenu = new NativeMenu("GTACOOP:R", "MAIN")
+ internal NativeMenu MainMenu = new NativeMenu("GTACOOP:R", "MAIN")
{
UseMouse = false,
Alignment = Main.MainSettings.FlipMenu ? GTA.UI.Alignment.Right : GTA.UI.Alignment.Left
};
#region SUB
+ ///
+ /// Don't use it!
+ ///
public Sub.Settings SubSettings = new Sub.Settings();
#endregion
@@ -28,6 +34,9 @@ namespace CoopClient.Menus
Main.CurrentVersion.Replace("_", ".")) { LeftBadge = new LemonUI.Elements.ScaledTexture("commonmenu", "shop_new_star") };
#endregion
+ ///
+ /// Don't use it!
+ ///
public MenusMain()
{
UsernameItem.Activated += UsernameActivated;
@@ -46,7 +55,7 @@ namespace CoopClient.Menus
MenuPool.Add(SubSettings.MainMenu);
}
- public void UsernameActivated(object a, System.EventArgs b)
+ internal void UsernameActivated(object a, System.EventArgs b)
{
string newUsername = Game.GetUserInput(WindowTitle.EnterMessage20, UsernameItem.AltTitle, 20);
if (!string.IsNullOrWhiteSpace(newUsername))
@@ -59,7 +68,7 @@ namespace CoopClient.Menus
}
}
- public void ServerIpActivated(object a, System.EventArgs b)
+ internal void ServerIpActivated(object a, System.EventArgs b)
{
string newServerIp = Game.GetUserInput(WindowTitle.EnterMessage60, ServerIpItem.AltTitle, 60);
if (!string.IsNullOrWhiteSpace(newServerIp) && newServerIp.Contains(":"))
@@ -72,14 +81,14 @@ namespace CoopClient.Menus
}
}
- public void InitiateConnectionMenuSetting()
+ internal void InitiateConnectionMenuSetting()
{
MainMenu.Items[0].Enabled = false;
MainMenu.Items[1].Enabled = false;
MainMenu.Items[2].Enabled = false;
}
- public void ConnectedMenuSetting()
+ internal void ConnectedMenuSetting()
{
MainMenu.Items[2].Enabled = true;
MainMenu.Items[2].Title = "Disconnect";
@@ -89,7 +98,7 @@ namespace CoopClient.Menus
MenuPool.RefreshAll();
}
- public void DisconnectedMenuSetting()
+ internal void DisconnectedMenuSetting()
{
MainMenu.Items[0].Enabled = true;
MainMenu.Items[1].Enabled = true;
diff --git a/Client/Menus/Sub/Settings.cs b/Client/Menus/Sub/Settings.cs
index 2de3d0e..4ef99f0 100644
--- a/Client/Menus/Sub/Settings.cs
+++ b/Client/Menus/Sub/Settings.cs
@@ -2,9 +2,12 @@
namespace CoopClient.Menus.Sub
{
- internal class Settings
+ ///
+ /// Don't use it!
+ ///
+ public class Settings
{
- public NativeMenu MainMenu = new NativeMenu("GTACOOP:R", "Settings", "Go to the settings")
+ internal NativeMenu MainMenu = new NativeMenu("GTACOOP:R", "Settings", "Go to the settings")
{
UseMouse = false,
Alignment = Main.MainSettings.FlipMenu ? GTA.UI.Alignment.Right : GTA.UI.Alignment.Left
@@ -19,6 +22,9 @@ namespace CoopClient.Menus.Sub
private readonly NativeCheckboxItem ShowNetworkInfo = new NativeCheckboxItem("Show Network Info", Main.MainNetworking.ShowNetworkInfo);
#endif
+ ///
+ /// Don't use it!
+ ///
public Settings()
{
DisableTraffic.CheckboxChanged += DisableTrafficCheckboxChanged;
@@ -40,7 +46,7 @@ namespace CoopClient.Menus.Sub
#endif
}
- public void DisableTrafficCheckboxChanged(object a, System.EventArgs b)
+ internal void DisableTrafficCheckboxChanged(object a, System.EventArgs b)
{
Main.DisableTraffic = DisableTraffic.Checked;
@@ -59,14 +65,14 @@ namespace CoopClient.Menus.Sub
}
}
- public void StreamedNpcsValueChanged(object a, System.EventArgs b)
+ internal void StreamedNpcsValueChanged(object a, System.EventArgs b)
{
Main.MainSettings.StreamedNpc = StreamedNpcsItem.Value;
Util.SaveSettings();
StreamedNpcsItem.Title = string.Format("Streamed Npcs ({0})", Main.MainSettings.StreamedNpc);
}
- public void FlipMenuCheckboxChanged(object a, System.EventArgs b)
+ internal void FlipMenuCheckboxChanged(object a, System.EventArgs b)
{
#if !NON_INTERACTIVE
Main.MainMenu.MainMenu.Alignment = FlipMenuItem.Checked ? GTA.UI.Alignment.Right : GTA.UI.Alignment.Left;
@@ -78,7 +84,7 @@ namespace CoopClient.Menus.Sub
}
#if DEBUG
- public void UseDebugCheckboxChanged(object a, System.EventArgs b)
+ internal void UseDebugCheckboxChanged(object a, System.EventArgs b)
{
Main.UseDebug = UseDebugItem.Checked;
@@ -96,7 +102,7 @@ namespace CoopClient.Menus.Sub
}
}
- public void ShowNetworkInfoCheckboxChanged(object a, System.EventArgs b)
+ internal void ShowNetworkInfoCheckboxChanged(object a, System.EventArgs b)
{
Main.MainNetworking.ShowNetworkInfo = ShowNetworkInfo.Checked;
diff --git a/Client/Networking.cs b/Client/Networking.cs
index 56088a5..66afd2e 100644
--- a/Client/Networking.cs
+++ b/Client/Networking.cs
@@ -10,17 +10,20 @@ using GTA.Native;
namespace CoopClient
{
- internal class Networking
+ ///
+ /// Don't use it!
+ ///
+ public class Networking
{
- public NetClient Client;
- public float Latency;
+ internal NetClient Client;
+ internal float Latency;
- public bool ShowNetworkInfo = false;
+ internal bool ShowNetworkInfo = false;
- public int BytesReceived = 0;
- public int BytesSend = 0;
+ internal int BytesReceived = 0;
+ internal int BytesSend = 0;
- public void DisConnectFromServer(string address)
+ internal void DisConnectFromServer(string address)
{
if (IsOnServer())
{
@@ -66,12 +69,12 @@ namespace CoopClient
}
}
- public bool IsOnServer()
+ internal bool IsOnServer()
{
return Client?.ConnectionStatus == NetConnectionStatus.Connected;
}
- public void ReceiveMessages()
+ internal void ReceiveMessages()
{
if (Client == null)
{
@@ -588,7 +591,7 @@ namespace CoopClient
#region -- SEND --
private ulong LastPlayerFullSync = 0;
- public void SendPlayerData()
+ internal void SendPlayerData()
{
Ped player = Game.Player.Character;
@@ -760,7 +763,7 @@ namespace CoopClient
#endif
}
- public void SendNpcData(Ped npc)
+ internal void SendNpcData(Ped npc)
{
NetOutgoingMessage outgoingMessage = Client.CreateMessage();
@@ -857,7 +860,7 @@ namespace CoopClient
#endif
}
- public void SendChatMessage(string message)
+ internal void SendChatMessage(string message)
{
NetOutgoingMessage outgoingMessage = Client.CreateMessage();
new ChatMessagePacket()
@@ -876,7 +879,7 @@ namespace CoopClient
#endif
}
- public void SendModData(long target, string mod, byte customID, byte[] bytes)
+ internal void SendModData(long target, string mod, byte customID, byte[] bytes)
{
NetOutgoingMessage outgoingMessage = Client.CreateMessage();
new ModPacket()
diff --git a/Client/PlayerList.cs b/Client/PlayerList.cs
index 163ebf2..7b02f1c 100644
--- a/Client/PlayerList.cs
+++ b/Client/PlayerList.cs
@@ -8,12 +8,18 @@ using GTA.Native;
namespace CoopClient
{
- internal class PlayerList : Script
+ ///
+ /// Don't use it!
+ ///
+ public class PlayerList : Script
{
private readonly Scaleform MainScaleform = new Scaleform("mp_mm_card_freemode");
private ulong LastUpdate = Util.GetTickCount64();
- public static ulong Pressed { get; set; }
+ internal static ulong Pressed { get; set; }
+ ///
+ /// Don't use it!
+ ///
public PlayerList()
{
Init();
diff --git a/Client/Settings.cs b/Client/Settings.cs
index aebbd50..99b42b4 100644
--- a/Client/Settings.cs
+++ b/Client/Settings.cs
@@ -1,10 +1,13 @@
namespace CoopClient
{
- internal class Settings
+ ///
+ /// Don't use it!
+ ///
+ public class Settings
{
- public string Username { get; set; } = "Player";
- public string LastServerAddress { get; set; } = "127.0.0.1:4499";
- public bool FlipMenu { get; set; } = false;
- public int StreamedNpc { get; set; } = 10;
+ internal string Username { get; set; } = "Player";
+ internal string LastServerAddress { get; set; } = "127.0.0.1:4499";
+ internal bool FlipMenu { get; set; } = false;
+ internal int StreamedNpc { get; set; } = 10;
}
}
diff --git a/Client/WorldThread.cs b/Client/WorldThread.cs
index 35188a1..feddba1 100644
--- a/Client/WorldThread.cs
+++ b/Client/WorldThread.cs
@@ -6,10 +6,16 @@ using GTA.Native;
namespace CoopClient
{
- internal class WorldThread : Script
+ ///
+ /// Don't use it!
+ ///
+ public class WorldThread : Script
{
private static bool LastDisableTraffic = false;
+ ///
+ /// Don't use it!
+ ///
public WorldThread()
{
Tick += OnTick;
@@ -23,7 +29,7 @@ namespace CoopClient
};
}
- public static void OnTick(object sender, EventArgs e)
+ internal static void OnTick(object sender, EventArgs e)
{
if (Game.IsLoading)
{