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 0000000000..6518b7245c Binary files /dev/null and b/Resources/Textures/Structures/Doors/secret_door.rsi/assembly.png differ diff --git a/Resources/Textures/Structures/Doors/secret_door.rsi/closed.png b/Resources/Textures/Structures/Doors/secret_door.rsi/closed.png new file mode 100644 index 0000000000..b68b06f10d Binary files /dev/null and b/Resources/Textures/Structures/Doors/secret_door.rsi/closed.png differ 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 0000000000..0bb895b050 Binary files /dev/null and b/Resources/Textures/Structures/Doors/secret_door.rsi/closing.png differ 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 0000000000..81862e1ead Binary files /dev/null and b/Resources/Textures/Structures/Doors/secret_door.rsi/open.png differ 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 0000000000..9d14324686 Binary files /dev/null and b/Resources/Textures/Structures/Doors/secret_door.rsi/opening.png differ