Unstable 0.15.15.0 (and the one before it I forgor)

This commit is contained in:
Markus Isberg
2021-11-18 21:34:30 +09:00
parent 10e5fd5f3e
commit 80f39cd2a3
257 changed files with 4916 additions and 2582 deletions
@@ -13,6 +13,7 @@ namespace Barotrauma
public float Commonness;
public string Identifier;
public string BiomeIdentifier;
public float SpawnDistance;
public bool UnlockPathEvent;
public string UnlockPathTooltip;
@@ -46,25 +47,30 @@ namespace Barotrauma
UnlockPathTooltip = element.GetAttributeString("unlockpathtooltip", "lockedpathtooltip");
UnlockPathReputation = element.GetAttributeInt("unlockpathreputation", 0);
UnlockPathFaction = element.GetAttributeString("unlockpathfaction", "");
SpawnDistance = element.GetAttributeFloat("spawndistance", 0);
}
public bool TryCreateInstance<T>(out T instance) where T : Event
{
instance = CreateInstance() as T;
return instance is T;
}
public Event CreateInstance()
{
ConstructorInfo constructor = EventType.GetConstructor(new[] { typeof(EventPrefab) });
object instance = null;
Event instance = null;
try
{
instance = constructor.Invoke(new object[] { this });
instance = constructor.Invoke(new object[] { this }) as Event;
}
catch (Exception ex)
{
DebugConsole.ThrowError(ex.InnerException != null ? ex.InnerException.ToString() : ex.ToString());
}
Event ev = (Event)instance;
if (!ev.LevelMeetsRequirements()) { return null; }
return (Event)instance;
if (instance != null && !instance.LevelMeetsRequirements()) { return null; }
return instance;
}
public override string ToString()