From d52db153a854c336975eba9e6aacd1bafcd56e44 Mon Sep 17 00:00:00 2001 From: Matt Atlas Date: Fri, 3 Feb 2023 15:44:10 +0100 Subject: [PATCH] Fixes shuttle maneuver bugs. (#15690) Co-authored-by: Matt Atlas --- code/modules/overmap/ships/computers/helm.dm | 13 ++++-- html/changelogs/mattatlas-ombugs.yml | 42 ++++++++++++++++++++ 2 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 html/changelogs/mattatlas-ombugs.yml diff --git a/code/modules/overmap/ships/computers/helm.dm b/code/modules/overmap/ships/computers/helm.dm index 2513be6f1a8..13ef8e592d7 100644 --- a/code/modules/overmap/ships/computers/helm.dm +++ b/code/modules/overmap/ships/computers/helm.dm @@ -224,16 +224,21 @@ var/ndir = text2num(href_list["roll"]) if(ishuman(usr)) var/mob/living/carbon/human/H = usr - visible_message(SPAN_DANGER("[H] starts tilting the yoke all the way to the [ndir == WEST ? "left" : "right"]!")) - if(do_after(H, 1 SECOND)) + var/dir_to_move = turn(connected.dir, ndir == WEST ? 90 : -90) + var/turf/new_turf = get_step(connected, dir_to_move) + if(new_turf.x > current_map.overmap_size || new_turf.y > current_map.overmap_size) + to_chat(H, SPAN_WARNING("Automated piloting safeties prevent you from going into deep space.")) + return + if(do_after(H, 1 SECOND) && connected.can_combat_roll()) + visible_message(SPAN_DANGER("[H] tilts the yoke all the way to the [ndir == WEST ? "left" : "right"]!")) connected.combat_roll(ndir) if (href_list["turn"]) var/ndir = text2num(href_list["turn"]) if(ishuman(usr)) var/mob/living/carbon/human/H = usr - visible_message(SPAN_DANGER("[H] starts twisting the yoke all the way to the [ndir == WEST ? "left" : "right"]!")) - if(do_after(H, 1 SECOND)) + if(do_after(H, 1 SECOND) && connected.can_combat_turn()) + visible_message(SPAN_DANGER("[H] twists the yoke all the way to the [ndir == WEST ? "left" : "right"]!")) connected.combat_turn(ndir) if (href_list["manual"]) diff --git a/html/changelogs/mattatlas-ombugs.yml b/html/changelogs/mattatlas-ombugs.yml new file mode 100644 index 00000000000..934965f5c2c --- /dev/null +++ b/html/changelogs/mattatlas-ombugs.yml @@ -0,0 +1,42 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: MattAtlas + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "You can no longer combat roll/turn more than once at a time." + - bugfix: "Maneuvers can no longer throw you into deep space."