mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +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)
|
add_overlay(I)
|
||||||
turn_off() //so engine verbs are correctly set
|
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)
|
if(on && cell.charge < charge_use)
|
||||||
turn_off()
|
turn_off()
|
||||||
update_stats()
|
update_stats()
|
||||||
@@ -75,11 +75,11 @@
|
|||||||
to_chat(load, "The drive motor briefly whines, then drones to a stop.")
|
to_chat(load, "The drive motor briefly whines, then drones to a stop.")
|
||||||
|
|
||||||
if(is_train_head() && !on)
|
if(is_train_head() && !on)
|
||||||
return 0
|
return FALSE
|
||||||
|
|
||||||
//space check ~no flying space trains sorry
|
//space check ~no flying space trains sorry
|
||||||
if(on && istype(destination, /turf/space))
|
if(on && isnonsolidturf(newloc))
|
||||||
return 0
|
return FALSE
|
||||||
|
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
|||||||
@@ -133,25 +133,25 @@
|
|||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
/obj/vehicle/bike/Move(var/turf/destination)
|
/obj/vehicle/bike/Move(atom/newloc, direct = 0, movetime)
|
||||||
if(kickstand) return 0
|
if(kickstand) return 0
|
||||||
|
|
||||||
if(on && (!cell || cell.charge < charge_use))
|
if(on && (!cell || cell.charge < charge_use))
|
||||||
turn_off()
|
turn_off()
|
||||||
visible_message(span_warning("\The [src] whines, before its engines wind down."))
|
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.
|
//these things like space, not turf. Dragging shouldn't weigh you down.
|
||||||
if(on && cell)
|
if(on && cell)
|
||||||
cell.use(charge_use)
|
cell.use(charge_use)
|
||||||
|
|
||||||
if(istype(destination,/turf/space) || istype(destination, /turf/simulated/floor/water) || pulledby)
|
if(isnonsolidturf(newloc) || pulledby)
|
||||||
if(!space_speed)
|
if(!space_speed)
|
||||||
return 0
|
return FALSE
|
||||||
move_delay = space_speed
|
move_delay = space_speed
|
||||||
else
|
else
|
||||||
if(!land_speed)
|
if(!land_speed)
|
||||||
return 0
|
return FALSE
|
||||||
move_delay = land_speed
|
move_delay = land_speed
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
turn_off() //so engine verbs are correctly set
|
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)
|
if(on && cell.charge < charge_use)
|
||||||
turn_off()
|
turn_off()
|
||||||
update_stats()
|
update_stats()
|
||||||
@@ -59,11 +59,11 @@
|
|||||||
to_chat(load, "The drive motor briefly whines, then drones to a stop.")
|
to_chat(load, "The drive motor briefly whines, then drones to a stop.")
|
||||||
|
|
||||||
if(is_train_head() && !on)
|
if(is_train_head() && !on)
|
||||||
return 0
|
return FALSE
|
||||||
|
|
||||||
//space check ~no flying space trains sorry
|
//space check ~no flying space trains sorry
|
||||||
if(on && istype(destination, /turf/space))
|
if(on && isnonsolidturf(newloc))
|
||||||
return 0
|
return FALSE
|
||||||
|
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
@@ -156,7 +156,7 @@
|
|||||||
verbs += /obj/vehicle/train/engine/verb/stop_engine
|
verbs += /obj/vehicle/train/engine/verb/stop_engine
|
||||||
|
|
||||||
/obj/vehicle/train/RunOver(var/mob/living/M)
|
/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
|
return
|
||||||
|
|
||||||
var/list/parts = list(BP_HEAD, BP_TORSO, BP_L_LEG, BP_R_LEG, BP_L_ARM, BP_R_ARM)
|
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
|
else
|
||||||
anchored = TRUE
|
anchored = TRUE
|
||||||
|
|
||||||
// VOREStation Edit Start - Overlay stuff for the chair-like effect
|
|
||||||
/obj/vehicle/train/engine/update_icon()
|
/obj/vehicle/train/engine/update_icon()
|
||||||
..()
|
..()
|
||||||
cut_overlays()
|
cut_overlays()
|
||||||
@@ -412,7 +411,6 @@
|
|||||||
/obj/vehicle/train/engine/set_dir()
|
/obj/vehicle/train/engine/set_dir()
|
||||||
..()
|
..()
|
||||||
update_icon()
|
update_icon()
|
||||||
// VOREStation Edit End - Overlay stuff for the chair-like effect
|
|
||||||
|
|
||||||
//-------------------------------------------------------
|
//-------------------------------------------------------
|
||||||
// Cargo tugs for reagent transport from chemical refinery
|
// Cargo tugs for reagent transport from chemical refinery
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
. = ..()
|
. = ..()
|
||||||
turn_off() //so engine verbs are correctly set
|
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)
|
if(on && cell.charge < charge_use)
|
||||||
turn_off()
|
turn_off()
|
||||||
update_stats()
|
update_stats()
|
||||||
@@ -75,11 +75,11 @@
|
|||||||
to_chat(load, span_notice("The drive motor briefly whines, then drones to a stop."))
|
to_chat(load, span_notice("The drive motor briefly whines, then drones to a stop."))
|
||||||
|
|
||||||
if(is_train_head() && !on)
|
if(is_train_head() && !on)
|
||||||
return 0
|
return FALSE
|
||||||
|
|
||||||
//space check ~no flying space trains sorry
|
//space check ~no flying space trains sorry
|
||||||
if(on && isopenturf(destination))
|
if(on && isnonsolidturf(newloc))
|
||||||
return 0
|
return FALSE
|
||||||
|
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
if(latch_on_start)
|
if(latch_on_start)
|
||||||
latch(T, null)
|
latch(T, null)
|
||||||
|
|
||||||
/obj/vehicle/train/Move()
|
/obj/vehicle/train/Move(atom/newloc, direct = 0, movetime)
|
||||||
var/old_loc = get_turf(src)
|
var/old_loc = get_turf(src)
|
||||||
if((. = ..()))
|
if((. = ..()))
|
||||||
if(tow)
|
if(tow)
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
unattach()
|
unattach()
|
||||||
|
|
||||||
/obj/vehicle/train/Bump(atom/Obstacle)
|
/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 ..()
|
return ..()
|
||||||
if(!istype(Obstacle, /atom/movable))
|
if(!istype(Obstacle, /atom/movable))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -78,21 +78,20 @@
|
|||||||
riding_datum.restore_position(buckled_mob)
|
riding_datum.restore_position(buckled_mob)
|
||||||
riding_datum.handle_vehicle_offsets() // So the person in back goes to the front.
|
riding_datum.handle_vehicle_offsets() // So the person in back goes to the front.
|
||||||
|
|
||||||
/obj/vehicle/Move(var/newloc, var/direction, var/movetime)
|
/obj/vehicle/Move(atom/newloc, direct = 0, movetime)
|
||||||
// VOREstation edit - Zmoving for falling
|
|
||||||
var/turf/newturf = newloc
|
var/turf/newturf = newloc
|
||||||
var/zmove = (newturf && z != newturf.z)
|
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
|
if(!zmove && world.time < l_move_time + move_delay) //This AND the riding datum move speed limit?
|
||||||
return
|
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()
|
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)
|
cell.use(charge_use)
|
||||||
|
|
||||||
//Dummy loads do not have to be moved as they are just an overlay
|
//Dummy loads do not have to be moved as they are just an overlay
|
||||||
|
|||||||
Reference in New Issue
Block a user