From: Flareguy <78941145+Flareguy@users.noreply.github.com> Date: Sat, 16 Sep 2023 12:50:48 +0000 (-0500) Subject: Ports /vg/station barricade sprites & slightly buffs them (#19840) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=743063e4f0c601fe7b496cb82b7721c58fcd4454;p=space-station-14.git Ports /vg/station barricade sprites & slightly buffs them (#19840) --- diff --git a/Resources/Prototypes/Entities/Structures/Walls/barricades.yml b/Resources/Prototypes/Entities/Structures/Walls/barricades.yml deleted file mode 100644 index 666a237e5b..0000000000 --- a/Resources/Prototypes/Entities/Structures/Walls/barricades.yml +++ /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 index 0000000000..8cdd1c4786 --- /dev/null +++ b/Resources/Prototypes/Entities/Structures/barricades.yml @@ -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 diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/structures/barricades.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/barricades.yml index 152ad1e846..d5553af83b 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/structures/barricades.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/structures/barricades.yml @@ -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 + diff --git a/Resources/Prototypes/Recipes/Construction/structures.yml b/Resources/Prototypes/Recipes/Construction/structures.yml index 648bc19673..a5045d8134 100644 --- a/Resources/Prototypes/Recipes/Construction/structures.yml +++ b/Resources/Prototypes/Recipes/Construction/structures.yml @@ -564,12 +564,12 @@ 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 index c65024c634..0000000000 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 index 5d7869fa19..0000000000 --- a/Resources/Textures/Structures/Walls/barricades.rsi/meta.json +++ /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 index 0000000000..ad31943a51 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 index 0000000000..75d4120265 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 index 0000000000..7ea5580cfb 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 index 0000000000..367f94de64 --- /dev/null +++ b/Resources/Textures/Structures/barricades.rsi/meta.json @@ -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