Files
sbox-public/game/editor/Hammer/Code/Tools/PathTool.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

20 lines
590 B
C#

namespace Editor.MapEditor;
partial class ToolFactory : IToolFactory
{
public IPathTool CreatePathTool() => new PathTool();
}
/// <summary>
/// Path Entity tool in Hammer, implements an interface called from native.
/// </summary>
partial class PathTool : IPathTool
{
public PathTool() => EditorEvent.Register( this );
~PathTool() => EditorEvent.Unregister( this );
public string GetCurrentEntityClassName() => EntitySelector?.SelectedEntity ?? "path_generic";
public float GetRadiusOffset() => Settings.Radius;
public bool IsRadiusOffsetEnabled() => Settings.OffsetByRadius;
}