mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 23:50:29 +01:00
CreateWaypointBlip is now a local function and not referenced elsewhere
This commit is contained in:
parent
6ce58a7d8e
commit
14378211b6
1 changed files with 32 additions and 32 deletions
|
|
@ -94,11 +94,11 @@ namespace SceneManager
|
|||
|
||||
if (collectorWaypoint.Checked)
|
||||
{
|
||||
PathMainMenu.paths[pathIndex].Waypoints.Add(new Waypoint(firstNonNullPath, waypointNumber, Game.LocalPlayer.Character.Position, SetDriveSpeedForWaypoint(), drivingFlags[waypointType.Index], CreateWaypointBlip(pathIndex, drivingFlags[waypointType.Index]), true, collectorRadius.Value, speedZoneRadius.Value));
|
||||
PathMainMenu.paths[pathIndex].Waypoints.Add(new Waypoint(firstNonNullPath, waypointNumber, Game.LocalPlayer.Character.Position, SetDriveSpeedForWaypoint(), drivingFlags[waypointType.Index], CreateWaypointBlip(), true, collectorRadius.Value, speedZoneRadius.Value));
|
||||
}
|
||||
else
|
||||
{
|
||||
PathMainMenu.paths[pathIndex].Waypoints.Add(new Waypoint(firstNonNullPath, waypointNumber, Game.LocalPlayer.Character.Position, SetDriveSpeedForWaypoint(), drivingFlags[waypointType.Index], CreateWaypointBlip(pathIndex, drivingFlags[waypointType.Index])));
|
||||
PathMainMenu.paths[pathIndex].Waypoints.Add(new Waypoint(firstNonNullPath, waypointNumber, Game.LocalPlayer.Character.Position, SetDriveSpeedForWaypoint(), drivingFlags[waypointType.Index], CreateWaypointBlip()));
|
||||
}
|
||||
Logger.Log($"[Path {pathNumber}] Waypoint {waypointNumber} ({drivingFlags[waypointType.Index].ToString()}) added");
|
||||
|
||||
|
|
@ -125,6 +125,36 @@ namespace SceneManager
|
|||
|
||||
return convertedSpeed;
|
||||
}
|
||||
|
||||
Blip CreateWaypointBlip()
|
||||
{
|
||||
var spriteNumericalEnum = pathIndex + 17; // 17 because the numerical value of these sprites are always 17 more than the path index
|
||||
var blip = new Blip(Game.LocalPlayer.Character.Position)
|
||||
{
|
||||
Scale = 0.5f,
|
||||
Sprite = (BlipSprite)spriteNumericalEnum
|
||||
};
|
||||
|
||||
if (collectorWaypoint.Checked)
|
||||
{
|
||||
blip.Color = Color.Blue;
|
||||
}
|
||||
else if (drivingFlags[waypointType.Index] == VehicleDrivingFlags.StopAtDestination)
|
||||
{
|
||||
blip.Color = Color.Red;
|
||||
}
|
||||
else
|
||||
{
|
||||
blip.Color = Color.Green;
|
||||
}
|
||||
|
||||
if (!SettingsMenu.mapBlips.Checked)
|
||||
{
|
||||
blip.Alpha = 0f;
|
||||
}
|
||||
|
||||
return blip;
|
||||
}
|
||||
}
|
||||
|
||||
if (selectedItem == trafficRemoveWaypoint)
|
||||
|
|
@ -228,36 +258,6 @@ namespace SceneManager
|
|||
}
|
||||
}
|
||||
|
||||
internal static Blip CreateWaypointBlip(int pathIndex, VehicleDrivingFlags drivingFlag)
|
||||
{
|
||||
var spriteNumericalEnum = pathIndex + 17; // 17 because the numerical value of these sprites are always 17 more than the path index
|
||||
var blip = new Blip(Game.LocalPlayer.Character.Position)
|
||||
{
|
||||
Scale = 0.5f,
|
||||
Sprite = (BlipSprite)spriteNumericalEnum
|
||||
};
|
||||
|
||||
if (collectorWaypoint.Checked)
|
||||
{
|
||||
blip.Color = Color.Blue;
|
||||
}
|
||||
else if (drivingFlag == VehicleDrivingFlags.StopAtDestination)
|
||||
{
|
||||
blip.Color = Color.Red;
|
||||
}
|
||||
else
|
||||
{
|
||||
blip.Color = Color.Green;
|
||||
}
|
||||
|
||||
if (!SettingsMenu.mapBlips.Checked)
|
||||
{
|
||||
blip.Alpha = 0f;
|
||||
}
|
||||
|
||||
return blip;
|
||||
}
|
||||
|
||||
internal static void AddNewPathToPathsCollection(List<Path> paths, int pathIndex)
|
||||
{
|
||||
var pathNum = pathIndex + 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue