Port miasma from nyano (#8926)
Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
92
Content.Server/Atmos/Miasma/MiasmaSystem.cs
Normal file
92
Content.Server/Atmos/Miasma/MiasmaSystem.cs
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
using Content.Shared.MobState;
|
||||||
|
using Content.Shared.Damage;
|
||||||
|
using Content.Shared.Atmos;
|
||||||
|
using Content.Server.Atmos.EntitySystems;
|
||||||
|
using Content.Server.Temperature.Components;
|
||||||
|
using Content.Server.Body.Components;
|
||||||
|
using Robust.Shared.Containers;
|
||||||
|
|
||||||
|
namespace Content.Server.Atmos.Miasma
|
||||||
|
{
|
||||||
|
public sealed class MiasmaSystem : EntitySystem
|
||||||
|
{
|
||||||
|
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
|
||||||
|
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
|
||||||
|
|
||||||
|
public override void Update(float frameTime)
|
||||||
|
{
|
||||||
|
base.Update(frameTime);
|
||||||
|
foreach (var (rotting, perishable) in EntityQuery<RottingComponent, PerishableComponent>())
|
||||||
|
{
|
||||||
|
if (!perishable.Progressing)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (TryComp<TemperatureComponent>(perishable.Owner, out var temp) && temp.CurrentTemperature < 274f)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
perishable.DeathAccumulator += frameTime;
|
||||||
|
if (perishable.DeathAccumulator < perishable.RotAfter.TotalSeconds)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
perishable.RotAccumulator += frameTime;
|
||||||
|
if (perishable.RotAccumulator < 1f)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
perishable.RotAccumulator -= 1f;
|
||||||
|
|
||||||
|
DamageSpecifier damage = new();
|
||||||
|
damage.DamageDict.Add("Blunt", 0.25); // Slowly accumulate enough to gib after like half an hour
|
||||||
|
damage.DamageDict.Add("Cellular", 0.25); // Cloning rework might use this eventually
|
||||||
|
|
||||||
|
_damageableSystem.TryChangeDamage(perishable.Owner, damage, true, true);
|
||||||
|
|
||||||
|
if (!TryComp<PhysicsComponent>(perishable.Owner, out var physics))
|
||||||
|
continue;
|
||||||
|
// We need a way to get the mass of the mob alone without armor etc in the future
|
||||||
|
|
||||||
|
var tileMix = _atmosphereSystem.GetTileMixture(Transform(perishable.Owner).Coordinates);
|
||||||
|
if (tileMix != null)
|
||||||
|
tileMix.AdjustMoles(Gas.Miasma, perishable.MolsPerSecondPerUnitMass * physics.FixturesMass);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
base.Initialize();
|
||||||
|
SubscribeLocalEvent<PerishableComponent, MobStateChangedEvent>(OnMobStateChanged);
|
||||||
|
SubscribeLocalEvent<PerishableComponent, BeingGibbedEvent>(OnGibbed);
|
||||||
|
SubscribeLocalEvent<AntiRottingContainerComponent, EntInsertedIntoContainerMessage>(OnEntInserted);
|
||||||
|
SubscribeLocalEvent<AntiRottingContainerComponent, EntRemovedFromContainerMessage>(OnEntRemoved);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnMobStateChanged(EntityUid uid, PerishableComponent component, MobStateChangedEvent args)
|
||||||
|
{
|
||||||
|
if (args.Component.IsDead())
|
||||||
|
EnsureComp<RottingComponent>(uid);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnGibbed(EntityUid uid, PerishableComponent component, BeingGibbedEvent args)
|
||||||
|
{
|
||||||
|
if (!TryComp<PhysicsComponent>(uid, out var physics))
|
||||||
|
return;
|
||||||
|
|
||||||
|
var molsToDump = (component.MolsPerSecondPerUnitMass * physics.FixturesMass) * component.DeathAccumulator;
|
||||||
|
var tileMix = _atmosphereSystem.GetTileMixture(Transform(uid).Coordinates);
|
||||||
|
if (tileMix != null)
|
||||||
|
tileMix.AdjustMoles(Gas.Miasma, molsToDump);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnEntInserted(EntityUid uid, AntiRottingContainerComponent component, EntInsertedIntoContainerMessage args)
|
||||||
|
{
|
||||||
|
if (TryComp<PerishableComponent>(args.Entity, out var perishable))
|
||||||
|
perishable.Progressing = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnEntRemoved(EntityUid uid, AntiRottingContainerComponent component, EntRemovedFromContainerMessage args)
|
||||||
|
{
|
||||||
|
if (TryComp<PerishableComponent>(args.Entity, out var perishable))
|
||||||
|
perishable.Progressing = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
9
Content.Server/Atmos/Miasma/NoRotContainerComponent.cs
Normal file
9
Content.Server/Atmos/Miasma/NoRotContainerComponent.cs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
namespace Content.Server.Atmos.Miasma
|
||||||
|
{
|
||||||
|
[RegisterComponent]
|
||||||
|
/// <summary>
|
||||||
|
/// Entities inside this container will not rot.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class AntiRottingContainerComponent : Component
|
||||||
|
{}
|
||||||
|
}
|
||||||
42
Content.Server/Atmos/Miasma/PerishableComponent.cs
Normal file
42
Content.Server/Atmos/Miasma/PerishableComponent.cs
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
namespace Content.Server.Atmos.Miasma
|
||||||
|
{
|
||||||
|
[RegisterComponent]
|
||||||
|
/// <summary>
|
||||||
|
/// This makes mobs eventually start rotting when they die.
|
||||||
|
/// It may be expanded to food at some point, but it's just for mobs right now.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class PerishableComponent : Component
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Is this progressing?
|
||||||
|
/// </summary>
|
||||||
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
public bool Progressing = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// How long this creature has been dead.
|
||||||
|
/// </summary>
|
||||||
|
[DataField("deathAccumulator")]
|
||||||
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
public float DeathAccumulator = 0f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// When DeathAccumulator is greater than this, start rotting.
|
||||||
|
/// </summary>
|
||||||
|
public TimeSpan RotAfter = TimeSpan.FromMinutes(3);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gasses are released every second.
|
||||||
|
/// </summary>
|
||||||
|
[DataField("rotAccumulator")]
|
||||||
|
public float RotAccumulator = 0f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// How many moles of gas released per second, adjusted for mass.
|
||||||
|
/// Humans have a mass of 70. I am aiming for ten mols a minute, so
|
||||||
|
/// 1/6 of a minute, divided by 70 as a baseline.
|
||||||
|
/// </summary>
|
||||||
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
public float MolsPerSecondPerUnitMass = 0.0025f;
|
||||||
|
}
|
||||||
|
}
|
||||||
9
Content.Server/Atmos/Miasma/RottingComponent.cs
Normal file
9
Content.Server/Atmos/Miasma/RottingComponent.cs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
namespace Content.Server.Atmos.Miasma
|
||||||
|
{
|
||||||
|
[RegisterComponent]
|
||||||
|
/// <summary>
|
||||||
|
/// Tracking component for stuff that has started to rot.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class RottingComponent : Component
|
||||||
|
{}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
using Content.Shared.Chemistry.Reagent;
|
||||||
|
using Content.Server.Disease;
|
||||||
|
using Content.Shared.Disease.Components;
|
||||||
|
using Robust.Shared.Random;
|
||||||
|
using JetBrains.Annotations;
|
||||||
|
|
||||||
|
namespace Content.Server.Chemistry.ReagentEffects
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Default metabolism for medicine reagents.
|
||||||
|
/// </summary>
|
||||||
|
[UsedImplicitly]
|
||||||
|
public sealed class ChemCauseRandomDisease : ReagentEffect
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A disease to choose from.
|
||||||
|
/// </summary>
|
||||||
|
[DataField("diseases", required: true)]
|
||||||
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
public List<string> Diseases = default!;
|
||||||
|
|
||||||
|
public override void Effect(ReagentEffectArgs args)
|
||||||
|
{
|
||||||
|
if (args.EntityManager.TryGetComponent<DiseasedComponent>(args.SolutionEntity, out var diseased))
|
||||||
|
return;
|
||||||
|
|
||||||
|
var random = IoCManager.Resolve<IRobustRandom>();
|
||||||
|
|
||||||
|
EntitySystem.Get<DiseaseSystem>().TryAddDisease(args.SolutionEntity, random.Pick(Diseases));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -20,6 +20,7 @@ namespace Content.Server.StationEvents.Events
|
|||||||
protected override string EndAnnouncement => Loc.GetString("station-event-gas-leak-end-announcement");
|
protected override string EndAnnouncement => Loc.GetString("station-event-gas-leak-end-announcement");
|
||||||
|
|
||||||
private static readonly Gas[] LeakableGases = {
|
private static readonly Gas[] LeakableGases = {
|
||||||
|
Gas.Miasma,
|
||||||
Gas.Plasma,
|
Gas.Plasma,
|
||||||
Gas.Tritium,
|
Gas.Tritium,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,136 +0,0 @@
|
|||||||
using Content.Server.Radiation;
|
|
||||||
using Content.Server.Station.Components;
|
|
||||||
using Content.Server.Station.Systems;
|
|
||||||
using Content.Shared.Coordinates;
|
|
||||||
using Content.Shared.Sound;
|
|
||||||
using JetBrains.Annotations;
|
|
||||||
using Robust.Shared.Map;
|
|
||||||
using Robust.Shared.Random;
|
|
||||||
|
|
||||||
namespace Content.Server.StationEvents.Events
|
|
||||||
{
|
|
||||||
[UsedImplicitly]
|
|
||||||
public sealed class RadiationStorm : StationEvent
|
|
||||||
{
|
|
||||||
// Based on Goonstation style radiation storm with some TG elements (announcer, etc.)
|
|
||||||
|
|
||||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
|
||||||
[Dependency] private readonly IRobustRandom _robustRandom = default!;
|
|
||||||
|
|
||||||
private StationSystem _stationSystem = default!;
|
|
||||||
|
|
||||||
public override string Name => "RadiationStorm";
|
|
||||||
public override string StartAnnouncement => Loc.GetString("station-event-radiation-storm-start-announcement");
|
|
||||||
protected override string EndAnnouncement => Loc.GetString("station-event-radiation-storm-end-announcement");
|
|
||||||
public override SoundSpecifier? StartAudio => new SoundPathSpecifier("/Audio/Announcements/radiation.ogg");
|
|
||||||
protected override float StartAfter => 10.0f;
|
|
||||||
|
|
||||||
// Event specific details
|
|
||||||
private float _timeUntilPulse;
|
|
||||||
private const float MinPulseDelay = 0.2f;
|
|
||||||
private const float MaxPulseDelay = 0.8f;
|
|
||||||
private EntityUid _target = EntityUid.Invalid;
|
|
||||||
|
|
||||||
private void ResetTimeUntilPulse()
|
|
||||||
{
|
|
||||||
_timeUntilPulse = _robustRandom.NextFloat() * (MaxPulseDelay - MinPulseDelay) + MinPulseDelay;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Announce()
|
|
||||||
{
|
|
||||||
base.Announce();
|
|
||||||
EndAfter = _robustRandom.Next(30, 80) + StartAfter; // We want to be forgiving about the radstorm.
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Startup()
|
|
||||||
{
|
|
||||||
_entityManager.EntitySysManager.Resolve(ref _stationSystem);
|
|
||||||
ResetTimeUntilPulse();
|
|
||||||
|
|
||||||
if (_stationSystem.Stations.Count == 0)
|
|
||||||
{
|
|
||||||
Running = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_target = _robustRandom.Pick(_stationSystem.Stations);
|
|
||||||
base.Startup();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Update(float frameTime)
|
|
||||||
{
|
|
||||||
base.Update(frameTime);
|
|
||||||
|
|
||||||
if (!Started || !Running) return;
|
|
||||||
if (_target.Valid == false)
|
|
||||||
{
|
|
||||||
Running = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_timeUntilPulse -= frameTime;
|
|
||||||
|
|
||||||
if (_timeUntilPulse <= 0.0f)
|
|
||||||
{
|
|
||||||
var mapManager = IoCManager.Resolve<IMapManager>();
|
|
||||||
// Account for split stations by just randomly picking a piece of it.
|
|
||||||
var possibleTargets = _entityManager.GetComponent<StationDataComponent>(_target).Grids;
|
|
||||||
if (possibleTargets.Count == 0)
|
|
||||||
{
|
|
||||||
Running = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var stationEnt = _robustRandom.Pick(possibleTargets);
|
|
||||||
|
|
||||||
if (!_entityManager.TryGetComponent<IMapGridComponent>(stationEnt, out var grid))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (mapManager.IsGridPaused(grid.Owner))
|
|
||||||
return;
|
|
||||||
|
|
||||||
SpawnPulse(grid.Grid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SpawnPulse(IMapGrid mapGrid)
|
|
||||||
{
|
|
||||||
if (!TryFindRandomGrid(mapGrid, out var coordinates))
|
|
||||||
return;
|
|
||||||
|
|
||||||
var pulse = _entityManager.SpawnEntity("RadiationPulse", coordinates);
|
|
||||||
_entityManager.GetComponent<RadiationPulseComponent>(pulse).DoPulse();
|
|
||||||
ResetTimeUntilPulse();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SpawnPulseAt(EntityCoordinates at)
|
|
||||||
{
|
|
||||||
var pulse = IoCManager.Resolve<IEntityManager>()
|
|
||||||
.SpawnEntity("RadiationPulse", at);
|
|
||||||
_entityManager.GetComponent<RadiationPulseComponent>(pulse).DoPulse();
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool TryFindRandomGrid(IMapGrid mapGrid, out EntityCoordinates coordinates)
|
|
||||||
{
|
|
||||||
if (!(mapGrid.GridEntityId).IsValid())
|
|
||||||
{
|
|
||||||
coordinates = default;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
var bounds = mapGrid.LocalAABB;
|
|
||||||
var randomX = _robustRandom.Next((int) bounds.Left, (int) bounds.Right);
|
|
||||||
var randomY = _robustRandom.Next((int) bounds.Bottom, (int) bounds.Top);
|
|
||||||
|
|
||||||
coordinates = mapGrid.ToCoordinates(randomX, randomY);
|
|
||||||
|
|
||||||
// TODO: Need to get valid tiles? (maybe just move right if the tile we chose is invalid?)
|
|
||||||
if (!coordinates.IsValid(_entityManager))
|
|
||||||
{
|
|
||||||
coordinates = default;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -26,7 +26,8 @@ public sealed class GasArtifactComponent : Component
|
|||||||
Gas.Plasma,
|
Gas.Plasma,
|
||||||
Gas.Nitrogen,
|
Gas.Nitrogen,
|
||||||
Gas.CarbonDioxide,
|
Gas.CarbonDioxide,
|
||||||
Gas.Tritium
|
Gas.Tritium,
|
||||||
|
Gas.Miasma,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ public sealed class ArtifactGasTriggerComponent : Component
|
|||||||
Gas.Oxygen,
|
Gas.Oxygen,
|
||||||
Gas.Plasma,
|
Gas.Plasma,
|
||||||
Gas.Nitrogen,
|
Gas.Nitrogen,
|
||||||
Gas.CarbonDioxide
|
Gas.CarbonDioxide,
|
||||||
|
Gas.Miasma
|
||||||
};
|
};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ namespace Content.Shared.Atmos
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Total number of gases. Increase this if you want to add more!
|
/// Total number of gases. Increase this if you want to add more!
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const int TotalNumberOfGases = 6;
|
public const int TotalNumberOfGases = 7;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the actual length of the gases arrays in mixtures.
|
/// This is the actual length of the gases arrays in mixtures.
|
||||||
@@ -285,5 +285,6 @@ namespace Content.Shared.Atmos
|
|||||||
Plasma = 3,
|
Plasma = 3,
|
||||||
Tritium = 4,
|
Tritium = 4,
|
||||||
WaterVapor = 5,
|
WaterVapor = 5,
|
||||||
|
Miasma = 6
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ namespace Content.Shared.Atmos.Piping.Unary.Components
|
|||||||
Gas.Plasma,
|
Gas.Plasma,
|
||||||
Gas.Tritium,
|
Gas.Tritium,
|
||||||
Gas.WaterVapor,
|
Gas.WaterVapor,
|
||||||
|
Gas.Miasma
|
||||||
};
|
};
|
||||||
|
|
||||||
// Presets for 'dumb' air alarm modes
|
// Presets for 'dumb' air alarm modes
|
||||||
|
|||||||
@@ -12,3 +12,6 @@ reagent-desc-carbon-dioxide = You have genuinely no idea what this is.
|
|||||||
|
|
||||||
reagent-name-nitrogen = nitrogen
|
reagent-name-nitrogen = nitrogen
|
||||||
reagent-desc-nitrogen = A colorless, odorless unreactive gas. Highly stable.
|
reagent-desc-nitrogen = A colorless, odorless unreactive gas. Highly stable.
|
||||||
|
|
||||||
|
reagent-name-miasma = miasma
|
||||||
|
reagent-desc-miasma = Uh oh, stinky!
|
||||||
|
|||||||
@@ -57,3 +57,14 @@
|
|||||||
gasOverlayState: water_vapor
|
gasOverlayState: water_vapor
|
||||||
color: bffffd
|
color: bffffd
|
||||||
reagent: Water
|
reagent: Water
|
||||||
|
|
||||||
|
- type: gas
|
||||||
|
id: 6
|
||||||
|
name: Miasma
|
||||||
|
specificHeat: 20
|
||||||
|
heatCapacityRatio: 1.4
|
||||||
|
molarMass: 44
|
||||||
|
gasOverlaySprite: /Textures/Effects/atmospherics.rsi
|
||||||
|
gasOverlayState: miasma
|
||||||
|
color: 56941E
|
||||||
|
reagent: Miasma
|
||||||
@@ -152,6 +152,7 @@
|
|||||||
90: 0.2
|
90: 0.2
|
||||||
- type: MobPrice
|
- type: MobPrice
|
||||||
price: 1000 # Living critters are valuable in space.
|
price: 1000 # Living critters are valuable in space.
|
||||||
|
- type: Perishable
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
save: false
|
save: false
|
||||||
|
|||||||
@@ -326,6 +326,7 @@
|
|||||||
- type: MobPrice
|
- type: MobPrice
|
||||||
price: 1500 # Kidnapping a living person and selling them for cred is a good move.
|
price: 1500 # Kidnapping a living person and selling them for cred is a good move.
|
||||||
deathPenalty: 0.01 # However they really ought to be living and intact, otherwise they're worth 100x less.
|
deathPenalty: 0.01 # However they really ought to be living and intact, otherwise they're worth 100x less.
|
||||||
|
- type: Perishable
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
save: false
|
save: false
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
key: bag
|
key: bag
|
||||||
- type: BodyBagVisualizer
|
- type: BodyBagVisualizer
|
||||||
- type: Pullable
|
- type: Pullable
|
||||||
|
- type: AntiRottingContainer
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: BodyBag_Folded
|
id: BodyBag_Folded
|
||||||
|
|||||||
@@ -338,6 +338,43 @@
|
|||||||
- !type:DoActsBehavior
|
- !type:DoActsBehavior
|
||||||
acts: [ "Destruction" ]
|
acts: [ "Destruction" ]
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: GasCanister
|
||||||
|
id: MiasmaCanister
|
||||||
|
name: miasma canister
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: redws
|
||||||
|
- type: GasCanister
|
||||||
|
gasMixture:
|
||||||
|
volume: 1000
|
||||||
|
moles:
|
||||||
|
- 0 # oxygen
|
||||||
|
- 0 # nitrogen
|
||||||
|
- 0 # CO2
|
||||||
|
- 0 # Plasma
|
||||||
|
- 0 # Tritium
|
||||||
|
- 0 # Water vapor
|
||||||
|
- 1871.71051 # Miasma
|
||||||
|
temperature: 293.15
|
||||||
|
- type: Destructible
|
||||||
|
thresholds:
|
||||||
|
- trigger:
|
||||||
|
!type:DamageTrigger
|
||||||
|
damage: 300
|
||||||
|
behaviors:
|
||||||
|
- !type:PlaySoundBehavior
|
||||||
|
sound:
|
||||||
|
path: /Audio/Effects/metalbreak.ogg
|
||||||
|
- !type:SpawnEntitiesBehavior
|
||||||
|
spawn:
|
||||||
|
MiasmaCanisterBroken:
|
||||||
|
min: 1
|
||||||
|
max: 1
|
||||||
|
- !type:DoActsBehavior
|
||||||
|
acts: [ "Destruction" ]
|
||||||
|
|
||||||
|
|
||||||
# Broke Entities
|
# Broke Entities
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -453,3 +490,12 @@
|
|||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
state: water_vapor-1
|
state: water_vapor-1
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: GasCanisterBrokenBase
|
||||||
|
id: MiasmaCanisterBroken
|
||||||
|
name: broken miasma canister
|
||||||
|
noSpawn: true
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: redws-1
|
||||||
|
|||||||
@@ -47,8 +47,8 @@
|
|||||||
state_open: mining_open
|
state_open: mining_open
|
||||||
state_closed: mining_door
|
state_closed: mining_door
|
||||||
- type: AccessReader
|
- type: AccessReader
|
||||||
access: [["Salvage"]]
|
access: [["Salvage"]]
|
||||||
|
|
||||||
# Command
|
# Command
|
||||||
- type: entity
|
- type: entity
|
||||||
id: LockerCaptain
|
id: LockerCaptain
|
||||||
@@ -169,6 +169,7 @@
|
|||||||
access: [ [ "Kitchen" ] ]
|
access: [ [ "Kitchen" ] ]
|
||||||
- type: ExplosionResistance
|
- type: ExplosionResistance
|
||||||
resistance: 0.90
|
resistance: 0.90
|
||||||
|
- type: AntiRottingContainer
|
||||||
|
|
||||||
# Botanist
|
# Botanist
|
||||||
- type: entity
|
- type: entity
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
light_soul: morgue_soul_light
|
light_soul: morgue_soul_light
|
||||||
- type: Transform
|
- type: Transform
|
||||||
anchored: true
|
anchored: true
|
||||||
|
- type: AntiRottingContainer
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: MorgueTray
|
id: MorgueTray
|
||||||
@@ -72,7 +73,7 @@
|
|||||||
- type: Clickable
|
- type: Clickable
|
||||||
- type: InteractionOutline
|
- type: InteractionOutline
|
||||||
- type: MorgueTray
|
- type: MorgueTray
|
||||||
|
- type: AntiRottingContainer
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
id: Crematorium
|
id: Crematorium
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
Plasma: danger # everything below is usually bad
|
Plasma: danger # everything below is usually bad
|
||||||
Tritium: danger
|
Tritium: danger
|
||||||
WaterVapor: danger
|
WaterVapor: danger
|
||||||
|
Miasma: danger
|
||||||
- type: AtmosAlarmable
|
- type: AtmosAlarmable
|
||||||
alarmedBy: ["AirAlarm"]
|
alarmedBy: ["AirAlarm"]
|
||||||
- type: AtmosDevice
|
- type: AtmosDevice
|
||||||
|
|||||||
@@ -144,3 +144,43 @@
|
|||||||
CarbonDioxide: 1.0
|
CarbonDioxide: 1.0
|
||||||
Nitrogen: -1.0
|
Nitrogen: -1.0
|
||||||
|
|
||||||
|
- type: reagent
|
||||||
|
id: Miasma
|
||||||
|
name: reagent-name-miasma
|
||||||
|
desc: reagent-desc-miasma
|
||||||
|
physicalDesc: reagent-physical-desc-gaseous
|
||||||
|
color: "#56941E"
|
||||||
|
boilingPoint: -195.8
|
||||||
|
meltingPoint: -210.0
|
||||||
|
metabolisms:
|
||||||
|
Gas:
|
||||||
|
effects:
|
||||||
|
- !type:ChemCauseRandomDisease
|
||||||
|
conditions:
|
||||||
|
- !type:ReagentThreshold
|
||||||
|
reagent: Miasma
|
||||||
|
min: 1
|
||||||
|
diseases:
|
||||||
|
- VentCough
|
||||||
|
- AMIV
|
||||||
|
- SpaceCold
|
||||||
|
- SpaceFlu
|
||||||
|
- Bird Flew
|
||||||
|
- VanAusdallsRobovirus
|
||||||
|
- BleedersBite
|
||||||
|
- !type:HealthChange
|
||||||
|
conditions:
|
||||||
|
- !type:ReagentThreshold
|
||||||
|
reagent: Miasma
|
||||||
|
min: 1
|
||||||
|
scaleByQuantity: true
|
||||||
|
ignoreResistances: true
|
||||||
|
damage:
|
||||||
|
types:
|
||||||
|
Poison: 0.25
|
||||||
|
- !type:ChemVomit
|
||||||
|
probability: 0.12
|
||||||
|
conditions:
|
||||||
|
- !type:ReagentThreshold
|
||||||
|
reagent: Miasma
|
||||||
|
min: 0.8
|
||||||
|
|||||||
Reference in New Issue
Block a user