Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public sealed partial class PortableScrubberComponent : Component
Gas.Frezon,
// Funkystation Start: Funky atmos - /tg/ gases
Gas.BZ,
Gas.Healium,
Gas.Nitrium,
Gas.Hydrogen,
Gas.HyperNoblium,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public sealed partial class GasLeakRuleComponent : Component
Gas.WaterVapor, // the fog
// Funkystation Start: Funky atmos - /tg/ gases
Gas.BZ,
Gas.Healium,
Gas.Nitrium,
Gas.Pluoxium,
Gas.HyperNoblium,
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
using Content.Server.Atmos;
using Content.Server.Atmos.EntitySystems;
using Content.Shared.Atmos;
using Content.Shared.Atmos.Reactions;
using JetBrains.Annotations;

namespace Content.Server._Starlight.Atmos.Reactions;

/// <summary>
/// Funky Atmos - /tg/ gases - Starlight Overhaul
/// Produces Nitrium by mixing Tritium, Nitrogen and Pluoxium at temperatures above 500K.
/// </summary>
[UsedImplicitly]
public sealed partial class NitriumProductionReaction : IGasReactionEffect
{
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem, float heatScale)
{
if (mixture.Temperature > 20f && mixture.GetMoles(Gas.HyperNoblium) >= 5f)
return ReactionResult.NoReaction;

var initTritium = mixture.GetMoles(Gas.Tritium);
var initNitrogen = mixture.GetMoles(Gas.Nitrogen);
var initPluox = mixture.GetMoles(Gas.Pluoxium);
var initBZ = mixture.GetMoles(Gas.BZ);
var pressure = mixture.Pressure;
var volume = mixture.Volume;
var temperature = mixture.Temperature;

var catalyze = 1f + (initBZ / 100f) ;

/// Check what ingredient is smallest relative to its un-catalyzed demand. Use it as a limiter.

var limit = Math.Min(initTritium / 2f, Math.Min(initNitrogen * catalyze / 3f, initPluox));
Comment thread
OrangeJuiceGoose marked this conversation as resolved.

/// Produces faster with higher temperature, lower pressure, and higher concetrations of BZ. BZ also magnifies the nitrogen consumption so watch out.

var tempRate = temperature / 500f ;

var pressureRate = (10f / pressure) * 2f ;

Check warning on line 39 in Content.Server/_Starlight/Atmos/Reactions/NitriumProductionReaction.cs

View workflow job for this annotation

GitHub Actions / build

[C# diagnostics] reported by reviewdog 🐶 Parentheses can be removed Raw Output: {"level":"warning","locations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Server/_Starlight/Atmos/Reactions/NitriumProductionReaction.cs"},"region":{"endColumn":44,"endLine":39,"startColumn":28,"startLine":39}}}],"message":{"text":"Parentheses can be removed"},"properties":{},"relatedLocations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Server/_Starlight/Atmos/Reactions/NitriumProductionReaction.cs"},"region":{"endColumn":44,"endLine":39,"startColumn":28,"startLine":39}}},{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Server/_Starlight/Atmos/Reactions/NitriumProductionReaction.cs"},"region":{"endColumn":29,"endLine":39,"startColumn":28,"startLine":39}}},{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Server/_Starlight/Atmos/Reactions/NitriumProductionReaction.cs"},"region":{"endColumn":44,"endLine":39,"startColumn":43,"startLine":39}}}],"ruleId":"IDE0047","ruleIndex":661}

var rate = Math.Min(0.5F * tempRate * pressureRate * catalyze, limit);

var tritiumRemoved = 2f * rate;
var nitrogenRemoved = 3f * rate * catalyze;
var pluoxRemoved = 1f * rate;

var nitriumProduced = 3f * rate;

mixture.AdjustMoles(Gas.Tritium, -tritiumRemoved);
mixture.AdjustMoles(Gas.Nitrogen, -nitrogenRemoved);
mixture.AdjustMoles(Gas.Pluoxium, -pluoxRemoved);
mixture.AdjustMoles(Gas.Nitrium, nitriumProduced);

var energyReleased = rate * Atmospherics.NitriumProductionEnergy / heatScale;
var heatCap = atmosphereSystem.GetHeatCapacity(mixture, true);
if (heatCap > Atmospherics.MinimumHeatCapacity)
mixture.Temperature = Math.Max((mixture.Temperature * heatCap + energyReleased) / heatCap, Atmospherics.TCMB);

Check warning on line 57 in Content.Server/_Starlight/Atmos/Reactions/NitriumProductionReaction.cs

View workflow job for this annotation

GitHub Actions / build

[C# diagnostics] reported by reviewdog 🐶 Parentheses should be added for clarity Raw Output: {"level":"warning","locations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Server/_Starlight/Atmos/Reactions/NitriumProductionReaction.cs"},"region":{"endColumn":66,"endLine":57,"startColumn":65,"startLine":57}}}],"message":{"text":"Parentheses should be added for clarity"},"properties":{},"relatedLocations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Server/_Starlight/Atmos/Reactions/NitriumProductionReaction.cs"},"region":{"endColumn":74,"endLine":57,"startColumn":45,"startLine":57}}}],"ruleId":"IDE0048","ruleIndex":673}

return ReactionResult.Reacting;
}
}
1 change: 0 additions & 1 deletion Content.Server/_Starlight/Energy/Supermatter/Const.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ internal static class Const
new (0.13f, 2.19f, 2.2f, 0f, -0.02f, 0f, 0f), // nitrous oxide
new (1.00f, 0.01f, 1.1f, 0f, -0.1f, 0f, 0f), // frezon
new (0.25f, 1.20f, 1.80f, 0f, 0f, 0f, 0f), // BZ (catalist so an not competing gas) //FUNKY GASES
new (0.40f, 0.50f, 1.8f, 1f, -0.1f, -0.1f, 0f), // Healium (support gas) {Special effect: increase passive}
new (0.30f, 0.50f, 1.2f, 0f, 0.75f, 0.5f, 0f), // Nitrium {Special effect: SM reacts more, cost of stability}
new (0.30f, 1.0f, 1.7f, 0f, 0f, 0f, 0f), // Pluoxium better then o2 not insane
new (0.35f, 0.35f, 1.1f, 0f, 0.25f, 0f, 0f), // Hydrogen Better heatT than Trit but "ignites" faster
Expand Down
32 changes: 12 additions & 20 deletions Content.Shared/Atmos/Atmospherics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ public static class Atmospherics
[Gas.WaterVapor] = Loc.GetString("gas-water-vapor-abbreviation"),
// Funkystation Start: Funky atmos - /tg/ gases
[Gas.BZ] = Loc.GetString("gas-bz-abbreviation"),
[Gas.Healium] = Loc.GetString("gas-healium-abbreviation"),
[Gas.Nitrium] = Loc.GetString("gas-nitrium-abbreviation"),
[Gas.Pluoxium] = Loc.GetString("gas-pluoxium-abbreviation"),
[Gas.Hydrogen] = Loc.GetString("gas-hydrogen-abbreviation"),
Expand Down Expand Up @@ -224,7 +223,7 @@ public static class Atmospherics
/// <summary>
/// Total number of gases. Increase this if you want to add more!
/// </summary>
public const int TotalNumberOfGases = 22; // Starlight Edit: 9 -> 22
public const int TotalNumberOfGases = 21; // Starlight Edit: 9 -> 21

/// <summary>
/// This is the actual length of the gases arrays in mixtures.
Expand Down Expand Up @@ -310,12 +309,6 @@ public static class Atmospherics
/// </summary>
public const float BZProductionEnergy = 80e3f;

/// <summary>
/// Funky Atmos - /tg/ gases
/// The amount of energy 1 mol of Healium forming from BZ and frezon releases.
/// </summary>
public const float HealiumProductionEnergy = 9e3f;

/// <summary>
/// Funky Atmos - /tg/ gases
/// The amount of energy 1 mol of Nitrium forming from Tritium, Nitrogen and BZ releases.
Expand Down Expand Up @@ -492,21 +485,20 @@ public enum Gas : sbyte
Frezon = 8,
// Funkystation Start: Funky atmos - /tg/ gases
BZ = 9,
Healium = 10,
Nitrium = 11,
Pluoxium = 12,
Hydrogen = 13,
HyperNoblium = 14,
ProtoNitrate = 15,
Zauker = 16,
Halon = 17,
Helium = 18,
AntiNoblium = 19,
Nitrium = 10,
Comment thread
OrangeJuiceGoose marked this conversation as resolved.
Pluoxium = 11,
Hydrogen = 12,
HyperNoblium = 13,
ProtoNitrate = 14,
Zauker = 15,
Halon = 16,
Helium = 17,
AntiNoblium = 18,
Comment thread
OrangeJuiceGoose marked this conversation as resolved.
// Funkystation End: Funky atmos - /tg/ gases
#region Starlight
// Starlight gases!
Ulnitranium = 20,
ZXA = 21,
Ulnitranium = 19,
ZXA = 20,
#endregion
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public sealed class GasVentScrubberData : IAtmosDeviceData
Gas.Frezon,
// Funkystation Start: Funky atmos - /tg/ gases
Gas.BZ,
Gas.Healium,
Gas.Nitrium,
Gas.Hydrogen,
Gas.HyperNoblium,
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Catalog/thief_toolbox_sets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
- ChemistryBottleTazinide # Starlight
- HypopenBox
- NitrousOxideTankFilled
- HealiumTankFilled # Starlight, for those nitrogen breathers
- ZXATankFilled # Starlight, for those nitrogen breathers

- type: thiefBackpackSet
id: CommunicatorSet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
Frezon: danger
# Funkystation Start: Funky atmos - /tg/ gases
BZ: stationBZ
Healium: stationHealium
Nitrium: danger
Pluoxium: stationPluoxium
Hydrogen: danger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
Frezon: danger
# Funkystation Start: Funky atmos - /tg/ gases
BZ: stationBZ
Healium: stationHealium
Nitrium: voxNitrium
Pluoxium: stationPluoxium
Hydrogen: danger
Expand Down Expand Up @@ -77,7 +76,6 @@
- Frezon
# Funkystation Start: Funky atmos - /tg/ gases
- BZ
- Healium
- Nitrium
- Halon
- Hydrogen
Expand Down
1 change: 0 additions & 1 deletion Resources/Prototypes/Paintables/canister_groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
# Starlight End: Additional canisters
# Funkystation Start: Funky atmos - /tg/ gases
bz: BZCanister
healium: HealiumCanister
nitrium: NitriumCanister
pluoxium: PluoxiumCanister
hydrogen: HydrogenCanister
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@
upperWarnAround: !type:AlarmThresholdSetting
threshold: 0.08

- type: alarmThreshold
id: stationHealium
upperBound: !type:AlarmThresholdSetting
threshold: 0.08
upperWarnAround: !type:AlarmThresholdSetting
threshold: 0.5

- type: alarmThreshold
id: stationPluoxium
upperBound: !type:AlarmThresholdSetting
Expand Down
16 changes: 3 additions & 13 deletions Resources/Prototypes/_Funkystation/Atmospherics/gases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,17 @@
reagent: BZ
pricePerMole: 1.2

- type: gas
id: Healium
name: gases-healium
specificHeat: 10
heatCapacityRatio: 1.4
molarMass: 15
gasOverlaySprite: /Textures/_Funkystation/Effects/atmospherics.rsi
gasOverlayState: healium
color: fa8072
reagent: Healium
pricePerMole: 2.7
# Starlight: Healium removed

- type: gas
id: Nitrium
name: gases-nitrium
specificHeat: 10
heatCapacityRatio: 1.4
gasOverlaySprite: /Textures/_Funkystation/Effects/atmospherics.rsi
gasOverlayState: nitrium
gasOverlayState: healium # Starlight: Nitrium gets healium's old color.
molarMass: 8
color: a52a2a
color: fa8072
reagent: Nitrium
pricePerMole: 4

Expand Down
Loading
Loading