mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Mech Controls Rework (#21762)
This PR reworks the controls for Mechs to now operate under "Battletech-Style" controls. Where the W and S keys are instead Forward and Reverse, while A and D are turn-left and turn-right respectively. This control scheme is generally significantly more playable for mechs, since mechs can only interact with objects or fire weapons in a forward-facing arc. Mechs were previously incapable of both repositioning and fighting at the same time, while with this update a mech can now face an enemy, fire upon them, and either move closer to them or further away. Mechs also now have reverse speed characteristics based on their chassis selection. Bipedal legs generally have the worst reverse speed. Quad legs have significantly better reverse handling, and Treads have no reverse speed reduction at all (with the fun caveat that they suck at turning). I have also fixed the issue of mechs feeling like they were "too easy to mobility kill". It turned out that mechs were hardcoded to be mobility killed when they took only 45 points of damage, regardless of how tough their legs were. I have reworked this to instead be a linear decrease in movement speed, based on the damage taken ratio of the legs. Larger and tougher legs are naturally more resistant to being impeded by mobility damage. I have actually tested this PR, here's it in action! NOW WITH STRAFING https://github.com/user-attachments/assets/3123fed8-ec22-4118-8a6a-7cbfe45e6667 --------- Signed-off-by: VMSolidus <evilexecutive@gmail.com> Co-authored-by: Cody Brittain <1779662+Generalcamo@users.noreply.github.com>
This commit is contained in:
co-authored by
Cody Brittain
parent
2a2d0798b9
commit
cf861efefd
@@ -7,6 +7,11 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
set name = "quick-equip"
|
||||
set hidden = 1
|
||||
|
||||
var/cancelled = FALSE
|
||||
SEND_SIGNAL(src, COMSIG_INPUT_KEY_QUICK_EQUIP, &cancelled)
|
||||
if (cancelled)
|
||||
return
|
||||
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
var/obj/item/I = H.get_active_hand()
|
||||
|
||||
@@ -52,6 +52,9 @@
|
||||
diagonal_action(SOUTHWEST)
|
||||
|
||||
/client/proc/diagonal_action(direction)
|
||||
if (!mob)
|
||||
return
|
||||
|
||||
switch(client_dir(direction, 1))
|
||||
if(NORTHEAST)
|
||||
swap_hand()
|
||||
@@ -67,6 +70,11 @@
|
||||
to_chat(usr, SPAN_WARNING("This mob type cannot throw items."))
|
||||
return
|
||||
if(NORTHWEST)
|
||||
var/cancelled = FALSE
|
||||
SEND_SIGNAL(mob, COMSIG_INPUT_KEY_DROP, &cancelled)
|
||||
if (cancelled)
|
||||
return
|
||||
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
if(!C.get_active_hand())
|
||||
|
||||
Reference in New Issue
Block a user