From 998c6f3d7b85d2c0c09f407c4acc9a812563bde4 Mon Sep 17 00:00:00 2001 From: Nim <128169402+Nimfar11@users.noreply.github.com> Date: Sun, 13 Aug 2023 10:10:45 +0300 Subject: [PATCH] Secret door (#19023) * secret door * oops --- .../Doors/SecretDoor/secret_door.yml | 111 ++++++++++++++++++ .../Graphs/structures/secretdoor.yml | 86 ++++++++++++++ .../Recipes/Construction/structures.yml | 17 +++ .../Doors/secret_door.rsi/assembly.png | Bin 0 -> 305 bytes .../Doors/secret_door.rsi/closed.png | Bin 0 -> 171 bytes .../Doors/secret_door.rsi/closing.png | Bin 0 -> 516 bytes .../Doors/secret_door.rsi/meta.json | 60 ++++++++++ .../Structures/Doors/secret_door.rsi/open.png | Bin 0 -> 219 bytes .../Doors/secret_door.rsi/opening.png | Bin 0 -> 530 bytes 9 files changed, 274 insertions(+) create mode 100644 Resources/Prototypes/Entities/Structures/Doors/SecretDoor/secret_door.yml create mode 100644 Resources/Prototypes/Recipes/Construction/Graphs/structures/secretdoor.yml create mode 100644 Resources/Textures/Structures/Doors/secret_door.rsi/assembly.png create mode 100644 Resources/Textures/Structures/Doors/secret_door.rsi/closed.png create mode 100644 Resources/Textures/Structures/Doors/secret_door.rsi/closing.png create mode 100644 Resources/Textures/Structures/Doors/secret_door.rsi/meta.json create mode 100644 Resources/Textures/Structures/Doors/secret_door.rsi/open.png create mode 100644 Resources/Textures/Structures/Doors/secret_door.rsi/opening.png diff --git a/Resources/Prototypes/Entities/Structures/Doors/SecretDoor/secret_door.yml b/Resources/Prototypes/Entities/Structures/Doors/SecretDoor/secret_door.yml new file mode 100644 index 0000000000..2cc6ae0467 --- /dev/null +++ b/Resources/Prototypes/Entities/Structures/Doors/SecretDoor/secret_door.yml @@ -0,0 +1,111 @@ +- type: entity + id: BaseSecretDoor + parent: BaseStructure + name: solid wall # No meta + suffix: secret door + abstract: true + description: Keeps the air in and the greytide out. + components: + - type: Sprite + sprite: Structures/Doors/secret_door.rsi + layers: + - state: closed + map: ["enum.DoorVisualLayers.Base"] + - type: AnimationPlayer + - type: Physics + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.49,-0.49,0.49,0.49" + density: 100 + mask: + - FullTileMask + layer: + - AirlockLayer + - type: Door + bumpOpen: false + clickOpen: true + canCrush: false + closeTimeOne: 0.2 + closeTimeTwo: 0.6 + openTimeOne: 0.6 + openTimeTwo: 0.2 + openingAnimationTime: 1.2 + closingAnimationTime: 1.2 + - type: Appearance + - type: Airtight + fixVacuum: true + - type: Damageable + damageContainer: Inorganic + damageModifierSet: Metallic + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 200 + behaviors: + - !type:DoActsBehavior + acts: ["Destruction"] + - type: IconSmooth + key: walls + mode: NoSprite + - type: Occluder + +- type: entity + id: BaseSecretDoorAssembly + name: secret door assembly + description: It opens, it closes, and maybe crushes you. + components: + - type: Clickable + - type: InteractionOutline + - type: Sprite + sprite: Structures/Doors/secret_door.rsi + state: assembly + - type: Physics + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.45,-0.45,0.45,0.45" + density: 110 + mask: + - FullTileMask + layer: + - HumanoidBlockLayer + - type: Anchorable + delay: 2 + - type: Pullable + - type: Transform + anchored: true + noRot: false + - type: Rotatable + - type: Damageable + damageContainer: Inorganic + damageModifierSet: Metallic + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 100 + behaviors: + - !type:DoActsBehavior + acts: ["Destruction"] + - type: Construction + graph: SecretDoor + node: assembly + placement: + mode: SnapgridCenter + +- type: entity + id: SolidSecretDoor + name: solid wall + parent: BaseSecretDoor + components: + - type: Construction + graph: SecretDoor + node: solidSecretDoor + containers: + - battery-container diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/structures/secretdoor.yml b/Resources/Prototypes/Recipes/Construction/Graphs/structures/secretdoor.yml new file mode 100644 index 0000000000..8acaa5f505 --- /dev/null +++ b/Resources/Prototypes/Recipes/Construction/Graphs/structures/secretdoor.yml @@ -0,0 +1,86 @@ +- type: constructionGraph + id: SecretDoor + start: start + graph: + - node: start + edges: + - to: assembly + completed: + - !type:SetAnchor + value: false + steps: + - material: Steel + amount: 4 + doAfter: 4 + + - material: MetalRod + amount: 4 + doAfter: 4 + + - node: assembly + entity: BaseSecretDoorAssembly + actions: + - !type:SnapToGrid {} + - !type:SetAnchor {} + edges: + - to: wired + conditions: + - !type:EntityAnchored {} + steps: + - material: Cable + amount: 4 + doAfter: 2.5 + - to: start + conditions: + - !type:EntityAnchored + anchored: false + completed: + - !type:SpawnPrototype + prototype: SheetSteel1 + amount: 4 + - !type:DeleteEntity {} + steps: + - tool: Welding + doAfter: 3 + + - node: wired + entity: BaseSecretDoorAssembly + edges: + - to: electronics + steps: + - component: PowerCell + name: power cell + store: battery-container + icon: + sprite: Objects/Power/power_cells.rsi + state: small + doAfter: 1 + - to: assembly + completed: + - !type:GivePrototype + prototype: CableApcStack1 + amount: 4 + steps: + - tool: Cutting + doAfter: 2 + + - node: electronics + entity: BaseSecretDoorAssembly + edges: + - to: solidSecretDoor + steps: + - tool: Screwing + doAfter: 2 + + - node: solidSecretDoor + entity: SolidSecretDoor + edges: + - to: wired + conditions: + - !type:EntityAnchored {} + - !type:DoorWelded {} + completed: + - !type:EmptyAllContainers {} + steps: + - tool: Prying + doAfter: 5 diff --git a/Resources/Prototypes/Recipes/Construction/structures.yml b/Resources/Prototypes/Recipes/Construction/structures.yml index 2b4dbf0415..648bc19673 100644 --- a/Resources/Prototypes/Recipes/Construction/structures.yml +++ b/Resources/Prototypes/Recipes/Construction/structures.yml @@ -1045,3 +1045,20 @@ canBuildInImpassable: false conditions: - !type:TileNotBlocked + +- type: construction + name: solid secret door + id: SolidSecretDoor + graph: SecretDoor + startNode: start + targetNode: solidSecretDoor + category: construction-category-structures + description: A secret door for the wall. + objectType: Structure + placementMode: SnapgridCenter + canBuildInImpassable: false + icon: + sprite: Structures/Doors/secret_door.rsi + state: closed + conditions: + - !type:TileNotBlocked diff --git a/Resources/Textures/Structures/Doors/secret_door.rsi/assembly.png b/Resources/Textures/Structures/Doors/secret_door.rsi/assembly.png new file mode 100644 index 0000000000000000000000000000000000000000..6518b7245c721677990edb252828d4ce34c776f5 GIT binary patch literal 305 zcmV-10nYx3P)Px#>q$gGR9J=WmoW;2Fc3w5G@W2!FL(;U-eOLWLwW*lAmkd;TUZO(Vqr-}S6E1d z#e7H;#=OUnfTQ}pckp7ZRY(}g(_PmE1=iY>d`O;V=A=Lw$t%jTguje2?#s7PB6)>U z3jShd5K%G-$GTD literal 0 HcmV?d00001 diff --git a/Resources/Textures/Structures/Doors/secret_door.rsi/closing.png b/Resources/Textures/Structures/Doors/secret_door.rsi/closing.png new file mode 100644 index 0000000000000000000000000000000000000000..0bb895b050f0d11e75d4ceed4e62cdac855c6d56 GIT binary patch literal 516 zcmeAS@N?(olHy`uVBq!ia0vp^2|(ofA8$SVG)Q<`o&VHXi(4;R@40u;x@yn28awv$nd*l(uDafL z{PB_CG9#JQRk^pF>YlAmu?YKm>t)HTic@}V$)W4_-hbb@{0&I(pYI-LlLZV0Tnvke zB$CsnDb9QsaW#AW_3THQ){=dpd%yi{JE#6%6=bp9{PR$Y-`3cP+wZxXC-_|^t53}B z{f8>|_b)!)di+tsX8By6>uX>B0a2 literal 0 HcmV?d00001 diff --git a/Resources/Textures/Structures/Doors/secret_door.rsi/meta.json b/Resources/Textures/Structures/Doors/secret_door.rsi/meta.json new file mode 100644 index 0000000000..7e8135f216 --- /dev/null +++ b/Resources/Textures/Structures/Doors/secret_door.rsi/meta.json @@ -0,0 +1,60 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Made by Nimfar11 (GitHub) for Space Station 14", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "assembly" + }, + { + "name": "closed", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "closing", + "directions": 1, + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "open", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "opening", + "directions": 1, + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + } + ] +} diff --git a/Resources/Textures/Structures/Doors/secret_door.rsi/open.png b/Resources/Textures/Structures/Doors/secret_door.rsi/open.png new file mode 100644 index 0000000000000000000000000000000000000000..81862e1eade5b452853842c8baaa21f5413914aa GIT binary patch literal 219 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Q$1ZALn2z= zUNq!tRupIn?7dvsCU4XF{e6pV>jTL*BA1VO2E7Zjo~yKnzh~<;VLLS?LybP$DM9Pl zl@`5Z|7LJ3fVJ|C;?fkU19C|re?P6?*gj`-CPQ^Z_Dr@7-;J);pJBE+fItifr1qRI z_PfmRt>E0x&mrk=65r3z6@>g$7oAcf_paU5^UHx3v IIVCg!0MYbT&;S4c literal 0 HcmV?d00001 diff --git a/Resources/Textures/Structures/Doors/secret_door.rsi/opening.png b/Resources/Textures/Structures/Doors/secret_door.rsi/opening.png new file mode 100644 index 0000000000000000000000000000000000000000..9d14324686769b131f947fdce1c02423f2cd3823 GIT binary patch literal 530 zcmeAS@N?(olHy`uVBq!ia0vp^2|(b=ZN&^=a>}IR_^M|M)jI(J%3XaQkgp6o;ec)3?=6WWL@`mnpgbeX^Bdhe7*MNB!yD&8I4q&LkFI z$o%#FxsI&hvkew6zE+h6Ncy)}>hM*`v_s{86n;?PHDHinV>rx^Ai==H+>pp%z{AkS zcmTKH;#FN`FPy;U?7uG?a!fdpue;f9zGk@de*rL4j-P$%N0%9gA1(N7W4+?X=5?=c ze?MXQYWsPM7u#~xOOrsV4qw@H`Cq2~zGdIn{oDTj+qVt-Za=zMBL4wR=wXq(Kw@~j zN_+e1T8Ea{+KDo9dfyoZ%f7l6RqVLK?sDU*_{oQGMeP51S&8=tSY;0}=DJ_5J+OT5 qk6HJ2|GK~L_U*&J^12c3(Vtkmw&2XHnTvsu%;4$j=d#Wzp$P!4QQz+X literal 0 HcmV?d00001