Merge pull request #70 from oiltanker/master
Cs mod store folder method for storing configs, etc.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Barotrauma
|
||||
@@ -9,6 +10,16 @@ namespace Barotrauma
|
||||
private static List<ACsMod> mods = new List<ACsMod>();
|
||||
public static List<ACsMod> LoadedMods { get => mods; }
|
||||
|
||||
private const string MOD_STORE = "LocalMods/.modstore";
|
||||
public static string GetSoreFolder<T>() where T : ACsMod
|
||||
{
|
||||
if (!Directory.Exists(MOD_STORE)) Directory.CreateDirectory(MOD_STORE);
|
||||
var modFolder = $"{MOD_STORE}/{typeof(T)}";
|
||||
if (!Directory.Exists(modFolder)) Directory.CreateDirectory(modFolder);
|
||||
return modFolder;
|
||||
}
|
||||
|
||||
|
||||
public bool IsDisposed { get; private set; }
|
||||
|
||||
public ACsMod()
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Barotrauma
|
||||
{
|
||||
class CsScriptLoader : CsScriptBase
|
||||
{
|
||||
public LuaCsSetup setup;
|
||||
private LuaCsSetup setup;
|
||||
private List<MetadataReference> defaultReferences;
|
||||
|
||||
private Dictionary<string, List<string>> sources;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Barotrauma
|
||||
{
|
||||
public delegate void LuaCsAction(params object[] args);
|
||||
public delegate object LuaCsFunc(params object[] args);
|
||||
public delegate object LuaCsPatch(object self, object args);
|
||||
public delegate object LuaCsPatch(object self, Dictionary<string, object> args);
|
||||
|
||||
public class LuaCsHook
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user