diff --git a/Content.Client/Atmos/Consoles/AtmosAlarmEntryContainer.xaml.cs b/Content.Client/Atmos/Consoles/AtmosAlarmEntryContainer.xaml.cs index f0e4b13356..e537728331 100644 --- a/Content.Client/Atmos/Consoles/AtmosAlarmEntryContainer.xaml.cs +++ b/Content.Client/Atmos/Consoles/AtmosAlarmEntryContainer.xaml.cs @@ -31,6 +31,22 @@ public sealed partial class AtmosAlarmEntryContainer : BoxContainer [AtmosAlarmType.Danger] = "atmos-alerts-window-danger-state", }; + private Dictionary _gasShorthands = new Dictionary() + { + [Gas.Ammonia] = "NH₃", + [Gas.CarbonDioxide] = "CO₂", + [Gas.Frezon] = "F", + [Gas.Nitrogen] = "N₂", + [Gas.NitrousOxide] = "N₂O", + [Gas.Oxygen] = "O₂", + [Gas.Plasma] = "P", + [Gas.Tritium] = "T", + [Gas.WaterVapor] = "H₂O", + [Gas.BZ] = "BZ", //SunRise edit + [Gas.Healium] = "F₃BZ", //SunRise edit + [Gas.Nitrium] = "N" //SunRise edit + }; + public AtmosAlarmEntryContainer(NetEntity uid, EntityCoordinates? coordinates) { RobustXamlLoader.Load(this); @@ -149,11 +165,12 @@ public sealed partial class AtmosAlarmEntryContainer : BoxContainer foreach ((var gas, (var mol, var percent, var alert)) in keyValuePairs) { FixedPoint2 gasPercent = percent * 100f; - var gasAbbreviation = Atmospherics.GasAbbreviations.GetValueOrDefault(gas, Loc.GetString("gas-unknown-abbreviation")); + + var gasShorthand = _gasShorthands.GetValueOrDefault(gas, "X"); var gasLabel = new Label() { - Text = Loc.GetString("atmos-alerts-window-other-gases-value", ("shorthand", gasAbbreviation), ("value", gasPercent)), + Text = Loc.GetString("atmos-alerts-window-other-gases-value", ("shorthand", gasShorthand), ("value", gasPercent)), FontOverride = normalFont, FontColorOverride = GetAlarmStateColor(alert), HorizontalAlignment = HAlignment.Center, diff --git a/Content.Server/Atmos/Portable/PortableScrubberComponent.cs b/Content.Server/Atmos/Portable/PortableScrubberComponent.cs index e94f5e5e0e..74ffe21e60 100644 --- a/Content.Server/Atmos/Portable/PortableScrubberComponent.cs +++ b/Content.Server/Atmos/Portable/PortableScrubberComponent.cs @@ -32,6 +32,7 @@ namespace Content.Server.Atmos.Portable Gas.Frezon, Gas.BZ, //SunRise edit Gas.Healium, //SunRise edit + Gas.Nitrium, //SunRise edit }; [ViewVariables(VVAccess.ReadWrite)] diff --git a/Content.Server/Atmos/Reactions/NitriumSynthesisReaction.cs b/Content.Server/Atmos/Reactions/NitriumSynthesisReaction.cs new file mode 100644 index 0000000000..310f4b7b63 --- /dev/null +++ b/Content.Server/Atmos/Reactions/NitriumSynthesisReaction.cs @@ -0,0 +1,41 @@ +using Content.Server.Atmos.EntitySystems; +using Content.Shared.Atmos; +using Content.Shared.Atmos.Reactions; +using JetBrains.Annotations; + +namespace Content.Server.Atmos.Reactions; + +/// +/// Реакция для синтеза Нитриума из трития, азота и BZ. by TERRISS +/// +[UsedImplicitly] +public sealed partial class NitriumSynthesisReaction : IGasReactionEffect +{ + public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem, float heatScale) + { + var initTritium = mixture.GetMoles(Gas.Tritium); + var initNitrogen = mixture.GetMoles(Gas.Nitrogen); + var initBZ = mixture.GetMoles(Gas.BZ); + var temperature = mixture.Temperature; + + // Проверка условий для реакции + if (initTritium < 2 || initNitrogen < 2 || initBZ < 1 || temperature < 1500 || temperature > 100000) + return ReactionResult.NoReaction; + + // Логика реакции + var tritiumRemoved = 2f; // Количество удаляемого трития + var nitrogenRemoved = 2f; // Количество удаляемого азота + var bzRemoved = 1f; // Количество удаляемого BZ + var nitriumProduced = 3f; // Количество производимого Нитриума + + if (tritiumRemoved > initTritium || nitrogenRemoved > initNitrogen || bzRemoved > initBZ) + return ReactionResult.NoReaction; + + mixture.AdjustMoles(Gas.Tritium, -tritiumRemoved); + mixture.AdjustMoles(Gas.Nitrogen, -nitrogenRemoved); + mixture.AdjustMoles(Gas.BZ, -bzRemoved); + mixture.AdjustMoles(Gas.Nitrium, nitriumProduced); + + return ReactionResult.Reacting; + } +} diff --git a/Content.Server/StationEvents/Components/GasLeakRuleComponent.cs b/Content.Server/StationEvents/Components/GasLeakRuleComponent.cs index 040e3acbf5..7a96c720a0 100644 --- a/Content.Server/StationEvents/Components/GasLeakRuleComponent.cs +++ b/Content.Server/StationEvents/Components/GasLeakRuleComponent.cs @@ -15,7 +15,8 @@ public sealed partial class GasLeakRuleComponent : Component Gas.Frezon, Gas.WaterVapor, // the fog Gas.BZ, //SunRise edit - Gas.Healium //SunRise edit + Gas.Healium, //SunRise edit + Gas.Nitrium, //SunRise edit }; /// diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/GasArtifactComponent.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/GasArtifactComponent.cs index d76c2833cc..612df83b5e 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/GasArtifactComponent.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Components/GasArtifactComponent.cs @@ -31,7 +31,8 @@ public sealed partial class GasArtifactComponent : Component Gas.NitrousOxide, Gas.Frezon, Gas.BZ, //SunRise edit - Gas.Healium //SunRise edit + Gas.Healium, //SunRise edit + Gas.Nitrium, //SunRise edit }; /// diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Components/ArtifactGasTriggerComponent.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Components/ArtifactGasTriggerComponent.cs index cb64c9c4c0..3eeaccf72c 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Components/ArtifactGasTriggerComponent.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/Triggers/Components/ArtifactGasTriggerComponent.cs @@ -22,6 +22,7 @@ public sealed partial class ArtifactGasTriggerComponent : Component Gas.NitrousOxide, Gas.BZ, //SunRise edit Gas.Healium, //SunRise edit + Gas.Nitrium, //SunRise edit }; /// diff --git a/Content.Shared/Atmos/Atmospherics.cs b/Content.Shared/Atmos/Atmospherics.cs index 6e7d860980..1f68988530 100644 --- a/Content.Shared/Atmos/Atmospherics.cs +++ b/Content.Shared/Atmos/Atmospherics.cs @@ -176,6 +176,7 @@ namespace Content.Shared.Atmos [Gas.WaterVapor] = Loc.GetString("gas-water-vapor-abbreviation"), [Gas.BZ] = Loc.GetString("gas-bz-abbreviation"), //SunRise edit [Gas.Healium] = Loc.GetString("gas-healium-abbreviation"), //SunRise edit + [Gas.Nitrium] = Loc.GetString("gas-nitrium-abbreviation"), //SunRise edit }; #region Excited Groups @@ -205,7 +206,7 @@ namespace Content.Shared.Atmos /// /// Total number of gases. Increase this if you want to add more! /// - public const int TotalNumberOfGases = 11; //SunRise edit + public const int TotalNumberOfGases = 12; //SunRise edit /// /// This is the actual length of the gases arrays in mixtures. @@ -391,5 +392,6 @@ namespace Content.Shared.Atmos Frezon = 8, BZ = 9, //SunRise edit Healium = 10, //SunRise edit + Nitrium = 11 //SunRise edit } } diff --git a/Content.Shared/Atmos/Piping/Unary/Components/SharedVentScrubberComponent.cs b/Content.Shared/Atmos/Piping/Unary/Components/SharedVentScrubberComponent.cs index 738fd9b8a9..57800b653b 100644 --- a/Content.Shared/Atmos/Piping/Unary/Components/SharedVentScrubberComponent.cs +++ b/Content.Shared/Atmos/Piping/Unary/Components/SharedVentScrubberComponent.cs @@ -25,6 +25,7 @@ namespace Content.Shared.Atmos.Piping.Unary.Components Gas.Frezon, Gas.BZ, // Sunrise-Edit Gas.Healium, // Sunrise-Edit + Gas.Nitrium, //SunRise edit }; // Presets for 'dumb' air alarm modes diff --git a/Resources/Locale/en-US/_prototypes/_sunrise/entities/structures/storage/canisters/gas_canisters.ftl b/Resources/Locale/en-US/_prototypes/_sunrise/entities/structures/storage/canisters/gas_canisters.ftl index 76d1d6a754..fde654b406 100644 --- a/Resources/Locale/en-US/_prototypes/_sunrise/entities/structures/storage/canisters/gas_canisters.ftl +++ b/Resources/Locale/en-US/_prototypes/_sunrise/entities/structures/storage/canisters/gas_canisters.ftl @@ -2,7 +2,11 @@ ent-BZCanister = BZ Canister .desc = A canister that can contain any type of gas. This one presumably contains BZ. Can be attached to a connector port using a wrench. ent-HealiumCanister = Healium Canister .desc = A canister that can contain any type of gas. This one presumably contains Healium. Can be attached to a connector port using a wrench. +ent-NitriumCanister = Nitrium Canister + .desc = A canister that can contain any type of gas. This one presumably contains Nitrium. Can be attached to a connector port using a wrench. ent-BZCanisterBroken = { ent-GasCanisterBrokenBase } .desc = { ent-GasCanisterBrokenBase.desc } ent-HealiumCanisterBroken = { ent-GasCanisterBrokenBase } .desc = { ent-GasCanisterBrokenBase.desc } +ent-NitriumCanisterBroken = { ent-GasCanisterBrokenBase } + .desc = { ent-GasCanisterBrokenBase.desc } diff --git a/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/structures/storage/canisters/gas_canisters.ftl b/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/structures/storage/canisters/gas_canisters.ftl index fb1c122c60..ffd5213721 100644 --- a/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/structures/storage/canisters/gas_canisters.ftl +++ b/Resources/Locale/ru-RU/_prototypes/_sunrise/entities/structures/storage/canisters/gas_canisters.ftl @@ -2,7 +2,11 @@ ent-BZCanister = Канистра БЗ .desc = Канистра, в которой может содержаться газ любого вида. В этой, предположительно, содержится БЗ. Можно прикрепить к порту коннектора с помощью гаечного ключа. ent-HealiumCanister = Канистра хилиума .desc = Канистра, в которой может содержаться газ любого вида. В этой, предположительно, содержится хилиум. Можно прикрепить к порту коннектора с помощью гаечного ключа. +ent-NitriumCanister = канистра нитриума + .desc = Канистра, в которой может содержаться газ любого вида. В этой, предположительно, содержится Нитриум. Можно прикрепить к порту коннектора с помощью гаечного ключа. ent-BZCanisterBroken = { ent-GasCanisterBrokenBase } .desc = { ent-GasCanisterBrokenBase.desc } ent-HealiumCanisterBroken = { ent-GasCanisterBrokenBase } .desc = { ent-GasCanisterBrokenBase.desc } +ent-NitriumCanisterBroken = { ent-GasCanisterBrokenBase } + .desc = { ent-GasCanisterBrokenBase.desc } diff --git a/Resources/Locale/ru-RU/_prototypes/_sunrise/reagents/meta/gases.ftl b/Resources/Locale/ru-RU/_prototypes/_sunrise/reagents/meta/gases.ftl index b55d661d84..669ed3b006 100644 --- a/Resources/Locale/ru-RU/_prototypes/_sunrise/reagents/meta/gases.ftl +++ b/Resources/Locale/ru-RU/_prototypes/_sunrise/reagents/meta/gases.ftl @@ -2,5 +2,8 @@ reagent-name-bz = БЗ reagent-desc-bz = Мощный галлюциноген, который также усыпляет слаймолюдов. reagent-name-healium = хилиум reagent-desc-healium = Мощное снотворное средство с регенерирующими свойствами. +reagent-name-nitrium = нитриум +reagent-desc-nitrium = Мощный стимулятор, при вдыхании повышает скорость и выносливость. gases-healium = Хилиум gases-bz = БЗ +gases-nitrium = Нитриум diff --git a/Resources/Locale/ru-RU/_strings/_sunrise/atmos/gases.ftl b/Resources/Locale/ru-RU/_strings/_sunrise/atmos/gases.ftl index aef73ef84c..54a6238f88 100644 --- a/Resources/Locale/ru-RU/_strings/_sunrise/atmos/gases.ftl +++ b/Resources/Locale/ru-RU/_strings/_sunrise/atmos/gases.ftl @@ -1,2 +1,3 @@ gas-bz-abbreviation = BZ gas-healium-abbreviation = F₃BZ +gas-nitrium-abbreviation = N diff --git a/Resources/Prototypes/Entities/Structures/Specific/Atmospherics/sensor.yml b/Resources/Prototypes/Entities/Structures/Specific/Atmospherics/sensor.yml index 7b9fbf08de..50c5124a8d 100644 --- a/Resources/Prototypes/Entities/Structures/Specific/Atmospherics/sensor.yml +++ b/Resources/Prototypes/Entities/Structures/Specific/Atmospherics/sensor.yml @@ -27,6 +27,7 @@ Frezon: danger BZ: danger #SunRise edit Healium: stationNO #SunRise edit + Nitrium: stationNO #SunRise edit - type: Tag tags: - AirSensor diff --git a/Resources/Prototypes/_Sunrise/Atmospherics/gases.yml b/Resources/Prototypes/_Sunrise/Atmospherics/gases.yml index f507a1c917..25965dad3e 100644 --- a/Resources/Prototypes/_Sunrise/Atmospherics/gases.yml +++ b/Resources/Prototypes/_Sunrise/Atmospherics/gases.yml @@ -21,3 +21,16 @@ pricePerMole: 3 gasOverlaySprite: /Textures/_Sunrise/Effects/atmospherics.rsi gasOverlayState: healium + +- type: gas + id: 11 + name: gases-nitrium + specificHeat: 20 + heatCapacityRatio: 1.4 + molarMass: 30 + color: 8B4513 + reagent: Nitrium + pricePerMole: 0.2 + gasOverlaySprite: /Textures/_Sunrise/Effects/atmospherics.rsi + gasOverlayState: nitriumGas + diff --git a/Resources/Prototypes/_Sunrise/Atmospherics/reactions.yml b/Resources/Prototypes/_Sunrise/Atmospherics/reactions.yml index 825787aaf4..3b6db95525 100644 --- a/Resources/Prototypes/_Sunrise/Atmospherics/reactions.yml +++ b/Resources/Prototypes/_Sunrise/Atmospherics/reactions.yml @@ -30,4 +30,21 @@ - 0.01 # frezon - 0.01 # bz effects: - - !type:HealiumProductionReaction {} \ No newline at end of file + - !type:HealiumProductionReaction {} + +- type: gasReaction + id: NitriumSynthesis + priority: 2 + minimumRequirements: + - 0 # oxygen + - 2 # nitrogen + - 0 # carbon dioxide + - 0 # plasma + - 2 # tritium + - 0 # vapor + - 0 # miasma + - 0 # n2o + - 0 # frezon + - 0.01 # bz + effects: + - !type:NitriumSynthesisReaction {} diff --git a/Resources/Prototypes/_Sunrise/Entities/Structures/Storage/Canisters/gas_canisters.yml b/Resources/Prototypes/_Sunrise/Entities/Structures/Storage/Canisters/gas_canisters.yml index 8efc321906..855ffda39a 100644 --- a/Resources/Prototypes/_Sunrise/Entities/Structures/Storage/Canisters/gas_canisters.yml +++ b/Resources/Prototypes/_Sunrise/Entities/Structures/Storage/Canisters/gas_canisters.yml @@ -101,6 +101,58 @@ - type: Lock locked: true +- type: entity + parent: GasCanister + id: NitriumCanister + name: Nitrium Canister + description: "Канистра, которая может содержать любой тип газа. Эта, предположительно, содержит Нитриум. Может быть подключена к разъему с помощью ключа." + components: + - type: Sprite + sprite: _Sunrise/Structures/Storage/canister.rsi + layers: + - state: nitrium + - type: GasCanister + gasMixture: + volume: 1000 + moles: + - 0 # oxygen + - 0 # nitrogen + - 0 # CO2 + - 0 # Plasma + - 0 # Tritium + - 0 # Water vapor + - 0 # Miasma + - 0 # N2O + - 0 # Frezon + - 0 # BZ + - 0 # Healium + - 1871.71051 # Nitrium + temperature: 293.15 + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 600 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - trigger: + !type:DamageTrigger + damage: 300 + behaviors: + - !type:PlaySoundBehavior + sound: + collection: MetalBreak + - !type:SpawnEntitiesBehavior + spawn: + NitriumCanisterBroken: + min: 1 + max: 1 + - !type:DoActsBehavior + acts: [ "Destruction" ] + - !type:DumpCanisterBehavior + - type: Lock + locked: true - type: entity @@ -120,3 +172,12 @@ - type: Sprite sprite: _Sunrise/Structures/Storage/canister.rsi state: healium-1 + +- type: entity + parent: GasCanisterBrokenBase + id: NitriumCanisterBroken + categories: [ HideSpawnMenu ] + components: + - type: Sprite + sprite: _Sunrise/Structures/Storage/canister.rsi + state: nitrium-1 diff --git a/Resources/Prototypes/_Sunrise/Reagents/gases.yml b/Resources/Prototypes/_Sunrise/Reagents/gases.yml index 0ede2f2615..c97bf172e2 100644 --- a/Resources/Prototypes/_Sunrise/Reagents/gases.yml +++ b/Resources/Prototypes/_Sunrise/Reagents/gases.yml @@ -168,4 +168,66 @@ conditions: - !type:ReagentThreshold reagent: Healium - min: 1 \ No newline at end of file + min: 1 + +- type: reagent + id: Nitrium + name: reagent-name-nitrium + desc: reagent-desc-nitrium + physicalDesc: reagent-physical-desc-gaseous + flavor: bitter + color: "#8B4513" + metabolisms: + Gas: + Medicine: + metabolismRate: 1.0 + effects: + - !type:MovespeedModifier + walkSpeedModifier: 1.5 + sprintSpeedModifier: 1.5 + - !type:MovespeedModifier + walkSpeedModifier: 1.5 + sprintSpeedModifier: 1.5 + - !type:MovespeedModifier + walkSpeedModifier: 1.5 + sprintSpeedModifier: 1.5 + - !type:MovespeedModifier + walkSpeedModifier: 1.5 + sprintSpeedModifier: 1.5 + - !type:HealthChange + conditions: + - !type:ReagentThreshold + min: 80 + damage: + types: + Poison: 20 + - !type:AdjustReagent + conditions: + - !type:ReagentThreshold + reagent: ChloralHydrate + min: 1 + reagent: ChloralHydrate + amount: -10 + - !type:GenericStatusEffect + key: Stun + time: 10 + type: Remove + - !type:GenericStatusEffect + key: KnockedDown + time: 10 + type: Remove + - !type:GenericStatusEffect + key: StaminaModifier + component: StaminaModifier + time: 10 + type: Add + - !type:GenericStatusEffect + key: ForcedSleep + time: 10 + type: Remove + - !type:Jitter + - !type:PopupMessage + visualType: Medium + messages: ["Вы чувствуете как ваше тело наполняется энергией", "Вы чувствуете как начинают болеть ваши мышцы"] + type: Local + probability: 0.05 diff --git a/Resources/Textures/_Sunrise/Effects/atmospherics.rsi/meta.json b/Resources/Textures/_Sunrise/Effects/atmospherics.rsi/meta.json index a3604c29b8..c26aa2aeec 100644 --- a/Resources/Textures/_Sunrise/Effects/atmospherics.rsi/meta.json +++ b/Resources/Textures/_Sunrise/Effects/atmospherics.rsi/meta.json @@ -14,6 +14,10 @@ { "name": "bz", "delays": [[0.1, 0.1, 0.1, 0.1, 0.1]] + }, + { + "name": "nitriumGas", + "delays": [[0.1, 0.1, 0.1, 0.1, 0.1]] } ] } diff --git a/Resources/Textures/_Sunrise/Effects/atmospherics.rsi/nitriumGas.png b/Resources/Textures/_Sunrise/Effects/atmospherics.rsi/nitriumGas.png new file mode 100644 index 0000000000..bd1d5aff6e Binary files /dev/null and b/Resources/Textures/_Sunrise/Effects/atmospherics.rsi/nitriumGas.png differ diff --git a/Resources/Textures/_Sunrise/Structures/Storage/canister.rsi/meta.json b/Resources/Textures/_Sunrise/Structures/Storage/canister.rsi/meta.json index 78b15b5d17..4b1c11a5ec 100644 --- a/Resources/Textures/_Sunrise/Structures/Storage/canister.rsi/meta.json +++ b/Resources/Textures/_Sunrise/Structures/Storage/canister.rsi/meta.json @@ -19,6 +19,12 @@ { "name": "healium-1" }, + { + "name": "nitrium" + }, + { + "name": "nitrium-1" + }, { "name": "can-connector" }, diff --git a/Resources/Textures/_Sunrise/Structures/Storage/canister.rsi/nitrium-1.png b/Resources/Textures/_Sunrise/Structures/Storage/canister.rsi/nitrium-1.png new file mode 100644 index 0000000000..07edc17298 Binary files /dev/null and b/Resources/Textures/_Sunrise/Structures/Storage/canister.rsi/nitrium-1.png differ diff --git a/Resources/Textures/_Sunrise/Structures/Storage/canister.rsi/nitrium.png b/Resources/Textures/_Sunrise/Structures/Storage/canister.rsi/nitrium.png new file mode 100644 index 0000000000..a62ce7bae9 Binary files /dev/null and b/Resources/Textures/_Sunrise/Structures/Storage/canister.rsi/nitrium.png differ