]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Re-anchorable structures (#39542)
authorchromiumboy <50505512+chromiumboy@users.noreply.github.com>
Wed, 27 Aug 2025 15:04:39 +0000 (10:04 -0500)
committerGitHub <noreply@github.com>
Wed, 27 Aug 2025 15:04:39 +0000 (17:04 +0200)
* Initial commit

* Reverted reinvention of an existing feature...

* Fixed two missed entries

* Added extra examine check

* AI core and high security doors visuals snap to always face south

18 files changed:
Content.Shared/Construction/Components/AnchorableComponent.cs
Content.Shared/Construction/EntitySystems/AnchorableSystem.cs
Resources/Prototypes/Entities/Mobs/Player/silicon.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/Turrets/turrets_energy.yml
Resources/Prototypes/Entities/Structures/Doors/Airlocks/base_structureairlocks.yml
Resources/Prototypes/Entities/Structures/Doors/Airlocks/highsec.yml
Resources/Prototypes/Entities/Structures/Doors/Firelocks/firelock.yml
Resources/Prototypes/Entities/Structures/Doors/MaterialDoors/material_doors.yml
Resources/Prototypes/Entities/Structures/Doors/SecretDoor/secret_door.yml
Resources/Prototypes/Entities/Structures/Doors/Shutter/shutters.yml
Resources/Prototypes/Entities/Structures/Doors/Windoors/base_structurewindoors.yml
Resources/Prototypes/Entities/Structures/Wallmounts/base_wallmount.yml
Resources/Prototypes/Entities/Structures/Walls/walls.yml
Resources/Prototypes/Entities/Structures/Windows/window.yml
Resources/Prototypes/Entities/Structures/catwalk.yml
Resources/Prototypes/Entities/Structures/cryogenic_sleep_unit.yml
Resources/Prototypes/Entities/Structures/plastic_flaps.yml
Resources/Prototypes/Entities/Structures/stairs.yml

index 064f839efa5601229906beb3ac930b697234a6fb..e17a49937af483c56520909d9c70edc354c6bab7 100644 (file)
@@ -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
 {
index e690b9382638f00335618a0a00e309cc7b9b3633..d53a100acc65d9ecd88822b4dcc5926c9e8cf64e 100644 (file)
@@ -102,6 +102,13 @@ public sealed partial class AnchorableSystem : EntitySystem
     private void OnAnchoredExamine(EntityUid uid, AnchorableComponent component, ExaminedEvent args)
     {
         var isAnchored = Comp<TransformComponent>(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)));
     }
index c2025bb663c6bd183c4714b11ef2142cb0b85322..8542afbdc1e33f734f5cec372bb5648387aa5031 100644 (file)
   - AiHolder
   suffix: Empty
   components:
+  - type: Anchorable
+    flags: 
+    - Anchorable
+  - type: Rotatable
   - type: WarpPoint
     blacklist:
       tags:
   - type: StationAiVision
   - type: InteractionOutline
   - type: Sprite
+    snapCardinals: true
     sprite: Mobs/Silicon/station_ai.rsi
     layers:
     - state: base
index 40c67c898df3d8dc885ccc79148e8e8defb4c49f..1fe926294c96a393d21e288f15d9017f99b3223e 100644 (file)
@@ -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:
index 437076b0a2c782aa30492878809da07f108c5e1a..8b509a17ffbcb782f0f4f2510e4101ba535d7362 100644 (file)
@@ -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:
index 28b63d9723be0e13f81620d96cff2e3467779186..975328c7c1bb8668bd7c627d58eb867341c93643 100644 (file)
@@ -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
index 584a4e5c7bcf376b831ddd518e7b37c352ce63d0..489411bc28ddd60ca9ba4cb24f808f4e40ebb459 100644 (file)
@@ -5,6 +5,10 @@
   name: firelock
   description: Apply crowbar.
   components:
+    - type: Anchorable
+      flags:
+      - Anchorable
+    - type: Rotatable
     - type: AtmosAlarmable
       syncWith:
         - FireAlarm
index 1ce3d1b61c7457a6784ee76e082c3d34faf7aee3..510b76b41eb8e2970373521e9769a083d7cf5f3f 100644 (file)
@@ -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
index 0784829e1c0d83e69aef43d87ada1b484fc64444..c8fdbec326f246125bc446319bec29cc2fc6d115 100644 (file)
@@ -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:
index ca870d7c7dab8458d9cfe447794885cea3ca6fd0..6e855a150f160f0a293004d0fed78440b31062cf 100644 (file)
@@ -7,6 +7,10 @@
   placement:
     mode: SnapgridCenter
   components:
+  - type: Anchorable
+    flags:
+    - Anchorable
+  - type: Rotatable
   - type: StationAiWhitelist
   - type: Sprite
     sprite: Structures/Doors/Shutters/shutters.rsi
index 10062d7803e7ef1bc7ae783c236cb3ed1ffbf869..811385645c83eed585099261968fc85cd5d6a343 100644 (file)
@@ -6,6 +6,10 @@
   placement:
     mode: SnapgridCenter
   components:
+  - type: Anchorable
+    flags:
+    - Anchorable
+  - type: Rotatable
   - type: MeleeSound
     soundGroups:
       Brute:
index 49e4a62fd4670fd2ee3241ad395cbedeff21a8b5..b064d4a231a637f9bc190899ef53601568fd2f2b 100644 (file)
@@ -6,6 +6,10 @@
     snap:
     - Wallmount
   components:
+  - type: Anchorable
+    flags:
+    - Anchorable
+  - type: Rotatable
   - type: Physics
     canCollide: false
   - type: Clickable
index 0063b0ad5a027cebe6bdd6dafbbd9830c7add2ce..2964b71162d8194b4daac2edd912553ada652afc 100644 (file)
@@ -9,6 +9,10 @@
     snap:
     - Wall
   components:
+  - type: Anchorable
+    flags: 
+    - Anchorable
+  - type: Rotatable
   - type: RangedDamageSound
     soundGroups:
       Brute:
index 0c8ada8f76b51dca921e3e45fcd3f2a3747e2586..ad36a583623f750e63711c0bd47cadf3a4c0c041 100644 (file)
@@ -8,6 +8,10 @@
     snap:
     - Window
   components:
+  - type: Anchorable
+    flags:
+    - Anchorable
+  - type: Rotatable
   - type: MeleeSound
     soundGroups:
       Brute:
index 0a44c338a4d5ae7f9ee365f3f1804b66d76c79bb..669f4a6800c79986e91b57646664a2b0953b1494 100644 (file)
@@ -6,6 +6,10 @@
   placement:
     mode: SnapgridCenter
   components:
+  - type: Anchorable
+    flags:
+    - Anchorable
+  - type: Rotatable
   - type: Clickable
   - type: Sprite
     sprite: Structures/catwalk.rsi
index 568c38a5d22a2642103ed1b265047719832ff018..7458cd2b6998187a31c92ec350aeff0bbdafe0ed 100644 (file)
@@ -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
index 088ddfda61bd5e2f62f929bf44873af9a66214fb..a8fa40b69dc65305864aeb09e36403799abcf581 100644 (file)
@@ -5,6 +5,10 @@
   placement:
     mode: SnapgridCenter
   components:
+  - type: Anchorable
+    flags:
+    - Anchorable
+  - type: Rotatable
   - type: Sprite
     sprite: Structures/plastic_flaps.rsi
     state: plasticflaps
index 1d107b50cd7a5c6c66d0cb62ff8748c34ce61841..a371f935672f86bedfeaf2dbe10ea32a4d9f487c 100644 (file)
@@ -6,6 +6,10 @@
   placement:
     mode: SnapgridCenter
   components:
+  - type: Anchorable
+    flags:
+    - Anchorable
+  - type: Rotatable
   - type: Clickable
   - type: Sprite
     sprite: Structures/stairs.rsi