From 09d40b386ab0deadfaf499ea20c163cd4f48849c Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com> Date: Sat, 9 Oct 2021 10:54:56 +0200 Subject: [PATCH] Added simple grilles with construction, deconstruction and destruction. (#4801) --- Resources/Prototypes/Damage/modifier_sets.yml | 9 +++ .../Entities/Structures/Walls/grille.yml | 72 ++++++++++++++++++ .../Recipes/Construction/Graphs/grille.yml | 44 +++++++++++ .../Recipes/Construction/structures.yml | 17 +++++ .../Structures/Walls/grille.rsi/grille.png | Bin 0 -> 216 bytes .../Walls/grille.rsi/grille_broken.png | Bin 0 -> 285 bytes .../Walls/grille.rsi/grille_damaged_0.png | Bin 0 -> 490 bytes .../Walls/grille.rsi/grille_damaged_1.png | Bin 0 -> 483 bytes .../Walls/grille.rsi/grille_damaged_2.png | Bin 0 -> 526 bytes .../Walls/grille.rsi/grille_damaged_3.png | Bin 0 -> 510 bytes .../Structures/Walls/grille.rsi/meta.json | 29 +++++++ 11 files changed, 171 insertions(+) create mode 100644 Resources/Prototypes/Entities/Structures/Walls/grille.yml create mode 100644 Resources/Prototypes/Recipes/Construction/Graphs/grille.yml create mode 100644 Resources/Textures/Structures/Walls/grille.rsi/grille.png create mode 100644 Resources/Textures/Structures/Walls/grille.rsi/grille_broken.png create mode 100644 Resources/Textures/Structures/Walls/grille.rsi/grille_damaged_0.png create mode 100644 Resources/Textures/Structures/Walls/grille.rsi/grille_damaged_1.png create mode 100644 Resources/Textures/Structures/Walls/grille.rsi/grille_damaged_2.png create mode 100644 Resources/Textures/Structures/Walls/grille.rsi/grille_damaged_3.png create mode 100644 Resources/Textures/Structures/Walls/grille.rsi/meta.json 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 0000000000000000000000000000000000000000..29d9b1685b55411fb0f6a0c4b5300f2c8ea30c1b GIT binary patch literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=ffJ`JOJ0Ar*7pPT9zNM1jZkzM__t zc*x8X(i@n&H#)a@c}uQS^0HX!z2n%see<}z?^o%Z{vNFkBuc|tkUueGi zv-P|5a=TCSq! M)78&qol`;+0R8$}00000 literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..f13aae568ec7acf3f8029a4e49872b42748ec308 GIT binary patch literal 285 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?4jBOuH;Rhv&5D0tq} z#WAE}&f7^F1rICmxPFwiWp&=jENvhty@A;|(17vdch_<*wn-u}T^_x<|Mg!suDROp z%)sJ+gdW&4I&tVOU6Qr-xEO=og6lnoy#DX^TG{4u9q2VY=3FcBm%%|mfXQ;7v-^uk zVWWVDXPD>C%ecqCKyFR^EWROkU8ja&P#S_VsHzHsA{mRh{I(v> z0Zow+Ak$)CUDvF7&6PZI4j6Gz^e(vULwZd$L8O4IW@bDnhEV#ir}l(SsTrjnZ-Fe>j?vkvJ)u)-1_$FfUcqpgj#bFs1?@Yhyk@kR zoY6d&&2wSq&gWQ9alMEKcn~o(O>@9j+EY><5C?(1_#TgW0FEiO640>?1;`QQfxCE} z2go?&bXk@^;)Ps1;OzxC_hljr54d2nqHXWOZ61g@e~kxHk@{_s@W4TlOPpuB517wz z%)gQxT@er1Mz(XJTYD|;3NF%0;sKW<*IP)l!fhxRj3FMl-p=OrkN(^YbFmMVq$hN! z=GYt~XG0f!C6V-mlLuU>^_^qDR}$)pTRdPx!tJ3t}_;f*-(}xE{1H}%bKm(e_RLL!3zQRZo74KDIr=1?&2{W0H$er z{=_bYhTL%CnMgcy5QXSw$_#To}2Vlp%34}*<0N6QG6_G>-CFgkpT0V<$8-VYQq~Th2Qp zpm3r=GZUf?NSrhO(FrB=ogFk2w{*Zo?Eijk{C9j8r1Y!43sU;6meW*z`)ST^e;1_k Z{{g%%X|SJK4YmLP002ovPDHLkV1hSV(}n;5 literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..5db2c0b4dddcc5979bf1fd9b0772bcbd3915a293 GIT binary patch literal 526 zcmV+p0`dKcP)z{EPr?zd~FbuA$s^4$eec!vw<>CZ}n{hs$adEUUSlfI1 z5gZU^M!@D^;PH4I>KEr$WdB%M|C$zC+^F!}X>HwF~I*d>aS0VJB_^}Sa_LcB- zIytQqtTc!7VjX~ufc%m0EBo}n;eY%W9O;)*&i3|8DQA28<=dRUr2|L$pC}++m}HHX Qc>n+a07*qoM6N<$g7JRtKL7v# literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..e1f86fe756a7a01c46cec3b37a0987cc80a93390 GIT binary patch literal 510 zcmVA?o9*?(u-;b{A+&s^&s;c)_#KSPSaU2~Xa3`9k!NYNkmt|a< z$K(KUWemjpGO%sitvpFmRxW`g39ep)mLKDZH9@5SVkPO|B9>(Vf6)~AS}x#^FMEPC z%|QN4bgA6e6cEMynYeA+gY!c96w(ZXaWOGXc~|_&dD2w=r3bJ@Jec3060t3pW1YqQ zu37{6npjrGTdQ#)Xg%{?Khl)e!ez7rM6k}vF{!eqkvex z2C``8jF77jX>Rs`XBtq#dS9^k0K1-PC;aoH$bBG3hScYq?E^WJ1F`#pHvZE-z!yu7 z`@TQqP3d+Y;9D)n_#6Mry(4D%07E-5v9;%JT(}}Wpq&lO`{r|cL9(Z^d?3Zwb^VDa zOLFoqC;xx^F1V97`M{k#(^b literal 0 HcmV?d00001 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