Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
Rxup committed Nov 11, 2023
1 parent 660523d commit 4c0cf0a
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Content.Client/Backmen/Blob/BlobObserverSystem.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Content.Shared.Backmen.Blob;
using Content.Shared.GameTicking;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Player;

namespace Content.Client.Backmen.Blob;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Content.Shared.Backmen.EntityHealthBar;
using Content.Shared.GameTicking;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;

namespace Content.Client.Backmen.EntityHealthBar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ sealed class FixPlayerCommand : IConsoleCommand

[Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly ISharedPlayerManager _playerManager = default!;

public string Command => "fixplayerchat";

Expand Down Expand Up @@ -76,8 +77,7 @@ public void Execute(IConsoleShell shell, string argStr, string[] args)

// ReSharper disable once InconsistentNaming
var _mindSystem = _entityManager.System<SharedMindSystem>();
// ReSharper disable once InconsistentNaming
var _actorSystem = _entityManager.System<ActorSystem>();

var mind = playerCData.Mind ?? _mindSystem.CreateMind(session.UserId, _entityManager.GetComponent<MetaDataComponent>(eUid).EntityName);

//mind.TransferTo(null);
Expand All @@ -89,7 +89,7 @@ public void Execute(IConsoleShell shell, string argStr, string[] args)
if (eUid.IsValid() && _entityManager.HasComponent<MetaDataComponent>(eUid))
{
_mindSystem.TransferTo(mind, eUid);
_actorSystem.Attach(eUid, session, true);
_playerManager.SetAttachedEntity(session, eUid, true);
}
});
}
Expand Down
4 changes: 1 addition & 3 deletions Content.Server/Backmen/Blob/BlobCoreSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using Content.Server.GameTicking;
using Content.Server.Mind;
using Content.Server.Objectives.Conditions;
using Content.Server.Roles;
using Content.Server.RoundEnd;
using Content.Server.Station.Systems;
using Content.Shared.Alert;
Expand All @@ -21,11 +20,10 @@
using Content.Shared.Objectives.Components;
using Content.Shared.Popups;
using Content.Shared.Weapons.Melee;
using Robust.Server.GameObjects;
using Robust.Server.Player;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Network;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;

namespace Content.Server.Backmen.Blob;
Expand Down
6 changes: 3 additions & 3 deletions Content.Server/Backmen/Blob/BlobObserverSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public sealed class BlobObserverSystem : SharedBlobObserverSystem
[Dependency] private readonly RoleSystem _roleSystem = default!;
[Dependency] private readonly AlertsSystem _alerts = default!;
[Dependency] private readonly IChatManager _chatManager = default!;
[Dependency] private readonly ActorSystem _actorSystem = default!;
[Dependency] private readonly ISharedPlayerManager _actorSystem = default!;
[Dependency] private readonly ViewSubscriberSystem _viewSubscriberSystem = default!;


Expand Down Expand Up @@ -157,9 +157,9 @@ private void OnCreateBlobObserver(EntityUid blobCoreUid, BlobCoreComponent core,
_mindSystem.TryAddObjective(mindId, mind, "BlobCaptureObjective");

_mindSystem.TransferTo(mindId, observer, true, mind: mind);
if (_actorSystem.TryGetActorFromUserId(args.UserId, out var session, out _))
if (_actorSystem.TryGetSessionById(args.UserId, out var session))
{
_actorSystem.Attach(observer, session, true);
_actorSystem.SetAttachedEntity(session, observer, true);
}

UpdateUi(observer, core);
Expand Down
1 change: 1 addition & 0 deletions Content.Server/Backmen/Blob/BlobSpawnerSystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Content.Shared.Backmen.Blob;
using Robust.Server.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Player;

namespace Content.Server.Backmen.Blob;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public sealed class FleshCultRuleSystem : GameRuleSystem<FleshCultRuleComponent>
[Dependency] private readonly RoundEndSystem _roundEndSystem = default!;
[Dependency] private readonly StationSystem _stationSystem = default!;
[Dependency] private readonly MindSystem _mindSystem = default!;
[Dependency] private readonly ActorSystem _actorSystem = default!;
[Dependency] private readonly ISharedPlayerManager _actorSystem = default!;
[Dependency] private readonly RoleSystem _roleSystem = default!;
[Dependency] private readonly SharedJobSystem _jobs = default!;
[Dependency] private readonly ObjectivesSystem _objectivesSystem = default!;
Expand Down Expand Up @@ -376,9 +376,9 @@ private bool BaseMakeCultist(ICommonSession traitor, FleshCultRuleComponent fles

DebugTools.AssertNotNull(mind.OwnedEntity);

if (_actorSystem.TryGetActorFromUserId(traitor.Data.UserId, out _, out var ent))
if (_actorSystem.TryGetSessionById(traitor.Data.UserId, out var sess) && sess.AttachedEntity != null && sess.AttachedEntity.Value.IsValid())
{
fleshCultRule.CultistsNames.Add(MetaData(ent!.Value).EntityName);
fleshCultRule.CultistsNames.Add(MetaData(sess.AttachedEntity!.Value).EntityName);
}

if (!HasComp<FleshCultistRoleComponent>(mindId))
Expand Down
1 change: 1 addition & 0 deletions Content.Server/Backmen/GhostTheme/GhostThemeSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Shared.Backmen.GhostTheme;
using Content.Shared.Ghost;
using Robust.Server.GameObjects;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager;

Expand Down

0 comments on commit 4c0cf0a

Please sign in to comment.