# Conflicts: # Content.Client/Administration/AdminNameOverlay.cs # Content.Client/Administration/UI/Bwoink/BwoinkControl.xaml # Content.Client/Guidebook/Controls/GuideReagentReaction.xaml # Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs # Content.Client/SubFloor/SubFloorHideSystem.cs # Content.Server/Administration/Systems/AdminVerbSystem.Antags.cs # Content.Server/Antag/AntagSelectionSystem.cs # Content.Server/Cloning/CloningSystem.cs # Content.Server/GameTicking/Rules/Components/ParadoxCloneRuleComponent.cs # Content.Server/GameTicking/Rules/ParadoxCloneRuleSystem.cs # Content.Server/Roles/ParadoxCloneRoleComponent.cs # Content.Shared.Database/LogType.cs # Content.Shared/CCVar/CCVars.Interface.cs # Content.Shared/Cloning/CloningEvents.cs # Content.Shared/Cloning/CloningSettingsPrototype.cs # Content.Shared/Humanoid/NamingSystem.cs # Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs # Content.Shared/Light/Components/SunShadowCycleComponent.cs # Content.Shared/Storage/StorageComponent.cs # Resources/Changelog/Admin.yml # Resources/Changelog/Changelog.yml # Resources/Credits/GitHub.txt # Resources/Locale/en-US/paradox-clone/role.ftl # Resources/Maps/bagel.yml # Resources/Maps/loop.yml # Resources/Prototypes/Chemistry/mixing_types.yml # Resources/Prototypes/Datasets/Names/last.yml # Resources/Prototypes/Entities/Effects/puddle.yml # Resources/Prototypes/Entities/Mobs/Player/clone.yml # Resources/Prototypes/Entities/Mobs/Species/base.yml # Resources/Prototypes/Entities/Objects/Deliveries/deliveries_tables.yml # Resources/Prototypes/Entities/Objects/Devices/pda.yml # Resources/Prototypes/Entities/Objects/Tools/handheld_mass_scanner.yml # Resources/Prototypes/GameRules/events.yml # Resources/Prototypes/Maps/Pools/default.yml # Resources/Prototypes/Objectives/paradoxClone.yml # Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml # Resources/Textures/Clothing/Eyes/Glasses/jensen.rsi/equipped-EYES-arachnid.png
127 lines
3.7 KiB
C#
127 lines
3.7 KiB
C#
using Content.Shared.Actions;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.Ghost;
|
|
|
|
[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;
|
|
|
|
//CP14 Ghost abilities
|
|
[DataField]
|
|
public EntProtoId CP14ZLevelUpAction = "CP14ActionZLevelUp";
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public EntityUid? CP14ZLevelUpActionEntity;
|
|
|
|
[DataField]
|
|
public EntProtoId CP14ZLevelDownAction = "CP14ActionZLevelDown";
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public EntityUid? CP14ZLevelDownActionEntity;
|
|
|
|
[DataField]
|
|
public EntProtoId CP14ToggleRoofAction = "CP14ActionToggleRoofs";
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public EntityUid? CP14ToggleRoofActionEntity;
|
|
//CP14 Ghost entities end
|
|
|
|
// End actions
|
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField, AutoPausedField]
|
|
public TimeSpan TimeOfDeath = TimeSpan.Zero;
|
|
|
|
[DataField("booRadius"), ViewVariables(VVAccess.ReadWrite)]
|
|
public float BooRadius = 3;
|
|
|
|
[DataField("booMaxTargets"), ViewVariables(VVAccess.ReadWrite)]
|
|
public int BooMaxTargets = 3;
|
|
|
|
// TODO: instead of this funny stuff just give it access and update in system dirtying when needed
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public bool CanGhostInteract
|
|
{
|
|
get => _canGhostInteract;
|
|
set
|
|
{
|
|
if (_canGhostInteract == value) return;
|
|
_canGhostInteract = value;
|
|
Dirty();
|
|
}
|
|
}
|
|
|
|
[DataField("canInteract"), AutoNetworkedField]
|
|
private bool _canGhostInteract;
|
|
|
|
/// <summary>
|
|
/// Changed by <see cref="SharedGhostSystem.SetCanReturnToBody"/>
|
|
/// </summary>
|
|
// TODO MIRROR change this to use friend classes when thats merged
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public bool CanReturnToBody
|
|
{
|
|
get => _canReturnToBody;
|
|
set
|
|
{
|
|
if (_canReturnToBody == value) return;
|
|
_canReturnToBody = value;
|
|
Dirty();
|
|
}
|
|
}
|
|
|
|
/// <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;
|
|
|
|
[DataField("canReturnToBody"), AutoNetworkedField]
|
|
private bool _canReturnToBody;
|
|
}
|
|
|
|
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 { }
|