From 956f3c769a65e81dc0441afb2e326c8949c553d8 Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Thu, 23 Oct 2025 21:37:52 -0700 Subject: [PATCH] [MIRROR] vehicles properly call Move() (#11859) Co-authored-by: Will <7099514+Willburd@users.noreply.github.com> Co-authored-by: Cameron Lennox --- code/modules/vehicles/Securitrain_vr.dm | 8 ++++---- code/modules/vehicles/bike.dm | 10 +++++----- code/modules/vehicles/cargo_train.dm | 12 +++++------- code/modules/vehicles/rover_vr.dm | 8 ++++---- code/modules/vehicles/train.dm | 4 ++-- code/modules/vehicles/vehicle.dm | 13 ++++++------- 6 files changed, 26 insertions(+), 29 deletions(-) diff --git a/code/modules/vehicles/Securitrain_vr.dm b/code/modules/vehicles/Securitrain_vr.dm index 65226c4b7e..612fef99c0 100644 --- a/code/modules/vehicles/Securitrain_vr.dm +++ b/code/modules/vehicles/Securitrain_vr.dm @@ -67,7 +67,7 @@ add_overlay(I) turn_off() //so engine verbs are correctly set -/obj/vehicle/train/security/engine/Move(var/turf/destination) +/obj/vehicle/train/security/engine/Move(atom/newloc, direct = 0, movetime) if(on && cell.charge < charge_use) turn_off() update_stats() @@ -75,11 +75,11 @@ to_chat(load, "The drive motor briefly whines, then drones to a stop.") if(is_train_head() && !on) - return 0 + return FALSE //space check ~no flying space trains sorry - if(on && istype(destination, /turf/space)) - return 0 + if(on && isnonsolidturf(newloc)) + return FALSE return ..() diff --git a/code/modules/vehicles/bike.dm b/code/modules/vehicles/bike.dm index ca6d172bc5..02630725fa 100644 --- a/code/modules/vehicles/bike.dm +++ b/code/modules/vehicles/bike.dm @@ -133,25 +133,25 @@ return 1 return 0 -/obj/vehicle/bike/Move(var/turf/destination) +/obj/vehicle/bike/Move(atom/newloc, direct = 0, movetime) if(kickstand) return 0 if(on && (!cell || cell.charge < charge_use)) turn_off() visible_message(span_warning("\The [src] whines, before its engines wind down.")) - return 0 + return FALSE //these things like space, not turf. Dragging shouldn't weigh you down. if(on && cell) cell.use(charge_use) - if(istype(destination,/turf/space) || istype(destination, /turf/simulated/floor/water) || pulledby) + if(isnonsolidturf(newloc) || pulledby) if(!space_speed) - return 0 + return FALSE move_delay = space_speed else if(!land_speed) - return 0 + return FALSE move_delay = land_speed return ..() diff --git a/code/modules/vehicles/cargo_train.dm b/code/modules/vehicles/cargo_train.dm index 156a0e1fe2..c8c72c1833 100644 --- a/code/modules/vehicles/cargo_train.dm +++ b/code/modules/vehicles/cargo_train.dm @@ -51,7 +51,7 @@ update_icon() turn_off() //so engine verbs are correctly set -/obj/vehicle/train/engine/Move(var/turf/destination) +/obj/vehicle/train/engine/Move(atom/newloc, direct = 0, movetime) if(on && cell.charge < charge_use) turn_off() update_stats() @@ -59,11 +59,11 @@ to_chat(load, "The drive motor briefly whines, then drones to a stop.") if(is_train_head() && !on) - return 0 + return FALSE //space check ~no flying space trains sorry - if(on && istype(destination, /turf/space)) - return 0 + if(on && isnonsolidturf(newloc)) + return FALSE return ..() @@ -156,7 +156,7 @@ verbs += /obj/vehicle/train/engine/verb/stop_engine /obj/vehicle/train/RunOver(var/mob/living/M) - if(pulledby == M) // VOREstation edit: Don't destroy people pulling vehicles up stairs + if(pulledby == M) // Don't destroy people pulling vehicles up stairs return var/list/parts = list(BP_HEAD, BP_TORSO, BP_L_LEG, BP_R_LEG, BP_L_ARM, BP_R_ARM) @@ -400,7 +400,6 @@ else anchored = TRUE -// VOREStation Edit Start - Overlay stuff for the chair-like effect /obj/vehicle/train/engine/update_icon() ..() cut_overlays() @@ -412,7 +411,6 @@ /obj/vehicle/train/engine/set_dir() ..() update_icon() -// VOREStation Edit End - Overlay stuff for the chair-like effect //------------------------------------------------------- // Cargo tugs for reagent transport from chemical refinery diff --git a/code/modules/vehicles/rover_vr.dm b/code/modules/vehicles/rover_vr.dm index 8d5d84067d..bb1af6a286 100644 --- a/code/modules/vehicles/rover_vr.dm +++ b/code/modules/vehicles/rover_vr.dm @@ -67,7 +67,7 @@ . = ..() turn_off() //so engine verbs are correctly set -/obj/vehicle/train/rover/engine/Move(var/turf/destination) +/obj/vehicle/train/rover/engine/Move(atom/newloc, direct = 0, movetime) if(on && cell.charge < charge_use) turn_off() update_stats() @@ -75,11 +75,11 @@ to_chat(load, span_notice("The drive motor briefly whines, then drones to a stop.")) if(is_train_head() && !on) - return 0 + return FALSE //space check ~no flying space trains sorry - if(on && isopenturf(destination)) - return 0 + if(on && isnonsolidturf(newloc)) + return FALSE return ..() diff --git a/code/modules/vehicles/train.dm b/code/modules/vehicles/train.dm index d7386d5bed..60fbe5b7f5 100644 --- a/code/modules/vehicles/train.dm +++ b/code/modules/vehicles/train.dm @@ -29,7 +29,7 @@ if(latch_on_start) latch(T, null) -/obj/vehicle/train/Move() +/obj/vehicle/train/Move(atom/newloc, direct = 0, movetime) var/old_loc = get_turf(src) if((. = ..())) if(tow) @@ -38,7 +38,7 @@ unattach() /obj/vehicle/train/Bump(atom/Obstacle) - if(istype(Obstacle,/obj/structure/stairs)) // VOREstation edit - Stair support for towing vehicles + if(istype(Obstacle,/obj/structure/stairs)) return ..() if(!istype(Obstacle, /atom/movable)) return diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index 0812b356b6..d2437dad42 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -78,21 +78,20 @@ riding_datum.restore_position(buckled_mob) riding_datum.handle_vehicle_offsets() // So the person in back goes to the front. -/obj/vehicle/Move(var/newloc, var/direction, var/movetime) - // VOREstation edit - Zmoving for falling +/obj/vehicle/Move(atom/newloc, direct = 0, movetime) var/turf/newturf = newloc var/zmove = (newturf && z != newturf.z) - if(!zmove && world.time < l_move_time + move_delay) //This AND the riding datum move speed limit? // VOREstation edit end - return + if(!zmove && world.time < l_move_time + move_delay) //This AND the riding datum move speed limit? + return FALSE - if(!zmove && mechanical && on && powered && cell.charge < charge_use) // VOREstation edit - zmove doesn't run this + if(!zmove && mechanical && on && powered && cell.charge < charge_use) turn_off() - return + return FALSE . = ..() - if(!zmove && mechanical && on && powered) // VOREstation edit - zmove doesn't run this + if(!zmove && mechanical && on && powered) cell.use(charge_use) //Dummy loads do not have to be moved as they are just an overlay