/
NLObP
/
AAEmu
Обзор
Документация
Войти
/
NLObP
/
AAEmu
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
AAEmu.Game/Scripts/Commands/AStarCmd.cs
52 строки
2 KB
Roger Barreto
Adding Dictionary, Cleaning all warnings (#1109)
10 дек 2024, 19:51
Не верифицирован
10 дек 2024, 19:51
7605fdd
Код
Авторство
О чём код?
using System; using System.Collections.Generic; using AAEmu.Game.Core.Managers; using AAEmu.Game.Models.Game; using AAEmu.Game.Models.Game.Char; using AAEmu.Game.Utils.Scripts; using AAEmu.Game.Utils.Scripts.SubCommands; using AAEmu.Game.Utils.Scripts.SubCommands.AStar; namespace AAEmu.Game.Scripts.Commands; public class AStarCmd : SubCommandBase, ICommand { public string[] CommandNames { get; set; } = ["pathfind", "pf"]; public AStarCmd() { Title = "[AStar]"; Description = "Root command to manage Path Findings"; CallPrefix = $"{CommandManager.CommandPrefix}{CommandNames[0]}"; Register(new AStarPathFindingSubCommand(), "find", "go"); // start searching for a path Register(new AStarStartPositionSubCommand(), "start", "begin"); // set the starting point of the path Register(new AStarEndPositionSubCommand(), "goal", "end"); // set the end point of the path Register(new AStarViewSubCommand(), "view"); // display the found path points on the terrain } public void OnLoad() { CommandManager.Instance.Register(CommandNames, this); } public AStarCmd(Dictionary<ICommandV2, string[]> subcommands) : base(subcommands) { } public string GetCommandLineHelp() { return $"<{string.Join("||", SupportedCommands)}>"; } public string GetCommandHelpText() { return CallPrefix; } public void Execute(Character character, string[] args, IMessageOutput messageOutput) { throw new InvalidOperationException( $"A {nameof(ICommandV2)} implementation should not be used as ICommand interface"); } }