- Config Services almost ready.

- Refactored and flattened namespaces.
This commit is contained in:
MapleWheels
2026-02-05 19:47:47 -05:00
committed by Maplewheels
parent 863ee23583
commit e75208507d
101 changed files with 350 additions and 1276 deletions
@@ -0,0 +1,24 @@
using System;
using System.Reflection;
using Barotrauma.LuaCs;
namespace Barotrauma.LuaCs.Compatibility;
public interface ILuaCsHook : ILuaPatcher, ILuaCsShim
{
// Event Services
[Obsolete("ACsMod is deprecated. Use ILuaEventService.Add() instead.")]
void Add(string eventName, string identifier, LuaCsFunc callback);
[Obsolete("ACsMod is deprecated. Use ILuaEventService.Add() instead.")]
void Add(string eventName, LuaCsFunc callback);
// Does anyone use this? TODO: Analyze old Lua mods for usage scenarios.
//bool Exists(string eventName, string identifier);
object Call(string eventName, params object[] args);
T Call<T>(string eventName, params object[] args);
// Needs to be here instead of ILuaPatcher for compatiility purposes
public enum HookMethodType
{
Before, After
}
}
@@ -0,0 +1,6 @@
namespace Barotrauma.LuaCs.Compatibility;
public interface ILuaCsLogger : ILuaCsShim
{
}
@@ -0,0 +1,6 @@
namespace Barotrauma.LuaCs.Compatibility;
internal partial interface ILuaCsNetworking : ILuaCsShim
{
}
@@ -0,0 +1,8 @@
using Barotrauma.LuaCs;
namespace Barotrauma.LuaCs.Compatibility;
public interface ILuaCsShim : IService
{
}
@@ -0,0 +1,14 @@
using System.Collections.Generic;
namespace Barotrauma.LuaCs.Compatibility;
internal partial interface ILuaCsTimer : ILuaCsShim
{
public static double Time => Timing.TotalTime;
public static double GetTime() => Time;
public static double AccumulatorMax { get; set; }
public void Clear();
public void Wait(LuaCsAction action, int millisecondDelay);
public void NextFrame(LuaCsAction action);
}
@@ -0,0 +1,10 @@
namespace Barotrauma.LuaCs.Compatibility;
public interface ILuaCsUtility : ILuaCsShim
{
public bool CanReadFromPath(string file);
public bool CanWriteToPath(string file);
internal bool IsPathAllowedException(string path, bool write = true,
LuaCsMessageOrigin origin = LuaCsMessageOrigin.Unknown);
}