CatStation/Content.Shared/Chemistry/Components/RiggableComponent.cs
psykana 880536d1b6
Predict stunbatons and add an integration test for them (#43117)
* predict stunbatons and add a test

* update

* formatting

* move explosion to riggable

* cleanup

* fix mousetrap

* fix test

* IOC readonly

* fix obsolete

* refactor test a bit

* fix riggable, add test

* moar tests

* fix proto

* EnterMultipleScope

* owner cleanup

* early return

* onActivate

* Fix GetVerb detonating rigged baton, add docs

* test updates

* docs

* improve riggable test

* TestOf

* predicted popup

* Update Content.IntegrationTests/Tests/Chemistry/RiggableTest.cs

* review

* review 2

* the end times

* review

* nesting

* nesting 2

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Co-authored-by: Connor Huffine <chuffine@gmail.com>
2026-07-13 18:24:31 +00:00

39 lines
1.2 KiB
C#

using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using Robust.Shared.GameStates;
namespace Content.Shared.Chemistry.Components;
/// <summary>
/// Allows to sabotage an entity by injecting a certain reagent.
/// Makes it explode when activated or used.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas: true)]
public sealed partial class RiggableComponent : Component
{
/// <summary>
/// Is this entity currently rigged?
/// </summary>
[DataField, AutoNetworkedField]
public bool IsRigged;
/// <summary>
/// Did this entity already explode from being rigged?
/// Used to prevent it from exploding multiple times from different events
/// happening in the same tick.
/// </summary>
[DataField, AutoNetworkedField]
public bool Exploded;
/// <summary>
/// The solution that needs to be injected into to rig this entity.
/// </summary>
[DataField, AutoNetworkedField]
public string Solution = "battery";
/// <summary>
/// The reagent and amount needed for rigging.
/// </summary>
[DataField, AutoNetworkedField]
public ReagentQuantity Reagent = new("Plasma", FixedPoint2.New(5), null);
}