// SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com> // SPDX-FileCopyrightText: 2025 Piras314 // SPDX-FileCopyrightText: 2025 gluesniffler <159397573+gluesniffler@users.noreply.github.com> // // SPDX-License-Identifier: AGPL-3.0-or-later using Content.Shared._Shitmed.StatusEffects; using Content.Server.Atmos.EntitySystems; using Content.Server.Chat.Systems; using Robust.Shared.Random; namespace Content.Server._Shitmed.StatusEffects; public sealed class ExpelGasEffectSystem : EntitySystem { [Dependency] private readonly AtmosphereSystem _atmos = default!; [Dependency] private readonly ChatSystem _chat = default!; [Dependency] private readonly IRobustRandom _random = default!; public override void Initialize() { SubscribeLocalEvent(OnInit); } private void OnInit(EntityUid uid, ExpelGasComponent component, ComponentInit args) { var mix = _atmos.GetContainingMixture((uid, Transform(uid)), true, true) ?? new(); var gas = _random.Pick(component.PossibleGases); mix.AdjustMoles(gas, 60); _chat.TryEmoteWithChat(uid, "Fart"); } }