Track/ShortcutInfo.cs

Component that stores AI parameters for a spline-tagged "shortcut" on a race track. It exposes RiskFactor (0..1) that influences bot willingness to take the shortcut and MinDifficulty that gates which bot difficulties may consider it.

using Machines.Player;

namespace Machines.Race;

/// <summary>
/// AI parameters for a <see cref="SplineComponent"/> tagged "shortcut"; defaults used if absent.
/// </summary>
public sealed class ShortcutInfo : Component
{
	/// <summary>
	/// Risk level (0=trivial, 1=very risky); higher values reduce bot take-chance.
	/// </summary>
	[Property, Range( 0f, 1f )]
	public float RiskFactor { get; set; } = 0.5f;

	/// <summary>
	/// Minimum bot difficulty required to consider this shortcut.
	/// </summary>
	[Property]
	public BotDifficulty MinDifficulty { get; set; } = BotDifficulty.Medium;
}