- Deleted unused service IPackageListRetrievalService.cs

- Added caching function to LuaScriptLoader.cs
- Added sample async code to LuaScriptManagementService.cs
- Removed most of the State functions in LuaCsSetup.cs (requires rewrite).
- Fixed CsEnabled check.
- Moved IsRunningWorkshop check to client-only project.
This commit is contained in:
MapleWheels
2026-01-14 08:50:09 -05:00
committed by Maplewheels
parent 0bfceacaf3
commit 055a508901
10 changed files with 94 additions and 295 deletions
@@ -1,4 +1,6 @@
using Barotrauma.Networking;
using System;
using System.IO;
using Barotrauma.Networking;
namespace Barotrauma;
@@ -19,4 +21,10 @@ partial class LuaCsSetup
private partial bool ShouldRunCs() => IsCsEnabled.Value ||
(GetPackage(new SteamWorkshopId(CsForBarotraumaSteamId.Value), false, false) is { }
&& GameMain.Server.ServerPeer is LidgrenServerPeer);
// ReSharper disable once InconsistentNaming
private static readonly Lazy<bool> isRunningInsideWorkshop = new Lazy<bool>(() =>
Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly()!.Location) !=
Directory.GetCurrentDirectory());
public static bool IsRunningInsideWorkshop => isRunningInsideWorkshop.Value;
}