From 0c15748429b6abb2a3d8616a86590ec027862a33 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Thu, 28 Mar 2019 12:40:22 +0200 Subject: [PATCH] (8bea0a96b) Removed minimum conditions from battery deconstruction output (= deconstructing an empty battery still gives the materials used to craft the battery). Closes #1356 --- .../Source/Items/Components/ItemComponent.cs | 1 - .../BarotraumaShared/Source/Items/ItemPrefab.cs | 17 ----------------- 2 files changed, 18 deletions(-) diff --git a/Barotrauma/BarotraumaShared/Source/Items/Components/ItemComponent.cs b/Barotrauma/BarotraumaShared/Source/Items/Components/ItemComponent.cs index e0050c17c..21fd14e74 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/Components/ItemComponent.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/Components/ItemComponent.cs @@ -538,7 +538,6 @@ namespace Barotrauma.Items.Components GameAnalyticsManager.AddErrorEventOnce("ItemComponent.DegreeOfSuccess:CharacterNull", GameAnalyticsSDK.Net.EGAErrorSeverity.Error, errorMsg); return 0.0f; } - float average = skillSuccessSum / requiredSkills.Count; float skillSuccessSum = 0.0f; for (int i = 0; i < requiredSkills.Count; i++) diff --git a/Barotrauma/BarotraumaShared/Source/Items/ItemPrefab.cs b/Barotrauma/BarotraumaShared/Source/Items/ItemPrefab.cs index 105a87746..81355ef74 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/ItemPrefab.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/ItemPrefab.cs @@ -503,23 +503,6 @@ namespace Barotrauma break; } } - - 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) {