Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions LSPDFR+/CourtSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Linq;

namespace LSPDFR_
{
internal static class CourtSystem
{
#region CourtSytem Keys
public static Keys OpenCourtMenuKey { get; set; } = Keys.F9;
public static Keys OpenCourtMenuModifierKey { get; set; } = Keys.None;
#endregion
public static List<CourtCase> PendingCourtCases { get; set; } = new List<CourtCase>();
public static List<CourtCase> PublishedCourtCases { get; set; } = new List<CourtCase>();
public static string CourtCaseFilePath { get; set; } = "Plugins/LSPDFR/LSPDFR+/CourtCases.xml";

public const string CourtCaseFilePath = "Plugins/LSPDFR/LSPDFR+/CourtCases.xml";
public static bool LoadingXMLFileCases { get; set; } = true;
public static bool RealisticCourtDates { get; set; } = true;
public static void CourtSystemMainLogic()
Expand Down
2 changes: 0 additions & 2 deletions LSPDFR+/EnhancedPursuitAI.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Rage;
using LSPD_First_Response.Mod.API;
using System.Windows.Forms;
Expand Down
4 changes: 0 additions & 4 deletions LSPDFR+/EnhancedTrafficStop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Albo1125.Common.CommonLibrary;
using System.IO;
using System.Xml.Serialization;

namespace LSPDFR_
{
Expand Down
2 changes: 1 addition & 1 deletion LSPDFR+/LSPDFR+.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LSPDFR_</RootNamespace>
<AssemblyName>LSPDFR+</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
Expand Down
9 changes: 0 additions & 9 deletions LSPDFR+/LSPDFRPlusHandler.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LSPD_First_Response.Mod.API;
using Rage;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
using RAGENativeUI;
using RAGENativeUI.Elements;
using System.Drawing;
using System.Threading;
using System.Management;
using System.Net;
using Rage.Native;
using Albo1125.Common.CommonLibrary;

Expand Down
6 changes: 1 addition & 5 deletions LSPDFR+/Main.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
using LSPD_First_Response.Mod.API;
using Rage;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;


namespace LSPDFR_
{
Expand Down
19 changes: 11 additions & 8 deletions LSPDFR+/Menus.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LSPD_First_Response.Mod.API;
using Rage;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
using RAGENativeUI;
using RAGENativeUI.Elements;
using System.Drawing;
using Rage.Native;
using RAGENativeUI.PauseMenu;
using Albo1125.Common.CommonLibrary;
Expand All @@ -35,6 +28,7 @@ internal static class Menus
private static UIMenuListItem OutOfVehicleItem;
private static List<dynamic> OccupantSelector = new List<dynamic>() { "Driver", "Passengers", "All occupants" };

#region Ticket Menu
private static UIMenu TicketMenu;
private static UIMenuListItem FineItem;
private static List<string> FineList = new List<string>();
Expand All @@ -50,8 +44,9 @@ internal static class Menus

private static UIMenuListItem IssueTicketItem;
private static UIMenuCheckboxItem SeizeVehicleTicketCheckboxItem;

#endregion

#region Question Driver Menu
private static UIMenu QuestioningMenu;
private static UIMenuItem IllegalInVehQuestionItem;
private static UIMenuItem DrinkingQuestionItem;
Expand All @@ -61,23 +56,31 @@ internal static class Menus
private static List<UIMenuItem> CustomQuestionsItems = new List<UIMenuItem>();
private static List<UIMenuItem> CustomQuestionsCallbacksAnswersItems = new List<UIMenuItem>();
private static List<UIMenuItem> CustomQuestionsAnswersCallbackItems = new List<UIMenuItem>();
#endregion

#region Court Menu
public static TabView CourtsMenu;

public static TabSubmenuItem PendingResultsList;
public static TabSubmenuItem PublishedResultsList;
#endregion

#region Pursuit Menu
public static UIMenu PursuitTacticsMenu;
public static UIMenuCheckboxItem AutomaticTacticsCheckboxItem;
public static UIMenuListItem PursuitTacticsListItem;
public static List<DisplayItem> PursuitTacticsOptionsList = new List<DisplayItem>() { new DisplayItem("Safe"), new DisplayItem("Slightly Aggressive"), new DisplayItem("Full-out aggressive") };
#endregion

#region Offence Menu
public static List<UIMenu> OffenceCategoryMenus = new List<UIMenu>();
public static UIMenuSwitchMenusItem OffenceCategorySwitchItem;
public static List<UIMenuCheckboxItem> Offences = new List<UIMenuCheckboxItem>();
public static TupleList<UIMenuCheckboxItem, Offence> CheckboxItems_Offences = new TupleList<UIMenuCheckboxItem, Offence>();
#endregion

#endregion

public static bool TrafficStopMenuEnabled { get; set; } = true;

public static bool StandardQuestionsInMenu { get; set; } = true;
Expand Down
13 changes: 8 additions & 5 deletions LSPDFR+/Offence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Serialization;

Expand All @@ -22,6 +20,8 @@ public class Offence
internal static int pointincstep { get; set; } = 1;
internal static int maxFine { get; set; } = 5000;

private const String offencePath = "Plugins / LSPDFR / LSPDFR +/ Offences";

internal static Keys OpenTicketMenuKey { get; set; } = Keys.Q;
internal static Keys OpenTicketMenuModifierKey { get; set; } = Keys.LShiftKey;

Expand All @@ -37,9 +37,9 @@ public override string ToString()
internal static List<Offence> DeserializeOffences()
{
List<Offence> AllOffences = new List<Offence>();
if (Directory.Exists("Plugins/LSPDFR/LSPDFR+/Offences"))
if (Directory.Exists(offencePath))
{
foreach (string file in Directory.EnumerateFiles("Plugins/LSPDFR/LSPDFR+/Offences", "*.xml", SearchOption.TopDirectoryOnly))
foreach (string file in Directory.EnumerateFiles(offencePath, "*.xml", SearchOption.TopDirectoryOnly))
{
try
{
Expand All @@ -64,7 +64,10 @@ internal static List<Offence> DeserializeOffences()
if (AllOffences.Count == 0)
{
AllOffences.Add(new Offence());
Game.DisplayNotification("~r~~h~LSPDFR+ couldn't find a valid XML file with offences in Plugins/LSPDFR/LSPDFR+/Offences. Setting just the default offence.");
Game.DisplayNotification(
String.Format("~r~~h~LSPDFR+ couldn't find a valid XML file with offences in {0}. Setting just the default offence.",
offencePath));

}
CategorizedTrafficOffences = AllOffences.GroupBy(x => x.offenceCategory).ToDictionary(x => x.Key, x => x.ToList());
return AllOffences;
Expand Down
5 changes: 1 addition & 4 deletions LSPDFR+/SimpleAES.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;


namespace LSPDFR_
{
Expand Down
5 changes: 1 addition & 4 deletions LSPDFR+/StatisticsCounter.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
using Rage;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;

namespace LSPDFR_
{
internal static class StatisticsCounter
{
public static string StatisticsFilePath = "Plugins/LSPDFR/LSPDFR+/Statistics.xml";
public const string StatisticsFilePath = "Plugins/LSPDFR/LSPDFR+/Statistics.xml";



Expand Down