# Conflicts: # Content.Client/Entry/EntryPoint.cs # Content.Client/Stylesheets/StyleNano.cs # Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs # Content.Server/Nutrition/EntitySystems/FoodSystem.cs # Content.Shared/Follower/FollowerSystem.cs # Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs # Content.Shared/Inventory/InventorySystem.Relay.cs # Content.Shared/PAI/SharedPAISystem.cs # Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs # Resources/Locale/en-US/_strings/access/components/genpop.ftl # Resources/Locale/en-US/_strings/doors/components/turnstile.ftl # Resources/Locale/en-US/_strings/power/battery.ftl # Resources/Locale/en-US/_strings/store/pai-catalog.ftl # Resources/Locale/en-US/_strings/tools/simple-tool-usage.ftl # Resources/Locale/en-US/_strings/ui/controls.ftl # Resources/Locale/en-US/_strings/weapons/ranged/upgrades.ftl # Resources/Prototypes/Access/misc.yml # Resources/Prototypes/Catalog/Cargo/cargo_vending.yml # Resources/Prototypes/Entities/Clothing/OuterClothing/coats.yml # Resources/Prototypes/Entities/Clothing/OuterClothing/hardsuits.yml # Resources/Prototypes/Entities/Markers/Spawners/Random/crates.yml # Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml # Resources/Prototypes/Entities/Mobs/Player/dragon.yml # Resources/Prototypes/Entities/Mobs/Player/humanoid.yml # Resources/Prototypes/Entities/Objects/Fun/toys.yml # Resources/Prototypes/Entities/Objects/Misc/paper.yml # Resources/Prototypes/Entities/Objects/Specific/Robotics/borg_modules.yml # Resources/Prototypes/Entities/Objects/Tools/access_configurator.yml # Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Magazines/shotgun.yml # Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml # Resources/Prototypes/Entities/Stations/base.yml # Resources/Prototypes/Entities/Structures/Walls/asteroid.yml # Resources/Prototypes/Loadouts/role_loadouts.yml # Resources/Prototypes/Recipes/Lathes/Packs/science.yml # Resources/Prototypes/Research/industrial.yml # Resources/Prototypes/Species/vox.yml # Resources/Prototypes/Store/currency.yml # Resources/Prototypes/Voice/speech_emotes.yml # Resources/Prototypes/ai_factions.yml # Resources/Prototypes/borg_types.yml # Resources/Textures/Clothing/Head/Hats/captain.rsi/meta.json # Resources/Textures/Clothing/Uniforms/Jumpskirt/capformaldress.rsi/meta.json # Resources/Textures/Clothing/Uniforms/Jumpskirt/captain.rsi/meta.json # Resources/Textures/Clothing/Uniforms/Jumpskirt/paramedic.rsi/equipped-INNERCLOTHING.png # Resources/Textures/Clothing/Uniforms/Jumpskirt/paramedic.rsi/icon.png # Resources/Textures/Clothing/Uniforms/Jumpsuit/capformal.rsi/equipped-INNERCLOTHING-monkey.png # Resources/Textures/Clothing/Uniforms/Jumpsuit/capformal.rsi/meta.json # Resources/Textures/Clothing/Uniforms/Jumpsuit/captain.rsi/equipped-INNERCLOTHING-monkey.png # Resources/Textures/Clothing/Uniforms/Jumpsuit/captain.rsi/meta.json # Resources/Textures/Clothing/Uniforms/Jumpsuit/paramedic.rsi/equipped-INNERCLOTHING-monkey.png # Resources/Textures/Clothing/Uniforms/Jumpsuit/paramedic.rsi/equipped-INNERCLOTHING.png # Resources/Textures/Clothing/Uniforms/Jumpsuit/paramedic.rsi/icon.png # Resources/Textures/Clothing/Uniforms/Jumpsuit/paramedic.rsi/meta.json # Resources/Textures/Objects/Weapons/Melee/captain_sabre.rsi/meta.json # Resources/Textures/Objects/Weapons/Melee/energykatana.rsi/meta.json # Resources/Textures/Objects/Weapons/Melee/katana.rsi/meta.json # Resources/Textures/Objects/Weapons/Melee/machete.rsi/meta.json # Resources/Textures/Structures/Doors/Airlocks/Glass/firelock.rsi/closed.png # Resources/Textures/Structures/Doors/Airlocks/Glass/firelock.rsi/closing.png # Resources/Textures/Structures/Doors/Airlocks/Glass/firelock.rsi/deny.png # Resources/Textures/Structures/Doors/Airlocks/Glass/firelock.rsi/locked.png # Resources/Textures/Structures/Doors/Airlocks/Glass/firelock.rsi/opening.png # Resources/Textures/Structures/Doors/Airlocks/Standard/atmospherics.rsi/assembly.png # Resources/Textures/Structures/Doors/Airlocks/Standard/atmospherics.rsi/closed.png # Resources/Textures/Structures/Doors/Airlocks/Standard/atmospherics.rsi/closing.png # Resources/Textures/Structures/Doors/Airlocks/Standard/atmospherics.rsi/meta.json # Resources/Textures/Structures/Doors/Airlocks/Standard/atmospherics.rsi/open.png # Resources/Textures/Structures/Doors/Airlocks/Standard/atmospherics.rsi/opening.png # Resources/Textures/Structures/Doors/Airlocks/Standard/firelock.rsi/closed.png # Resources/Textures/Structures/Doors/Airlocks/Standard/firelock.rsi/closing.png # Resources/Textures/Structures/Doors/Airlocks/Standard/firelock.rsi/opening.png # Resources/Textures/Structures/Wallmounts/posters.rsi/poster4_contraband.png # Resources/migration.yml
116 lines
3.5 KiB
C#
116 lines
3.5 KiB
C#
using Content.Shared.Actions;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.Ghost;
|
|
|
|
/// <summary>
|
|
/// Represents an observer ghost.
|
|
/// Handles limiting interactions, using ghost abilities, ghost visibility, and ghost warping.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, Access(typeof(SharedGhostSystem))]
|
|
[AutoGenerateComponentState(true), AutoGenerateComponentPause]
|
|
public sealed partial class GhostComponent : Component
|
|
{
|
|
// Actions
|
|
[DataField]
|
|
public EntProtoId ToggleLightingAction = "ActionToggleLighting";
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public EntityUid? ToggleLightingActionEntity;
|
|
|
|
[DataField]
|
|
public EntProtoId ToggleFoVAction = "ActionToggleFov";
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public EntityUid? ToggleFoVActionEntity;
|
|
|
|
[DataField]
|
|
public EntProtoId ToggleGhostsAction = "ActionToggleGhosts";
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public EntityUid? ToggleGhostsActionEntity;
|
|
|
|
[DataField]
|
|
public EntProtoId ToggleGhostHearingAction = "ActionToggleGhostHearing";
|
|
|
|
[DataField]
|
|
public EntityUid? ToggleGhostHearingActionEntity;
|
|
|
|
[DataField]
|
|
public EntProtoId BooAction = "ActionGhostBoo";
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public EntityUid? BooActionEntity;
|
|
|
|
// Sunrise-Start
|
|
[DataField]
|
|
public EntProtoId GhostsThemeAction = "GhostChangeTheme";
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public EntityUid? GhostsThemeActionEntity;
|
|
// Sunrise-End
|
|
|
|
// End actions
|
|
|
|
/// <summary>
|
|
/// Time at which the player died and created this ghost.
|
|
/// Used to determine votekick eligibility.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// May not reflect actual time of death if this entity has been paused,
|
|
/// but will give an accurate length of time <i>since</i> death.
|
|
/// </remarks>
|
|
[DataField, AutoPausedField]
|
|
public TimeSpan TimeOfDeath = TimeSpan.Zero;
|
|
|
|
/// <summary>
|
|
/// Range of the Boo action.
|
|
/// </summary>
|
|
[DataField]
|
|
public float BooRadius = 3;
|
|
|
|
/// <summary>
|
|
/// Maximum number of entities that can affected by the Boo action.
|
|
/// </summary>
|
|
[DataField]
|
|
public int BooMaxTargets = 3;
|
|
|
|
/// <summary>
|
|
/// Is this ghost allowed to interact with entities?
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Used to allow admins ghosts to interact with the world.
|
|
/// Changed by <see cref="SharedGhostSystem.SetCanGhostInteract"/>.
|
|
/// </remarks>
|
|
[DataField("canInteract"), AutoNetworkedField]
|
|
public bool CanGhostInteract;
|
|
|
|
/// <summary>
|
|
/// Is this ghost player allowed to return to their original body?
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Changed by <see cref="SharedGhostSystem.SetCanReturnToBody"/>.
|
|
/// </remarks>
|
|
[DataField, AutoNetworkedField]
|
|
public bool CanReturnToBody;
|
|
|
|
/// <summary>
|
|
/// Ghost color
|
|
/// </summary>
|
|
/// <remarks>Used to allow admins to change ghost colors. Should be removed if the capability to edit existing sprite colors is ever added back.</remarks>
|
|
[DataField, AutoNetworkedField]
|
|
public Color Color = Color.White;
|
|
}
|
|
|
|
public sealed partial class ToggleFoVActionEvent : InstantActionEvent { }
|
|
|
|
public sealed partial class ToggleGhostsActionEvent : InstantActionEvent { }
|
|
|
|
public sealed partial class ToggleLightingActionEvent : InstantActionEvent { }
|
|
|
|
public sealed partial class ToggleGhostHearingActionEvent : InstantActionEvent { }
|
|
|
|
public sealed partial class ToggleGhostVisibilityToAllEvent : InstantActionEvent { }
|
|
|
|
public sealed partial class BooActionEvent : InstantActionEvent { }
|