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

Mechs forcefully eject their occupants when destroyed #11349

Merged
merged 6 commits into from
Aug 25, 2024

Conversation

Rukofamicom
Copy link
Contributor

@Rukofamicom Rukofamicom commented Aug 20, 2024

About The Pull Request

  • Mechs now forcefully eject their occupants in a random direction, which guarantees* extra safety for miners that may fall into chasms with the new Clarke mech! This also means combat mechs will no longer drop the occupant on the same tile as the mech when destroyed and will instead forcefully eject them in a random direction, potentially into their attacker, or in some hilarious situations, straight into disposals!
  • Mechs play two sound effects when this function happens, a buzzing sound and a launching sound
  • Mechs no longer inflict sleeping when ejecting their occupant, instead they stun for two seconds (regardless of mech) and knockdown for 2-8 seconds depending on the mech. Syndicate mechs are two seconds (which overlaps the stun), non-combat NT mechs are 4 seconds and non-syndicate combat mechs are 8 seconds.
  • Mechs are no longer able to move when falling into a chasm
  • Since falling into a chasm takes two seconds, I extended the falling animation from 1 second to 1.5 seconds before the sprite fades from view. This was also done for better dramatic timing of the mech ejection and is not likely to be noticed by anyone.

Why It's Good For The Game

It really really sucks getting dropped into a chasm under any circumstances, but even moreso when piloting a clunky mech that can't strafe. This greatly improves the chances for miners to survive chasm falls while using mechs, and at the very least almost guarantees a recoverable body.

Likewise the forced ejection in a random direction made mech pilots a bit more slippery than before, and sleeping when ejected made no sense at all so I've swapped it for a hard stun + knockdown instead. The knockdown counteracts the ejection distance for most station mechs, while nuclear operative mechs will actually benefit from having their pilots be a bit more slippery after this PR.

Testing Photographs and Procedure

dreamseeker_oeuVIL4v8M.mp4

Changelog

🆑
tweak: Mechs now fling their occupants in a random direction upon destruction, including when a mech falls down a chasm.
code: Mechs now have an Eject() proc that can be called directly without destroying the mech.
fix: Mechs can no longer continue walking around when falling into a chasm
tweak: Mechs no longer put pilots to sleep when breaking, instead stunning the pilot and knocking them down for a time dependant on the type of mech.
/:cl:

@Rukofamicom
Copy link
Contributor Author

Rukofamicom commented Aug 20, 2024

I may have two follow-up PRs in mind for this for independent consideration.

  • Giving EMP a chance to trigger the eject functionality, so that EMP is an actual weakness for mechs again
  • Making the ejection stun instead of sleep and adjusting the time it stuns.

@MarkusLarsson421
Copy link
Contributor

If you could make them eject as soon as they enter crit or hard crit as well, that'd be great. Bit weird being able to control a mech while you're practically dead. lol

Copy link
Member

@EvilDragonfiend EvilDragonfiend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should have a knockdown regardless of an occupant will be hit to a wall to be knockdowned.

@Tsar-Salat
Copy link
Contributor

Tsar-Salat commented Aug 20, 2024

dreamseeker_sVnhKYWmAM.mp4

I dont really... like this?

Like there's no flair to it.

I guess I can paint a picture for you:
I expected it look like when you eject from your titan in titanfall, your body rocketing out from its frame. As inertia brings the hulking frame to the depths, you fly outwards and upwards, in its last force upon the waking world, your mech throws you to safety. As you feel the ground beneath your feet, the mech plummets below.

compare this to The mech drops off and two seconds later your unconscious body hits the wall.

Maybe like, a cool ejection sound or effect happens? I don't really understand why it would sleep you either.

@Rukofamicom
Copy link
Contributor Author

@EvilDragonfiend I plan to address the sleep in a follow-up PR. I don't want to shackle this modification with a balance change.

The sleeping is and has always been what happens when a player is ejected from a mech, before this PR it simply happened on the same location.

I don't really understand why it would sleep you either.

See above. This is not something new I have added and is something I want to change, but I don't want to hold this PR back with a balance change unless an unrelated balance change is forced on me by dragon.

I want this to merge as quickly as possible to improve mining in the new Clarke mech, and then worry about the balance afterward. The only thing this PR does to balance is highlight that it's stupid that mechs sleep their occupant upon breaking.

@github-actions github-actions bot added the Mapping DMM Change label Aug 20, 2024
@Rukofamicom
Copy link
Contributor Author

Alright, after pressure from a secondary person I have included the knockdown + stun changes with this PR.

I've also added sounds to the ejection and added a special hook to the chasm falling that triggers the ejection with more reasonable timing.

Copy link
Member

@PowerfulBacon PowerfulBacon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mech buff 😔

@EvilDragonfiend
Copy link
Member

looks good to me, but I hope you put a comment for the rand procs.
nullturf failsafe is optional.

Rukofamicom and others added 2 commits August 22, 2024 08:57
Failsafe for turf just in case

Co-authored-by: EvilDragonfiend <[email protected]>
Updates comment
@Rukofamicom
Copy link
Contributor Author

Per bacon the failsafe is already built into the game, in every possible case the player will already be sent to the error room if the mech is not in a valid location when it is destroyed or ejects.

Copy link
Member

@EvilDragonfiend EvilDragonfiend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ye

@EvilDragonfiend EvilDragonfiend added this pull request to the merge queue Aug 25, 2024
Merged via the queue into BeeStation:master with commit 081a354 Aug 25, 2024
8 checks passed
@Rukofamicom Rukofamicom deleted the eject-failsafe branch September 2, 2024 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants