]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Make shuttle walls/windows constructable (#19255)
authorVelcroboy <107660393+IamVelcroboy@users.noreply.github.com>
Tue, 21 Nov 2023 01:20:24 +0000 (19:20 -0600)
committerGitHub <noreply@github.com>
Tue, 21 Nov 2023 01:20:24 +0000 (17:20 -0800)
25 files changed:
Content.Client/Wall/ShuttleWallVisuals.cs [new file with mode: 0644]
Content.Shared/Wall/ShuttleWallVisuals.cs [new file with mode: 0644]
Resources/Prototypes/Entities/Structures/Walls/girders.yml
Resources/Prototypes/Entities/Structures/Walls/walls.yml
Resources/Prototypes/Entities/Structures/Windows/shuttle.yml
Resources/Prototypes/Recipes/Construction/Graphs/structures/girder.yml
Resources/Prototypes/Recipes/Construction/Graphs/structures/window.yml
Resources/Prototypes/Recipes/Construction/structures.yml
Resources/Textures/Structures/Walls/shuttle.rsi/meta.json
Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-0.png [new file with mode: 0644]
Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-1.png [new file with mode: 0644]
Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-2.png [new file with mode: 0644]
Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-3.png [new file with mode: 0644]
Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-4.png [new file with mode: 0644]
Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-5.png [new file with mode: 0644]
Resources/Textures/Structures/Walls/shuttleinterior.rsi/full.png [new file with mode: 0644]
Resources/Textures/Structures/Walls/shuttleinterior.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Structures/Walls/shuttleinterior.rsi/state0.png [new file with mode: 0644]
Resources/Textures/Structures/Walls/shuttleinterior.rsi/state1.png [new file with mode: 0644]
Resources/Textures/Structures/Walls/shuttleinterior.rsi/state2.png [new file with mode: 0644]
Resources/Textures/Structures/Walls/shuttleinterior.rsi/state3.png [new file with mode: 0644]
Resources/Textures/Structures/Walls/shuttleinterior.rsi/state4.png [new file with mode: 0644]
Resources/Textures/Structures/Walls/shuttleinterior.rsi/state5.png [new file with mode: 0644]
Resources/Textures/Structures/Walls/shuttleinterior.rsi/state6.png [new file with mode: 0644]
Resources/Textures/Structures/Walls/shuttleinterior.rsi/state7.png [new file with mode: 0644]

diff --git a/Content.Client/Wall/ShuttleWallVisuals.cs b/Content.Client/Wall/ShuttleWallVisuals.cs
new file mode 100644 (file)
index 0000000..9060e89
--- /dev/null
@@ -0,0 +1,6 @@
+namespace Content.Client.Wall;
+
+public enum ShuttleWallVisualLayers : byte
+{
+    Deconstruction,
+}
diff --git a/Content.Shared/Wall/ShuttleWallVisuals.cs b/Content.Shared/Wall/ShuttleWallVisuals.cs
new file mode 100644 (file)
index 0000000..31fef9f
--- /dev/null
@@ -0,0 +1,8 @@
+namespace Content.Shared.Wall;
+using Robust.Shared.Serialization;
+
+[Serializable, NetSerializable]
+public enum ShuttleWallVisuals
+{
+    DeconstructionStage,
+}
index 04b2aa1af06acc2105e24e72640e7876102e947e..a1ed2332b99e9e905492c62ade227b069bf9658e 100644 (file)
@@ -6,7 +6,7 @@
   components:
   - type: Transform
     anchored: true
-    noRot: true
+    noRot: false
   - type: Physics
     bodyType: Static
   - type: Fixtures
index 9059fd06d7f0e8509293881d3b55e1f6e5839eec..37c2b27f89dbd31ad89359e3390a432f4dfd6956 100644 (file)
         !type:DamageTrigger
         damage: 600
       behaviors:
+      - !type:PlaySoundBehavior
+        sound:
+          path: /Audio/Effects/metalbreak.ogg
       - !type:ChangeConstructionNodeBehavior
         node: girder
       - !type:DoActsBehavior
         acts: ["Destruction"]
+    destroySound:
+      path: /Audio/Effects/metalbreak.ogg
   - type: IconSmooth
     key: walls
     base: reinf_over
     key: walls
     base: silver
 
+#shuttle walls
 - type: entity
   id: WallShuttleDiagonal
   name: shuttle wall
-  suffix: diagonal
+  suffix: Diagonal
   description: Keeps the air in and the greytide out.
   placement:
     mode: SnapgridCenter
     state: state0
   - type: Damageable
     damageContainer: Inorganic
-    damageModifierSet: Metallic
+    damageModifierSet: StrongMetallic
   - type: Physics
     bodyType: Static
   - type: Reflect
         !type:DamageTrigger
         damage: 300
       behaviors:
+      - !type:ChangeConstructionNodeBehavior
+        node: girder
       - !type:PlaySoundBehavior
         sound:
           path: /Audio/Effects/metalbreak.ogg
         acts: ["Destruction"]
     destroySound:
       path: /Audio/Effects/metalbreak.ogg
+  - type: Construction
+    graph: Girder
+    node: diagonalshuttleWall
 
 - type: entity
-  parent: BaseWall
+  parent: WallReinforced
   id: WallShuttle
   name: shuttle wall
+  suffix: Reinforced, Exterior
   components:
-  - type: Tag
-    tags:
-      - Wall
-      - RCDDeconstructWhitelist
   - type: Sprite
     sprite: Structures/Walls/shuttle.rsi
   - type: Icon
     sprite: Structures/Walls/shuttle.rsi
-  - type: Destructible
-    thresholds:
-    - trigger:
-        !type:DamageTrigger
-        damage: 1000
-      behaviors:
-        - !type:DoActsBehavior
-          acts: [ "Destruction" ]
-    - trigger:
-        !type:DamageTrigger
-        damage: 500
-      behaviors:
-      - !type:PlaySoundBehavior
-        sound:
-          path: /Audio/Effects/metalbreak.ogg
-      - !type:DoActsBehavior
-        acts: ["Destruction"]
-    destroySound:
-      path: /Audio/Effects/metalbreak.ogg
+    state: full
+  - type: Construction
+    graph: Girder
+    node: shuttleWall
+  - type: IconSmooth
+    key: walls
+    base: state
+  - type: Appearance
+  - type: GenericVisualizer
+    visuals:
+      enum.ShuttleWallVisuals.DeconstructionStage:
+        ShuttleWallVisualLayers.Deconstruction:
+          -1: { visible: false }
+          0: { state: shuttle_construct-0, visible: true}
+          1: { state: shuttle_construct-1, visible: true}
+          2: { state: shuttle_construct-2, visible: true}
+          3: { state: shuttle_construct-3, visible: true}
+          4: { state: shuttle_construct-4, visible: true}
+          5: { state: shuttle_construct-5, visible: true}
   - type: Reflect
     reflectProb: 1
+
+- type: entity
+  parent: WallSolid
+  id: WallShuttleInterior
+  name: shuttle wall
+  suffix: Interior
+  components:
+  - type: Sprite
+    sprite: Structures/Walls/shuttleinterior.rsi
+  - type: Icon
+    sprite: Structures/Walls/shuttleinterior.rsi
+  - type: Construction
+    graph: Girder
+    node: shuttleInteriorWall
   - type: IconSmooth
     key: walls
     base: state
+  - type: Reflect
+    reflectProb: 1
 
 - type: entity
   parent: BaseWall
index 826f9b09f4717c2a15079aaa8ab4554e36b01642..8d7d1c8180e674dfe81475f163363941b3f55102 100644 (file)
@@ -8,6 +8,9 @@
     sprite: Structures/Windows/shuttle_window.rsi
   - type: Icon
     sprite: Structures/Windows/shuttle_window.rsi
+  - type: Repairable
+    fuelCost: 15
+    doAfterDelay: 3
   - type: Damageable
     damageContainer: Inorganic
     damageModifierSet: RGlass
@@ -38,6 +41,9 @@
         acts: [ "Destruction" ]
   - type: IconSmooth
     base: swindow
+  - type: Construction
+    graph: Window
+    node: shuttleWindow
   - type: Appearance
   - type: DamageVisuals
     thresholds: [4, 8, 12]
@@ -46,7 +52,7 @@
     damageOverlay:
       sprite: Structures/Windows/cracks.rsi
   - type: StaticPrice
-    price: 75
+    price: 100
 
 - type: entity
   parent: ShuttleWindow
index e652cfbec87ff956469a6694e9533020e5c0ddfc..0ccb3033341aa0290150080ebea1f4a3a6e43769 100644 (file)
@@ -43,7 +43,7 @@
         - to: reinforcedGirder
           completed:
             - !type:SnapToGrid
-              southRotation: true
+              southRotation: false
           conditions:
             - !type:EntityAnchored {}
           steps:
               amount: 2
               doAfter: 2
 
+        - to: shuttleInteriorWall
+          completed:
+            - !type:SnapToGrid
+              southRotation: true
+          conditions:
+            - !type:EntityAnchored { }
+          steps:
+            - material: MetalRod
+              amount: 2
+              doAfter: 1
+            - tool: Screwing
+              doAfter: 1
+            - material: Steel
+              amount: 2
+              doAfter: 1
+
     - node: wall
       entity: WallSolid
       edges:
             - tool: Prying
               doAfter: 5
 
+    - node: shuttleInteriorWall
+      entity: WallShuttleInterior
+      edges:
+        - to: girder
+          completed:
+            - !type:SpawnPrototype
+              prototype: SheetSteel1
+              amount: 2
+            - !type:SpawnPrototype
+              prototype: PartRodMetal1
+              amount: 2
+          steps:
+            - tool: Welding
+              doAfter: 10
+            - tool: Screwing
+              doAfter: 1
+
     - node: reinforcedGirder
       entity: ReinforcedGirder
       edges:
               amount: 2
               doAfter: 1
 
+        - to: shuttleWall
+          completed:
+            - !type:SnapToGrid
+              southRotation: true
+          conditions:
+            - !type:EntityAnchored { }
+          steps:
+            - material: MetalRod
+              amount: 4
+              doAfter: 1
+            - tool: Screwing
+              doAfter: 2
+            - material: Plasteel
+              amount: 2
+              doAfter: 1
+
+        - to: diagonalshuttleWall
+          completed:
+            - !type:SnapToGrid
+              southRotation: false
+          conditions:
+            - !type:EntityAnchored { }
+          steps:
+            - material: Steel
+              amount: 1
+              doAfter: 1
+            - tool: Welding
+              doAfter: 4
+            - material: Plasteel
+              amount: 1
+              doAfter: 1
+
         - to: girder
           completed:
             - !type:SnapToGrid
             - tool: Cutting
               doAfter: 1
 
+    - node: shuttleWall
+      entity: WallShuttle
+      edges:
+        - to: reinforcedGirder
+          completed:
+            - !type:SpawnPrototype
+              prototype: SheetPlasteel1
+              amount: 2
+            - !type:SpawnPrototype
+              prototype: PartRodMetal1
+              amount: 4
+          steps:
+            - tool: Welding
+              doAfter: 10
+            - tool: Cutting
+              doAfter: 1
+              completed:
+                - !type:VisualizerDataInt
+                  key: "enum.ShuttleWallVisuals.DeconstructionStage"
+                  data: 5
+            - tool: Screwing
+              doAfter: 2
+            - tool: Welding
+              doAfter: 5
+              completed:
+                - !type:VisualizerDataInt
+                  key: "enum.ShuttleWallVisuals.DeconstructionStage"
+                  data: 4
+            - tool: Prying
+              doAfter: 2
+            - tool: Anchoring
+              doAfter: 1
+              completed:
+                - !type:VisualizerDataInt
+                  key: "enum.ShuttleWallVisuals.DeconstructionStage"
+                  data: 3
+            - tool: Welding
+              doAfter: 10
+              completed:
+                - !type:VisualizerDataInt
+                  key: "enum.ShuttleWallVisuals.DeconstructionStage"
+                  data: 2
+            - tool: Prying
+              doAfter: 1
+              completed:
+                - !type:VisualizerDataInt
+                  key: "enum.ShuttleWallVisuals.DeconstructionStage"
+                  data: 1
+            - tool: Screwing
+              doAfter: 1
+              completed:
+                - !type:VisualizerDataInt
+                  key: "enum.ShuttleWallVisuals.DeconstructionStage"
+                  data: 0
+            - tool: Cutting
+              doAfter: 4
+
+    - node: diagonalshuttleWall
+      entity: WallShuttleDiagonal
+      edges:
+        - to: reinforcedGirder
+          completed:
+            - !type:SpawnPrototype
+              prototype: SheetPlasteel1
+              amount: 1
+            - !type:SpawnPrototype
+              prototype: SheetSteel1
+              amount: 1
+          steps:
+          #To-Do: Add deconstruct visuals
+            - tool: Welding
+              doAfter: 5
+            - tool: Cutting
+              doAfter: 1
+            - tool: Screwing
+              doAfter: 1
+            - tool: Welding
+              doAfter: 5
+            - tool: Prying
+              doAfter: 1
+            - tool: Anchoring
+              doAfter: 1
+            - tool: Welding
+              doAfter: 10
+            - tool: Prying
+              doAfter: 1
+            - tool: Screwing
+              doAfter: 1
+            - tool: Cutting
+              doAfter: 1
+
     - node: wallrust
       entity: WallSolidRust
       edges:
index d029ee6b907ea325b32d87955489027ec065a051..10284bdca2613c36baa0ccd285aa46a08e21a81c 100644 (file)
               amount: 2
               doAfter: 3
 
+        - to: shuttleWindow
+          steps:
+            - material: Plasteel
+              amount: 2
+            - material: ReinforcedGlass
+              amount: 2
+              doAfter: 4
+
     - node: window
       entity: Window
       edges:
               doAfter: 2
             - tool: Anchoring
               doAfter: 3
+
+    - node: shuttleWindow
+      entity: ShuttleWindow
+      edges:
+        - to: start
+          completed:
+            - !type:SpawnPrototype
+              prototype: SheetRGlass1
+              amount: 2
+            - !type:SpawnPrototype
+              prototype: SheetPlasteel1
+              amount: 2
+            - !type:DeleteEntity {}
+          steps:
+          #To-Do: Add deconstruct visuals
+            - tool: Welding
+              doAfter: 6
+            - tool: Screwing
+              doAfter: 2
+            - tool: Prying
+              doAfter: 3
+            - tool: Welding
+              doAfter: 5
+            - tool: Screwing
+              doAfter: 1
+            - tool: Prying
+              doAfter: 2
+            - tool: Welding
+              doAfter: 4
+            - tool: Anchoring
+              doAfter: 1
index 20343111a06efa69ab8647242765d4aee624a02d..8e3a3cf2acbf564172768267a32445d0f586aa5a 100644 (file)
   conditions:
     - !type:TileNotBlocked
 
+- type: construction
+  name: shuttle wall
+  id: ShuttleWall
+  graph: Girder
+  startNode: start
+  targetNode: shuttleWall
+  category: construction-category-structures
+  description: Keeps the air in and the greytide out.
+  icon:
+    sprite: Structures/Walls/shuttle.rsi
+    state: full
+  objectType: Structure
+  placementMode: SnapgridCenter
+  canRotate: false
+  canBuildInImpassable: false
+  conditions:
+    - !type:TileNotBlocked
+
+- type: construction
+  name: interior shuttle wall
+  id: InteriorShuttleWall
+  graph: Girder
+  startNode: start
+  targetNode: shuttleInteriorWall
+  category: construction-category-structures
+  description: Keeps the air in and the greytide out.
+  icon:
+    sprite: Structures/Walls/shuttleinterior.rsi
+    state: full
+  objectType: Structure
+  placementMode: SnapgridCenter
+  canRotate: false
+  canBuildInImpassable: false
+  conditions:
+    - !type:TileNotBlocked
+
+
+- type: construction
+  name: diagonal shuttle wall
+  id: DiagonalShuttleWall
+  graph: Girder
+  startNode: start
+  targetNode: diagonalshuttleWall
+  category: construction-category-structures
+  description: Keeps the air in and the greytide out.
+  icon:
+    sprite: Structures/Walls/shuttle_diagonal.rsi
+    state: state0
+  objectType: Structure
+  placementMode: SnapgridCenter
+  canRotate: true
+  canBuildInImpassable: false
+  conditions:
+    - !type:TileNotBlocked
+
 - type: construction
   name: bananium wall
   id: ClownWall
   canRotate: false
 
 - type: construction
+  name: shuttle window
+  id: ShuttleWindow
+  graph: Window
+  startNode: start
+  targetNode: shuttleWindow
+  category: construction-category-structures
+  canBuildInImpassable: true
+  description: Extra sturdy to resist the pressure of FTL or sustain damage from munitions.
+  conditions:
+    - !type:EmptyOrWindowValidInTile
+    - !type:NoWindowsInTile
+  icon:
+    sprite: Structures/Windows/shuttle_window.rsi
+    state: full
+  objectType: Structure
+  placementMode: SnapgridCenter
+  canRotate: false
+
+- type: construction  
   name: diagonal plasma window
   id: PlasmaWindowDiagonal
   graph: WindowDiagonal
index 97ca2aa3b00568359d43d12cf023b5a0f8690d53..9aff20a66c884e068d00fecce335ce1750f64454 100644 (file)
         {
             "name": "state7",
             "directions": 4
+        },
+        {
+            "name": "shuttle_construct-0"
+        },
+        {
+            "name": "shuttle_construct-1"
+        },
+        {
+            "name": "shuttle_construct-2"
+        },
+        {
+            "name": "shuttle_construct-3"
+        },
+        {
+            "name": "shuttle_construct-4"
+        },
+        {
+            "name": "shuttle_construct-5"
         }
     ]
-}
\ No newline at end of file
+}
diff --git a/Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-0.png b/Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-0.png
new file mode 100644 (file)
index 0000000..dde7f67
Binary files /dev/null and b/Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-0.png differ
diff --git a/Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-1.png b/Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-1.png
new file mode 100644 (file)
index 0000000..c68cfba
Binary files /dev/null and b/Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-1.png differ
diff --git a/Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-2.png b/Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-2.png
new file mode 100644 (file)
index 0000000..d2f5bc0
Binary files /dev/null and b/Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-2.png differ
diff --git a/Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-3.png b/Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-3.png
new file mode 100644 (file)
index 0000000..7098ec3
Binary files /dev/null and b/Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-3.png differ
diff --git a/Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-4.png b/Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-4.png
new file mode 100644 (file)
index 0000000..120b163
Binary files /dev/null and b/Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-4.png differ
diff --git a/Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-5.png b/Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-5.png
new file mode 100644 (file)
index 0000000..c29bdb3
Binary files /dev/null and b/Resources/Textures/Structures/Walls/shuttle.rsi/shuttle_construct-5.png differ
diff --git a/Resources/Textures/Structures/Walls/shuttleinterior.rsi/full.png b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/full.png
new file mode 100644 (file)
index 0000000..f336d4c
Binary files /dev/null and b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/full.png differ
diff --git a/Resources/Textures/Structures/Walls/shuttleinterior.rsi/meta.json b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/meta.json
new file mode 100644 (file)
index 0000000..97ca2aa
--- /dev/null
@@ -0,0 +1,46 @@
+{
+    "version": 1,
+    "size": {
+        "x": 32,
+        "y": 32
+    },
+    "license": "CC-BY-SA-3.0",
+    "copyright": "https://github.com/tgstation/tgstation/blob/9ddb8cf084e292571d4e9c79745db25befbd82fe/icons/turf/walls/shuttle_wall.dmi",
+    "states": [
+        {
+            "name": "full"
+        },
+        {
+            "name": "state0",
+            "directions": 4
+        },
+        {
+            "name": "state1",
+            "directions": 4
+        },
+        {
+            "name": "state2",
+            "directions": 4
+        },
+        {
+            "name": "state3",
+            "directions": 4
+        },
+        {
+            "name": "state4",
+            "directions": 4
+        },
+        {
+            "name": "state5",
+            "directions": 4
+        },
+        {
+            "name": "state6",
+            "directions": 4
+        },
+        {
+            "name": "state7",
+            "directions": 4
+        }
+    ]
+}
\ No newline at end of file
diff --git a/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state0.png b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state0.png
new file mode 100644 (file)
index 0000000..f53131b
Binary files /dev/null and b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state0.png differ
diff --git a/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state1.png b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state1.png
new file mode 100644 (file)
index 0000000..3041fa3
Binary files /dev/null and b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state1.png differ
diff --git a/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state2.png b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state2.png
new file mode 100644 (file)
index 0000000..f53131b
Binary files /dev/null and b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state2.png differ
diff --git a/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state3.png b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state3.png
new file mode 100644 (file)
index 0000000..1263f7a
Binary files /dev/null and b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state3.png differ
diff --git a/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state4.png b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state4.png
new file mode 100644 (file)
index 0000000..92ab836
Binary files /dev/null and b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state4.png differ
diff --git a/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state5.png b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state5.png
new file mode 100644 (file)
index 0000000..430bab8
Binary files /dev/null and b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state5.png differ
diff --git a/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state6.png b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state6.png
new file mode 100644 (file)
index 0000000..c8c28b2
Binary files /dev/null and b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state6.png differ
diff --git a/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state7.png b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state7.png
new file mode 100644 (file)
index 0000000..629e4e3
Binary files /dev/null and b/Resources/Textures/Structures/Walls/shuttleinterior.rsi/state7.png differ