Require traitors to maroon their objective no matter what (#35825)
* jesus * okay. * OOPS * ok * ok Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * ok * Update Resources/Prototypes/Objectives/paradoxClone.yml Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * Update Resources/Prototypes/Objectives/base_objectives.yml Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * m * ok * ok --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
@@ -10,8 +10,14 @@ namespace Content.Server.Objectives.Components;
|
|||||||
public sealed partial class KillPersonConditionComponent : Component
|
public sealed partial class KillPersonConditionComponent : Component
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether the target must be truly dead, ignores missing evac.
|
/// Whether the target must be dead
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||||
public bool RequireDead = false;
|
public bool RequireDead = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether the target must not be on evac
|
||||||
|
/// </summary>
|
||||||
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
public bool RequireMaroon = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,36 +29,30 @@ public sealed class KillPersonConditionSystem : EntitySystem
|
|||||||
if (!_target.GetTarget(uid, out var target))
|
if (!_target.GetTarget(uid, out var target))
|
||||||
return;
|
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
|
// deleted or gibbed or something, counts as dead
|
||||||
if (!TryComp<MindComponent>(target, out var mind) || mind.OwnedEntity == null)
|
if (!TryComp<MindComponent>(target, out var mind) || mind.OwnedEntity == null)
|
||||||
return 1f;
|
return 1f;
|
||||||
|
|
||||||
// dead is success
|
var targetDead = _mind.IsCharacterDeadIc(mind);
|
||||||
if (_mind.IsCharacterDeadIc(mind))
|
var targetMarooned = !_emergencyShuttle.IsTargetEscaping(target) &&
|
||||||
return 1f;
|
_emergencyShuttle.ShuttlesLeft;
|
||||||
|
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 && !targetDead)
|
||||||
if (requireDead)
|
|
||||||
return 0f;
|
return 0f;
|
||||||
|
|
||||||
// if evac is disabled then they really do have to be dead
|
if (requireMaroon) // if evac is still here and target hasn't boarded, show 50% to give you an indicator that you are doing good
|
||||||
if (!_config.GetCVar(CCVars.EmergencyShuttleEnabled))
|
return targetMarooned ? 1f : _emergencyShuttle.EmergencyShuttleArrived ? 0.5f : 0f;
|
||||||
return 0f;
|
|
||||||
|
|
||||||
// target is escaping so you fail
|
return 1f; // Good job you did it woohoo
|
||||||
if (_emergencyShuttle.IsTargetEscaping(mind.OwnedEntity.Value))
|
|
||||||
return 0f;
|
|
||||||
|
|
||||||
// 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 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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
objective-condition-kill-person-title = Kill or maroon {$targetName}, {CAPITALIZE($job)}
|
objective-condition-kill-person-title = Kill or maroon {$targetName}, {CAPITALIZE($job)}
|
||||||
|
objective-condition-kill-maroon-title = Kill and maroon {$targetName}, {CAPITALIZE($job)}
|
||||||
|
objective-condition-maroon-person-title = Maroon {$targetName}, {CAPITALIZE($job)}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
components:
|
components:
|
||||||
- type: PickSpecificPerson
|
- type: PickSpecificPerson
|
||||||
- type: KillPersonCondition
|
- type: KillPersonCondition
|
||||||
requireDead: true # don't count missing evac as killing
|
requireDead: true
|
||||||
- type: TargetObjective
|
- type: TargetObjective
|
||||||
title: objective-condition-kill-head-title # kill <name>, <job>
|
title: objective-condition-kill-head-title # kill <name>, <job>
|
||||||
|
|
||||||
|
|||||||
@@ -89,13 +89,13 @@
|
|||||||
difficulty: 1.75
|
difficulty: 1.75
|
||||||
unique: false
|
unique: false
|
||||||
- type: TargetObjective
|
- type: TargetObjective
|
||||||
title: objective-condition-kill-person-title
|
title: objective-condition-maroon-person-title
|
||||||
- type: PickRandomPerson
|
- type: PickRandomPerson
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: [BaseTraitorObjective, BaseKillObjective]
|
parent: [BaseTraitorObjective, BaseKillObjective]
|
||||||
id: KillRandomHeadObjective
|
id: KillRandomHeadObjective
|
||||||
description: We need this head gone and you probably know why. Good luck, agent.
|
description: We need this head gone and you probably know why. Make sure they don't make it to centcomm, even if they're dead. Good luck, agent.
|
||||||
components:
|
components:
|
||||||
- type: Objective
|
- type: Objective
|
||||||
# technically its still possible for KillRandomPersonObjective to roll a head but this is guaranteed, so higher difficulty
|
# technically its still possible for KillRandomPersonObjective to roll a head but this is guaranteed, so higher difficulty
|
||||||
@@ -103,12 +103,13 @@
|
|||||||
# killing 1 head is enough
|
# killing 1 head is enough
|
||||||
unique: true
|
unique: true
|
||||||
- type: TargetObjective
|
- type: TargetObjective
|
||||||
title: objective-condition-kill-head-title
|
title: objective-condition-kill-maroon-title
|
||||||
- type: PickRandomHead
|
- type: PickRandomHead
|
||||||
- type: KillPersonCondition
|
- type: KillPersonCondition
|
||||||
# don't count missing evac as killing as heads are higher profile, so you really need to do the dirty work
|
# don't count missing evac as killing as heads are higher profile, so you really need to do the dirty work
|
||||||
# if ce flies a shittle to centcom you better find a way onto it
|
# if ce flies a shittle to centcom you better find a way onto it
|
||||||
requireDead: true
|
requireDead: true
|
||||||
|
requireMaroon: true
|
||||||
|
|
||||||
# social
|
# social
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user