Build 0.17.11.0

This commit is contained in:
Markus Isberg
2022-04-19 23:52:59 +09:00
parent cfe0d6cbc3
commit d9a05400e0
14 changed files with 43 additions and 18 deletions
@@ -957,7 +957,18 @@ namespace Barotrauma
public PriceInfo GetPriceInfo(Location.StoreInfo store)
{
if (!store.Identifier.IsEmpty && StorePrices != null && StorePrices.TryGetValue(store.Identifier, out var storePriceInfo))
if (store == null)
{
string message = $"Tried to get price info for \"{Identifier}\" with a null store parameter!\n{Environment.StackTrace.CleanupStackTrace()}";
#if DEBUG
DebugConsole.ShowError(message);
#else
DebugConsole.AddWarning(message);
GameAnalyticsManager.AddErrorEventOnce("ItemPrefab.GetPriceInfo:StoreParameterNull", GameAnalyticsManager.ErrorSeverity.Error, message);
#endif
return null;
}
else if (!store.Identifier.IsEmpty && StorePrices != null && StorePrices.TryGetValue(store.Identifier, out var storePriceInfo))
{
return storePriceInfo;
}