]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
U-Shape Rails (#19485)
authorAlekshhh <44923899+Alekshhh@users.noreply.github.com>
Wed, 20 Sep 2023 08:26:16 +0000 (11:26 +0300)
committerGitHub <noreply@github.com>
Wed, 20 Sep 2023 08:26:16 +0000 (18:26 +1000)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
Resources/Prototypes/Entities/Structures/Walls/railing.yml
Resources/Prototypes/Recipes/Construction/Graphs/structures/railing.yml
Resources/Prototypes/Recipes/Construction/structures.yml
Resources/Textures/Structures/Walls/railing.rsi/meta.json
Resources/Textures/Structures/Walls/railing.rsi/round.png [new file with mode: 0644]
Resources/mapping_actions.yml

index dbb3aaabcfb9649f9bb1d5252b98d1b91cd19c3d..b083771ea90a0f424101be4415bc1f2f737d9fcf 100644 (file)
   - type: Construction
     graph: Railing
     node: railingCornerSmall
+
+- type: entity
+  parent: BaseStructure
+  id: RailingRound
+  name: railing
+  description: Basic railing meant to protect idiots like you from falling.
+  components:
+  - type: Sprite
+    drawdepth: WallTops
+    sprite: Structures/Walls/railing.rsi
+    state: round
+  - type: Physics
+    bodyType: Static
+  - type: Fixtures
+    fixtures:
+      fix1:
+        shape:
+          !type:PhysShapeAabb
+          bounds: "-0.49,-0.49,0.49,-0.25"
+        density: 1000
+        mask:
+          - TableMask
+        layer:
+          - TableLayer
+      fix2:
+        shape:
+          !type:PhysShapeAabb
+          bounds: "-0.49,-0.49,-0.25,0.49"
+        density: 1000
+        mask:
+          - TableMask
+        layer:
+          - TableLayer
+      fix3:
+        shape:
+          !type:PhysShapeAabb
+          bounds: "0.25,-0.49,0.49,0.49"
+        density: 1000
+        mask:
+          - TableMask
+        layer:
+          - TableLayer
+  - type: InteractionOutline
+  - type: Repairable
+  - type: Damageable
+    damageContainer: Inorganic
+    damageModifierSet: FlimsyMetallic
+  - type: Destructible
+    thresholds:
+    - trigger:
+        !type:DamageTrigger
+        damage: 100
+      behaviors:
+        - !type:DoActsBehavior
+          acts: [ "Destruction" ]
+    - trigger:
+        !type:DamageTrigger
+        damage: 20
+      behaviors:
+      - !type:PlaySoundBehavior
+        sound:
+          path: /Audio/Effects/metalbreak.ogg
+      - !type:SpawnEntitiesBehavior
+        spawn:
+          PartRodMetal1:
+            min: 0
+            max: 2
+      - !type:DoActsBehavior
+        acts: [ "Destruction" ]
+  - type: Climbable
+  - type: Construction
+    graph: Railing
+    node: railingRound
index 897685fd4a000939aecc0cf906abfd8d8e1793cd..f050c65c42c4b751452429c3007242cba7960a61 100644 (file)
             - material: MetalRod
               amount: 1
               doAfter: 2
+        - to: railingRound
+          completed:
+            - !type:SnapToGrid
+              southRotation: true
+          steps:
+            - material: MetalRod
+              amount: 2
+              doAfter: 2
 
     - node: railing
       entity: Railing
           steps:
             - tool: Screwing
               doAfter: 0.25
+
+    - node: railingRound
+      entity: RailingRound
+      edges:
+        - to: start
+          completed:
+            - !type:SpawnPrototype
+              prototype: PartRodMetal1
+              amount: 2
+            - !type:DeleteEntity
+          steps:
+            - tool: Screwing
+              doAfter: 0.5
index a5045d813408c8c52148acaa9bf49e41883bdcb3..3539cc2065617fa7b1f004700fb74bfbada56d00 100644 (file)
   conditions:
   - !type:TileNotBlocked
 
+- type: construction
+  name: railing round
+  id: RailingRound
+  graph: Railing
+  startNode: start
+  targetNode: railingRound
+  category: construction-category-structures
+  description: Basic railing meant to protect idiots like you from falling.
+  icon:
+    sprite: Structures/Walls/railing.rsi
+    state: round
+  objectType: Structure
+  placementMode: SnapgridCenter
+  canBuildInImpassable: false
+  conditions:
+  - !type:TileNotBlocked
+
 # Chain link fencing
 - type: construction
   name: chain link fence
index 3d1553e971281bc5f95ef2db9f4ae56f961ca985..0858e0a1b2319533ae674d3452d5af68fdf4cb16 100644 (file)
     {
         "name": "corner_small",
         "directions": 4
+    },
+    {
+        "name": "round",
+        "directions": 4
     }
   ]
 }
diff --git a/Resources/Textures/Structures/Walls/railing.rsi/round.png b/Resources/Textures/Structures/Walls/railing.rsi/round.png
new file mode 100644 (file)
index 0000000..440ac17
Binary files /dev/null and b/Resources/Textures/Structures/Walls/railing.rsi/round.png differ
index 9bd170ee35d44e7eb817ce5825ab49ae40a7b18a..918333adfbd34135fd6c7e1e9a74b3277e5bfa00 100644 (file)
   - 5: 8
   name: RailingCornerSmall
 - action: !type:InstantActionComponent
+    icon:
+      entity: RailingRound
+    name: RailingRound
+    keywords: []
+    clientExclusive: True
+    autoPopulate: False
+    temporary: True
+    event: !type:StartPlacementActionEvent
+      placementOption: SnapgridCenter
+      entityType: RailingRound
+  assignments:
+  - 5: 9
+- action: !type:InstantAction
+    checkCanInteract: False
     icon:
       entity: AirlockMaintLocked
     keywords: []