Melee Executions (#30104)
* melee executions * fix damage bug * cleanup * address reviews hopefully * resistance bypass mechanic * component changes * self executions (not finished yet) * self execs part two * ok i fixed things (still not finished) * finish everything * review stuff * nuke if (kind = special) * more review stuffs * Make suicide system much less hardcoded and make much more use of events * Fix a dumb bug I introduced * self execution popups * Integration tests * Why did they even take 0.5 blunt damage? * More consistent integration tests * Destructive equals true * Allow it to dirty-dispose * IS THIS WHAT YOU WANT? * FRESH AND CLEAN * modifier to multiplier * don't jinx the integration tests * no file-scoped namespace * Move the rest of execution to shared, create SuicideGhostEvent * handled * Get rid of unused code and add a comment * ghost before suicide * stop cat suicides * popup fix + small suicide change * make it a bit better --------- Co-authored-by: Plykiya <58439124+Plykiya@users.noreply.github.com>
This commit is contained in:
77
Content.Shared/Execution/ExecutionComponent.cs
Normal file
77
Content.Shared/Execution/ExecutionComponent.cs
Normal file
@@ -0,0 +1,77 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Execution;
|
||||
|
||||
/// <summary>
|
||||
/// Added to entities that can be used to execute another target.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class ExecutionComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// How long the execution duration lasts.
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
public float DoAfterDuration = 5f;
|
||||
|
||||
/// <summary>
|
||||
/// Arbitrarily chosen number to multiply damage by, used to deal reasonable amounts of damage to a victim of an execution.
|
||||
/// /// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
public float DamageMultiplier = 9f;
|
||||
|
||||
/// <summary>
|
||||
/// Shown to the person performing the melee execution (attacker) upon starting a melee execution.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public LocId InternalMeleeExecutionMessage = "execution-popup-melee-initial-internal";
|
||||
|
||||
/// <summary>
|
||||
/// Shown to bystanders and the victim of a melee execution when a melee execution is started.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public LocId ExternalMeleeExecutionMessage = "execution-popup-melee-initial-external";
|
||||
|
||||
/// <summary>
|
||||
/// Shown to the attacker upon completion of a melee execution.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public LocId CompleteInternalMeleeExecutionMessage = "execution-popup-melee-complete-internal";
|
||||
|
||||
/// <summary>
|
||||
/// Shown to bystanders and the victim of a melee execution when a melee execution is completed.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public LocId CompleteExternalMeleeExecutionMessage = "execution-popup-melee-complete-external";
|
||||
|
||||
/// <summary>
|
||||
/// Shown to the person performing the self execution when starting one.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public LocId InternalSelfExecutionMessage = "execution-popup-self-initial-internal";
|
||||
|
||||
/// <summary>
|
||||
/// Shown to bystanders near a self execution when one is started.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public LocId ExternalSelfExecutionMessage = "execution-popup-self-initial-external";
|
||||
|
||||
/// <summary>
|
||||
/// Shown to the person performing a self execution upon completion of a do-after or on use of /suicide with a weapon that has the Execution component.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public LocId CompleteInternalSelfExecutionMessage = "execution-popup-self-complete-internal";
|
||||
|
||||
/// <summary>
|
||||
/// Shown to bystanders when a self execution is completed or a suicide via execution weapon happens nearby.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public LocId CompleteExternalSelfExecutionMessage = "execution-popup-self-complete-external";
|
||||
|
||||
// Not networked because this is transient inside of a tick.
|
||||
/// <summary>
|
||||
/// True if it is currently executing for handlers.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public bool Executing = false;
|
||||
}
|
||||
Reference in New Issue
Block a user