Adds the pressure medipen and adds the emergency suit to emergency lockers (#7880)
* Implement pressure medipen Add the emergency suit to emergency lockers Increase leporazine temperature change * Fix typo in translation file * Fix ignored component name * Address reviews * Revert changes to submodule commit
This commit is contained in:
@@ -33,6 +33,7 @@ namespace Content.Client.Entry
|
||||
"MeleeChemicalInjector",
|
||||
"Dice",
|
||||
"PaperLabel",
|
||||
"PressureImmunity",
|
||||
"Construction",
|
||||
"PoweredLight",
|
||||
"Smes",
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace Content.Server.Atmos.Components;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed class PressureImmunityComponent : Component
|
||||
{
|
||||
}
|
||||
@@ -25,6 +25,10 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
{
|
||||
SubscribeLocalEvent<PressureProtectionComponent, HighPressureEvent>(OnHighPressureEvent);
|
||||
SubscribeLocalEvent<PressureProtectionComponent, LowPressureEvent>(OnLowPressureEvent);
|
||||
|
||||
SubscribeLocalEvent<PressureImmunityComponent, HighPressureEvent>(OnHighPressureImmuneEvent);
|
||||
SubscribeLocalEvent<PressureImmunityComponent, LowPressureEvent>(OnLowPressureImmuneEvent);
|
||||
|
||||
}
|
||||
|
||||
private void OnHighPressureEvent(EntityUid uid, PressureProtectionComponent component, HighPressureEvent args)
|
||||
@@ -39,6 +43,24 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
args.Multiplier *= component.LowPressureMultiplier;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Completely prevent high pressure damage
|
||||
/// </summary>
|
||||
private void OnHighPressureImmuneEvent(EntityUid uid, PressureImmunityComponent component, HighPressureEvent args)
|
||||
{
|
||||
args.Multiplier = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Completely prevent low pressure damage
|
||||
/// </summary>
|
||||
private void OnLowPressureImmuneEvent(EntityUid uid, PressureImmunityComponent component, LowPressureEvent args)
|
||||
{
|
||||
args.Modifier = 100;
|
||||
args.Multiplier = 10000;
|
||||
}
|
||||
|
||||
public float GetFeltLowPressure(BarotraumaComponent baro, float environmentPressure)
|
||||
{
|
||||
var modifier = float.MaxValue;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Content.Server.Chemistry.Components;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Weapons.Melee;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -13,6 +14,15 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
SubscribeLocalEvent<HyposprayComponent, AfterInteractEvent>(OnAfterInteract);
|
||||
SubscribeLocalEvent<HyposprayComponent, ClickAttackEvent>(OnClickAttack);
|
||||
SubscribeLocalEvent<HyposprayComponent, SolutionChangedEvent>(OnSolutionChange);
|
||||
SubscribeLocalEvent<HyposprayComponent, UseInHandEvent>(OnUseInHand);
|
||||
}
|
||||
|
||||
private void OnUseInHand(EntityUid uid, HyposprayComponent component, UseInHandEvent args)
|
||||
{
|
||||
if (args.Handled) return;
|
||||
|
||||
component.TryDoInject(args.User, args.User);
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
private void OnSolutionChange(EntityUid uid, HyposprayComponent component, SolutionChangedEvent args)
|
||||
|
||||
2
Resources/Locale/en-US/reagents/barozine.ftl
Normal file
2
Resources/Locale/en-US/reagents/barozine.ftl
Normal file
@@ -0,0 +1,2 @@
|
||||
barozine-effect-skin-burning = You feel like your skin is burning off!
|
||||
barozine-effect-muscle-contract = You can feel your muscles contracting.
|
||||
@@ -8,6 +8,7 @@
|
||||
contents:
|
||||
- id: ClothingMaskBreath
|
||||
- id: EmergencyOxygenTankFilled
|
||||
- id: SpaceMedipen
|
||||
- id: EmergencyMedipen
|
||||
- id: Flare
|
||||
- id: FoodSnackChocolate
|
||||
@@ -26,6 +27,7 @@
|
||||
contents:
|
||||
- id: ClothingMaskBreath
|
||||
- id: ExtendedEmergencyOxygenTankFilled
|
||||
- id: SpaceMedipen
|
||||
- id: EmergencyMedipen
|
||||
- id: Flare
|
||||
- id: FoodSnackChocolate
|
||||
@@ -45,6 +47,7 @@
|
||||
contents:
|
||||
- id: ClothingMaskGasSecurity
|
||||
- id: EmergencyOxygenTankFilled
|
||||
- id: SpaceMedipen
|
||||
- id: EmergencyMedipen
|
||||
- id: Flare
|
||||
- id: FoodSnackChocolate
|
||||
@@ -64,6 +67,7 @@
|
||||
contents:
|
||||
- id: ClothingMaskBreathMedical
|
||||
- id: EmergencyOxygenTankFilled
|
||||
- id: SpaceMedipen
|
||||
- id: EmergencyMedipen
|
||||
- id: Flare
|
||||
- id: FoodSnackChocolate
|
||||
@@ -88,6 +92,7 @@
|
||||
contents:
|
||||
- id: ClothingMaskBreath
|
||||
- id: EmergencyOxygenTankFilled
|
||||
- id: SpaceMedipen
|
||||
- id: EmergencyMedipen
|
||||
- id: Flare
|
||||
- id: FoodSnackChocolate
|
||||
@@ -102,6 +107,7 @@
|
||||
contents:
|
||||
- id: ClothingMaskGasSyndicate
|
||||
- id: ExtendedEmergencyOxygenTankFilled
|
||||
- id: SpaceMedipen
|
||||
- id: EmergencyMedipen
|
||||
- id: Flare
|
||||
- id: FoodSnackChocolate
|
||||
|
||||
@@ -144,6 +144,7 @@
|
||||
contents:
|
||||
- id: ClothingMaskBreath
|
||||
- id: EmergencyOxygenTankFilled
|
||||
- id: SpaceMedipen
|
||||
- id: EmergencyMedipen
|
||||
- id: Flare
|
||||
- id: FoodSnackChocolate
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
prob: 0.2
|
||||
- id: FlareGun
|
||||
prob: 0.05
|
||||
- id: ClothingOuterSuitEmergency
|
||||
prob: 0.5
|
||||
- id: BoxMRE
|
||||
prob: 0.1
|
||||
|
||||
|
||||
@@ -28,6 +28,13 @@
|
||||
sprite: Clothing/OuterClothing/Suits/emergency.rsi
|
||||
- type: Clothing
|
||||
sprite: Clothing/OuterClothing/Suits/emergency.rsi
|
||||
- type: ClothingSpeedModifier
|
||||
walkModifier: 0.5
|
||||
sprintModifier: 0.5
|
||||
- type: TemperatureProtection
|
||||
coefficient: 0.5
|
||||
- type: ToggleableClothing
|
||||
clothingPrototype: ClothingHeadHelmetEVA
|
||||
|
||||
- type: entity
|
||||
parent: ClothingOuterBase
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
- SlowedDown
|
||||
- Stutter
|
||||
- Electrocution
|
||||
- PressureImmunity
|
||||
- type: DiseaseCarrier
|
||||
# Other
|
||||
- type: Inventory
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
map: ["enum.SolutionContainerLayers.Fill"]
|
||||
- type: Item
|
||||
sprite: Objects/Specific/Medical/medipen.rsi
|
||||
size: 5
|
||||
size: 3
|
||||
- type: SolutionContainerManager
|
||||
solutions:
|
||||
pen:
|
||||
@@ -88,6 +88,37 @@
|
||||
- ReagentId: Epinephrine
|
||||
Quantity: 5
|
||||
|
||||
- type: entity
|
||||
name: space medipen
|
||||
parent: ChemicalMedipen
|
||||
id: SpaceMedipen
|
||||
description: Contains a mix of chemicals that protect you from the deadly effects of space.
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Specific/Medical/medipen.rsi
|
||||
netsync: false
|
||||
layers:
|
||||
- state: hypovolemic
|
||||
map: [ "enum.SolutionContainerLayers.Fill" ]
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: SolutionContainerVisualizer
|
||||
maxFillLevels: 1
|
||||
changeColor: false
|
||||
emptySpriteName: hypovolemic_empty
|
||||
- type: Hypospray
|
||||
solutionName: pen
|
||||
transferAmount: 20
|
||||
- type: SolutionContainerManager
|
||||
solutions:
|
||||
pen:
|
||||
maxVol: 20
|
||||
reagents:
|
||||
- ReagentId: Leporazine
|
||||
Quantity: 10
|
||||
- ReagentId: Barozine
|
||||
Quantity: 10
|
||||
|
||||
- type: entity
|
||||
name: pen
|
||||
suffix: Hypopen
|
||||
|
||||
@@ -292,17 +292,52 @@
|
||||
conditions:
|
||||
- !type:Temperature
|
||||
max: 293.15
|
||||
amount: 1000 # thermal energy, not temperature!
|
||||
amount: 100000 # thermal energy, not temperature!
|
||||
- !type:AdjustTemperature
|
||||
conditions:
|
||||
- !type:Temperature
|
||||
min: 293.15
|
||||
amount: -1000
|
||||
amount: -10000
|
||||
- !type:PopupMessage
|
||||
type: Local
|
||||
messages: [ "leporazine-effect-temperature-adjusting" ]
|
||||
probability: 0.2
|
||||
|
||||
- type: reagent
|
||||
id: Barozine
|
||||
name: barozine
|
||||
group: Medicine
|
||||
desc: A somewhat toxic medicine that prevents pressure damage. Causes extreme pain and jittering. Very poisonous when overdosed.
|
||||
physicalDesc: viscous
|
||||
color: "#ff867d"
|
||||
metabolisms:
|
||||
Medicine:
|
||||
effects:
|
||||
- !type:HealthChange
|
||||
damage:
|
||||
types:
|
||||
Poison: 1
|
||||
- !type:HealthChange
|
||||
conditions:
|
||||
- !type:ReagentThreshold
|
||||
min: 15
|
||||
damage:
|
||||
types:
|
||||
Poison: 4
|
||||
- !type:GenericStatusEffect
|
||||
key: PressureImmunity
|
||||
component: PressureImmunity
|
||||
- !type:GenericStatusEffect
|
||||
key: Stutter
|
||||
component: StutteringAccent
|
||||
- !type:Jitter
|
||||
- !type:Scream
|
||||
probability: 0.2
|
||||
- !type:PopupMessage
|
||||
type: Local
|
||||
messages: [ "barozine-effect-skin-burning", "barozine-effect-muscle-contract" ]
|
||||
probability: 0.1
|
||||
|
||||
- type: reagent
|
||||
id: Phalanximine
|
||||
name: phalanximine
|
||||
|
||||
@@ -24,3 +24,6 @@
|
||||
|
||||
- type: statusEffect
|
||||
id: Electrocution
|
||||
|
||||
- type: statusEffect
|
||||
id: PressureImmunity
|
||||
|
||||
Reference in New Issue
Block a user