From e6917d84e51d47f3305a4decdd52b701ac4f88f4 Mon Sep 17 00:00:00 2001 From: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> Date: Tue, 9 Jul 2024 17:41:23 +0200 Subject: [PATCH] Fixed relaymove blocking you in place (#19595) Fixed relaymove blocking you in place Should fix #19569 and #19507 --- .../signals_atom/signals_atom_movement.dm | 2 +- code/game/atom/_atom.dm | 4 +- code/game/dna/dna_modifier.dm | 2 - .../technomancer/spells/phase_shift.dm | 2 - code/game/gamemodes/vampire/vampire_powers.dm | 2 - code/game/machinery/Sleeper.dm | 2 - code/game/machinery/body_scanner.dm | 2 - code/game/machinery/cloning.dm | 2 - code/game/machinery/cryo.dm | 2 - code/game/machinery/cryopod.dm | 2 - code/game/machinery/rechargestation.dm | 2 - code/game/machinery/suit_cycler.dm | 2 - code/game/objects/items/devices/aicard.dm | 2 - .../objects/items/devices/chameleonproj.dm | 2 - code/game/objects/items/devices/paicard.dm | 2 - .../structures/crates_lockers/closets.dm | 2 - .../crates_lockers/closets/statue.dm | 2 - code/game/objects/structures/janicart.dm | 2 - code/game/objects/structures/morgue.dm | 2 - .../stool_bed_chair_nest/wheelchair.dm | 2 - code/game/objects/structures/trash_pile.dm | 2 - code/modules/cooking/machinery/gibber.dm | 2 - .../modules/heavy_vehicle/mech_interaction.dm | 2 - code/modules/holidays/christmas/props.dm | 2 - code/modules/mob/living/carbon/brain/MMI.dm | 2 - code/modules/mob/living/carbon/carbon.dm | 2 - code/modules/overmap/ships/computers/helm.dm | 2 - code/modules/overmap/ships/ship.dm | 2 - code/modules/recycling/disposal.dm | 4 -- .../spell_list/self/generic/ethereal_jaunt.dm | 2 - code/modules/vehicles/animal.dm | 2 - code/modules/vehicles/bike.dm | 2 - code/modules/vehicles/unicycle.dm | 2 - .../ventcrawl/ventcrawl_atmospherics.dm | 2 - .../changelogs/fluffyghost-relaymovefixes.yml | 58 +++++++++++++++++++ 35 files changed, 61 insertions(+), 69 deletions(-) create mode 100644 html/changelogs/fluffyghost-relaymovefixes.yml diff --git a/code/__DEFINES/dcs/signals/signals_atom/signals_atom_movement.dm b/code/__DEFINES/dcs/signals/signals_atom/signals_atom_movement.dm index 8db700d8f76..52629f9f4ac 100644 --- a/code/__DEFINES/dcs/signals/signals_atom/signals_atom_movement.dm +++ b/code/__DEFINES/dcs/signals/signals_atom/signals_atom_movement.dm @@ -4,7 +4,7 @@ ///from base of atom/relaymove(): (mob/living/user, direction) #define COMSIG_ATOM_RELAYMOVE "atom_relaymove" - ///prevents the "you cannot move while buckled! message" + ///prevents the "you cannot move while buckled! message" -- At the moment, this doesn't do it in our codebase, pending to have driving and buckling implementation updated #define COMSIG_BLOCK_RELAYMOVE (1<<0) ///From base of /datum/move_loop/process() after attempting to move a movable: (datum/move_loop/loop, old_dir) diff --git a/code/game/atom/_atom.dm b/code/game/atom/_atom.dm index e9068020fc4..f7c23e7ef14 100644 --- a/code/game/atom/_atom.dm +++ b/code/game/atom/_atom.dm @@ -131,8 +131,8 @@ SHOULD_CALL_PARENT(TRUE) if(SEND_SIGNAL(src, COMSIG_ATOM_RELAYMOVE, user, direction) & COMSIG_BLOCK_RELAYMOVE) - return FALSE - return TRUE + return + return /** diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 837bbc9ac57..be3f6fb6a03 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -56,8 +56,6 @@ /obj/machinery/dna_scannernew/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(user.stat) return diff --git a/code/game/gamemodes/technomancer/spells/phase_shift.dm b/code/game/gamemodes/technomancer/spells/phase_shift.dm index 729f3799dd6..7c1111cfe94 100644 --- a/code/game/gamemodes/technomancer/spells/phase_shift.dm +++ b/code/game/gamemodes/technomancer/spells/phase_shift.dm @@ -48,8 +48,6 @@ /obj/effect/phase_shift/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(user.stat) return diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm index 6312df20d18..052ca5e100b 100644 --- a/code/game/gamemodes/vampire/vampire_powers.dm +++ b/code/game/gamemodes/vampire/vampire_powers.dm @@ -467,8 +467,6 @@ /obj/effect/dummy/veil_walk/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(user != owner_mob) return diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index ec5c97b64f0..000bc0ae13d 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -296,8 +296,6 @@ /obj/machinery/sleeper/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(user == occupant) go_out() diff --git a/code/game/machinery/body_scanner.dm b/code/game/machinery/body_scanner.dm index 78d47bff4df..c5f6252c6cd 100644 --- a/code/game/machinery/body_scanner.dm +++ b/code/game/machinery/body_scanner.dm @@ -80,8 +80,6 @@ /obj/machinery/bodyscanner/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if (user.stat) return diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 05dcef07d97..7c6ea215b66 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -335,8 +335,6 @@ /obj/machinery/clonepod/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(user.stat) return diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 67bec58ee7a..3d887db2976 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -112,8 +112,6 @@ /obj/machinery/atmospherics/unary/cryo_cell/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(src.occupant == user && !user.stat) go_out() diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 1e0177d8910..d1bb4e4cd92 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -562,8 +562,6 @@ GLOBAL_LIST_EMPTY(frozen_crew) /obj/machinery/cryopod/relaymove(mob/living/user, direction) . = ..() - if(!.) - return go_out() diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 83a4968a0ae..33286dd1303 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -143,8 +143,6 @@ /obj/machinery/recharge_station/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(user.stat) return diff --git a/code/game/machinery/suit_cycler.dm b/code/game/machinery/suit_cycler.dm index c9dd7116848..4a191047a6c 100644 --- a/code/game/machinery/suit_cycler.dm +++ b/code/game/machinery/suit_cycler.dm @@ -144,8 +144,6 @@ /obj/machinery/suit_cycler/relaymove(mob/living/user, direction) . = ..() - if(!.) - return eject_occupant(user) diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 8e3a0567cf2..4ec39ac8ee8 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -177,8 +177,6 @@ /obj/item/aicard/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(user.stat || user.stunned) return diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index c531f2892f8..f80fc99dca3 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -128,8 +128,6 @@ /obj/effect/dummy/chameleon/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(istype(loc, /turf/space)) return //No magical space movement! diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index 34381a38f74..3f0f4d23838 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -18,8 +18,6 @@ /obj/item/device/paicard/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(user.stat || user.stunned) return diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index bfd7d6b9f7e..cf913c540ed 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -532,8 +532,6 @@ /obj/structure/closet/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(user.stat || !isturf(loc)) return diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm index 1eec5b1d17c..02401c1814d 100644 --- a/code/game/objects/structures/crates_lockers/closets/statue.dm +++ b/code/game/objects/structures/crates_lockers/closets/statue.dm @@ -154,8 +154,6 @@ /obj/structure/closet/statue/relaymove(mob/living/user, direction) . = ..() - if(!.) - return return diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 408c1f8dfd2..905da3072e8 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -360,8 +360,6 @@ //Shamelessly copied from wheelchair code /obj/structure/janitorialcart/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(user.stat || user.stunned || user.weakened || user.paralysis || user.lying || user.restrained()) if(user==pulling) diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 264925eafe5..1e8e4ff2faf 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -108,8 +108,6 @@ /obj/structure/morgue/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(user.stat || locked) return diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index e9f9e215ec9..e3238881786 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -22,8 +22,6 @@ /obj/structure/bed/stool/chair/office/wheelchair/relaymove(mob/living/user, direction) . = ..() - if(!.) - return // Redundant check? if(user.stat || user.stunned || user.weakened || user.paralysis || user.lying || user.restrained()) diff --git a/code/game/objects/structures/trash_pile.dm b/code/game/objects/structures/trash_pile.dm index bdce73b0d81..75423ed56f3 100644 --- a/code/game/objects/structures/trash_pile.dm +++ b/code/game/objects/structures/trash_pile.dm @@ -43,8 +43,6 @@ /obj/structure/trash_pile/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(user.stat || user.resting) // don't care too much about use_check here, checking these will suffice return diff --git a/code/modules/cooking/machinery/gibber.dm b/code/modules/cooking/machinery/gibber.dm index 74d07711c9e..aa7c02986b9 100644 --- a/code/modules/cooking/machinery/gibber.dm +++ b/code/modules/cooking/machinery/gibber.dm @@ -69,8 +69,6 @@ /obj/machinery/gibber/relaymove(mob/living/user, direction) . = ..() - if(!.) - return go_out() return diff --git a/code/modules/heavy_vehicle/mech_interaction.dm b/code/modules/heavy_vehicle/mech_interaction.dm index 147490fe614..5e7bd819617 100644 --- a/code/modules/heavy_vehicle/mech_interaction.dm +++ b/code/modules/heavy_vehicle/mech_interaction.dm @@ -266,8 +266,6 @@ /mob/living/heavy_vehicle/relaymove(mob/living/user, direction, var/turn_only = FALSE) . = ..() - if(!.) - return if(!can_move(user)) return diff --git a/code/modules/holidays/christmas/props.dm b/code/modules/holidays/christmas/props.dm index 50c026dea97..34c7dd8783b 100644 --- a/code/modules/holidays/christmas/props.dm +++ b/code/modules/holidays/christmas/props.dm @@ -78,8 +78,6 @@ /obj/effect/spresent/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if (user.stat) return diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index cef4479ca7d..d6d7e03406e 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -203,8 +203,6 @@ /obj/item/device/mmi/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(user.stat || user.stunned) return diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index d5e2fae967c..562bbc875c8 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -78,8 +78,6 @@ /mob/living/carbon/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if((user in contents) && istype(user)) if(user.last_special <= world.time) diff --git a/code/modules/overmap/ships/computers/helm.dm b/code/modules/overmap/ships/computers/helm.dm index b8f1a7f1a28..715e4873bdd 100644 --- a/code/modules/overmap/ships/computers/helm.dm +++ b/code/modules/overmap/ships/computers/helm.dm @@ -111,8 +111,6 @@ /obj/machinery/computer/ship/helm/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(viewing_overmap(user) && connected) connected.relaymove(user, direction, accellimit) diff --git a/code/modules/overmap/ships/ship.dm b/code/modules/overmap/ships/ship.dm index b4fe6404c1d..e932bfd0eb6 100644 --- a/code/modules/overmap/ships/ship.dm +++ b/code/modules/overmap/ships/ship.dm @@ -81,8 +81,6 @@ var/const/OVERMAP_SPEED_CONSTANT = (1 SECOND) /obj/effect/overmap/visitable/ship/relaymove(mob/living/user, direction, accel_limit) . = ..() - if(!.) - return INVOKE_ASYNC(src, PROC_REF(accelerate), direction, accel_limit) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 40ff05a1bd8..0b286777627 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -312,8 +312,6 @@ // attempt to move while inside /obj/machinery/disposal/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(user.stat || src.flushing) return @@ -752,8 +750,6 @@ // called when player tries to move while in a pipe /obj/disposalholder/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(!istype(user,/mob/living)) return diff --git a/code/modules/spell_system/spells/spell_list/self/generic/ethereal_jaunt.dm b/code/modules/spell_system/spells/spell_list/self/generic/ethereal_jaunt.dm index 0ab507fb225..80cdee763c4 100644 --- a/code/modules/spell_system/spells/spell_list/self/generic/ethereal_jaunt.dm +++ b/code/modules/spell_system/spells/spell_list/self/generic/ethereal_jaunt.dm @@ -98,8 +98,6 @@ /obj/effect/dummy/spell_jaunt/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if (!src.canmove || reappearing) return var/turf/newLoc = get_step(src,direction) diff --git a/code/modules/vehicles/animal.dm b/code/modules/vehicles/animal.dm index 475663f61a9..cbb259b47cd 100644 --- a/code/modules/vehicles/animal.dm +++ b/code/modules/vehicles/animal.dm @@ -92,8 +92,6 @@ /obj/vehicle/animal/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(user != load || user.incapacitated()) return diff --git a/code/modules/vehicles/bike.dm b/code/modules/vehicles/bike.dm index 0d022a05269..6e304f6db58 100644 --- a/code/modules/vehicles/bike.dm +++ b/code/modules/vehicles/bike.dm @@ -191,8 +191,6 @@ /obj/vehicle/bike/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(user != load || !on || user.incapacitated()) return diff --git a/code/modules/vehicles/unicycle.dm b/code/modules/vehicles/unicycle.dm index 8c6f863ff39..2f525d199da 100644 --- a/code/modules/vehicles/unicycle.dm +++ b/code/modules/vehicles/unicycle.dm @@ -47,8 +47,6 @@ /obj/vehicle/unicycle/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(user != load || !on || user.incapacitated()) return diff --git a/code/modules/ventcrawl/ventcrawl_atmospherics.dm b/code/modules/ventcrawl/ventcrawl_atmospherics.dm index da1ff2f138f..89875b2e1c0 100644 --- a/code/modules/ventcrawl/ventcrawl_atmospherics.dm +++ b/code/modules/ventcrawl/ventcrawl_atmospherics.dm @@ -25,8 +25,6 @@ /obj/machinery/atmospherics/relaymove(mob/living/user, direction) . = ..() - if(!.) - return if(user.loc != src || !(direction & initialize_directions)) //can't go in a way we aren't connecting to return diff --git a/html/changelogs/fluffyghost-relaymovefixes.yml b/html/changelogs/fluffyghost-relaymovefixes.yml new file mode 100644 index 00000000000..bfea06b9a96 --- /dev/null +++ b/html/changelogs/fluffyghost-relaymovefixes.yml @@ -0,0 +1,58 @@ +################################ +# 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 +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: FluffyGhost + +# 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, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Fixed relaymove blocking you in place."