Unstable 0.14.5.0
This commit is contained in:
@@ -525,7 +525,15 @@ namespace Barotrauma
|
||||
|
||||
public string GetOptionName(string id)
|
||||
{
|
||||
return Prefab == null ? OptionNames[id] : Prefab.OptionNames[id];
|
||||
if (Prefab == null)
|
||||
{
|
||||
if (OptionNames.ContainsKey(id)) { return OptionNames[id]; }
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Prefab.OptionNames.ContainsKey(id)) { return Prefab.OptionNames[id]; }
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public string GetOptionName(int index)
|
||||
|
||||
@@ -37,7 +37,14 @@ namespace Barotrauma
|
||||
|
||||
private static bool IsThalamus(MapEntityPrefab entityPrefab, string tag) => entityPrefab.HasSubCategory("thalamus") || entityPrefab.Tags.Contains(tag);
|
||||
|
||||
public WreckAI(Submarine wreck)
|
||||
public static WreckAI Create(Submarine wreck)
|
||||
{
|
||||
var wreckAI = new WreckAI(wreck);
|
||||
if (wreckAI.Config == null) { return null; }
|
||||
return wreckAI;
|
||||
}
|
||||
|
||||
private WreckAI(Submarine wreck)
|
||||
{
|
||||
Wreck = wreck;
|
||||
Config = WreckAIConfig.GetRandom();
|
||||
|
||||
@@ -2990,11 +2990,14 @@ namespace Barotrauma
|
||||
Spawner.AddToRemoveQueue(this);
|
||||
}
|
||||
|
||||
public void DespawnNow()
|
||||
public void DespawnNow(bool createNetworkEvents = true)
|
||||
{
|
||||
despawnTimer = GameMain.Config.CorpseDespawnDelay;
|
||||
UpdateDespawn(1.0f, ignoreThresholds: true);
|
||||
Spawner.Update();
|
||||
if (createNetworkEvents)
|
||||
{
|
||||
Spawner.Update();
|
||||
}
|
||||
}
|
||||
|
||||
public static void RemoveByPrefab(CharacterPrefab prefab)
|
||||
|
||||
@@ -627,7 +627,10 @@ namespace Barotrauma
|
||||
Kill();
|
||||
}
|
||||
#if CLIENT
|
||||
selectedLimbIndex = -1;
|
||||
if (CharacterHealth.OpenHealthWindow != this)
|
||||
{
|
||||
selectedLimbIndex = -1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user