mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 07:59:01 +01:00
Rudimentary Mech Z-level Travel and Hoverpods (#7739)
This commit is contained in:
@@ -77,6 +77,10 @@
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/zMove(direction)
|
||||
if(istype(loc, /mob/living/heavy_vehicle))
|
||||
var/mob/living/heavy_vehicle/mech = loc
|
||||
mech.zMove(direction)
|
||||
return
|
||||
. = ..()
|
||||
if(.)
|
||||
for(var/obj/item/grab/G in list(l_hand, r_hand))
|
||||
@@ -315,6 +319,19 @@
|
||||
if((locate(/obj/structure/disposalpipe/up) in below) || (locate(/obj/machinery/atmospherics/pipe/zpipe/up) in below))
|
||||
return FALSE
|
||||
|
||||
/mob/living/heavy_vehicle/can_ztravel(var/direction)
|
||||
if(legs)
|
||||
if(legs.hover && legs.motivator.is_functional())
|
||||
if(get_cell().charge < ((legs.power_use * CELLRATE) / 2))
|
||||
return FALSE
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/heavy_vehicle/CanAvoidGravity()
|
||||
if(can_ztravel())
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/heavy_vehicle/can_fall(turf/below, turf/simulated/open/dest = src.loc)
|
||||
// The var/climbers API is implemented here.
|
||||
if (LAZYLEN(dest.climbers) && (src in dest.climbers))
|
||||
@@ -328,6 +345,12 @@
|
||||
if(!A.CanPass(src, dest))
|
||||
return FALSE
|
||||
|
||||
// Hover thrusters
|
||||
if(legs)
|
||||
if(legs.hover && legs.motivator.is_functional())
|
||||
get_cell().use((legs.power_use * CELLRATE) / 2)
|
||||
return FALSE
|
||||
|
||||
// True otherwise.
|
||||
return TRUE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user