- Moved all console commands to their respective services and added via injector service.

- Fixed LuaCs IsCsEnabled prompt not working.
- Add settings profiles support.
This commit is contained in:
MapleWheels
2026-02-24 15:26:49 -05:00
parent 394856fa04
commit d9d980122d
9 changed files with 298 additions and 121 deletions
@@ -19,6 +19,7 @@ public partial interface IConfigService : IReusableService, ILuaConfigService
Task<FluentResults.Result> LoadConfigsProfilesAsync(ImmutableArray<IConfigResourceInfo> configProfileResources);
FluentResults.Result LoadSavedValueForConfig(ISettingBase setting);
FluentResults.Result LoadSavedConfigsValues();
FluentResults.Result ApplyConfigProfile(ContentPackage package, string internalName);
FluentResults.Result SaveConfigValue(ISettingBase setting);
FluentResults.Result DisposePackageData(ContentPackage package);
FluentResults.Result DisposeAllPackageData();
@@ -0,0 +1,11 @@
using System;
namespace Barotrauma.LuaCs;
public interface IConsoleCommandsService : IService
{
FluentResults.Result RegisterCommand(string name, string help, Action<string[]> onExecute, Func<string[][]> getValidArgs = null,
bool isCheat = false);
void RemoveCommand(string name);
void RemoveRegisteredCommands();
}