Update content to mapsystem (#12387)

This commit is contained in:
metalgearsloth
2022-11-13 17:47:48 +11:00
committed by GitHub
parent 9f5c3318c9
commit 6ab864fcda
16 changed files with 70 additions and 62 deletions

View File

@@ -1,4 +1,3 @@
using Content.Server.Chat.Managers;
using Content.Server.GameTicking;
using Content.Shared.CCVar;
using Content.Shared.Examine;
@@ -12,24 +11,20 @@ using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Utility;
using System.Linq;
using Content.Server.Chat;
using Content.Server.Chat.Systems;
using Content.Server.Ghost.Components;
using Content.Server.Radio.EntitySystems;
using Content.Server.Station.Systems;
using Content.Shared.Chat;
using Content.Shared.Radio;
using Robust.Shared.Network;
using Robust.Server.GameObjects;
namespace Content.Server.Salvage
{
public sealed class SalvageSystem : EntitySystem
{
[Dependency] private readonly IMapLoader _mapLoader = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IConfigurationManager _configurationManager = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly MapLoaderSystem _map = default!;
[Dependency] private readonly SharedPopupSystem _popupSystem = default!;
[Dependency] private readonly RadioSystem _radioSystem = default!;
@@ -301,7 +296,7 @@ namespace Content.Server.Salvage
Offset = spawnLocation
};
var (_, salvageEntityId) = _mapLoader.LoadGrid(spl.MapId, map.MapPath.ToString(), opts);
var salvageEntityId = _map.LoadGrid(spl.MapId, map.MapPath.ToString(), opts);
if (salvageEntityId == null)
{
Report(component.Owner, component.SalvageChannel, "salvage-system-announcement-spawn-debris-disintegrated");