v1.4.4.1 (Blood in the Water Update)

This commit is contained in:
Regalis11
2024-04-24 18:09:05 +03:00
parent 89b91d1c3e
commit ff1b8951a7
397 changed files with 15250 additions and 6479 deletions
@@ -99,19 +99,19 @@ namespace Barotrauma
UnlockPathReputation = element.GetAttributeInt("unlockpathreputation", 0);
}
public bool TryCreateInstance<T>(out T instance) where T : Event
public bool TryCreateInstance<T>(int seed, out T instance) where T : Event
{
instance = CreateInstance() as T;
instance = CreateInstance(seed) as T;
return instance is not null;
}
public Event CreateInstance()
public Event CreateInstance(int seed)
{
ConstructorInfo constructor = EventType.GetConstructor(new[] { GetType() });
ConstructorInfo constructor = EventType.GetConstructor(new[] { GetType(), typeof(int) });
Event instance = null;
try
{
instance = constructor.Invoke(new object[] { this }) as Event;
instance = constructor.Invoke(new object[] { this, seed }) as Event;
}
catch (Exception ex)
{