Files
Delta-v/Content.Shared/EntityEffects/Effects/Atmos/CreateGasEntityEffect.cs
T
slarticodefastandArtisticRoomba 79e519696b cleanup GasPrototype and some other atmos code (#43318)
* cleanup

* fix some localizations

* fix typo

* review and test fix

* rename

* minus one

---------

Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
2026-06-29 12:44:16 +02:00

36 lines
984 B
C#

using Content.Shared.Atmos;
using Content.Shared.Atmos.EntitySystems;
using Robust.Shared.Prototypes;
namespace Content.Shared.EntityEffects.Effects.Atmos;
/// <summary>
/// See serverside system.
/// </summary>
/// <inheritdoc cref="EntityEffect"/>
public sealed partial class CreateGas : EntityEffectBase<CreateGas>
{
/// <summary>
/// The gas we're creating
/// </summary>
[DataField]
public Gas Gas;
/// <summary>
/// Amount of moles we're creating
/// </summary>
[DataField]
public float Moles = 3f;
public override string EntityEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
{
var atmos = entSys.GetEntitySystem<SharedAtmosphereSystem>();
var gasProto = atmos.GetGas(Gas);
return Loc.GetString("entity-effect-guidebook-create-gas",
("chance", Probability),
("moles", Moles),
("gas", Loc.GetString(gasProto.Name)));
}
}