diff --git a/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.cs b/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.cs index 409077594eb..92862cc5dfa 100644 --- a/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.cs +++ b/Content.Goobstation.Server/Supermatter/Systems/SupermatterSystem.cs @@ -185,6 +185,17 @@ public void Cycle(EntityUid uid, SupermatterComponent sm) HandleAnnouncements(uid, sm); } + if (sm.HazardGas == true) //Omu - increment the time since hazard gas + { + sm.TimesinceHazardGas += 0.1f; + if (sm.TimesinceHazardGas >= 1f) //Should last roughly like... 10 seconds without constant zaps + { + sm.HazardGas = false; + sm.TimesinceHazardGas = 0f; + _achat.SendAdminAlert($"Hazardardous gas production turned off at time {_gameTiming.CurTime.TotalMinutes}"); + } + } + if (sm.SMAngerValue < 0f) //Omu - Sm events start { sm.SMAngerValue = 0f; //no negative numbers plz @@ -364,7 +375,11 @@ private void ProcessAtmos(EntityUid uid, SupermatterComponent sm) // Assmos - /tg/ gases end // Release the waste - absorbedGas.AdjustMoles(Gas.Plasma, Math.Max(energy * heatModifier * sm.PlasmaReleaseModifier, 0f)); + if (!sm.HazardGas) //Omu hazardous gas emission + absorbedGas.AdjustMoles(Gas.Plasma, Math.Max(energy * heatModifier * sm.PlasmaReleaseModifier, 0f)); + else + absorbedGas.AdjustMoles(Gas.Tritium, Math.Max(energy * heatModifier * sm.PlasmaReleaseModifier * 2f, 0f)); //Omu emit out trit for fun + absorbedGas.AdjustMoles(Gas.Oxygen, Math.Max((energy + absorbedGas.Temperature * heatModifier - Atmospherics.T0C) * sm.OxygenReleaseEfficiencyModifier, 0f)); _atmosphere.Merge(mix, absorbedGas); @@ -727,6 +742,28 @@ private void OnCollideEvent(EntityUid uid, SupermatterComponent sm, ref StartCol QueueDel(target); return; } + if (_tag.HasTag(target, "EmitterBoltExcitatory")) + { + sm.Damage += 1f; + sm.SMAngerValue += 20f; + _adminLog.Add(LogType.AdminMessage, LogImpact.Extreme, + $"SUPERMATTER hit by angering bolt AT {Transform(uid).Coordinates}"); + QueueDel(target); + return; + } + if (_tag.HasTag(target, "EmitterBoltEmissive")) + { + sm.Damage += 1f; + if (!sm.Varlocked) + sm.RadiationOutputFactor += 0.05f; + sm.HazardGas = true; + sm.TimesinceHazardGas = 0f; + sm.RadiationOutputFactorChanged = true; + _adminLog.Add(LogType.AdminMessage, LogImpact.Extreme, + $"SUPERMATTER hit by emissive bolt AT {Transform(uid).Coordinates}"); + QueueDel(target); + return; + } } //omu end if (TryComp(target, out var food)) diff --git a/Content.Goobstation.Shared/Supermatter/Components/SupermatterComponent.cs b/Content.Goobstation.Shared/Supermatter/Components/SupermatterComponent.cs index 0a9b5c70d56..42bd4a231f9 100644 --- a/Content.Goobstation.Shared/Supermatter/Components/SupermatterComponent.cs +++ b/Content.Goobstation.Shared/Supermatter/Components/SupermatterComponent.cs @@ -498,6 +498,14 @@ public sealed partial class SupermatterComponent : Component [ViewVariables(VVAccess.ReadWrite)] public bool GasEfficiencyFactorChanged = false; + [DataField("HazardGas")] + [ViewVariables(VVAccess.ReadWrite)] + public bool HazardGas = false; + + [DataField("TimeSinceHazardousGasEnabled")] + [ViewVariables(VVAccess.ReadWrite)] + public float TimesinceHazardGas = 0f; + } [Prototype] public sealed partial class SupermatterEventPrototype : IPrototype diff --git a/Resources/Locale/en-US/_Omu/Emitters/Emitters.ftl b/Resources/Locale/en-US/_Omu/Emitters/Emitters.ftl index 3075dc02aef..250eea284da 100644 --- a/Resources/Locale/en-US/_Omu/Emitters/Emitters.ftl +++ b/Resources/Locale/en-US/_Omu/Emitters/Emitters.ftl @@ -1,3 +1,6 @@ Emitter-Electro-Disrutpive = [color=cyan]Electro-Disruptive[/color]: [color=green]increases integrity[/color] in exchange for [color=red]reducing internal energy[/color]. Emitter-Electro-Behavioural = [color=cyan]Electro-Behavioural[/color]: [color=green]increases internal energy[/color] in exchange for [color=red]reducing integrity drasticly![/color]. +Emitter-Excitatory = [color=cyan]Excitatory[/color]: [color=green]increases supermatter activity[/color] in exchange for [color=red]reducing integrity and causing explosions[/color]. +Emitter-Emissive = [color=cyan]Emissive[/color]: [color=green]increases radiation emission[/color] in exchange for [color=red]causing hazardous gas emission[/color]. + research-technology-advanced-emitters = Diode-Disc Emitter Technology diff --git a/Resources/Prototypes/_Omu/Entities/Objects/Tools/diodediscs.yml b/Resources/Prototypes/_Omu/Entities/Objects/Tools/diodediscs.yml index d0041eb97ae..a9568499ad0 100644 --- a/Resources/Prototypes/_Omu/Entities/Objects/Tools/diodediscs.yml +++ b/Resources/Prototypes/_Omu/Entities/Objects/Tools/diodediscs.yml @@ -32,6 +32,31 @@ - type: UpgradedMachine upgrade: Emitter-Electro-Behavioural +- type: entity + parent: BaseDiodeDisc + id: DiodeDiscExcitatory + name: Excitatory Diode disc + description: A diode disc for use within an emitter, this one will trigger a supermatter to become more active. + components: + - type: DiodeDisc + newBolt: EmitterBoltExcitatory + componentsToAdd: + - type: UpgradedMachine + upgrade: Emitter-Excitatory + +- type: entity + parent: BaseDiodeDisc + id: DiodeDiscEmissive + name: Emissive Diode disc + description: A diode disc for use within an emitter, this one will trigger a supermatter to emit more radiation + components: + - type: DiodeDisc + newBolt: EmitterBoltEmissive + componentsToAdd: + - type: UpgradedMachine + upgrade: Emitter-Emissive + + - type: entity name: emitter bolt id: EmitterBoltElectroDisruptive @@ -64,9 +89,54 @@ Heat: -5 Blunt: -2 +- type: entity + name: emitter bolt + id: EmitterBoltExcitatory + parent: EmitterBolt + categories: [ HideSpawnMenu ] + components: + - type: Tag + tags: + - EmitterBoltExcitatory + - EmitterBolt + - type: Projectile + damage: + types: + Heat: 10 + - type: TriggerOnCollide + fixtureID: projectile + maxTriggers: 1 + - type: ExplodeOnTrigger + - type: Explosive + explosionType: Default + totalIntensity: 10.0 + intensitySlope: 5 + maxIntensity: 4 + +- type: entity + name: emitter bolt + id: EmitterBoltEmissive + parent: EmitterBolt + categories: [ HideSpawnMenu ] + components: + - type: Tag + tags: + - EmitterBoltEmissive + - EmitterBolt + - type: Projectile + damage: + types: + Radiation: 10 + - type: Tag id: EmitterBoltElectroDisruptive - type: Tag id: EmitterBoltElectroBehavioural + +- type: Tag + id: EmitterBoltExcitatory + +- type: Tag + id: EmitterBoltEmissive diff --git a/Resources/Prototypes/_DV/Recipes/Lathes/diodediscs.yml b/Resources/Prototypes/_Omu/Recipes/Lathes/diodediscs.yml similarity index 53% rename from Resources/Prototypes/_DV/Recipes/Lathes/diodediscs.yml rename to Resources/Prototypes/_Omu/Recipes/Lathes/diodediscs.yml index 0eb451be24e..e95619d15e0 100644 --- a/Resources/Prototypes/_DV/Recipes/Lathes/diodediscs.yml +++ b/Resources/Prototypes/_Omu/Recipes/Lathes/diodediscs.yml @@ -7,3 +7,13 @@ parent: BaseUpgradeKit id: DiodeDiscElectroBehavioural result: DiodeDiscElectroBehavioural + +- type: latheRecipe + parent: BaseUpgradeKit + id: DiodeDiscExcitatory + result: DiodeDiscExcitatory + +- type: latheRecipe + parent: BaseUpgradeKit + id: DiodeDiscEmissive + result: DiodeDiscEmissive