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",
|
"MeleeChemicalInjector",
|
||||||
"Dice",
|
"Dice",
|
||||||
"PaperLabel",
|
"PaperLabel",
|
||||||
|
"PressureImmunity",
|
||||||
"Construction",
|
"Construction",
|
||||||
"PoweredLight",
|
"PoweredLight",
|
||||||
"Smes",
|
"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, HighPressureEvent>(OnHighPressureEvent);
|
||||||
SubscribeLocalEvent<PressureProtectionComponent, LowPressureEvent>(OnLowPressureEvent);
|
SubscribeLocalEvent<PressureProtectionComponent, LowPressureEvent>(OnLowPressureEvent);
|
||||||
|
|
||||||
|
SubscribeLocalEvent<PressureImmunityComponent, HighPressureEvent>(OnHighPressureImmuneEvent);
|
||||||
|
SubscribeLocalEvent<PressureImmunityComponent, LowPressureEvent>(OnLowPressureImmuneEvent);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnHighPressureEvent(EntityUid uid, PressureProtectionComponent component, HighPressureEvent args)
|
private void OnHighPressureEvent(EntityUid uid, PressureProtectionComponent component, HighPressureEvent args)
|
||||||
@@ -39,6 +43,24 @@ namespace Content.Server.Atmos.EntitySystems
|
|||||||
args.Multiplier *= component.LowPressureMultiplier;
|
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)
|
public float GetFeltLowPressure(BarotraumaComponent baro, float environmentPressure)
|
||||||
{
|
{
|
||||||
var modifier = float.MaxValue;
|
var modifier = float.MaxValue;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using Content.Server.Chemistry.Components;
|
using Content.Server.Chemistry.Components;
|
||||||
using Content.Shared.Interaction;
|
using Content.Shared.Interaction;
|
||||||
|
using Content.Shared.Interaction.Events;
|
||||||
using Content.Shared.Weapons.Melee;
|
using Content.Shared.Weapons.Melee;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
@@ -13,6 +14,15 @@ namespace Content.Server.Chemistry.EntitySystems
|
|||||||
SubscribeLocalEvent<HyposprayComponent, AfterInteractEvent>(OnAfterInteract);
|
SubscribeLocalEvent<HyposprayComponent, AfterInteractEvent>(OnAfterInteract);
|
||||||
SubscribeLocalEvent<HyposprayComponent, ClickAttackEvent>(OnClickAttack);
|
SubscribeLocalEvent<HyposprayComponent, ClickAttackEvent>(OnClickAttack);
|
||||||
SubscribeLocalEvent<HyposprayComponent, SolutionChangedEvent>(OnSolutionChange);
|
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)
|
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:
|
contents:
|
||||||
- id: ClothingMaskBreath
|
- id: ClothingMaskBreath
|
||||||
- id: EmergencyOxygenTankFilled
|
- id: EmergencyOxygenTankFilled
|
||||||
|
- id: SpaceMedipen
|
||||||
- id: EmergencyMedipen
|
- id: EmergencyMedipen
|
||||||
- id: Flare
|
- id: Flare
|
||||||
- id: FoodSnackChocolate
|
- id: FoodSnackChocolate
|
||||||
@@ -26,6 +27,7 @@
|
|||||||
contents:
|
contents:
|
||||||
- id: ClothingMaskBreath
|
- id: ClothingMaskBreath
|
||||||
- id: ExtendedEmergencyOxygenTankFilled
|
- id: ExtendedEmergencyOxygenTankFilled
|
||||||
|
- id: SpaceMedipen
|
||||||
- id: EmergencyMedipen
|
- id: EmergencyMedipen
|
||||||
- id: Flare
|
- id: Flare
|
||||||
- id: FoodSnackChocolate
|
- id: FoodSnackChocolate
|
||||||
@@ -45,6 +47,7 @@
|
|||||||
contents:
|
contents:
|
||||||
- id: ClothingMaskGasSecurity
|
- id: ClothingMaskGasSecurity
|
||||||
- id: EmergencyOxygenTankFilled
|
- id: EmergencyOxygenTankFilled
|
||||||
|
- id: SpaceMedipen
|
||||||
- id: EmergencyMedipen
|
- id: EmergencyMedipen
|
||||||
- id: Flare
|
- id: Flare
|
||||||
- id: FoodSnackChocolate
|
- id: FoodSnackChocolate
|
||||||
@@ -64,6 +67,7 @@
|
|||||||
contents:
|
contents:
|
||||||
- id: ClothingMaskBreathMedical
|
- id: ClothingMaskBreathMedical
|
||||||
- id: EmergencyOxygenTankFilled
|
- id: EmergencyOxygenTankFilled
|
||||||
|
- id: SpaceMedipen
|
||||||
- id: EmergencyMedipen
|
- id: EmergencyMedipen
|
||||||
- id: Flare
|
- id: Flare
|
||||||
- id: FoodSnackChocolate
|
- id: FoodSnackChocolate
|
||||||
@@ -88,6 +92,7 @@
|
|||||||
contents:
|
contents:
|
||||||
- id: ClothingMaskBreath
|
- id: ClothingMaskBreath
|
||||||
- id: EmergencyOxygenTankFilled
|
- id: EmergencyOxygenTankFilled
|
||||||
|
- id: SpaceMedipen
|
||||||
- id: EmergencyMedipen
|
- id: EmergencyMedipen
|
||||||
- id: Flare
|
- id: Flare
|
||||||
- id: FoodSnackChocolate
|
- id: FoodSnackChocolate
|
||||||
@@ -102,6 +107,7 @@
|
|||||||
contents:
|
contents:
|
||||||
- id: ClothingMaskGasSyndicate
|
- id: ClothingMaskGasSyndicate
|
||||||
- id: ExtendedEmergencyOxygenTankFilled
|
- id: ExtendedEmergencyOxygenTankFilled
|
||||||
|
- id: SpaceMedipen
|
||||||
- id: EmergencyMedipen
|
- id: EmergencyMedipen
|
||||||
- id: Flare
|
- id: Flare
|
||||||
- id: FoodSnackChocolate
|
- id: FoodSnackChocolate
|
||||||
|
|||||||
@@ -144,6 +144,7 @@
|
|||||||
contents:
|
contents:
|
||||||
- id: ClothingMaskBreath
|
- id: ClothingMaskBreath
|
||||||
- id: EmergencyOxygenTankFilled
|
- id: EmergencyOxygenTankFilled
|
||||||
|
- id: SpaceMedipen
|
||||||
- id: EmergencyMedipen
|
- id: EmergencyMedipen
|
||||||
- id: Flare
|
- id: Flare
|
||||||
- id: FoodSnackChocolate
|
- id: FoodSnackChocolate
|
||||||
|
|||||||
@@ -24,6 +24,8 @@
|
|||||||
prob: 0.2
|
prob: 0.2
|
||||||
- id: FlareGun
|
- id: FlareGun
|
||||||
prob: 0.05
|
prob: 0.05
|
||||||
|
- id: ClothingOuterSuitEmergency
|
||||||
|
prob: 0.5
|
||||||
- id: BoxMRE
|
- id: BoxMRE
|
||||||
prob: 0.1
|
prob: 0.1
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,13 @@
|
|||||||
sprite: Clothing/OuterClothing/Suits/emergency.rsi
|
sprite: Clothing/OuterClothing/Suits/emergency.rsi
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
sprite: Clothing/OuterClothing/Suits/emergency.rsi
|
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
|
- type: entity
|
||||||
parent: ClothingOuterBase
|
parent: ClothingOuterBase
|
||||||
|
|||||||
@@ -71,6 +71,7 @@
|
|||||||
- SlowedDown
|
- SlowedDown
|
||||||
- Stutter
|
- Stutter
|
||||||
- Electrocution
|
- Electrocution
|
||||||
|
- PressureImmunity
|
||||||
- type: DiseaseCarrier
|
- type: DiseaseCarrier
|
||||||
# Other
|
# Other
|
||||||
- type: Inventory
|
- type: Inventory
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
map: ["enum.SolutionContainerLayers.Fill"]
|
map: ["enum.SolutionContainerLayers.Fill"]
|
||||||
- type: Item
|
- type: Item
|
||||||
sprite: Objects/Specific/Medical/medipen.rsi
|
sprite: Objects/Specific/Medical/medipen.rsi
|
||||||
size: 5
|
size: 3
|
||||||
- type: SolutionContainerManager
|
- type: SolutionContainerManager
|
||||||
solutions:
|
solutions:
|
||||||
pen:
|
pen:
|
||||||
@@ -88,6 +88,37 @@
|
|||||||
- ReagentId: Epinephrine
|
- ReagentId: Epinephrine
|
||||||
Quantity: 5
|
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
|
- type: entity
|
||||||
name: pen
|
name: pen
|
||||||
suffix: Hypopen
|
suffix: Hypopen
|
||||||
|
|||||||
@@ -292,17 +292,52 @@
|
|||||||
conditions:
|
conditions:
|
||||||
- !type:Temperature
|
- !type:Temperature
|
||||||
max: 293.15
|
max: 293.15
|
||||||
amount: 1000 # thermal energy, not temperature!
|
amount: 100000 # thermal energy, not temperature!
|
||||||
- !type:AdjustTemperature
|
- !type:AdjustTemperature
|
||||||
conditions:
|
conditions:
|
||||||
- !type:Temperature
|
- !type:Temperature
|
||||||
min: 293.15
|
min: 293.15
|
||||||
amount: -1000
|
amount: -10000
|
||||||
- !type:PopupMessage
|
- !type:PopupMessage
|
||||||
type: Local
|
type: Local
|
||||||
messages: [ "leporazine-effect-temperature-adjusting" ]
|
messages: [ "leporazine-effect-temperature-adjusting" ]
|
||||||
probability: 0.2
|
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
|
- type: reagent
|
||||||
id: Phalanximine
|
id: Phalanximine
|
||||||
name: phalanximine
|
name: phalanximine
|
||||||
|
|||||||
@@ -24,3 +24,6 @@
|
|||||||
|
|
||||||
- type: statusEffect
|
- type: statusEffect
|
||||||
id: Electrocution
|
id: Electrocution
|
||||||
|
|
||||||
|
- type: statusEffect
|
||||||
|
id: PressureImmunity
|
||||||
|
|||||||
Reference in New Issue
Block a user