remove uses of removed obsolete code
This commit is contained in:
parent
ce286f78f4
commit
eecda36f51
|
|
@ -435,7 +435,7 @@ namespace Content.Server.Cloning
|
|||
var grammar = EnsureComp<GrammarComponent>(mob);
|
||||
grammar.ProperNoun = true;
|
||||
grammar.Gender = humanoid.Gender;
|
||||
Dirty(grammar);
|
||||
Dirty(mob, grammar);
|
||||
|
||||
EnsureComp<PotentialPsionicComponent>(mob);
|
||||
EnsureComp<SpeechComponent>(mob);
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ namespace Content.Server.Carrying
|
|||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||
[Dependency] private readonly MovementSpeedModifierSystem _movementSpeed = default!;
|
||||
[Dependency] private readonly RespiratorSystem _respirator = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
[Dependency] private readonly PseudoItemSystem _pseudoItem = default!; // Needed for fitting check
|
||||
|
||||
public override void Initialize()
|
||||
|
|
@ -286,10 +287,13 @@ namespace Content.Server.Carrying
|
|||
if (TryComp<PullableComponent>(carried, out var pullable))
|
||||
_pullingSystem.TryStopPull(carried, pullable);
|
||||
|
||||
Transform(carrier).AttachToGridOrMap();
|
||||
Transform(carried).AttachToGridOrMap();
|
||||
Transform(carried).Coordinates = Transform(carrier).Coordinates;
|
||||
Transform(carried).AttachParent(Transform(carrier));
|
||||
var carrierXform = Transform(carrier);
|
||||
var xform = Transform(carried);
|
||||
_transform.AttachToGridOrMap(carrier, carrierXform);
|
||||
_transform.AttachToGridOrMap(carried, xform);
|
||||
xform.Coordinates = carrierXform.Coordinates;
|
||||
_transform.SetParent(carried, xform, carrier, carrierXform);
|
||||
|
||||
_virtualItemSystem.TrySpawnVirtualItemInHand(carried, carrier);
|
||||
_virtualItemSystem.TrySpawnVirtualItemInHand(carried, carrier);
|
||||
var carryingComp = EnsureComp<CarryingComponent>(carrier);
|
||||
|
|
|
|||
|
|
@ -35,13 +35,13 @@ namespace Content.Server.Nyanotrasen.Chat
|
|||
return Filter.Empty()
|
||||
.AddWhereAttachedEntity(IsEligibleForTelepathy)
|
||||
.Recipients
|
||||
.Select(p => p.ConnectedClient);
|
||||
.Select(p => p.Channel);
|
||||
}
|
||||
|
||||
private IEnumerable<INetChannel> GetAdminClients()
|
||||
{
|
||||
return _adminManager.ActiveAdmins
|
||||
.Select(p => p.ConnectedClient);
|
||||
.Select(p => p.Channel);
|
||||
}
|
||||
|
||||
private List<INetChannel> GetDreamers(IEnumerable<INetChannel> removeList)
|
||||
|
|
@ -49,7 +49,7 @@ namespace Content.Server.Nyanotrasen.Chat
|
|||
var filtered = Filter.Empty()
|
||||
.AddWhereAttachedEntity(entity => HasComp<SleepingComponent>(entity) || HasComp<SeeingRainbowsComponent>(entity) && !HasComp<PsionicsDisabledComponent>(entity) && !HasComp<PsionicInsulationComponent>(entity))
|
||||
.Recipients
|
||||
.Select(p => p.ConnectedClient);
|
||||
.Select(p => p.Channel);
|
||||
|
||||
var filteredList = filtered.ToList();
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ using Content.Shared.Tag;
|
|||
using Robust.Server.Player;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
|
|
@ -53,8 +54,7 @@ namespace Content.Server.Construction.Commands
|
|||
return;
|
||||
}
|
||||
|
||||
var mapManager = IoCManager.Resolve<IMapManager>();
|
||||
if (!mapManager.TryGetGrid(gridId, out var grid))
|
||||
if (!entityManager.TryGetComponent<MapGridComponent>(gridId, out var grid))
|
||||
{
|
||||
shell.WriteLine($"No grid exists with id {gridId}");
|
||||
return;
|
||||
|
|
@ -71,7 +71,8 @@ namespace Content.Server.Construction.Commands
|
|||
var underplating = tileDefinitionManager[TilePrototypeId];
|
||||
var underplatingTile = new Tile(underplating.TileId);
|
||||
var changed = 0;
|
||||
foreach (var child in entityManager.GetComponent<TransformComponent>(grid.Owner).ChildEntities)
|
||||
var children = entityManager.GetComponent<TransformComponent>(grid.Owner).ChildEnumerator;
|
||||
while (children.MoveNext(out var child))
|
||||
{
|
||||
if (!entityManager.EntityExists(child))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ public sealed partial class PlayTimeTrackingManager
|
|||
Whitelisted = whitelist
|
||||
};
|
||||
|
||||
_net.ServerSendMessage(msg, playerSession.ConnectedClient);
|
||||
_net.ServerSendMessage(msg, playerSession.Channel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ namespace Content.Server.Psionics.Dreams
|
|||
("telepathicChannelName", Loc.GetString("chat-manager-telepathic-channel-name")), ("message", msg));
|
||||
|
||||
_chatManager.ChatMessageToOne(Shared.Chat.ChatChannel.Telepathic,
|
||||
msg, messageWrap, sleeper.Owner, false, actor.PlayerSession.ConnectedClient, Color.PaleVioletRed);
|
||||
msg, messageWrap, sleeper.Owner, false, actor.PlayerSession.Channel, Color.PaleVioletRed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ using Content.Shared.Power;
|
|||
using Content.Shared.Weapons.Melee.Components;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Utility;
|
||||
|
|
@ -44,8 +44,7 @@ namespace Content.Server.Psionics.Glimmer
|
|||
[Dependency] private readonly SharedDestructibleSystem _destructibleSystem = default!;
|
||||
[Dependency] private readonly GhostSystem _ghostSystem = default!;
|
||||
[Dependency] private readonly RevenantSystem _revenantSystem = default!;
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
[Dependency] private readonly SharedPointLightSystem _pointLightSystem = default!;
|
||||
|
||||
public float Accumulator = 0;
|
||||
|
|
@ -234,15 +233,16 @@ namespace Content.Server.Psionics.Glimmer
|
|||
public void BeamRandomNearProber(EntityUid prober, int targets, float range = 10f)
|
||||
{
|
||||
List<EntityUid> targetList = new();
|
||||
foreach (var target in _entityLookupSystem.GetComponentsInRange<StatusEffectsComponent>(_transformSystem.GetMapCoordinates(prober), range))
|
||||
var coords = _transform.GetMapCoordinates(prober);
|
||||
foreach (var target in _entityLookupSystem.GetEntitiesInRange<StatusEffectsComponent>(coords, range))
|
||||
{
|
||||
if (target.AllowedEffects.Contains("Electrocution"))
|
||||
targetList.Add(target.Owner);
|
||||
if (target.Comp.AllowedEffects.Contains("Electrocution"))
|
||||
targetList.Add(target);
|
||||
}
|
||||
|
||||
foreach(var reactive in _entityLookupSystem.GetComponentsInRange<SharedGlimmerReactiveComponent>(_transformSystem.GetMapCoordinates(prober), range))
|
||||
foreach(var reactive in _entityLookupSystem.GetEntitiesInRange<SharedGlimmerReactiveComponent>(coords, range))
|
||||
{
|
||||
targetList.Add(reactive.Owner);
|
||||
targetList.Add(reactive);
|
||||
}
|
||||
|
||||
_random.Shuffle(targetList);
|
||||
|
|
@ -304,12 +304,12 @@ namespace Content.Server.Psionics.Glimmer
|
|||
var coordinates = xform.Coordinates;
|
||||
var gridUid = xform.GridUid;
|
||||
|
||||
if (_mapManager.TryGetGrid(gridUid, out var grid))
|
||||
if (TryComp<MapGridComponent>(gridUid, out var grid))
|
||||
{
|
||||
var tileIndices = grid.TileIndicesFor(coordinates);
|
||||
|
||||
if (_anchorableSystem.TileFree(grid, tileIndices, physics.CollisionLayer, physics.CollisionMask) &&
|
||||
_transformSystem.AnchorEntity(uid, xform))
|
||||
_transform.AnchorEntity(uid, xform))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -332,7 +332,7 @@ namespace Content.Server.Psionics.Glimmer
|
|||
_lightning.ShootRandomLightnings(uid, 10, 2, "SuperchargedLightning", 2, false);
|
||||
|
||||
// Check if the parent of the user is alive, which will be the case if the user is an item and is being held.
|
||||
var zapTarget = _transformSystem.GetParentUid(args.User);
|
||||
var zapTarget = _transform.GetParentUid(args.User);
|
||||
if (TryComp<MindContainerComponent>(zapTarget, out _))
|
||||
_electrocutionSystem.TryDoElectrocution(zapTarget, uid, 5, TimeSpan.FromSeconds(3), true,
|
||||
ignoreInsulation: true);
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public sealed class OracleSystem : EntitySystem
|
|||
("telepathicChannelName", Loc.GetString("chat-manager-telepathic-channel-name")), ("message", message));
|
||||
|
||||
_chatManager.ChatMessageToOne(ChatChannel.Telepathic,
|
||||
message, messageWrap, uid, false, actor.PlayerSession.ConnectedClient, Color.PaleVioletRed);
|
||||
message, messageWrap, uid, false, actor.PlayerSession.Channel, Color.PaleVioletRed);
|
||||
|
||||
if (component.LastDesiredPrototype != null)
|
||||
{
|
||||
|
|
@ -96,7 +96,7 @@ public sealed class OracleSystem : EntitySystem
|
|||
("message", message2));
|
||||
|
||||
_chatManager.ChatMessageToOne(ChatChannel.Telepathic,
|
||||
message2, messageWrap2, uid, false, actor.PlayerSession.ConnectedClient, Color.PaleVioletRed);
|
||||
message2, messageWrap2, uid, false, actor.PlayerSession.Channel, Color.PaleVioletRed);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ using Content.Server.StationEvents.Events;
|
|||
using Content.Shared.Construction.EntitySystems;
|
||||
using Content.Shared.GameTicking.Components;
|
||||
using Content.Shared.Psionics.Glimmer;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Server.Nyanotrasen.StationEvents.Events;
|
||||
|
|
@ -14,7 +14,6 @@ namespace Content.Server.Nyanotrasen.StationEvents.Events;
|
|||
internal sealed class FreeProberRule : StationEventSystem<FreeProberRuleComponent>
|
||||
{
|
||||
[Dependency] private readonly IRobustRandom _robustRandom = default!;
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly AnchorableSystem _anchorable = default!;
|
||||
[Dependency] private readonly GlimmerSystem _glimmerSystem = default!;
|
||||
[Dependency] private readonly StationSystem _stationSystem = default!;
|
||||
|
|
@ -59,7 +58,7 @@ internal sealed class FreeProberRule : StationEventSystem<FreeProberRuleComponen
|
|||
|
||||
var coordinates = xform.Coordinates;
|
||||
var gridUid = xform.GridUid;
|
||||
if (!_mapManager.TryGetGrid(gridUid, out var grid))
|
||||
if (CompOrNull<MapGridComponent>(gridUid) is not {} grid)
|
||||
continue;
|
||||
|
||||
var tileIndices = grid.TileIndicesFor(coordinates);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ using Content.Shared.Mobs.Components;
|
|||
using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.Psionics.Glimmer;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
|
|
@ -26,7 +26,6 @@ namespace Content.Server.Nyanotrasen.StationEvents.Events;
|
|||
/// </summary>
|
||||
internal sealed class NoosphericFryRule : StationEventSystem<NoosphericFryRuleComponent>
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly MobStateSystem _mobStateSystem = default!;
|
||||
[Dependency] private readonly InventorySystem _inventorySystem = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audioSystem = default!;
|
||||
|
|
@ -111,7 +110,7 @@ internal sealed class NoosphericFryRule : StationEventSystem<NoosphericFryRuleCo
|
|||
{
|
||||
var coordinates = xform.Coordinates;
|
||||
var gridUid = xform.GridUid;
|
||||
if (!_mapManager.TryGetGrid(gridUid, out var grid))
|
||||
if (!TryComp<MapGridComponent>(gridUid, out var grid))
|
||||
continue;
|
||||
|
||||
var tileIndices = grid.TileIndicesFor(coordinates);
|
||||
|
|
|
|||
Loading…
Reference in New Issue