new documentation and some fixes in code
This commit is contained in:
@@ -65,7 +65,7 @@ namespace Barotrauma
|
||||
|
||||
partial class Item
|
||||
{
|
||||
public void AddToRemoveQueue(Item item)
|
||||
public static void AddToRemoveQueue(Item item)
|
||||
{
|
||||
EntitySpawner.Spawner.AddToRemoveQueue(item);
|
||||
}
|
||||
@@ -74,14 +74,14 @@ namespace Barotrauma
|
||||
|
||||
partial class ItemPrefab
|
||||
{
|
||||
public void AddToSpawnQueue(ItemPrefab itemPrefab, Vector2 position, object spawned = null)
|
||||
public static void AddToSpawnQueue(ItemPrefab itemPrefab, Vector2 position, object spawned = null)
|
||||
{
|
||||
EntitySpawner.Spawner.AddToSpawnQueue(itemPrefab, position, onSpawned: (Item item) => {
|
||||
GameMain.Lua.CallFunction(spawned, new object[] { item });
|
||||
});
|
||||
}
|
||||
|
||||
public void AddToSpawnQueue(ItemPrefab itemPrefab, Inventory inventory, object spawned = null)
|
||||
public static void AddToSpawnQueue(ItemPrefab itemPrefab, Inventory inventory, object spawned = null)
|
||||
{
|
||||
EntitySpawner.Spawner.AddToSpawnQueue(itemPrefab, inventory, onSpawned: (Item item) => {
|
||||
GameMain.Lua.CallFunction(spawned, new object[] { item });
|
||||
|
||||
@@ -396,7 +396,6 @@ namespace Barotrauma
|
||||
string name = subElement.GetAttributeString("name", null);
|
||||
enabledPackages.Add(name);
|
||||
}
|
||||
|
||||
return enabledPackages;
|
||||
}
|
||||
}
|
||||
@@ -469,6 +468,11 @@ namespace Barotrauma
|
||||
return Directory.Exists(path);
|
||||
}
|
||||
|
||||
public static string[] GetFiles(string path)
|
||||
{
|
||||
return Directory.GetFiles(path);
|
||||
}
|
||||
|
||||
public static string[] GetDirectories(string path)
|
||||
{
|
||||
return Directory.GetDirectories(path);
|
||||
|
||||
@@ -296,7 +296,7 @@ namespace Barotrauma
|
||||
lua.Globals["Gap"] = UserData.CreateStatic<Gap>();
|
||||
lua.Globals["ContentPackage"] = UserData.CreateStatic<ContentPackage>();
|
||||
lua.Globals["ClientPermissions"] = UserData.CreateStatic<ClientPermissions>();
|
||||
|
||||
lua.Globals["Signal"] = UserData.CreateStatic<Signal>();
|
||||
|
||||
if (File.Exists("Lua/MoonsharpSetup.lua")) // try the default loader
|
||||
DoFile("Lua/MoonsharpSetup.lua");
|
||||
|
||||
Reference in New Issue
Block a user