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

@@ -10,8 +10,14 @@ namespace Content.Server.Objectives.Components;
public sealed partial class KillPersonConditionComponent : Component
{
/// <summary>
/// Whether the target must be truly dead, ignores missing evac.
/// Whether the target must be dead
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool RequireDead = false;
/// <summary>
/// Whether the target must not be on evac
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool RequireMaroon = false;
}

View File

@@ -29,36 +29,38 @@ public sealed class KillPersonConditionSystem : EntitySystem
if (!_target.GetTarget(uid, out var target))
return;
args.Progress = GetProgress(target.Value, comp.RequireDead);
args.Progress = GetProgress(target.Value, comp.RequireDead, comp.RequireMaroon);
}
private float GetProgress(EntityUid target, bool requireDead)
private float GetProgress(EntityUid target, bool requireDead, bool requireMaroon)
{
// deleted or gibbed or something, counts as dead
if (!TryComp<MindComponent>(target, out var mind) || mind.OwnedEntity == null)
return 1f;
// dead is success
if (_mind.IsCharacterDeadIc(mind))
return 1f;
var targetDead = _mind.IsCharacterDeadIc(mind);
var targetOnShuttle = _emergencyShuttle.IsTargetEscaping(mind.OwnedEntity.Value);
if (!_config.GetCVar(CCVars.EmergencyShuttleEnabled) && requireMaroon)
{
requireDead = true;
requireMaroon = false;
}
// if the target has to be dead dead then don't check evac stuff
if (requireDead)
if (requireDead && !targetDead)
return 0f;
// if evac is disabled then they really do have to be dead
if (!_config.GetCVar(CCVars.EmergencyShuttleEnabled))
// Always failed if the target needs to be marooned and the shuttle hasn't even arrived yet
if (requireMaroon && !_emergencyShuttle.EmergencyShuttleArrived)
return 0f;
// target is escaping so you fail
if (_emergencyShuttle.IsTargetEscaping(mind.OwnedEntity.Value))
return 0f;
// If the shuttle hasn't left, give 50% progress if the target isn't on the shuttle as a "almost there!"
if (requireMaroon && !_emergencyShuttle.ShuttlesLeft)
return targetOnShuttle ? 0f : 0.5f;
// evac has left without the target, greentext since the target is afk in space with a full oxygen tank and coordinates off.
if (_emergencyShuttle.ShuttlesLeft)
return 1f;
// If the shuttle has already left, and the target isn't on it, 100%
if (requireMaroon && _emergencyShuttle.ShuttlesLeft)
return targetOnShuttle ? 0f : 1f;
// if evac is still here and target hasn't boarded, show 50% to give you an indicator that you are doing good
return _emergencyShuttle.EmergencyShuttleArrived ? 0.5f : 0f;
return 1f; // Good job you did it woohoo
}
}

View File

@@ -4,6 +4,7 @@ using Content.Server.Warps;
using Content.Shared.Objectives.Components;
using Content.Shared.Ninja.Components;
using Content.Shared.Roles;
using Content.Shared.Warps;
using Robust.Shared.Random;
namespace Content.Server.Objectives.Systems;