Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phoron Will Make Us Rich #107

Closed
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Content.Client/Explosion/ExplosionOverlaySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Content.Client.Explosion;

/// <summary>
/// This system is responsible for showing the client-side explosion effects (light source & fire-overlay). The
/// fire overlay code is just a bastardized version of the atmos plasma fire overlay and uses the same texture.
/// fire overlay code is just a bastardized version of the atmos phoron fire overlay and uses the same texture.
/// </summary>
public sealed class ExplosionOverlaySystem : EntitySystem
{
Expand Down
34 changes: 17 additions & 17 deletions Content.Server/Administration/Systems/AdminVerbSystem.Tools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,20 +262,20 @@ private void AddTricksVerbs(GetVerbsEvent<Verb> args)
};
args.Verbs.Add(refillInternalsN2);

Verb refillInternalsPlasma = new()
Verb refillInternalsPhoron = new()
{
Text = "Refill Internals Plasma",
Text = "Refill Internals Phoron",
Category = VerbCategory.Tricks,
Icon = new SpriteSpecifier.Rsi(new("/Textures/Objects/Tanks/plasma.rsi"), "icon"),
Icon = new SpriteSpecifier.Rsi(new("/Textures/Objects/Tanks/phoron.rsi"), "icon"),
Act = () =>
{
RefillGasTank(args.Target, Gas.Plasma, tank);
RefillGasTank(args.Target, Gas.Phoron, tank);
},
Impact = LogImpact.Extreme,
Message = Loc.GetString("admin-trick-internals-refill-plasma-description"),
Priority = (int) TricksVerbPriorities.RefillPlasma,
Message = Loc.GetString("admin-trick-internals-refill-phoron-description"),
Priority = (int) TricksVerbPriorities.RefillPhoron,
};
args.Verbs.Add(refillInternalsPlasma);
args.Verbs.Add(refillInternalsPhoron);
}

if (HasComp<InventoryComponent>(args.Target))
Expand Down Expand Up @@ -304,17 +304,17 @@ private void AddTricksVerbs(GetVerbsEvent<Verb> args)
};
args.Verbs.Add(refillInternalsN2);

Verb refillInternalsPlasma = new()
Verb refillInternalsPhoron = new()
{
Text = "Refill Internals Plasma",
Text = "Refill Internals Phoron",
Category = VerbCategory.Tricks,
Icon = new SpriteSpecifier.Rsi(new("/Textures/Objects/Tanks/plasma.rsi"), "icon"),
Act = () => RefillEquippedTanks(args.User, Gas.Plasma),
Icon = new SpriteSpecifier.Rsi(new("/Textures/Objects/Tanks/phoron.rsi"), "icon"),
Act = () => RefillEquippedTanks(args.User, Gas.Phoron),
Impact = LogImpact.Extreme,
Message = Loc.GetString("admin-trick-internals-refill-plasma-description"),
Priority = (int) TricksVerbPriorities.RefillPlasma,
Message = Loc.GetString("admin-trick-internals-refill-phoron-description"),
Priority = (int) TricksVerbPriorities.RefillPhoron,
};
args.Verbs.Add(refillInternalsPlasma);
args.Verbs.Add(refillInternalsPhoron);
}

Verb sendToTestArena = new()
Expand Down Expand Up @@ -731,11 +731,11 @@ private void AddTricksVerbs(GetVerbsEvent<Verb> args)
}
}

private void RefillEquippedTanks(EntityUid target, Gas plasma)
private void RefillEquippedTanks(EntityUid target, Gas phoron)
{
foreach (var held in _inventorySystem.GetHandOrInventoryEntities(target))
{
RefillGasTank(held, Gas.Plasma);
RefillGasTank(held, Gas.Phoron);
}
}

Expand Down Expand Up @@ -855,7 +855,7 @@ public enum TricksVerbPriorities
DrainBattery = -8,
RefillOxygen = -9,
RefillNitrogen = -10,
RefillPlasma = -11,
RefillPhoron = -11,
SendToTestArena = -12,
GrantAllAccess = -13,
RevokeAllAccess = -14,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ public sealed partial class AnomalyGeneratorComponent : Component
/// The material needed to generate an anomaly
/// </summary>
[DataField("requiredMaterial", customTypeSerializer: typeof(PrototypeIdSerializer<MaterialPrototype>)), ViewVariables(VVAccess.ReadWrite)]
public string RequiredMaterial = "Plasma";
public string RequiredMaterial = "Phoron";

/// <summary>
/// The amount of material needed to generate a single anomaly
/// </summary>
[DataField("materialPerAnomaly"), ViewVariables(VVAccess.ReadWrite)]
public int MaterialPerAnomaly = 1500; // a bit less than a stack of plasma
public int MaterialPerAnomaly = 1500; // a bit less than a stack of phoron

/// <summary>
/// The random anomaly spawner entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ private void FixGridAtmosCommand(IConsoleShell shell, string argstr, string[] ar
// 3: Nitrogen (GM)
mixtures[3].AdjustMoles(Gas.Nitrogen, Atmospherics.MolesCellGasMiner);

// 4: Plasma (GM)
mixtures[4].AdjustMoles(Gas.Plasma, Atmospherics.MolesCellGasMiner);
// 4: Phoron (GM)
mixtures[4].AdjustMoles(Gas.Phoron, Atmospherics.MolesCellGasMiner);

// 5: Instant Plasmafire (r)
// 5: Instant Phoronfire (r)
mixtures[5].AdjustMoles(Gas.Oxygen, Atmospherics.MolesCellGasMiner);
mixtures[5].AdjustMoles(Gas.Plasma, Atmospherics.MolesCellGasMiner);
mixtures[5].AdjustMoles(Gas.Phoron, Atmospherics.MolesCellGasMiner);
mixtures[5].Temperature = 5000f;

// 6: (Walk-In) Freezer
Expand Down
10 changes: 5 additions & 5 deletions Content.Server/Atmos/EntitySystems/AtmosphereSystem.Hotspot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ private void ProcessHotspot(GridAtmosphereComponent gridAtmosphere, TileAtmosphe
ExcitedGroupResetCooldowns(tile.ExcitedGroup);

if ((tile.Hotspot.Temperature < Atmospherics.FireMinimumTemperatureToExist) || (tile.Hotspot.Volume <= 1f)
|| tile.Air == null || tile.Air.GetMoles(Gas.Oxygen) < 0.5f || (tile.Air.GetMoles(Gas.Plasma) < 0.5f && tile.Air.GetMoles(Gas.Tritium) < 0.5f))
|| tile.Air == null || tile.Air.GetMoles(Gas.Oxygen) < 0.5f || (tile.Air.GetMoles(Gas.Phoron) < 0.5f && tile.Air.GetMoles(Gas.Tritium) < 0.5f))
{
tile.Hotspot = new Hotspot();
InvalidateVisuals(tile.GridIndex, tile.GridIndices);
Expand Down Expand Up @@ -104,14 +104,14 @@ private void HotspotExpose(GridAtmosphereComponent gridAtmosphere, TileAtmospher
if (oxygen < 0.5f)
return;

var plasma = tile.Air.GetMoles(Gas.Plasma);
var phoron = tile.Air.GetMoles(Gas.Phoron);
var tritium = tile.Air.GetMoles(Gas.Tritium);

if (tile.Hotspot.Valid)
{
if (soh)
{
if (plasma > 0.5f || tritium > 0.5f)
if (phoron > 0.5f || tritium > 0.5f)
{
if (tile.Hotspot.Temperature < exposedTemperature)
tile.Hotspot.Temperature = exposedTemperature;
Expand All @@ -123,10 +123,10 @@ private void HotspotExpose(GridAtmosphereComponent gridAtmosphere, TileAtmospher
return;
}

if ((exposedTemperature > Atmospherics.PlasmaMinimumBurnTemperature) && (plasma > 0.5f || tritium > 0.5f))
if ((exposedTemperature > Atmospherics.PhoronMinimumBurnTemperature) && (phoron > 0.5f || tritium > 0.5f))
{
if (sparkSourceUid.HasValue)
_adminLog.Add(LogType.Flammable, LogImpact.High, $"Heat/spark of {ToPrettyString(sparkSourceUid.Value)} caused atmos ignition of gas: {tile.Air.Temperature.ToString():temperature}K - {oxygen}mol Oxygen, {plasma}mol Plasma, {tritium}mol Tritium");
_adminLog.Add(LogType.Flammable, LogImpact.High, $"Heat/spark of {ToPrettyString(sparkSourceUid.Value)} caused atmos ignition of gas: {tile.Air.Temperature.ToString():temperature}K - {oxygen}mol Oxygen, {phoron}mol Phoron, {tritium}mol Tritium");

tile.Hotspot = new Hotspot
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private void OnCanisterChangeReleasePressure(EntityUid uid, GasCanisterComponent
private void OnCanisterChangeReleaseValve(EntityUid uid, GasCanisterComponent canister, GasCanisterChangeReleaseValveMessage args)
{
var impact = LogImpact.High;
// filling a jetpack with plasma is less important than filling a room with it
// filling a jetpack with phoron is less important than filling a room with it
impact = canister.GasTankSlot.HasItem ? LogImpact.Medium : LogImpact.High;

var containedGasDict = new Dictionary<Gas, float>();
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Atmos/Portable/PortableScrubberComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public sealed partial class PortableScrubberComponent : Component
public HashSet<Gas> FilterGases = new()
{
Gas.CarbonDioxide,
Gas.Plasma,
Gas.Phoron,
Gas.Tritium,
Gas.WaterVapor,
Gas.Ammonia,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Content.Server.Atmos.Reactions
{
[UsedImplicitly]
[DataDefinition]
public sealed partial class PlasmaFireReaction : IGasReactionEffect
public sealed partial class PhoronFireReaction : IGasReactionEffect
{
public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, AtmosphereSystem atmosphereSystem, float heatScale)
{
Expand All @@ -16,50 +16,50 @@ public ReactionResult React(GasMixture mixture, IGasMixtureHolder? holder, Atmos
var location = holder as TileAtmosphere;
mixture.ReactionResults[GasReaction.Fire] = 0;

// More plasma released at higher temperatures.
// More phoron released at higher temperatures.
var temperatureScale = 0f;

if (temperature > Atmospherics.PlasmaUpperTemperature)
if (temperature > Atmospherics.PhoronUpperTemperature)
temperatureScale = 1f;
else
{
temperatureScale = (temperature - Atmospherics.PlasmaMinimumBurnTemperature) /
(Atmospherics.PlasmaUpperTemperature - Atmospherics.PlasmaMinimumBurnTemperature);
temperatureScale = (temperature - Atmospherics.PhoronMinimumBurnTemperature) /
(Atmospherics.PhoronUpperTemperature - Atmospherics.PhoronMinimumBurnTemperature);
}

if (temperatureScale > 0)
{
var oxygenBurnRate = Atmospherics.OxygenBurnRateBase - temperatureScale;
var plasmaBurnRate = 0f;
var phoronBurnRate = 0f;

var initialOxygenMoles = mixture.GetMoles(Gas.Oxygen);
var initialPlasmaMoles = mixture.GetMoles(Gas.Plasma);
var initialPhoronMoles = mixture.GetMoles(Gas.Phoron);

// Supersaturation makes tritium.
var oxyRatio = initialOxygenMoles / initialPlasmaMoles;
// Efficiency of reaction decreases from 1% Plasma to 3% plasma:
var oxyRatio = initialOxygenMoles / initialPhoronMoles;
// Efficiency of reaction decreases from 1% Phoron to 3% phoron:
var supersaturation = Math.Clamp((oxyRatio - Atmospherics.SuperSaturationEnds) /
(Atmospherics.SuperSaturationThreshold -
Atmospherics.SuperSaturationEnds), 0.0f, 1.0f);

if (initialOxygenMoles > initialPlasmaMoles * Atmospherics.PlasmaOxygenFullburn)
plasmaBurnRate = initialPlasmaMoles * temperatureScale / Atmospherics.PlasmaBurnRateDelta;
if (initialOxygenMoles > initialPhoronMoles * Atmospherics.PhoronOxygenFullburn)
phoronBurnRate = initialPhoronMoles * temperatureScale / Atmospherics.PhoronBurnRateDelta;
else
plasmaBurnRate = temperatureScale * (initialOxygenMoles / Atmospherics.PlasmaOxygenFullburn) / Atmospherics.PlasmaBurnRateDelta;
phoronBurnRate = temperatureScale * (initialOxygenMoles / Atmospherics.PhoronOxygenFullburn) / Atmospherics.PhoronBurnRateDelta;

if (plasmaBurnRate > Atmospherics.MinimumHeatCapacity)
if (phoronBurnRate > Atmospherics.MinimumHeatCapacity)
{
plasmaBurnRate = MathF.Min(plasmaBurnRate, MathF.Min(initialPlasmaMoles, initialOxygenMoles / oxygenBurnRate));
mixture.SetMoles(Gas.Plasma, initialPlasmaMoles - plasmaBurnRate);
mixture.SetMoles(Gas.Oxygen, initialOxygenMoles - plasmaBurnRate * oxygenBurnRate);
phoronBurnRate = MathF.Min(phoronBurnRate, MathF.Min(initialPhoronMoles, initialOxygenMoles / oxygenBurnRate));
mixture.SetMoles(Gas.Phoron, initialPhoronMoles - phoronBurnRate);
mixture.SetMoles(Gas.Oxygen, initialOxygenMoles - phoronBurnRate * oxygenBurnRate);

// supersaturation adjusts the ratio of produced tritium to unwanted CO2
mixture.AdjustMoles(Gas.Tritium, plasmaBurnRate * supersaturation);
mixture.AdjustMoles(Gas.CarbonDioxide, plasmaBurnRate * (1.0f - supersaturation));
mixture.AdjustMoles(Gas.Tritium, phoronBurnRate * supersaturation);
mixture.AdjustMoles(Gas.CarbonDioxide, phoronBurnRate * (1.0f - supersaturation));

energyReleased += Atmospherics.FirePlasmaEnergyReleased * plasmaBurnRate;
energyReleased += Atmospherics.FirePhoronEnergyReleased * phoronBurnRate;
energyReleased /= heatScale; // adjust energy to make sure speedup doesn't cause mega temperature rise
mixture.ReactionResults[GasReaction.Fire] += plasmaBurnRate * (1 + oxygenBurnRate);
mixture.ReactionResults[GasReaction.Fire] += phoronBurnRate * (1 + oxygenBurnRate);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public sealed partial class GatewayGeneratorComponent : Component
"OreQuartz",
"OreGold",
"OreSilver",
"OrePlasma",
"OrePhoron",
"OreUranium",
"OreBananium",
"OreArtifactFragment",
Expand Down
8 changes: 4 additions & 4 deletions Content.Server/Materials/MaterialStorageSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public override bool TryInsertMaterialEntity(EntityUid user,
/// Spawn an amount of a material in stack entities.
/// Note the 'amount' is material dependent.
/// 1 biomass = 1 biomass in its stack,
/// but 100 plasma = 1 sheet of plasma, etc.
/// but 100 phoron = 1 sheet of phoron, etc.
/// </summary>
public List<EntityUid> SpawnMultipleFromMaterial(int amount, string material, EntityCoordinates coordinates)
{
Expand All @@ -129,7 +129,7 @@ public List<EntityUid> SpawnMultipleFromMaterial(int amount, string material, En
/// Spawn an amount of a material in stack entities.
/// Note the 'amount' is material dependent.
/// 1 biomass = 1 biomass in its stack,
/// but 100 plasma = 1 sheet of plasma, etc.
/// but 100 phoron = 1 sheet of phoron, etc.
/// </summary>
public List<EntityUid> SpawnMultipleFromMaterial(int amount, string material, EntityCoordinates coordinates, out int overflowMaterial)
{
Expand All @@ -147,7 +147,7 @@ public List<EntityUid> SpawnMultipleFromMaterial(int amount, string material, En
/// Spawn an amount of a material in stack entities.
/// Note the 'amount' is material dependent.
/// 1 biomass = 1 biomass in its stack,
/// but 100 plasma = 1 sheet of plasma, etc.
/// but 100 phoron = 1 sheet of phoron, etc.
/// </summary>
[PublicAPI]
public List<EntityUid> SpawnMultipleFromMaterial(int amount, MaterialPrototype materialProto, EntityCoordinates coordinates)
Expand All @@ -159,7 +159,7 @@ public List<EntityUid> SpawnMultipleFromMaterial(int amount, MaterialPrototype m
/// Spawn an amount of a material in stack entities.
/// Note the 'amount' is material dependent.
/// 1 biomass = 1 biomass in its stack,
/// but 100 plasma = 1 sheet of plasma, etc.
/// but 100 phoron = 1 sheet of phoron, etc.
/// </summary>
public List<EntityUid> SpawnMultipleFromMaterial(int amount, MaterialPrototype materialProto, EntityCoordinates coordinates, out int overflowMaterial)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private void OnVapeInteraction(Entity<VapeComponent> entity, ref AfterInteractEv
// All vapes explode if they contain anything other than pure water???
// WTF is this? Why is this? Am I going insane?
// Who the fuck vapes pure water?
// If this isn't how this is meant to work and this is meant to be for vapes with plasma or something,
// If this isn't how this is meant to work and this is meant to be for vapes with phoron or something,
// just re-use the existing RiggableSystem.
foreach (var name in solution.Contents)
{
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Power/Components/RiggableComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ public sealed partial class RiggableComponent : Component

[ViewVariables(VVAccess.ReadWrite)]
[DataField("reagent")]
public ReagentQuantity RequiredQuantity = new("Plasma", FixedPoint2.New(5), null);
public ReagentQuantity RequiredQuantity = new("Phoron", FixedPoint2.New(5), null);
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public sealed partial class SolidFuelGeneratorAdapterComponent : Component
/// </summary>
[DataField("fuelMaterial", customTypeSerializer: typeof(PrototypeIdSerializer<MaterialPrototype>))]
[ViewVariables(VVAccess.ReadWrite)]
public string FuelMaterial = "Plasma";
public string FuelMaterial = "Phoron";

/// <summary>
/// How much material (can be fractional) is left in the generator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public sealed partial class GasLeakRuleComponent : Component
public readonly Gas[] LeakableGases =
{
Gas.Ammonia,
Gas.Plasma,
Gas.Phoron,
Gas.Tritium,
Gas.Frezon,
Gas.WaterVapor, // the fog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public float HeatCapacity
/// Temperature won't do more than this amount of damage per second.
/// </summary>
/// <remarks>
/// Okay it genuinely reaches this basically immediately for a plasma fire.
/// Okay it genuinely reaches this basically immediately for a phoron fire.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public FixedPoint2 DamageCap = FixedPoint2.New(8);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public sealed partial class GasArtifactComponent : Component
public List<Gas> PossibleGases = new()
{
Gas.Oxygen,
Gas.Plasma,
Gas.Phoron,
Gas.Nitrogen,
Gas.CarbonDioxide,
Gas.Tritium,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public sealed partial class ArtifactGasTriggerComponent : Component
public List<Gas> PossibleGases = new()
{
Gas.Oxygen,
Gas.Plasma,
Gas.Phoron,
Gas.Nitrogen,
Gas.CarbonDioxide,
Gas.Ammonia,
Expand Down
Loading
Loading