Files
crystall-punk-14/Content.Shared/Execution/ExecutionComponent.cs
Sefaia c87907f80d EXECUTION! (#1419)
* Execution option unlocked for Sharp weapons.

* Created CP14Execution component to avoid issues with SS14 standard core coding.

Removed Execution Component in preparation to add in CP14Execution component instead.

* Added CP14Execution as a modularPart modifier under the id: BaseWeaponExecution

Added BaseWeaponExecution to the following weapons:
-Axe
-Dagger
-Mace
-Rapier
-Scimitar
-Spear
-Sword

* Added Executions to all Tools in the ModularWeapon category.

* Removed redundant code and replace CP14Execution Component with original Execution Component. Removed Mace, Hammer, Hoe, Shovel and Pickaxe execution for now. Added Execution Component to BaseWeaponSharp modifier

* Added Execution to non-sharp weapons via modifier called BaseWeaponExecution.

* Exchanged prefix of blunt to cp14 and added the override values.

* networking problems

---------

Co-authored-by: Red <96445749+TheShuEd@users.noreply.github.com>
2025-06-18 13:10:08 +03:00

78 lines
3.2 KiB
C#

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, AutoNetworkedField] //CP14 AutoNetworkedField
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, AutoNetworkedField] //CP14 AutoNetworkedField
public LocId ExternalMeleeExecutionMessage = "execution-popup-melee-initial-external";
/// <summary>
/// Shown to the attacker upon completion of a melee execution.
/// </summary>
[DataField, AutoNetworkedField] //CP14 AutoNetworkedField
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, AutoNetworkedField] //CP14 AutoNetworkedField
public LocId CompleteExternalMeleeExecutionMessage = "execution-popup-melee-complete-external";
/// <summary>
/// Shown to the person performing the self execution when starting one.
/// </summary>
[DataField, AutoNetworkedField] //CP14 AutoNetworkedField
public LocId InternalSelfExecutionMessage = "execution-popup-self-initial-internal";
/// <summary>
/// Shown to bystanders near a self execution when one is started.
/// </summary>
[DataField, AutoNetworkedField] //CP14 AutoNetworkedField
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, AutoNetworkedField] //CP14 AutoNetworkedField
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, AutoNetworkedField] //CP14 AutoNetworkedField
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;
}