mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* 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>
39 lines
1.2 KiB
C#
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);
|
|
}
|