Landmine stepoff (#22962)

* make landmine work on stepping off

* update methods naming

* made both step modes possible

* updated stepoff event raise to not interfere with game physics internals

* added comments

* figuring out how audiosystem works

* added beep sound effect, updated how stepoff trigger works to make it more consistent

* updated source in attributions.yml

* made stepoff working every time

* introduced suggested changes

* updated janitor's WetSignMine to have audio

* made cleaner events and bashing my head at OnEndCollide event raise

* inverted conditional where applicable

* review

---------

Co-authored-by: Yurii Kis <yurii.kis@smartteksas.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
KISS
2024-03-24 07:33:45 +02:00
committed by GitHub
parent f96cf360e9
commit 54dd273f66
13 changed files with 97 additions and 49 deletions

View File

@@ -221,3 +221,8 @@
copyright: TGStation at 3df5d3b42bfb6b3b5adba1067ab41f83816255bb
license: CC-BY-SA-3.0
source: https://github.com/tgstation/tgstation/blob/3df5d3b42bfb6b3b5adba1067ab41f83816255bb/sound/misc/server-ready.ogg
- files: [beep_landmine.ogg]
copyright: '"beep_landmine.ogg" by kaktuscsc of Discord for SS14'
license: "CC-BY-SA-3.0"
source: https://github.com/YuriyKiss/space-station-14/commit/971a135a9c83aed46e967aac9302ab5b35562b5f

Binary file not shown.

View File

@@ -35,9 +35,13 @@
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: LandMine
- type: TriggerOnStepTrigger
sound:
path: /Audio/Effects/beep_landmine.ogg
params:
maxDistance: 10
- type: StepTrigger
requiredTriggeredSpeed: 0
stepOn: true
- type: entity
name: kick mine
@@ -57,7 +61,6 @@
- type: Construction
graph: ModularMineGraph
node: emptyCase
- type: LandMine
- type: entity
name: explosive mine
@@ -71,4 +74,3 @@
intensitySlope: 3
totalIntensity: 120 # about a ~4 tile radius
canCreateVacuum: false
- type: DeleteOnTrigger

View File

@@ -230,6 +230,7 @@
- type: StepTrigger
intersectRatio: 0.2
requiredTriggeredSpeed: 0
stepOn: true
- type: CollisionWake
enabled: false
- type: Physics
@@ -251,6 +252,10 @@
mask:
- ItemMask
- type: LandMine
sound:
path: /Audio/Effects/beep_landmine.ogg
params:
maxDistance: 10
- type: ExplodeOnTrigger
- type: Explosive
explosionType: HardBomb # normally Default and max 5 total 60