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 @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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<SupermatterFoodComponent>(target, out var food))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions Resources/Locale/en-US/_Omu/Emitters/Emitters.ftl
Original file line number Diff line number Diff line change
@@ -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
70 changes: 70 additions & 0 deletions Resources/Prototypes/_Omu/Entities/Objects/Tools/diodediscs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,13 @@
parent: BaseUpgradeKit
id: DiodeDiscElectroBehavioural
result: DiodeDiscElectroBehavioural

Comment thread
harryhulse12-alt marked this conversation as resolved.
- type: latheRecipe
parent: BaseUpgradeKit
id: DiodeDiscExcitatory
result: DiodeDiscExcitatory

- type: latheRecipe
parent: BaseUpgradeKit
id: DiodeDiscEmissive
result: DiodeDiscEmissive
Loading