using System; using System.IO; using System.Linq; using System.Collections.Generic; using Decal.Adapter; using Decal.Adapter.Wrappers; using Decal.Filters; using RynthAi.Meta; namespace NexSuite.Plugins.RynthAi { public class CommandProcessor { private readonly PluginCore _plugin; private readonly UISettings _settings; private readonly MetaManager _meta; private readonly NavigationManager _nav; private readonly BuffManager _buff; private readonly CombatManager _combat; private readonly LootManager _loot; private readonly LuaManager _lua; private readonly RynthJumper _jumper; private readonly SpellManager _spellManager; private readonly FellowshipTracker _fellowship; public CommandProcessor(PluginCore plugin, UISettings settings, MetaManager meta, NavigationManager nav, BuffManager buff, CombatManager combat, LootManager loot, LuaManager lua, RynthJumper jumper, SpellManager spellManager, FellowshipTracker fellowship) { _plugin = plugin; _settings = settings; _meta = meta; _nav = nav; _buff = buff; _combat = combat; _loot = loot; _lua = lua; _jumper = jumper; _spellManager = spellManager; _fellowship = fellowship; } public void Execute(string text, ChatParserInterceptEventArgs e) { try { string trimmed = text.Trim(); bool isNA = trimmed.StartsWith("/na", StringComparison.OrdinalIgnoreCase); bool isVT = trimmed.StartsWith("/vt", StringComparison.OrdinalIgnoreCase); bool isLua = trimmed.StartsWith("/lua", StringComparison.OrdinalIgnoreCase); if (!isNA && !isVT && !isLua) return; string[] parts = trimmed.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); // --- Handle Top-Level /lua command --- if (isLua) { e.Eat = true; if (parts.Length < 2) { _plugin.PluginHost.Actions.AddChatText("[RynthAi] Usage: /lua