added a way to know which content packages are enabled
This commit is contained in:
@@ -8,6 +8,7 @@ using System.Threading.Tasks;
|
|||||||
using Barotrauma.Items.Components;
|
using Barotrauma.Items.Components;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace Barotrauma
|
namespace Barotrauma
|
||||||
{
|
{
|
||||||
@@ -338,7 +339,12 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
return new Signal(value, stepsTaken, sender, source, power, strength);
|
return new Signal(value, stepsTaken, sender, source, power, strength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ContentPackage[] GetEnabledContentPackages()
|
||||||
|
{
|
||||||
|
return GameMain.Config.AllEnabledPackages.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -201,6 +201,7 @@ namespace Barotrauma
|
|||||||
UserData.RegisterType<FireSource>();
|
UserData.RegisterType<FireSource>();
|
||||||
UserData.RegisterType<Fabricator>();
|
UserData.RegisterType<Fabricator>();
|
||||||
UserData.RegisterType<Pair<JobPrefab, int>>();
|
UserData.RegisterType<Pair<JobPrefab, int>>();
|
||||||
|
UserData.RegisterType<ContentPackage>();
|
||||||
|
|
||||||
lua = new Script(CoreModules.Preset_SoftSandbox);
|
lua = new Script(CoreModules.Preset_SoftSandbox);
|
||||||
|
|
||||||
@@ -210,7 +211,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
hook = new LuaHook(this);
|
hook = new LuaHook(this);
|
||||||
game = new LuaGame(this);
|
game = new LuaGame(this);
|
||||||
|
|
||||||
lua.Globals["dofile"] = (Func<string, Table, string, DynValue>)DoFile;
|
lua.Globals["dofile"] = (Func<string, Table, string, DynValue>)DoFile;
|
||||||
lua.Globals["loadfile"] = (Func<string, Table, string, DynValue>)LoadFile;
|
lua.Globals["loadfile"] = (Func<string, Table, string, DynValue>)LoadFile;
|
||||||
lua.Globals["require"] = (Func<string, Table, DynValue>)Require;
|
lua.Globals["require"] = (Func<string, Table, DynValue>)Require;
|
||||||
@@ -250,6 +251,7 @@ namespace Barotrauma
|
|||||||
lua.Globals["Hull"] = UserData.CreateStatic<Hull>();
|
lua.Globals["Hull"] = UserData.CreateStatic<Hull>();
|
||||||
lua.Globals["InvSlotType"] = UserData.CreateStatic<InvSlotType>();
|
lua.Globals["InvSlotType"] = UserData.CreateStatic<InvSlotType>();
|
||||||
lua.Globals["Gap"] = UserData.CreateStatic<Gap>();
|
lua.Globals["Gap"] = UserData.CreateStatic<Gap>();
|
||||||
|
lua.Globals["ContentPackage"] = UserData.CreateStatic<ContentPackage>();
|
||||||
|
|
||||||
List<string> modulePaths = new List<string>();
|
List<string> modulePaths = new List<string>();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user