diff --git a/Resources/Prototypes/Damage/modifier_sets.yml b/Resources/Prototypes/Damage/modifier_sets.yml index a122aecce0..58443b557e 100644 --- a/Resources/Prototypes/Damage/modifier_sets.yml +++ b/Resources/Prototypes/Damage/modifier_sets.yml @@ -8,6 +8,15 @@ flatReductions: Blunt: 5 +# Like metallic, but without flat reduction so it can be damaged with fists. +- type: damageModifierSet + id: FlimsyMetallic + coefficients: + Blunt: 0.7 + Slash: 0.5 + Piercing: 0.7 + Shock: 1.2 + - type: damageModifierSet id: Inflatable coefficients: diff --git a/Resources/Prototypes/Entities/Structures/Walls/grille.yml b/Resources/Prototypes/Entities/Structures/Walls/grille.yml new file mode 100644 index 0000000000..9c9e8d563e --- /dev/null +++ b/Resources/Prototypes/Entities/Structures/Walls/grille.yml @@ -0,0 +1,72 @@ +- type: entity + id: Grille + parent: BaseStructure + name: grille + description: A flimsy framework of iron rods. + components: + - type: Sprite + netsync: false + drawdepth: Walls + sprite: Structures/Walls/grille.rsi + state: grille + - type: Icon + sprite: Structures/Walls/grille.rsi + state: grille + - type: RCDDeconstructWhitelist + - type: Construction + graph: grille + node: grille + deconstructionTarget: start + - type: Damageable + damageContainer: Inorganic + damageModifierSet: FlimsyMetallic + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 20 + behaviors: + - !type:ChangeConstructionNodeBehavior + node: grilleBroken + - !type:DoActsBehavior + acts: ["Breakage"] + +- type: entity + id: GrilleBroken + parent: Grille + name: grille + description: A flimsy framework of iron rods. It has seen better days. + components: + - type: Sprite + netsync: false + drawdepth: Walls + sprite: Structures/Walls/grille.rsi + state: grille_broken + - type: Icon + sprite: Structures/Walls/grille.rsi + state: grille_broken + - type: RCDDeconstructWhitelist + - type: Construction + graph: grille + node: grilleBroken + deconstructionTarget: start + - type: Physics + fixtures: + - shape: + !type:PhysShapeAabb + bounds: "-0.45,-0.45,0.45,0.45" + mass: 50 + layer: + - Passable + mask: + - Passable + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 10 + behaviors: + - !type:ChangeConstructionNodeBehavior + node: start + - !type:DoActsBehavior + acts: ["Destruction"] diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/grille.yml b/Resources/Prototypes/Recipes/Construction/Graphs/grille.yml new file mode 100644 index 0000000000..0b91d50353 --- /dev/null +++ b/Resources/Prototypes/Recipes/Construction/Graphs/grille.yml @@ -0,0 +1,44 @@ +- type: constructionGraph + id: grille + start: start + graph: + - node: start + edges: + - to: grille + completed: + - !type:SnapToGrid + southRotation: true + steps: + - material: MetalRod + amount: 2 + doAfter: 1 + + - node: grille + entity: Grille + edges: + - to: start + completed: + - !type:SpawnPrototype + prototype: PartRodMetal1 + amount: 2 + - !type:DeleteEntity + steps: + - tool: Cutting + doAfter: 0.25 + + - node: grilleBroken + entity: GrilleBroken + edges: + - to: start + completed: + - !type:SpawnPrototype + prototype: PartRodMetal1 + amount: 1 + - !type:DeleteEntity + steps: + - tool: Cutting + - to: grille + steps: + - material: MetalRod + amount: 1 + doAfter: 0.5 diff --git a/Resources/Prototypes/Recipes/Construction/structures.yml b/Resources/Prototypes/Recipes/Construction/structures.yml index a9424d1aea..2dfba43459 100644 --- a/Resources/Prototypes/Recipes/Construction/structures.yml +++ b/Resources/Prototypes/Recipes/Construction/structures.yml @@ -70,6 +70,23 @@ placementMode: SnapgridCenter canRotate: false +- type: construction + name: grille + id: Grille + graph: grille + startNode: start + targetNode: grille + category: Structures + description: A flimsy framework of iron rods. + conditions: + - !type:TileNotBlocked + icon: + sprite: Structures/Walls/grille.rsi + state: grille + objectType: Structure + placementMode: SnapgridCenter + canRotate: false + - type: construction name: window id: Window diff --git a/Resources/Textures/Structures/Walls/grille.rsi/grille.png b/Resources/Textures/Structures/Walls/grille.rsi/grille.png new file mode 100644 index 0000000000..29d9b1685b Binary files /dev/null and b/Resources/Textures/Structures/Walls/grille.rsi/grille.png differ diff --git a/Resources/Textures/Structures/Walls/grille.rsi/grille_broken.png b/Resources/Textures/Structures/Walls/grille.rsi/grille_broken.png new file mode 100644 index 0000000000..f13aae568e Binary files /dev/null and b/Resources/Textures/Structures/Walls/grille.rsi/grille_broken.png differ diff --git a/Resources/Textures/Structures/Walls/grille.rsi/grille_damaged_0.png b/Resources/Textures/Structures/Walls/grille.rsi/grille_damaged_0.png new file mode 100644 index 0000000000..624eee3feb Binary files /dev/null and b/Resources/Textures/Structures/Walls/grille.rsi/grille_damaged_0.png differ diff --git a/Resources/Textures/Structures/Walls/grille.rsi/grille_damaged_1.png b/Resources/Textures/Structures/Walls/grille.rsi/grille_damaged_1.png new file mode 100644 index 0000000000..7914850c54 Binary files /dev/null and b/Resources/Textures/Structures/Walls/grille.rsi/grille_damaged_1.png differ diff --git a/Resources/Textures/Structures/Walls/grille.rsi/grille_damaged_2.png b/Resources/Textures/Structures/Walls/grille.rsi/grille_damaged_2.png new file mode 100644 index 0000000000..5db2c0b4dd Binary files /dev/null and b/Resources/Textures/Structures/Walls/grille.rsi/grille_damaged_2.png differ diff --git a/Resources/Textures/Structures/Walls/grille.rsi/grille_damaged_3.png b/Resources/Textures/Structures/Walls/grille.rsi/grille_damaged_3.png new file mode 100644 index 0000000000..e1f86fe756 Binary files /dev/null and b/Resources/Textures/Structures/Walls/grille.rsi/grille_damaged_3.png differ diff --git a/Resources/Textures/Structures/Walls/grille.rsi/meta.json b/Resources/Textures/Structures/Walls/grille.rsi/meta.json new file mode 100644 index 0000000000..fa55d903c6 --- /dev/null +++ b/Resources/Textures/Structures/Walls/grille.rsi/meta.json @@ -0,0 +1,29 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from https://github.com/tgstation/tgstation at commit 17c603f1d037f22081d446b9a3f3ae8d41f52e86", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "grille" + }, + { + "name": "grille_broken" + }, + { + "name": "grille_damaged_0" + }, + { + "name": "grille_damaged_1" + }, + { + "name": "grille_damaged_2" + }, + { + "name": "grille_damaged_3" + } + ] +} \ No newline at end of file