(8bea0a96b) Removed minimum conditions from battery deconstruction output (= deconstructing an empty battery still gives the materials used to craft the battery). Closes #1356

This commit is contained in:
Joonas Rikkonen
2019-03-28 12:40:22 +02:00
parent bcd779fe78
commit 0c15748429
2 changed files with 0 additions and 18 deletions
@@ -538,7 +538,6 @@ namespace Barotrauma.Items.Components
GameAnalyticsManager.AddErrorEventOnce("ItemComponent.DegreeOfSuccess:CharacterNull", GameAnalyticsSDK.Net.EGAErrorSeverity.Error, errorMsg); GameAnalyticsManager.AddErrorEventOnce("ItemComponent.DegreeOfSuccess:CharacterNull", GameAnalyticsSDK.Net.EGAErrorSeverity.Error, errorMsg);
return 0.0f; return 0.0f;
} }
float average = skillSuccessSum / requiredSkills.Count;
float skillSuccessSum = 0.0f; float skillSuccessSum = 0.0f;
for (int i = 0; i < requiredSkills.Count; i++) for (int i = 0; i < requiredSkills.Count; i++)
@@ -504,23 +504,6 @@ namespace Barotrauma
} }
} }
if (!category.HasFlag(MapEntityCategory.Legacy) && string.IsNullOrEmpty(identifier))
{
DebugConsole.ThrowError(
"Item prefab \"" + name + "\" has no identifier. All item prefabs have a unique identifier string that's used to differentiate between items during saving and loading.");
}
if (!string.IsNullOrEmpty(identifier))
{
MapEntityPrefab existingPrefab = List.Find(e => e.Identifier == identifier);
if (existingPrefab != null)
{
DebugConsole.ThrowError(
"Map entity prefabs \"" + name + "\" and \"" + existingPrefab.Name + "\" have the same identifier!");
}
}
AllowedLinks = element.GetAttributeStringArray("allowedlinks", new string[0], convertToLowerInvariant: true).ToList();
if (sprite == null) if (sprite == null)
{ {
DebugConsole.ThrowError("Item \"" + Name + "\" has no sprite!"); DebugConsole.ThrowError("Item \"" + Name + "\" has no sprite!");