add holdable, registered explosion and hook fixes
This commit is contained in:
@@ -339,6 +339,12 @@ namespace Barotrauma
|
|||||||
return item.GetComponent<Fabricator>();
|
return item.GetComponent<Fabricator>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Holdable GetHoldableComponent(Item item)
|
||||||
|
{
|
||||||
|
if (item == null) return null;
|
||||||
|
return item.GetComponent<Holdable>();
|
||||||
|
}
|
||||||
|
|
||||||
public static void DispatchRespawnSub()
|
public static void DispatchRespawnSub()
|
||||||
{
|
{
|
||||||
GameMain.Server.RespawnManager.DispatchShuttle();
|
GameMain.Server.RespawnManager.DispatchShuttle();
|
||||||
@@ -602,7 +608,8 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
lastResult = env.lua.Call(hf.function, args);
|
if (hf.function is Closure)
|
||||||
|
lastResult = env.lua.Call(hf.function, args);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ namespace Barotrauma
|
|||||||
UserData.RegisterType<WifiComponent>();
|
UserData.RegisterType<WifiComponent>();
|
||||||
UserData.RegisterType<LightComponent>();
|
UserData.RegisterType<LightComponent>();
|
||||||
UserData.RegisterType<CustomInterface>();
|
UserData.RegisterType<CustomInterface>();
|
||||||
|
UserData.RegisterType<Holdable>();
|
||||||
UserData.RegisterType<Inventory>();
|
UserData.RegisterType<Inventory>();
|
||||||
UserData.RegisterType<CharacterInventory>();
|
UserData.RegisterType<CharacterInventory>();
|
||||||
UserData.RegisterType<Hull>();
|
UserData.RegisterType<Hull>();
|
||||||
@@ -221,6 +222,7 @@ namespace Barotrauma
|
|||||||
UserData.RegisterType<ContentPackage>();
|
UserData.RegisterType<ContentPackage>();
|
||||||
UserData.RegisterType<SubmarineInfo>();
|
UserData.RegisterType<SubmarineInfo>();
|
||||||
UserData.RegisterType<SubmarineBody>();
|
UserData.RegisterType<SubmarineBody>();
|
||||||
|
UserData.RegisterType<Explosion>();
|
||||||
|
|
||||||
lua = new Script(CoreModules.Preset_SoftSandbox);
|
lua = new Script(CoreModules.Preset_SoftSandbox);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user