Unstable 1.2.4.0
This commit is contained in:
@@ -45,7 +45,14 @@ namespace Barotrauma
|
||||
}
|
||||
else
|
||||
{
|
||||
data.Add(identifier, Convert.ChangeType(value, type, NumberFormatInfo.InvariantInfo));
|
||||
try
|
||||
{
|
||||
data.Add(identifier, Convert.ChangeType(value, type, NumberFormatInfo.InvariantInfo));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugConsole.ThrowError($"Failed to change the type of the value \"{value}\" to {type}.", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Barotrauma
|
||||
if (increase != 0 && Character.Controlled != null)
|
||||
{
|
||||
Character.Controlled.AddMessage(
|
||||
TextManager.GetWithVariable("reputationgainnotification", "[reputationname]", Location?.Name ?? Faction.Prefab.Name).Value,
|
||||
TextManager.GetWithVariable("reputationgainnotification", "[reputationname]", Location?.DisplayName ?? Faction.Prefab.Name).Value,
|
||||
increase > 0 ? GUIStyle.Green : GUIStyle.Red,
|
||||
playSound: true, Identifier, increase, lifetime: 5.0f);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user