Mousetraps (#8440)

Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
Flipp Syder
2022-05-25 13:16:34 -07:00
committed by GitHub
parent bd6725e9d9
commit a8f1ffd435
16 changed files with 315 additions and 15 deletions

View File

@@ -507,7 +507,7 @@
- shape:
!type:PhysShapeCircle
radius: 0.48
mass: 20
mass: 60
mask:
- MobMask
layer:
@@ -560,7 +560,7 @@
crit: kangaroo-dead
dead: kangaroo-dead
- type: Puller
- type: entity
name: boxing kangaroo
parent: MobKangaroo
@@ -997,7 +997,7 @@
- shape:
!type:PhysShapeCircle
radius: 0.25
mass: 10
mass: 20
mask:
- MobMask
layer:
@@ -1213,7 +1213,7 @@
- shape:
!type:PhysShapeCircle
radius: 0.35
mass: 10
mass: 20
mask:
- MobMask
layer:
@@ -1269,7 +1269,7 @@
- shape:
!type:PhysShapeCircle
radius: 0.35
mass: 10
mass: 20
mask:
- MobMask
layer:
@@ -1325,7 +1325,7 @@
- shape:
!type:PhysShapeCircle
radius: 0.35
mass: 10
mass: 20
mask:
- MobMask
layer:

View File

@@ -19,7 +19,7 @@
- shape:
!type:PhysShapeCircle
radius: 0.35
mass: 10
mass: 20
mask:
- MobMask
layer:
@@ -138,7 +138,7 @@
spawned:
- id: FoodMeatCorgi
amount: 2
- type: entity
name: Old Ian
parent: MobCorgi
@@ -225,7 +225,7 @@
- shape:
!type:PhysShapeCircle
radius: 0.35
mass: 10
mass: 20
mask:
- MobMask
layer:
@@ -375,7 +375,7 @@
- shape:
!type:PhysShapeCircle
radius: 0.35
mass: 10
mass: 20
mask:
- MobMask
layer:
@@ -418,7 +418,7 @@
- shape:
!type:PhysShapeCircle
radius: 0.35
mass: 10
mass: 20
mask:
- MobMask
layer:
@@ -472,7 +472,7 @@
- shape:
!type:PhysShapeCircle
radius: 0.35
mass: 10
mass: 20
mask:
- MobMask
layer:
@@ -515,7 +515,7 @@
- shape:
!type:PhysShapeCircle
radius: 0.35
mass: 10
mass: 20
mask:
- MobMask
layer:
@@ -592,7 +592,7 @@
- shape:
!type:PhysShapeCircle
radius: 0.35
mass: 10
mass: 20
mask:
- MobMask
layer:

View File

@@ -0,0 +1,58 @@
- type: entity
name: mousetrap
parent: BaseItem
id: Mousetrap
components:
- type: Sprite
sprite: Objects/Devices/mousetrap.rsi
netsync: false
drawdepth: SmallMobs # if mice can hide under tables, so can mousetraps
layers:
- state: mousetrap
- type: StepTrigger
intersectRatio: 0.2
requiredTriggeredSpeed: 0
- type: Mousetrap
ignoreDamageIfInventorySlotsFilled:
- shoes # shoes
- type: DamageOnTrigger
damage:
types:
Blunt: 2 # base damage, scales based on mass
- type: EmitSoundOnUse
sound: "/Audio/Items/Handcuffs/cuff_end.ogg"
- type: EmitSoundOnTrigger
sound: "/Audio/Items/snap.ogg"
- type: Item
sprite: Objects/Devices/mousetrap.rsi
- type: Appearance
visuals:
- type: GenericEnumVisualizer
key: enum.MousetrapVisuals.Visual
layer: 0
states:
enum.MousetrapVisuals.Armed: mousetraparmed
enum.MousetrapVisuals.Unarmed: mousetrap
- type: Physics
bodyType: Dynamic
- type: CollisionWake
enabled: false
- type: Fixtures
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.2,-0.2,0.2,0.2"
id: "slips"
hard: false
layer:
- LowImpassable
- shape:
!type:PhysShapeAabb
bounds: "-0.2,-0.2,0.2,0.2"
mass: 5
mask:
- ItemMask
- type: Rotatable
- type: Tag
tags:
- DroneUsable