Cleanup all instances of IMapManager.GetMapEntityId (#37814)

* Cleanup all instances of IMapManager.GetMapEntityId

* Dependencies

* LocalizedEntityCommands
This commit is contained in:
Tayrtahn
2025-05-25 13:09:47 -04:00
committed by GitHub
parent e08a7f3c84
commit 50fb48de2e
8 changed files with 39 additions and 41 deletions

View File

@@ -74,7 +74,7 @@ public sealed partial class SalvageSystem
ChatChannel.Radio,
text,
text,
_mapManager.GetMapEntityId(mapId),
_mapSystem.GetMapOrInvalid(mapId),
false,
true,
null);
@@ -104,7 +104,7 @@ public sealed partial class SalvageSystem
Announce(args.MapUid, Loc.GetString("salvage-expedition-announcement-countdown-minutes", ("duration", (component.EndTime - _timing.CurTime).Minutes)));
var directionLocalization = ContentLocalizationManager.FormatDirection(component.DungeonLocation.GetDir()).ToLower();
var directionLocalization = ContentLocalizationManager.FormatDirection(component.DungeonLocation.GetDir()).ToLower();
if (component.DungeonLocation != Vector2.Zero)
Announce(args.MapUid, Loc.GetString("salvage-expedition-announcement-dungeon", ("direction", directionLocalization)));
@@ -170,11 +170,11 @@ public sealed partial class SalvageSystem
// Auto-FTL out any shuttles
else if (remaining < TimeSpan.FromSeconds(_shuttle.DefaultStartupTime) + TimeSpan.FromSeconds(0.5))
{
var ftlTime = (float) remaining.TotalSeconds;
var ftlTime = (float)remaining.TotalSeconds;
if (remaining < TimeSpan.FromSeconds(_shuttle.DefaultStartupTime))
{
ftlTime = MathF.Max(0, (float) remaining.TotalSeconds - 0.5f);
ftlTime = MathF.Max(0, (float)remaining.TotalSeconds - 0.5f);
}
ftlTime = MathF.Min(ftlTime, _shuttle.DefaultStartupTime);