diff --git a/Resources/Prototypes/_Backmen/Entities/Objects/Devices/trap.yml b/Resources/Prototypes/_Backmen/Entities/Objects/Devices/trap.yml new file mode 100644 index 00000000000..c64efb8ac37 --- /dev/null +++ b/Resources/Prototypes/_Backmen/Entities/Objects/Devices/trap.yml @@ -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 \ No newline at end of file diff --git a/Resources/Prototypes/_Backmen/Recipes/Construction/Graphs/weapons/trap.yml b/Resources/Prototypes/_Backmen/Recipes/Construction/Graphs/weapons/trap.yml new file mode 100644 index 00000000000..9ed629072ea --- /dev/null +++ b/Resources/Prototypes/_Backmen/Recipes/Construction/Graphs/weapons/trap.yml @@ -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 \ No newline at end of file diff --git a/Resources/Prototypes/_Backmen/Recipes/Construction/weapons.yml b/Resources/Prototypes/_Backmen/Recipes/Construction/weapons.yml new file mode 100644 index 00000000000..2aefbeca33a --- /dev/null +++ b/Resources/Prototypes/_Backmen/Recipes/Construction/weapons.yml @@ -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 \ No newline at end of file diff --git a/Resources/Textures/Backmen/Objects/Devices/trap.rsi/beartrap.png b/Resources/Textures/Backmen/Objects/Devices/trap.rsi/beartrap.png new file mode 100644 index 00000000000..ee870b4aae6 Binary files /dev/null and b/Resources/Textures/Backmen/Objects/Devices/trap.rsi/beartrap.png differ diff --git a/Resources/Textures/Backmen/Objects/Devices/trap.rsi/beartrap1.png b/Resources/Textures/Backmen/Objects/Devices/trap.rsi/beartrap1.png new file mode 100644 index 00000000000..dc3845910d0 Binary files /dev/null and b/Resources/Textures/Backmen/Objects/Devices/trap.rsi/beartrap1.png differ diff --git a/Resources/Textures/Backmen/Objects/Devices/trap.rsi/meta.json b/Resources/Textures/Backmen/Objects/Devices/trap.rsi/meta.json new file mode 100644 index 00000000000..8c952fb684b --- /dev/null +++ b/Resources/Textures/Backmen/Objects/Devices/trap.rsi/meta.json @@ -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" + } + ] +} \ No newline at end of file