mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
[MIRROR] vehicles properly call Move() (#11859)
Co-authored-by: Will <7099514+Willburd@users.noreply.github.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
3d1df78fe2
commit
956f3c769a
@@ -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 ..()
|
||||
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user