mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 05:27:01 +01:00
Fix vehicles being able to drive in space
Unfortunately, it COMPLETELY stops vehicles from moving in space, including via jetpack and other such things. Sorry, wizard car. :(
This commit is contained in:
@@ -36,6 +36,15 @@
|
||||
unattach()
|
||||
return 0
|
||||
|
||||
/obj/vehicle/train/can_move()
|
||||
if(!is_train_head())
|
||||
return 1 //towed objects do not need power to Move()
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/obj/vehicle/train/Bump(atom/Obstacle)
|
||||
if(!istype(Obstacle, /atom/movable))
|
||||
return
|
||||
|
||||
@@ -44,21 +44,10 @@
|
||||
key = new()
|
||||
|
||||
/obj/vehicle/train/ambulance/engine/Move()
|
||||
if(on && cell.charge < charge_use)
|
||||
turn_off()
|
||||
update_stats()
|
||||
if(load && is_train_head())
|
||||
load << "The drive motor briefly whines, then drones to a stop."
|
||||
|
||||
if(is_train_head() && !on)
|
||||
return 0
|
||||
|
||||
. = ..()
|
||||
|
||||
handle_rotation()
|
||||
update_mob()
|
||||
|
||||
|
||||
/obj/vehicle/train/ambulance/trolley/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(open && istype(W, /obj/item/weapon/wirecutters))
|
||||
passenger_allowed = !passenger_allowed
|
||||
@@ -177,7 +166,7 @@
|
||||
return 0
|
||||
|
||||
if(is_train_head())
|
||||
if(direction == reverse_direction(dir))
|
||||
if(direction == reverse_direction(dir) && tow) //can reverse with no tow
|
||||
return 0
|
||||
if(Move(get_step(src, direction)))
|
||||
return 1
|
||||
|
||||
@@ -47,18 +47,6 @@
|
||||
overlays += I
|
||||
turn_off() //so engine verbs are correctly set
|
||||
|
||||
/obj/vehicle/train/cargo/engine/Move()
|
||||
if(on && cell.charge < charge_use)
|
||||
turn_off()
|
||||
update_stats()
|
||||
if(load && is_train_head())
|
||||
load << "The drive motor briefly whines, then drones to a stop."
|
||||
|
||||
if(is_train_head() && !on)
|
||||
return 0
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/train/cargo/trolley/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(open && istype(W, /obj/item/weapon/wirecutters))
|
||||
passenger_allowed = !passenger_allowed
|
||||
|
||||
@@ -51,20 +51,10 @@
|
||||
R.my_atom = src
|
||||
|
||||
/obj/vehicle/train/janitor/engine/Move()
|
||||
if(on && cell.charge < charge_use)
|
||||
turn_off()
|
||||
update_stats()
|
||||
if(load && is_train_head())
|
||||
load << "The drive motor briefly whines, then drones to a stop."
|
||||
|
||||
if(is_train_head() && !on)
|
||||
return 0
|
||||
|
||||
. = ..()
|
||||
handle_rotation()
|
||||
update_mob()
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/vehicle/train/janitor/trolley/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(openTop)
|
||||
W.loc = src
|
||||
|
||||
@@ -42,10 +42,7 @@
|
||||
//spawn the cell you want in each vehicle
|
||||
|
||||
/obj/vehicle/Move()
|
||||
if(world.time > l_move_time + move_delay)
|
||||
if(on && powered && cell.charge < charge_use)
|
||||
turn_off()
|
||||
|
||||
if(can_move())
|
||||
var/init_anc = anchored
|
||||
anchored = 0
|
||||
if(!..())
|
||||
@@ -65,6 +62,23 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/vehicle/proc/can_move()
|
||||
if(world.time <= l_move_time + move_delay)
|
||||
return 0
|
||||
|
||||
if(!on || !powered)
|
||||
return 0
|
||||
|
||||
if(on && powered && cell.charge < charge_use)
|
||||
turn_off()
|
||||
return 0
|
||||
|
||||
if(istype(loc, /turf/space))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/vehicle/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/hand_labeler))
|
||||
return
|
||||
@@ -224,19 +238,19 @@
|
||||
|
||||
/obj/vehicle/proc/powercheck()
|
||||
if(!cell && !powered)
|
||||
return
|
||||
return 0
|
||||
|
||||
if(!cell && powered)
|
||||
turn_off()
|
||||
return
|
||||
return 0
|
||||
|
||||
if(cell.charge < charge_use)
|
||||
turn_off()
|
||||
return
|
||||
return 0
|
||||
|
||||
if(cell && powered)
|
||||
turn_on()
|
||||
return
|
||||
return 1
|
||||
|
||||
/obj/vehicle/proc/insert_cell(var/obj/item/weapon/stock_parts/cell/C, var/mob/living/carbon/human/H)
|
||||
if(cell)
|
||||
|
||||
Reference in New Issue
Block a user