mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-05-24 14:56:44 -04:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
20 lines
590 B
C#
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;
|
|
}
|