diff --git a/Content.Shared/Construction/Components/AnchorableComponent.cs b/Content.Shared/Construction/Components/AnchorableComponent.cs index 064f839efa..e17a49937a 100644 --- a/Content.Shared/Construction/Components/AnchorableComponent.cs +++ b/Content.Shared/Construction/Components/AnchorableComponent.cs @@ -2,7 +2,6 @@ using Content.Shared.Construction.EntitySystems; using Content.Shared.Tools; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Shared.Construction.Components { diff --git a/Content.Shared/Construction/EntitySystems/AnchorableSystem.cs b/Content.Shared/Construction/EntitySystems/AnchorableSystem.cs index e690b93826..d53a100acc 100644 --- a/Content.Shared/Construction/EntitySystems/AnchorableSystem.cs +++ b/Content.Shared/Construction/EntitySystems/AnchorableSystem.cs @@ -102,6 +102,13 @@ public sealed partial class AnchorableSystem : EntitySystem private void OnAnchoredExamine(EntityUid uid, AnchorableComponent component, ExaminedEvent args) { var isAnchored = Comp(uid).Anchored; + + if (isAnchored && (component.Flags & AnchorableFlags.Unanchorable) == 0x0) + return; + + if (!isAnchored && (component.Flags & AnchorableFlags.Anchorable) == 0x0) + return; + var messageId = isAnchored ? "examinable-anchored" : "examinable-unanchored"; args.PushMarkup(Loc.GetString(messageId, ("target", uid))); } diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index c2025bb663..8542afbdc1 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -170,6 +170,10 @@ - AiHolder suffix: Empty components: + - type: Anchorable + flags: + - Anchorable + - type: Rotatable - type: WarpPoint blacklist: tags: @@ -195,6 +199,7 @@ - type: StationAiVision - type: InteractionOutline - type: Sprite + snapCardinals: true sprite: Mobs/Silicon/station_ai.rsi layers: - state: base diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Turrets/turrets_energy.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Turrets/turrets_energy.yml index 40c67c898d..1fe926294c 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Turrets/turrets_energy.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Turrets/turrets_energy.yml @@ -5,6 +5,10 @@ name: sentry turret description: A high-tech autonomous weapons system designed to keep unauthorized personnel out of sensitive areas. components: + - type: Anchorable + flags: + - Anchorable + - type: Rotatable - type: Fixtures fixtures: body: diff --git a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base_structureairlocks.yml b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base_structureairlocks.yml index 437076b0a2..8b509a17ff 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base_structureairlocks.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/base_structureairlocks.yml @@ -4,6 +4,10 @@ name: airlock description: It opens, it closes, and maybe crushes you. components: + - type: Anchorable + flags: + - Anchorable + - type: Rotatable - type: StationAiWhitelist - type: MeleeSound soundGroups: diff --git a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/highsec.yml b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/highsec.yml index 28b63d9723..975328c7c1 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/highsec.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/highsec.yml @@ -6,9 +6,14 @@ placement: mode: SnapgridCenter components: + - type: Anchorable + flags: + - Anchorable + - type: Rotatable - type: StationAiWhitelist - type: InteractionOutline - type: Sprite + snapCardinals: true sprite: Structures/Doors/Airlocks/highsec/highsec.rsi layers: - state: closed diff --git a/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml b/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml index 584a4e5c7b..489411bc28 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml @@ -5,6 +5,10 @@ name: firelock description: Apply crowbar. components: + - type: Anchorable + flags: + - Anchorable + - type: Rotatable - type: AtmosAlarmable syncWith: - FireAlarm diff --git a/Resources/Prototypes/Entities/Structures/Doors/MaterialDoors/material_doors.yml b/Resources/Prototypes/Entities/Structures/Doors/MaterialDoors/material_doors.yml index 1ce3d1b61c..510b76b41e 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/MaterialDoors/material_doors.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/MaterialDoors/material_doors.yml @@ -5,6 +5,10 @@ abstract: true description: A door, where will it lead? components: + - type: Anchorable + flags: + - Anchorable + - type: Rotatable - type: InteractionOutline - type: Sprite sprite: Structures/Doors/MineralDoors/metal_door.rsi diff --git a/Resources/Prototypes/Entities/Structures/Doors/SecretDoor/secret_door.yml b/Resources/Prototypes/Entities/Structures/Doors/SecretDoor/secret_door.yml index 0784829e1c..c8fdbec326 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/SecretDoor/secret_door.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/SecretDoor/secret_door.yml @@ -6,6 +6,10 @@ abstract: true description: Keeps the air in and the greytide out. components: + - type: Anchorable + flags: + - Anchorable + - type: Rotatable - type: Sprite sprite: Structures/Doors/secret_door.rsi layers: diff --git a/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml b/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml index ca870d7c7d..6e855a150f 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml @@ -7,6 +7,10 @@ placement: mode: SnapgridCenter components: + - type: Anchorable + flags: + - Anchorable + - type: Rotatable - type: StationAiWhitelist - type: Sprite sprite: Structures/Doors/Shutters/shutters.rsi diff --git a/Resources/Prototypes/Entities/Structures/Doors/Windoors/base_structurewindoors.yml b/Resources/Prototypes/Entities/Structures/Doors/Windoors/base_structurewindoors.yml index 10062d7803..811385645c 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Windoors/base_structurewindoors.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Windoors/base_structurewindoors.yml @@ -6,6 +6,10 @@ placement: mode: SnapgridCenter components: + - type: Anchorable + flags: + - Anchorable + - type: Rotatable - type: MeleeSound soundGroups: Brute: diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/base_wallmount.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/base_wallmount.yml index 49e4a62fd4..b064d4a231 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/base_wallmount.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/base_wallmount.yml @@ -6,6 +6,10 @@ snap: - Wallmount components: + - type: Anchorable + flags: + - Anchorable + - type: Rotatable - type: Physics canCollide: false - type: Clickable diff --git a/Resources/Prototypes/Entities/Structures/Walls/walls.yml b/Resources/Prototypes/Entities/Structures/Walls/walls.yml index 0063b0ad5a..2964b71162 100644 --- a/Resources/Prototypes/Entities/Structures/Walls/walls.yml +++ b/Resources/Prototypes/Entities/Structures/Walls/walls.yml @@ -9,6 +9,10 @@ snap: - Wall components: + - type: Anchorable + flags: + - Anchorable + - type: Rotatable - type: RangedDamageSound soundGroups: Brute: diff --git a/Resources/Prototypes/Entities/Structures/Windows/window.yml b/Resources/Prototypes/Entities/Structures/Windows/window.yml index 0c8ada8f76..ad36a58362 100644 --- a/Resources/Prototypes/Entities/Structures/Windows/window.yml +++ b/Resources/Prototypes/Entities/Structures/Windows/window.yml @@ -8,6 +8,10 @@ snap: - Window components: + - type: Anchorable + flags: + - Anchorable + - type: Rotatable - type: MeleeSound soundGroups: Brute: diff --git a/Resources/Prototypes/Entities/Structures/catwalk.yml b/Resources/Prototypes/Entities/Structures/catwalk.yml index 0a44c338a4..669f4a6800 100644 --- a/Resources/Prototypes/Entities/Structures/catwalk.yml +++ b/Resources/Prototypes/Entities/Structures/catwalk.yml @@ -6,6 +6,10 @@ placement: mode: SnapgridCenter components: + - type: Anchorable + flags: + - Anchorable + - type: Rotatable - type: Clickable - type: Sprite sprite: Structures/catwalk.rsi diff --git a/Resources/Prototypes/Entities/Structures/cryogenic_sleep_unit.yml b/Resources/Prototypes/Entities/Structures/cryogenic_sleep_unit.yml index 568c38a5d2..7458cd2b69 100644 --- a/Resources/Prototypes/Entities/Structures/cryogenic_sleep_unit.yml +++ b/Resources/Prototypes/Entities/Structures/cryogenic_sleep_unit.yml @@ -4,6 +4,10 @@ name: cryogenic sleep unit description: A super-cooled container that keeps crewmates safe during space travel. components: + - type: Anchorable + flags: + - Anchorable + - type: Rotatable - type: Sprite noRot: true sprite: Structures/cryostorage.rsi diff --git a/Resources/Prototypes/Entities/Structures/plastic_flaps.yml b/Resources/Prototypes/Entities/Structures/plastic_flaps.yml index 088ddfda61..a8fa40b69d 100644 --- a/Resources/Prototypes/Entities/Structures/plastic_flaps.yml +++ b/Resources/Prototypes/Entities/Structures/plastic_flaps.yml @@ -5,6 +5,10 @@ placement: mode: SnapgridCenter components: + - type: Anchorable + flags: + - Anchorable + - type: Rotatable - type: Sprite sprite: Structures/plastic_flaps.rsi state: plasticflaps diff --git a/Resources/Prototypes/Entities/Structures/stairs.yml b/Resources/Prototypes/Entities/Structures/stairs.yml index 1d107b50cd..a371f93567 100644 --- a/Resources/Prototypes/Entities/Structures/stairs.yml +++ b/Resources/Prototypes/Entities/Structures/stairs.yml @@ -6,6 +6,10 @@ placement: mode: SnapgridCenter components: + - type: Anchorable + flags: + - Anchorable + - type: Rotatable - type: Clickable - type: Sprite sprite: Structures/stairs.rsi