Pacification status effect and Pax (#10796)
This commit is contained in:
44
Content.Shared/CombatMode/Pacification/PacificationSystem.cs
Normal file
44
Content.Shared/CombatMode/Pacification/PacificationSystem.cs
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
using Content.Shared.CombatMode;
|
||||||
|
using Content.Shared.Actions;
|
||||||
|
|
||||||
|
namespace Content.Shared.CombatMode.Pacification
|
||||||
|
{
|
||||||
|
public sealed class PacificationSystem : EntitySystem
|
||||||
|
{
|
||||||
|
[Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
base.Initialize();
|
||||||
|
SubscribeLocalEvent<PacifiedComponent, ComponentInit>(OnInit);
|
||||||
|
SubscribeLocalEvent<PacifiedComponent, ComponentShutdown>(OnShutdown);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnInit(EntityUid uid, PacifiedComponent component, ComponentInit args)
|
||||||
|
{
|
||||||
|
if (!TryComp<SharedCombatModeComponent>(uid, out var combatMode))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (combatMode.DisarmAction != null)
|
||||||
|
{
|
||||||
|
_actionsSystem.SetToggled(combatMode.DisarmAction, false);
|
||||||
|
_actionsSystem.SetEnabled(combatMode.DisarmAction, false);
|
||||||
|
}
|
||||||
|
if (combatMode.CombatToggleAction != null)
|
||||||
|
{
|
||||||
|
combatMode.IsInCombatMode = false;
|
||||||
|
_actionsSystem.SetEnabled(combatMode.CombatToggleAction, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnShutdown(EntityUid uid, PacifiedComponent component, ComponentShutdown args)
|
||||||
|
{
|
||||||
|
if (!TryComp<SharedCombatModeComponent>(uid, out var combatMode))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (combatMode.DisarmAction != null)
|
||||||
|
_actionsSystem.SetEnabled(combatMode.DisarmAction, true);
|
||||||
|
if (combatMode.CombatToggleAction != null)
|
||||||
|
_actionsSystem.SetEnabled(combatMode.CombatToggleAction, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
namespace Content.Shared.CombatMode.Pacification
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Status effect that disables combat mode.
|
||||||
|
/// </summary>
|
||||||
|
[RegisterComponent]
|
||||||
|
public sealed class PacifiedComponent : Component
|
||||||
|
{}
|
||||||
|
}
|
||||||
@@ -51,3 +51,6 @@ reagent-desc-uncooked-animal-proteins = This is very risky for the stomachs of s
|
|||||||
|
|
||||||
reagent-name-allicin = allicin
|
reagent-name-allicin = allicin
|
||||||
reagent-desc-allicin = An organosulfur compound found in alliums like garlic, onions, and related plants.
|
reagent-desc-allicin = An organosulfur compound found in alliums like garlic, onions, and related plants.
|
||||||
|
|
||||||
|
reagent-name-pax = pax
|
||||||
|
reagent-desc-pax = A psychiatric drug which prevents the patient from directly harming anyone.
|
||||||
|
|||||||
@@ -110,6 +110,7 @@
|
|||||||
- Electrocution
|
- Electrocution
|
||||||
- ForcedSleep
|
- ForcedSleep
|
||||||
- TemporaryBlindness
|
- TemporaryBlindness
|
||||||
|
- Pacified
|
||||||
- type: Body
|
- type: Body
|
||||||
template: AnimalTemplate
|
template: AnimalTemplate
|
||||||
preset: AnimalPreset
|
preset: AnimalPreset
|
||||||
@@ -173,6 +174,7 @@
|
|||||||
- Electrocution
|
- Electrocution
|
||||||
- ForcedSleep
|
- ForcedSleep
|
||||||
- TemporaryBlindness
|
- TemporaryBlindness
|
||||||
|
- Pacified
|
||||||
- type: ThermalRegulator
|
- type: ThermalRegulator
|
||||||
metabolismHeat: 800
|
metabolismHeat: 800
|
||||||
radiatedHeat: 100
|
radiatedHeat: 100
|
||||||
|
|||||||
@@ -81,6 +81,7 @@
|
|||||||
- Muted
|
- Muted
|
||||||
- ForcedSleep
|
- ForcedSleep
|
||||||
- TemporaryBlindness
|
- TemporaryBlindness
|
||||||
|
- Pacified
|
||||||
- type: DiseaseCarrier
|
- type: DiseaseCarrier
|
||||||
- type: Blindable
|
- type: Blindable
|
||||||
# Other
|
# Other
|
||||||
|
|||||||
@@ -441,3 +441,18 @@
|
|||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
Poison: 6
|
Poison: 6
|
||||||
|
|
||||||
|
- type: reagent
|
||||||
|
id: Pax
|
||||||
|
name: reagent-name-pax
|
||||||
|
desc: reagent-desc-pax
|
||||||
|
physicalDesc: reagent-physical-desc-soothing
|
||||||
|
color: "#AAAAAA"
|
||||||
|
metabolisms:
|
||||||
|
Poison:
|
||||||
|
effects:
|
||||||
|
- !type:GenericStatusEffect
|
||||||
|
key: Pacified
|
||||||
|
component: Pacified
|
||||||
|
refresh: false
|
||||||
|
type: Add
|
||||||
|
|||||||
@@ -326,3 +326,16 @@
|
|||||||
amount: 1
|
amount: 1
|
||||||
products:
|
products:
|
||||||
ChloralHydrate: 1
|
ChloralHydrate: 1
|
||||||
|
|
||||||
|
- type: reaction
|
||||||
|
id: Pax
|
||||||
|
impact: Medium
|
||||||
|
reactants:
|
||||||
|
MindbreakerToxin:
|
||||||
|
amount: 1
|
||||||
|
Synaptizine:
|
||||||
|
amount: 1
|
||||||
|
Water:
|
||||||
|
amount: 1
|
||||||
|
products:
|
||||||
|
Pax: 3
|
||||||
|
|||||||
@@ -50,3 +50,6 @@
|
|||||||
|
|
||||||
- type: statusEffect
|
- type: statusEffect
|
||||||
id: TemporaryBlindness
|
id: TemporaryBlindness
|
||||||
|
|
||||||
|
- type: statusEffect
|
||||||
|
id: Pacified #cannot attack
|
||||||
|
|||||||
Reference in New Issue
Block a user