fix disarm action (#7411)

This commit is contained in:
Leon Friedrich
2022-04-04 17:45:26 +12:00
committed by GitHub
parent 019c106501
commit 6fb2b2a735
6 changed files with 71 additions and 16 deletions

View File

@@ -30,22 +30,7 @@ namespace Content.Shared.CombatMode
// These are chonky default definitions for combat actions. But its a pain to add a yaml version of this for
// every entity that wants combat mode, especially given that they're currently all identical... so ummm.. yeah.
[DataField("disarmAction")]
public readonly EntityTargetAction DisarmAction = new()
{
Icon = new SpriteSpecifier.Texture(new ResourcePath("Interface/Actions/disarmOff.png")),
IconOn = new SpriteSpecifier.Texture(new ResourcePath("Interface/Actions/disarm.png")),
Name = "action-name-disarm",
Description = "action-description-disarm",
Repeat = true,
UseDelay = TimeSpan.FromSeconds(1.5f),
InteractOnMiss = true,
Event = new DisarmActionEvent(),
CanTargetSelf = false,
Whitelist = new()
{
Components = new[] { "Hands", "StatusEffects" },
},
};
public readonly EntityTargetAction DisarmAction = new();
[DataField("combatToggleAction")]
public readonly InstantAction CombatToggleAction = new()

View File

@@ -95,6 +95,20 @@
100: !type:DeadMobState {}
- type: HeatResistance
- type: CombatMode
disarmAction:
name: action-name-disarm
description: action-description-disarm
icon: Interface/Actions/disarmOff.png
iconOn: Interface/Actions/disarm.png
repeat: true
useDelay: 1.5
interactOnMiss: true
event: !type:DisarmActionEvent
canTargetSelf: false
whitelist:
components:
- Hands
- StatusEffects
- type: Internals
- type: StatusEffects
allowed:

View File

@@ -12,6 +12,20 @@
- type: Hands
- type: DoAfter
- type: CombatMode
disarmAction:
name: action-name-disarm
description: action-description-disarm
icon: Interface/Actions/disarmOff.png
iconOn: Interface/Actions/disarm.png
repeat: true
useDelay: 1.5
interactOnMiss: true
event: !type:DisarmActionEvent
canTargetSelf: false
whitelist:
components:
- Hands
- StatusEffects
- type: Actions
- type: PlayerInputMover
- type: MovementSpeedModifier

View File

@@ -53,6 +53,20 @@
0: !type:NormalMobState {}
- type: HeatResistance
- type: CombatMode
disarmAction:
name: action-name-disarm
description: action-description-disarm
icon: Interface/Actions/disarmOff.png
iconOn: Interface/Actions/disarm.png
repeat: true
useDelay: 1.5
interactOnMiss: true
event: !type:DisarmActionEvent
canTargetSelf: false
whitelist:
components:
- Hands
- StatusEffects
- type: Internals
- type: Examiner
- type: Speech

View File

@@ -225,3 +225,17 @@
normal: onestar_boss
dead: onestar_boss_wrecked
- type: CombatMode
disarmAction:
name: action-name-disarm
description: action-description-disarm
icon: Interface/Actions/disarmOff.png
iconOn: Interface/Actions/disarm.png
repeat: true
useDelay: 1.5
interactOnMiss: true
event: !type:DisarmActionEvent
canTargetSelf: false
whitelist:
components:
- Hands
- StatusEffects

View File

@@ -258,6 +258,20 @@
Burn:
sprite: Mobs/Effects/burn_damage.rsi
- type: CombatMode
disarmAction:
name: action-name-disarm
description: action-description-disarm
icon: Interface/Actions/disarmOff.png
iconOn: Interface/Actions/disarm.png
repeat: true
useDelay: 1.5
interactOnMiss: true
event: !type:DisarmActionEvent
canTargetSelf: false
whitelist:
components:
- Hands
- StatusEffects
- type: Climbing
- type: Cuffable
- type: CharacterInfo