Нитриум (#1538)
This commit is contained in:
parent
119abfc6f2
commit
de40b76b2b
22 changed files with 248 additions and 7 deletions
|
|
@ -31,6 +31,22 @@ public sealed partial class AtmosAlarmEntryContainer : BoxContainer
|
|||
[AtmosAlarmType.Danger] = "atmos-alerts-window-danger-state",
|
||||
};
|
||||
|
||||
private Dictionary<Gas, string> _gasShorthands = new Dictionary<Gas, string>()
|
||||
{
|
||||
[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,
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
41
Content.Server/Atmos/Reactions/NitriumSynthesisReaction.cs
Normal file
41
Content.Server/Atmos/Reactions/NitriumSynthesisReaction.cs
Normal file
|
|
@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// Реакция для синтеза Нитриума из трития, азота и BZ. by TERRISS
|
||||
/// </summary>
|
||||
[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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ public sealed partial class ArtifactGasTriggerComponent : Component
|
|||
Gas.NitrousOxide,
|
||||
Gas.BZ, //SunRise edit
|
||||
Gas.Healium, //SunRise edit
|
||||
Gas.Nitrium, //SunRise edit
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -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
|
|||
/// <summary>
|
||||
/// Total number of gases. Increase this if you want to add more!
|
||||
/// </summary>
|
||||
public const int TotalNumberOfGases = 11; //SunRise edit
|
||||
public const int TotalNumberOfGases = 12; //SunRise edit
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
|
|
|
|||
|
|
@ -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 = Нитриум
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
gas-bz-abbreviation = BZ
|
||||
gas-healium-abbreviation = F₃BZ
|
||||
gas-nitrium-abbreviation = N
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
Frezon: danger
|
||||
BZ: danger #SunRise edit
|
||||
Healium: stationNO #SunRise edit
|
||||
Nitrium: stationNO #SunRise edit
|
||||
- type: Tag
|
||||
tags:
|
||||
- AirSensor
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -30,4 +30,21 @@
|
|||
- 0.01 # frezon
|
||||
- 0.01 # bz
|
||||
effects:
|
||||
- !type:HealiumProductionReaction {}
|
||||
- !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 {}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -168,4 +168,66 @@
|
|||
conditions:
|
||||
- !type:ReagentThreshold
|
||||
reagent: Healium
|
||||
min: 1
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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]]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
|
|
@ -19,6 +19,12 @@
|
|||
{
|
||||
"name": "healium-1"
|
||||
},
|
||||
{
|
||||
"name": "nitrium"
|
||||
},
|
||||
{
|
||||
"name": "nitrium-1"
|
||||
},
|
||||
{
|
||||
"name": "can-connector"
|
||||
},
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Loading…
Add table
Reference in a new issue