]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Ports /vg/station barricade sprites & slightly buffs them (#19840)
authorFlareguy <78941145+Flareguy@users.noreply.github.com>
Sat, 16 Sep 2023 12:50:48 +0000 (07:50 -0500)
committerGitHub <noreply@github.com>
Sat, 16 Sep 2023 12:50:48 +0000 (05:50 -0700)
Resources/Prototypes/Entities/Structures/Walls/barricades.yml [deleted file]
Resources/Prototypes/Entities/Structures/barricades.yml [new file with mode: 0644]
Resources/Prototypes/Recipes/Construction/Graphs/structures/barricades.yml
Resources/Prototypes/Recipes/Construction/structures.yml
Resources/Textures/Structures/Walls/barricades.rsi/barricadewooden.png [deleted file]
Resources/Textures/Structures/Walls/barricades.rsi/meta.json [deleted file]
Resources/Textures/Structures/barricades.rsi/barricade.png [new file with mode: 0644]
Resources/Textures/Structures/barricades.rsi/barricade_directional.png [new file with mode: 0644]
Resources/Textures/Structures/barricades.rsi/barricade_full.png [new file with mode: 0644]
Resources/Textures/Structures/barricades.rsi/meta.json [new file with mode: 0644]

diff --git a/Resources/Prototypes/Entities/Structures/Walls/barricades.yml b/Resources/Prototypes/Entities/Structures/Walls/barricades.yml
deleted file mode 100644 (file)
index 666a237..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-- type: entity
-  id: Barricade
-  parent: BaseStructure
-  name: barricade
-  components:
-  - type: InteractionOutline
-  - type: Construction
-    graph: Barricade
-    node: barricadewooden
-  - type: Sprite
-    sprite: Structures/Walls/barricades.rsi
-    state: barricadewooden
-  - type: Physics
-  - type: Fixtures
-    fixtures:
-      fix1:
-        shape:
-          !type:PhysShapeAabb {}
-        mask:
-        - FullTileMask
-        layer:
-        - WallLayer
-  - type: Tag
-    tags:
-    - Wooden
-  - type: Damageable
-    damageModifierSet: Wood
-    damageContainer: Inorganic
-  - type: Destructible
-    thresholds:
-    - trigger:
-        !type:DamageTrigger
-        damage: 50
-      behaviors:
-      - !type:SpawnEntitiesBehavior
-        spawn:
-          MaterialWoodPlank1:
-            min: 3
-            max: 3
-      - !type:DoActsBehavior
-        acts: [ "Destruction" ]
-  - type: AtmosExposed
-  - type: Flammable
-    fireSpread: true
-    damage:
-      types:
-        Heat: 1 #per second, scales with number of fire 'stacks'
-  - type: Appearance
-  - type: FireVisuals
-    sprite: Effects/fire.rsi
-    normalState: 1
diff --git a/Resources/Prototypes/Entities/Structures/barricades.yml b/Resources/Prototypes/Entities/Structures/barricades.yml
new file mode 100644 (file)
index 0000000..8cdd1c4
--- /dev/null
@@ -0,0 +1,111 @@
+#None of these besides the full barricade are constructible yet since I can't understand code, and they need to do stuff like go over airlocks / windows.
+#Consider porting the barricade kit from /vg/ if you do make them constructible, along with their HP values. Or don't.
+
+#Base barricade
+#A lot of components here are intentionally ommitted in case someone wants to make barricades that are made out of things other than wood.
+- type: entity
+  id: BaseBarricade
+  description: A barricade made out of wood planks. It looks like it can take a few solid hits.
+  parent: BaseStructure
+  name: wooden barricade
+  abstract: true
+  components:
+  - type: InteractionOutline
+  - type: Sprite
+    sprite: Structures/barricades.rsi
+    state: barricade_full
+    drawdepth: BlastDoors
+    noRot: true
+  - type: Physics
+  - type: Fixtures
+    fixtures:
+      fix1:
+        shape:
+          !type:PhysShapeAabb {}
+        mask:
+        - FullTileMask
+        layer:
+        - WallLayer
+  - type: Damageable
+    damageModifierSet: Wood
+    damageContainer: Inorganic
+  - type: Destructible
+    thresholds:
+    - trigger:
+        !type:DamageTrigger
+        damage: 60
+      behaviors:
+      - !type:SpawnEntitiesBehavior
+        spawn:
+          MaterialWoodPlank1:
+            min: 3
+            max: 3
+      - !type:DoActsBehavior
+        acts: [ "Destruction" ]
+  - type: AtmosExposed
+  
+#Regular Barricade
+- type: entity
+  id: Barricade
+  parent: BaseBarricade
+  components:
+  - type: Construction
+    graph: Barricade
+    node: barricadefull
+  - type: Tag
+    tags:
+    - Wooden
+  - type: Flammable
+    fireSpread: true
+    damage:
+      types:
+        Heat: 1 #per second, scales with number of fire 'stacks'
+  - type: Appearance
+  - type: FireVisuals
+    sprite: Effects/fire.rsi
+    normalState: 1
+
+#Structure-Mounted Barricade
+- type: entity
+  id: BarricadeBlock
+  parent: Barricade
+  components:
+  - type: Sprite
+    sprite: Structures/barricades.rsi
+    state: barricade
+
+#Directional Barricade
+- type: entity
+  id: BarricadeDirectional
+  parent: BaseBarricade
+  placement:
+    mode: SnapgridCenter
+#A bunch of this is taken straight from dirwindows and there is a chance that I may have fucked something up. Probably not though
+  components:
+  - type: Sprite
+    sprite: Structures/barricades.rsi
+    state: barricade_directional
+    noRot: false #Results in smoother rotation when turning the camera, the sprite's dirs are just it rotated anyways so there's no reason to not set this.
+  - type: Physics
+  - type: Fixtures
+    fixtures:
+      fix1:
+        shape:
+          !type:PhysShapeAabb
+          bounds: "-0.49,-0.39,0.49,-0.36"
+        mask:
+        - FullTileMask
+        layer:
+        - WallLayer
+  - type: Tag
+    tags:
+    - Wooden
+  - type: Flammable
+    fireSpread: true
+    damage:
+      types:
+        Heat: 1 #per second, scales with number of fire 'stacks'
+  - type: Appearance
+  - type: FireVisuals
+    sprite: Effects/fire.rsi
+    normalState: 1
\ No newline at end of file
index 152ad1e8468b43c8d3d0023e236f6c08b7f4640e..d5553af83b084fbef5ab4e26941827f4bb9f3535 100644 (file)
@@ -1,27 +1,30 @@
-- type: constructionGraph
+#Due to limitations with placement conditions in the construction system, the other kinds of non-fulltile barricades are currently not constructible.
+#This may make it sound like it needs some big refactor to be possible, but make no mistake, it is 100% due to my own technical incompetence.
+- type: constructionGraph
   id: Barricade
   start: start
   graph:
     - node: start
       edges:
-        - to: barricadewooden
+        - to: barricadefull
           steps:
             - material: WoodPlank
-              amount: 5
+              amount: 4
               doAfter: 3
               
-    - node: barricadewooden
+    - node: barricadefull
       entity: Barricade
       edges:
         - to: start
           completed:
             - !type:SpawnPrototype
               prototype: MaterialWoodPlank1
-              amount: 4 #returns 1 less as one breaks
+              amount: 3 #returns 1 less as one breaks
             - !type:DeleteEntity {}
           conditions:
             - !type:EntityAnchored
               anchored: true
           steps:
             - tool: Prying
-              doAfter: 5
\ No newline at end of file
+              doAfter: 5
+
index 648bc19673eb8f737fc35c49b3e312473700673f..a5045d813408c8c52148acaa9bf49e41883bdcb3 100644 (file)
   id: Barricade
   graph: Barricade
   startNode: start
-  targetNode: barricadewooden
+  targetNode: barricadefull
   category: construction-category-structures
   description: An improvised barricade made out of wooden planks.
   icon:
-    sprite: Structures/Walls/barricades.rsi
-    state: barricadewooden
+    sprite: Structures/barricades.rsi
+    state: barricade_full
   objectType: Structure
   placementMode: SnapgridCenter
   canBuildInImpassable: false
diff --git a/Resources/Textures/Structures/Walls/barricades.rsi/barricadewooden.png b/Resources/Textures/Structures/Walls/barricades.rsi/barricadewooden.png
deleted file mode 100644 (file)
index c65024c..0000000
Binary files a/Resources/Textures/Structures/Walls/barricades.rsi/barricadewooden.png and /dev/null differ
diff --git a/Resources/Textures/Structures/Walls/barricades.rsi/meta.json b/Resources/Textures/Structures/Walls/barricades.rsi/meta.json
deleted file mode 100644 (file)
index 5d7869f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-{
-  "version": 1,
-  "license": "CC-BY-SA-3.0",
-  "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/e09101cb4be860ff02e035b18bef93a08b9c204c",
-  "size": {
-    "x": 32,
-    "y": 32
-  },
-  "states": [
-    {
-      "name": "barricadewooden"
-    }
-  ]
-}
diff --git a/Resources/Textures/Structures/barricades.rsi/barricade.png b/Resources/Textures/Structures/barricades.rsi/barricade.png
new file mode 100644 (file)
index 0000000..ad31943
Binary files /dev/null and b/Resources/Textures/Structures/barricades.rsi/barricade.png differ
diff --git a/Resources/Textures/Structures/barricades.rsi/barricade_directional.png b/Resources/Textures/Structures/barricades.rsi/barricade_directional.png
new file mode 100644 (file)
index 0000000..75d4120
Binary files /dev/null and b/Resources/Textures/Structures/barricades.rsi/barricade_directional.png differ
diff --git a/Resources/Textures/Structures/barricades.rsi/barricade_full.png b/Resources/Textures/Structures/barricades.rsi/barricade_full.png
new file mode 100644 (file)
index 0000000..7ea5580
Binary files /dev/null and b/Resources/Textures/Structures/barricades.rsi/barricade_full.png differ
diff --git a/Resources/Textures/Structures/barricades.rsi/meta.json b/Resources/Textures/Structures/barricades.rsi/meta.json
new file mode 100644 (file)
index 0000000..367f94d
--- /dev/null
@@ -0,0 +1,23 @@
+{
+  "version": 1,
+  "license": "CC-BY-SA-3.0",
+  "copyright": "Taken from /vg/station at commit https://github.com/vgstation-coders/vgstation13/commit/fa615ead9d02b879b2ed0461f36622affb32088f",
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "states": [
+    {
+      "name": "barricade",
+      "directions": 1
+    },
+       {
+         "name": "barricade_full",
+         "directions": 1
+       },
+       {
+         "name": "barricade_directional",
+         "directions": 4
+       }
+  ]
+}
\ No newline at end of file