Merge remote-tracking branch 'upstream/stable' into ed-30-04-2025-upstream-sync

# Conflicts:
#	Content.Client/Parallax/ParallaxControl.cs
#	Content.Client/UserInterface/Systems/Storage/Controls/ItemGridPiece.cs
#	Content.IntegrationTests/Tests/PostMapInitTest.cs
#	Content.Server/Chat/Managers/ChatManager.cs
#	Content.Server/Fluids/EntitySystems/PuddleSystem.Evaporation.cs
#	Content.Server/Labels/Label/LabelSystem.cs
#	Content.Shared/Actions/SharedActionsSystem.cs
#	Content.Shared/Fluids/Components/EvaporationComponent.cs
#	Content.Shared/Labels/EntitySystems/SharedLabelSystem.cs
#	README.md
#	Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml
#	Resources/Prototypes/Maps/Pools/deathmatch.yml
#	Resources/Prototypes/Maps/arenas.yml
This commit is contained in:
Ed
2025-04-30 20:31:50 +03:00
2053 changed files with 113995 additions and 38376 deletions

View File

@@ -26,6 +26,7 @@ public abstract partial class SharedMindSystem : EntitySystem
[Dependency] private readonly MobStateSystem _mobState = default!;
[Dependency] private readonly SharedObjectivesSystem _objectives = default!;
[Dependency] private readonly SharedPlayerSystem _player = default!;
[Dependency] private readonly ISharedPlayerManager _playerManager = default!;
[Dependency] private readonly MetaDataSystem _metadata = default!;
[Dependency] private readonly EntityWhitelistSystem _whitelist = default!;
@@ -153,23 +154,31 @@ public abstract partial class SharedMindSystem : EntitySystem
if (!mindContainer.ShowExamineInfo || !args.IsInDetailsRange)
return;
// TODO predict we can't right now because session stuff isnt networked
// TODO: Move this out of the SharedMindSystem into its own comp and predict it
if (_net.IsClient)
return;
var dead = _mobState.IsDead(uid);
var hasUserId = CompOrNull<MindComponent>(mindContainer.Mind)?.UserId;
var hasSession = CompOrNull<MindComponent>(mindContainer.Mind)?.Session;
var mind = CompOrNull<MindComponent>(mindContainer.Mind);
var hasUserId = mind?.UserId;
var hasActiveSession = hasUserId != null && _playerManager.ValidSessionId(hasUserId.Value);
// Scenarios:
// 1. Dead + No User ID: Entity is permanently dead with no player ever attached
// 2. Dead + Has User ID + No Session: Player died and disconnected
// 3. Dead + Has Session: Player is dead but still connected
// 4. Alive + No User ID: Entity was never controlled by a player
// 5. Alive + No Session: Player disconnected while alive (SSD)
if (dead && hasUserId == null)
args.PushMarkup($"[color=mediumpurple]{Loc.GetString("comp-mind-examined-dead-and-irrecoverable", ("ent", uid))}[/color]");
else if (dead && hasSession == null)
else if (dead && !hasActiveSession)
args.PushMarkup($"[color=yellow]{Loc.GetString("comp-mind-examined-dead-and-ssd", ("ent", uid))}[/color]");
else if (dead)
args.PushMarkup($"[color=red]{Loc.GetString("comp-mind-examined-dead", ("ent", uid))}[/color]");
else if (hasUserId == null)
args.PushMarkup($"[color=mediumpurple]{Loc.GetString("comp-mind-examined-catatonic", ("ent", uid))}[/color]");
else if (hasSession == null)
else if (!hasActiveSession)
args.PushMarkup($"[color=yellow]{Loc.GetString("comp-mind-examined-ssd", ("ent", uid))}[/color]");
}
@@ -474,12 +483,6 @@ public abstract partial class SharedMindSystem : EntitySystem
return false;
}
public bool TryGetSession(EntityUid? mindId, [NotNullWhen(true)] out ICommonSession? session)
{
session = null;
return TryComp(mindId, out MindComponent? mind) && (session = mind.Session) != null;
}
/// <summary>
/// Gets a mind from uid and/or MindContainerComponent. Used for null checks.
/// </summary>