Secret door (#19023)

* secret door

* oops
This commit is contained in:
Nim
2023-08-13 10:10:45 +03:00
committed by GitHub
parent 3af1cc0dbd
commit 998c6f3d7b
9 changed files with 274 additions and 0 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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