mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 15:40:29 +01:00
Added ini setting for Advanced Barrier Options. Added enum for TrafficLight state. Added debug message for invalid barriers.
This commit is contained in:
parent
92bf6de34c
commit
46d5686bc3
1 changed files with 20 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ namespace SceneManager
|
||||||
Direct = 17040259
|
Direct = 17040259
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum DismissOption
|
internal enum DismissOption
|
||||||
{
|
{
|
||||||
FromPath = 0,
|
FromPath = 0,
|
||||||
FromWaypoint = 1,
|
FromWaypoint = 1,
|
||||||
|
|
@ -32,6 +32,14 @@ namespace SceneManager
|
||||||
FromDirected = 4
|
FromDirected = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal enum TrafficLight
|
||||||
|
{
|
||||||
|
Green = 0,
|
||||||
|
Red = 1,
|
||||||
|
Yellow = 2,
|
||||||
|
None = 3
|
||||||
|
}
|
||||||
|
|
||||||
internal static class Settings
|
internal static class Settings
|
||||||
{
|
{
|
||||||
internal static readonly InitializationFile ini = new InitializationFile("Plugins/SceneManager.ini");
|
internal static readonly InitializationFile ini = new InitializationFile("Plugins/SceneManager.ini");
|
||||||
|
|
@ -41,18 +49,22 @@ namespace SceneManager
|
||||||
internal static Keys ModifierKey = Keys.LShiftKey;
|
internal static Keys ModifierKey = Keys.LShiftKey;
|
||||||
internal static ControllerButtons ToggleButton = ControllerButtons.Y;
|
internal static ControllerButtons ToggleButton = ControllerButtons.Y;
|
||||||
internal static ControllerButtons ModifierButton = ControllerButtons.A;
|
internal static ControllerButtons ModifierButton = ControllerButtons.A;
|
||||||
|
|
||||||
// Plugin Settings
|
// Plugin Settings
|
||||||
internal static bool Enable3DWaypoints = true;
|
internal static bool Enable3DWaypoints = true;
|
||||||
internal static bool EnableMapBlips = true;
|
internal static bool EnableMapBlips = true;
|
||||||
internal static bool EnableHints = true;
|
internal static bool EnableHints = true;
|
||||||
internal static SpeedUnits SpeedUnit = SpeedUnits.MPH;
|
internal static SpeedUnits SpeedUnit = SpeedUnits.MPH;
|
||||||
internal static float BarrierPlacementDistance = 30f;
|
internal static float BarrierPlacementDistance = 30f;
|
||||||
|
internal static bool EnableAdvancedBarricadeOptions = false;
|
||||||
|
|
||||||
// Default Waypoint Settings
|
// Default Waypoint Settings
|
||||||
internal static int CollectorRadius = 1;
|
internal static int CollectorRadius = 1;
|
||||||
internal static int SpeedZoneRadius = 5;
|
internal static int SpeedZoneRadius = 5;
|
||||||
internal static bool StopWaypoint = false;
|
internal static bool StopWaypoint = false;
|
||||||
internal static bool DirectDrivingBehavior = false;
|
internal static bool DirectDrivingBehavior = false;
|
||||||
internal static int WaypointSpeed = 5;
|
internal static int WaypointSpeed = 5;
|
||||||
|
|
||||||
// Barriers
|
// Barriers
|
||||||
internal static List<string> barrierKeys = new List<string>();
|
internal static List<string> barrierKeys = new List<string>();
|
||||||
internal static List<string> barrierValues = new List<string>();
|
internal static List<string> barrierValues = new List<string>();
|
||||||
|
|
@ -74,6 +86,7 @@ namespace SceneManager
|
||||||
EnableHints = ini.ReadBoolean("Plugin Settings", "EnableHints", true);
|
EnableHints = ini.ReadBoolean("Plugin Settings", "EnableHints", true);
|
||||||
SpeedUnit = ini.ReadEnum("Plugin Settings", "SpeedUnits", SpeedUnits.MPH);
|
SpeedUnit = ini.ReadEnum("Plugin Settings", "SpeedUnits", SpeedUnits.MPH);
|
||||||
BarrierPlacementDistance = ini.ReadInt32("Plugin Settings", "BarrierPlacementDistance", 30);
|
BarrierPlacementDistance = ini.ReadInt32("Plugin Settings", "BarrierPlacementDistance", 30);
|
||||||
|
EnableAdvancedBarricadeOptions = ini.ReadBoolean("Plugin Settings", "EnableAdvancedBarricadeOptions", false);
|
||||||
|
|
||||||
// Default Waypoint Settings
|
// Default Waypoint Settings
|
||||||
CollectorRadius = ini.ReadInt32("Default Waypoint Settings", "CollectorRadius", 1);
|
CollectorRadius = ini.ReadInt32("Default Waypoint Settings", "CollectorRadius", 1);
|
||||||
|
|
@ -89,7 +102,13 @@ namespace SceneManager
|
||||||
barrierKeys.Add(key.Trim());
|
barrierKeys.Add(key.Trim());
|
||||||
var m = new Model(ini.ReadString("Barriers", key));
|
var m = new Model(ini.ReadString("Barriers", key));
|
||||||
if (m.IsValid)
|
if (m.IsValid)
|
||||||
|
{
|
||||||
barrierValues.Add(m.Name);
|
barrierValues.Add(m.Name);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Game.LogTrivial($"{m.Name} is not valid.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheckForValidWaypointSettings()
|
void CheckForValidWaypointSettings()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue