Faction Test 100.4.0.0
This commit is contained in:
@@ -40,7 +40,8 @@ namespace Barotrauma
|
||||
DebugConsole.ThrowError($"Error in event prefab \"{scriptedEvent.Prefab.Identifier}\". Status effect configured as a sub action (text: \"{Text}\"). Please configure status effects as child elements of a StatusEffectAction.");
|
||||
continue;
|
||||
}
|
||||
Actions.Add(Instantiate(scriptedEvent, e));
|
||||
var action = Instantiate(scriptedEvent, e);
|
||||
if (action != null) { Actions.Add(action); }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,6 +150,10 @@ namespace Barotrauma
|
||||
ConstructorInfo constructor = actionType.GetConstructor(new[] { typeof(ScriptedEvent), typeof(ContentXElement) });
|
||||
try
|
||||
{
|
||||
if (constructor == null)
|
||||
{
|
||||
throw new Exception($"Error in scripted event \"{scriptedEvent.Prefab.Identifier}\" - could not find a constructor for the EventAction \"{actionType}\".");
|
||||
}
|
||||
return constructor.Invoke(new object[] { scriptedEvent, element }) as EventAction;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in New Issue
Block a user