Fix atmos UI decimal separator bug (#23009)

* Fix atmos UI inconsistent culture usage

* Remove the need to pass localization manager
This commit is contained in:
Kot
2024-01-05 09:18:09 +04:00
committed by GitHub
parent 920d7068e5
commit 3d911a64c7
14 changed files with 117 additions and 19 deletions

View File

@@ -1,5 +1,6 @@
using Content.Shared.Atmos;
using Content.Shared.Atmos.Piping.Binary.Components;
using Content.Shared.Localizations;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
@@ -46,7 +47,7 @@ namespace Content.Client.Atmos.UI
private void OnPumpTransferRatePressed(string value)
{
var rate = float.TryParse(value, out var parsed) ? parsed : 0f;
var rate = UserInputParser.TryFloat(value, out var parsed) ? parsed : 0f;
if (rate > MaxTransferRate)
rate = MaxTransferRate;