Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] i'ts trap #871

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions Resources/Prototypes/_Backmen/Entities/Objects/Devices/trap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
- type: entity
name: капкан
parent: BaseItem
id: trap
description: Капкан для больших мальчиков
components:
- type: Sprite
sprite: Backmen/Objects/Devices/trap.rsi
drawdepth: Mobs
layers:
- state: beartrap
map: ["base"]
- type: StepTrigger
intersectRatio: 0.2
requiredTriggeredSpeed: 2
- type: Ensnaring
freeTime: 3.0
breakoutTime: 3.5
walkSpeed: 0.7
sprintSpeed: 0.7
staminaDamage: 55
canThrowTrigger: true
canMoveBreakout: true
- type: Damageable
damageContainer: Inorganic
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 40
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- trigger:
!type:DamageTrigger
damage: 10
behaviors:
- !type:PlaySoundBehavior
sound:
collection: MetalBreak
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Mousetrap
- type: TriggerOnStepTrigger
- type: PreventableStepTrigger
- type: DamageUserOnTrigger
damage:
types:
Blunt: 5
Piercing: 10
- type: Construction
graph: Trap
node: trap
- type: EmitSoundOnUse
sound: "/Audio/Items/Handcuffs/cuff_end.ogg"
- type: EmitSoundOnTrigger
sound: "/Audio/Items/snap.ogg"
- type: Item
sprite: Backmen/Objects/Devices/trap.rsi
- type: Appearance
- type: GenericVisualizer
visuals:
enum.MousetrapVisuals.Visual:
base:
Armed: { state: beartrap1 }
Unarmed: { state: beartrap }
- type: Physics
bodyType: Dynamic
- type: CollisionWake
enabled: false
- type: Fixtures
fixtures:
slips:
shape:
!type:PhysShapeAabb
bounds: "-0.2,-0.2,0.2,0.2"
hard: false
layer:
- LowImpassable
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.2,-0.2,0.2,0.2"
density: 30
mask:
- ItemMask
- type: LandAtCursor
- type: Rotatable

- type: entity
name: капкан
suffix: Armed
parent: trap
id: trapArmed
description: Капкан для больших мальчиков
components:
- type: Mousetrap
isActive: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
- type: constructionGraph
id: Trap
start: start
graph:
- node: start
edges:
- to: trap
steps:
- material: Cable
amount: 5
doAfter: 2
- material: Steel
amount: 5
doAfter: 2
- material: MetalRod
amount: 5
doAfter: 2
- tag: GlassShard
name: glass shard
icon:
sprite: Objects/Materials/Shards/shard.rsi
state: shard1
doAfter: 0.5

- node: trap
entity: trap
10 changes: 10 additions & 0 deletions Resources/Prototypes/_Backmen/Recipes/Construction/weapons.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- type: construction
name: Trap
id: Trap
graph: Trap
startNode: start
targetNode: trap
category: construction-category-weapons
description: Ловушка для любителей подглядывать.
icon: { sprite: Backmen/Objects/Devices/trap.rsi, state: beartrap1 }
objectType: Item
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions Resources/Textures/Backmen/Objects/Devices/trap.rsi/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from daedalusdock at https://github.com/DaedalusDock/daedalusdock/blob/777fe5a35047cff82024df391638373bb4dd28b1/icons/obj/restraints.dmi modificated @CrimeMoot",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "beartrap"
},
{
"name": "beartrap1"
}
]
}
Loading