mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +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>
45 lines
1.5 KiB
C#
45 lines
1.5 KiB
C#
using Content.Shared.Item.ItemToggle;
|
|
using Content.Shared.Item.ItemToggle.Components;
|
|
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared.Trigger.Components.Effects;
|
|
|
|
/// <summary>
|
|
/// Will toggle an item when triggered. Requires <see cref="ItemToggleComponent"/>.
|
|
/// If TargetUser is true and they have that component they will be toggled instead.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
public sealed partial class ItemToggleOnTriggerComponent : BaseXOnTriggerComponent
|
|
{
|
|
/// <summary>
|
|
/// Can the item be toggled on using the trigger?
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public bool CanActivate = true;
|
|
|
|
/// <summary>
|
|
/// Can the item be toggled off using the trigger?
|
|
/// If both this and CanActivate are true then the trigger will toggle between states.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public bool CanDeactivate = true;
|
|
|
|
/// <summary>
|
|
/// Does this trigger require the user to have <see cref="ComplexInteractionComponent"/>?
|
|
/// If false, bypasses complex interaction checks in <see cref="ItemToggleSystem"/>.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public bool ConsciousAction = true;
|
|
|
|
/// <summary>
|
|
/// Can the audio and popups be predicted?
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public bool Predicted = true;
|
|
|
|
/// <summary>
|
|
/// Show a popup to the user when toggling the item?
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public bool ShowPopup = true;
|
|
}
|