Build 1.1.4.0

This commit is contained in:
Markus Isberg
2023-03-31 18:40:44 +03:00
parent efba17e0ff
commit 9470edead3
483 changed files with 17487 additions and 8548 deletions
@@ -1,12 +1,13 @@
using System.Xml.Linq;
namespace Barotrauma
namespace Barotrauma
{
class TriggerEventAction : EventAction
{
[Serialize("", IsPropertySaveable.Yes)]
public Identifier Identifier { get; set; }
[Serialize(false, IsPropertySaveable.Yes)]
public bool NextRound { get; set; }
private bool isFinished;
public TriggerEventAction(ScriptedEvent parentEvent, ContentXElement element) : base(parentEvent, element) { }
@@ -26,17 +27,24 @@ namespace Barotrauma
if (GameMain.GameSession?.EventManager != null)
{
var eventPrefab = EventSet.GetEventPrefab(Identifier);
if (eventPrefab == null)
if (NextRound)
{
DebugConsole.ThrowError($"Error in TriggerEventAction - could not find an event with the identifier {Identifier}.");
GameMain.GameSession.EventManager.QueuedEventsForNextRound.Enqueue(Identifier);
}
else
{
var ev = eventPrefab.CreateInstance();
if (ev != null)
var eventPrefab = EventSet.GetEventPrefab(Identifier);
if (eventPrefab == null)
{
GameMain.GameSession.EventManager.QueuedEvents.Enqueue(ev);
DebugConsole.ThrowError($"Error in TriggerEventAction - could not find an event with the identifier {Identifier}.");
}
else
{
var ev = eventPrefab.CreateInstance();
if (ev != null)
{
GameMain.GameSession.EventManager.QueuedEvents.Enqueue(ev);
}
}
}
}