Fixing stuff part 1
This commit is contained in:
@@ -1252,7 +1252,7 @@ namespace Barotrauma
|
||||
|
||||
commands.Add(new Command("install_cl_lua", "Installs client-Side Lua into your client.", (string[] args) =>
|
||||
{
|
||||
if (!File.Exists("Mods/LuaForBarotrauma/clientside_files.zip"))
|
||||
if (!System.IO.File.Exists("Mods/LuaForBarotrauma/clientside_files.zip"))
|
||||
{
|
||||
GameMain.Server.SendChatMessage("clientside_files.zip doesn't exist, Github version?", ChatMessageType.ServerMessageBox);
|
||||
|
||||
|
||||
@@ -83,47 +83,12 @@ namespace Barotrauma
|
||||
return generic.Invoke(this, new object[]{comp, extraData });
|
||||
}
|
||||
}
|
||||
|
||||
partial class ItemPrefab
|
||||
{
|
||||
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 static void AddToSpawnQueue(ItemPrefab itemPrefab, Inventory inventory, object spawned = null)
|
||||
{
|
||||
EntitySpawner.Spawner.AddToSpawnQueue(itemPrefab, inventory, null, null, onSpawned: (Item item) =>
|
||||
{
|
||||
GameMain.Lua.CallFunction(spawned, new object[] { item });
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Barotrauma.Items.Components
|
||||
{
|
||||
using Barotrauma.Networking;
|
||||
|
||||
partial class CustomInterface
|
||||
{
|
||||
public void UpdateClients()
|
||||
{
|
||||
|
||||
//notify all clients of the new state
|
||||
GameMain.Server.CreateEntityEvent(item, new object[]
|
||||
{
|
||||
NetEntityEvent.Type.ComponentState,
|
||||
item.GetComponentIndex(this)
|
||||
});
|
||||
|
||||
item.CreateServerEvent(this);
|
||||
}
|
||||
}
|
||||
|
||||
partial struct Signal
|
||||
{
|
||||
public static Signal Create(string value, int stepsTaken = 0, Character sender = null, Item source = null, float power = 0.0f, float strength = 1.0f)
|
||||
|
||||
Reference in New Issue
Block a user