Merge branch 'master' of https://github.com/space-wizards/space-station-14 into map-load-refactor
This commit is contained in:
@@ -6,12 +6,15 @@ using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Procedural;
|
||||
using Content.Shared.Radio;
|
||||
using Content.Shared.Salvage.Magnet;
|
||||
using Robust.Shared.Exceptions;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Server.Salvage;
|
||||
|
||||
public sealed partial class SalvageSystem
|
||||
{
|
||||
[Dependency] private readonly IRuntimeLog _runtimeLog = default!;
|
||||
|
||||
[ValidatePrototypeId<RadioChannelPrototype>]
|
||||
private const string MagnetChannel = "Supply";
|
||||
|
||||
@@ -42,7 +45,19 @@ public sealed partial class SalvageSystem
|
||||
return;
|
||||
}
|
||||
|
||||
TakeMagnetOffer((station.Value, dataComp), args.Index, (uid, component));
|
||||
var index = args.Index;
|
||||
async void TryTakeMagnetOffer()
|
||||
{
|
||||
try
|
||||
{
|
||||
await TakeMagnetOffer((station.Value, dataComp), index, (uid, component));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_runtimeLog.LogException(e, $"{nameof(SalvageSystem)}.{nameof(TakeMagnetOffer)}");
|
||||
}
|
||||
}
|
||||
TryTakeMagnetOffer();
|
||||
}
|
||||
|
||||
private void OnMagnetStartup(EntityUid uid, SalvageMagnetComponent component, ComponentStartup args)
|
||||
|
||||
Reference in New Issue
Block a user