diff --git a/Content.Client/Entry/IgnoredComponents.cs b/Content.Client/Entry/IgnoredComponents.cs index d0220af785..3263c077b7 100644 --- a/Content.Client/Entry/IgnoredComponents.cs +++ b/Content.Client/Entry/IgnoredComponents.cs @@ -33,6 +33,7 @@ namespace Content.Client.Entry "MeleeChemicalInjector", "Dice", "PaperLabel", + "PressureImmunity", "Construction", "PoweredLight", "Smes", diff --git a/Content.Server/Atmos/Components/PressureImmunityComponent.cs b/Content.Server/Atmos/Components/PressureImmunityComponent.cs new file mode 100644 index 0000000000..c25b2bd2a7 --- /dev/null +++ b/Content.Server/Atmos/Components/PressureImmunityComponent.cs @@ -0,0 +1,6 @@ +namespace Content.Server.Atmos.Components; + +[RegisterComponent] +public sealed class PressureImmunityComponent : Component +{ +} diff --git a/Content.Server/Atmos/EntitySystems/BarotraumaSystem.cs b/Content.Server/Atmos/EntitySystems/BarotraumaSystem.cs index 39c19081a1..93a61cc04f 100644 --- a/Content.Server/Atmos/EntitySystems/BarotraumaSystem.cs +++ b/Content.Server/Atmos/EntitySystems/BarotraumaSystem.cs @@ -25,6 +25,10 @@ namespace Content.Server.Atmos.EntitySystems { SubscribeLocalEvent(OnHighPressureEvent); SubscribeLocalEvent(OnLowPressureEvent); + + SubscribeLocalEvent(OnHighPressureImmuneEvent); + SubscribeLocalEvent(OnLowPressureImmuneEvent); + } private void OnHighPressureEvent(EntityUid uid, PressureProtectionComponent component, HighPressureEvent args) @@ -39,6 +43,24 @@ namespace Content.Server.Atmos.EntitySystems args.Multiplier *= component.LowPressureMultiplier; } + + /// + /// Completely prevent high pressure damage + /// + private void OnHighPressureImmuneEvent(EntityUid uid, PressureImmunityComponent component, HighPressureEvent args) + { + args.Multiplier = 0; + } + + /// + /// Completely prevent low pressure damage + /// + 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; diff --git a/Content.Server/Chemistry/EntitySystems/ChemistrySystemHypospray.cs b/Content.Server/Chemistry/EntitySystems/ChemistrySystemHypospray.cs index ab29879a7c..fd0a7dc55b 100644 --- a/Content.Server/Chemistry/EntitySystems/ChemistrySystemHypospray.cs +++ b/Content.Server/Chemistry/EntitySystems/ChemistrySystemHypospray.cs @@ -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(OnAfterInteract); SubscribeLocalEvent(OnClickAttack); SubscribeLocalEvent(OnSolutionChange); + SubscribeLocalEvent(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) diff --git a/Resources/Locale/en-US/reagents/barozine.ftl b/Resources/Locale/en-US/reagents/barozine.ftl new file mode 100644 index 0000000000..e668dcafd9 --- /dev/null +++ b/Resources/Locale/en-US/reagents/barozine.ftl @@ -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. diff --git a/Resources/Prototypes/Catalog/Fills/Boxes/emergency.yml b/Resources/Prototypes/Catalog/Fills/Boxes/emergency.yml index a6dde8ea74..cc161df02b 100644 --- a/Resources/Prototypes/Catalog/Fills/Boxes/emergency.yml +++ b/Resources/Prototypes/Catalog/Fills/Boxes/emergency.yml @@ -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,10 +107,11 @@ contents: - id: ClothingMaskGasSyndicate - id: ExtendedEmergencyOxygenTankFilled + - id: SpaceMedipen - id: EmergencyMedipen - id: Flare - id: FoodSnackChocolate - type: Sprite layers: - state: internals - - state: extendedtank \ No newline at end of file + - state: extendedtank diff --git a/Resources/Prototypes/Catalog/Fills/Boxes/general.yml b/Resources/Prototypes/Catalog/Fills/Boxes/general.yml index 8dee0d882f..dd00875dc9 100644 --- a/Resources/Prototypes/Catalog/Fills/Boxes/general.yml +++ b/Resources/Prototypes/Catalog/Fills/Boxes/general.yml @@ -144,6 +144,7 @@ contents: - id: ClothingMaskBreath - id: EmergencyOxygenTankFilled + - id: SpaceMedipen - id: EmergencyMedipen - id: Flare - id: FoodSnackChocolate diff --git a/Resources/Prototypes/Catalog/Fills/Lockers/misc.yml b/Resources/Prototypes/Catalog/Fills/Lockers/misc.yml index 2200879bc5..aed0031d67 100644 --- a/Resources/Prototypes/Catalog/Fills/Lockers/misc.yml +++ b/Resources/Prototypes/Catalog/Fills/Lockers/misc.yml @@ -24,6 +24,8 @@ prob: 0.2 - id: FlareGun prob: 0.05 + - id: ClothingOuterSuitEmergency + prob: 0.5 - id: BoxMRE prob: 0.1 diff --git a/Resources/Prototypes/Entities/Clothing/Head/helmets.yml b/Resources/Prototypes/Entities/Clothing/Head/helmets.yml index 64b75f0a4a..ccdcd42b3d 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/helmets.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/helmets.yml @@ -196,8 +196,8 @@ - type: Clothing sprite: Clothing/Head/Helmets/firehelmet.rsi size: 5 - canPickup: true - quickEquip: true + canPickup: true + quickEquip: true - type: IngestionBlocker - type: PowerCellSlot cellSlot: @@ -215,7 +215,7 @@ - type: PressureProtection highPressureMultiplier: 0.65 lowPressureMultiplier: 1000 - + - type: entity parent: ClothingHeadHardsuitWithLightBase @@ -228,8 +228,8 @@ - type: Clothing sprite: Clothing/Head/Helmets/atmos_firehelmet.rsi size: 5 - canPickup: true - quickEquip: true + canPickup: true + quickEquip: true - type: IngestionBlocker - type: TemperatureProtection coefficient: 0.005 diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/suits.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/suits.yml index ae4c3804e9..9c39f8c57e 100644 --- a/Resources/Prototypes/Entities/Clothing/OuterClothing/suits.yml +++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/suits.yml @@ -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 @@ -52,7 +59,7 @@ sprintModifier: 0.7 - type: TemperatureProtection coefficient: 0.01 - + - type: entity parent: ClothingOuterBase id: ClothingOuterSuitRad diff --git a/Resources/Prototypes/Entities/Mobs/Species/human.yml b/Resources/Prototypes/Entities/Mobs/Species/human.yml index 5f4bc090ea..af233d5754 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/human.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/human.yml @@ -71,6 +71,7 @@ - SlowedDown - Stutter - Electrocution + - PressureImmunity - type: DiseaseCarrier # Other - type: Inventory diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml index e0ec6b9294..be72c08c9a 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml @@ -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 diff --git a/Resources/Prototypes/Reagents/medicine.yml b/Resources/Prototypes/Reagents/medicine.yml index cbd19a97f1..64bbd6ec87 100644 --- a/Resources/Prototypes/Reagents/medicine.yml +++ b/Resources/Prototypes/Reagents/medicine.yml @@ -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 diff --git a/Resources/Prototypes/status_effects.yml b/Resources/Prototypes/status_effects.yml index 9037317e94..d7acc7601b 100644 --- a/Resources/Prototypes/status_effects.yml +++ b/Resources/Prototypes/status_effects.yml @@ -24,3 +24,6 @@ - type: statusEffect id: Electrocution + +- type: statusEffect + id: PressureImmunity