mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-23 00:22:12 +00:00
Rudimentary Mech Z-level Travel and Hoverpods (#7739)
This commit is contained in:
@@ -1524,6 +1524,7 @@
|
|||||||
#include "code\modules\heavy_vehicle\premade\_premade.dm"
|
#include "code\modules\heavy_vehicle\premade\_premade.dm"
|
||||||
#include "code\modules\heavy_vehicle\premade\combat.dm"
|
#include "code\modules\heavy_vehicle\premade\combat.dm"
|
||||||
#include "code\modules\heavy_vehicle\premade\heavy.dm"
|
#include "code\modules\heavy_vehicle\premade\heavy.dm"
|
||||||
|
#include "code\modules\heavy_vehicle\premade\hoverpod.dm"
|
||||||
#include "code\modules\heavy_vehicle\premade\light.dm"
|
#include "code\modules\heavy_vehicle\premade\light.dm"
|
||||||
#include "code\modules\heavy_vehicle\premade\misc.dm"
|
#include "code\modules\heavy_vehicle\premade\misc.dm"
|
||||||
#include "code\modules\heavy_vehicle\premade\powerloader.dm"
|
#include "code\modules\heavy_vehicle\premade\powerloader.dm"
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
var/mech_turn_sound = 'sound/mecha/mechturn.ogg'
|
var/mech_turn_sound = 'sound/mecha/mechturn.ogg'
|
||||||
var/mech_step_sound = 'sound/mecha/mechstep.ogg'
|
var/mech_step_sound = 'sound/mecha/mechstep.ogg'
|
||||||
var/trample_damage = 5
|
var/trample_damage = 5
|
||||||
|
var/hover = FALSE // Can this leg allow you to easily travel z-levels?
|
||||||
|
|
||||||
/obj/item/mech_component/propulsion/Destroy()
|
/obj/item/mech_component/propulsion/Destroy()
|
||||||
QDEL_NULL(motivator)
|
QDEL_NULL(motivator)
|
||||||
|
|||||||
@@ -470,7 +470,7 @@
|
|||||||
if(!isliving(H))
|
if(!isliving(H))
|
||||||
return
|
return
|
||||||
|
|
||||||
if(legs)
|
if(legs?.trample_damage)
|
||||||
if(ishuman(H))
|
if(ishuman(H))
|
||||||
var/mob/living/carbon/human/D = H
|
var/mob/living/carbon/human/D = H
|
||||||
if(D.lying)
|
if(D.lying)
|
||||||
|
|||||||
54
code/modules/heavy_vehicle/premade/hoverpod.dm
Normal file
54
code/modules/heavy_vehicle/premade/hoverpod.dm
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
/mob/living/heavy_vehicle/premade/hoverpod
|
||||||
|
name = "hoverpod"
|
||||||
|
desc = "An aging exosuit, produced to be a cheap variant to traditional space transport."
|
||||||
|
icon_state = "engineering_pod"
|
||||||
|
|
||||||
|
/mob/living/heavy_vehicle/premade/hoverpod/Initialize()
|
||||||
|
if(!arms)
|
||||||
|
arms = new /obj/item/mech_component/manipulators/ripley(src)
|
||||||
|
arms.color = COLOR_BLUE_GRAY
|
||||||
|
if(!legs)
|
||||||
|
legs = new /obj/item/mech_component/propulsion/hover(src)
|
||||||
|
legs.color = COLOR_BLUE_GRAY
|
||||||
|
if(!head)
|
||||||
|
head = new /obj/item/mech_component/sensors/ripley(src)
|
||||||
|
head.color = COLOR_BLUE_GRAY
|
||||||
|
if(!body)
|
||||||
|
body = new /obj/item/mech_component/chassis/pod(src)
|
||||||
|
body.color = COLOR_BLUE_GRAY
|
||||||
|
|
||||||
|
. = ..()
|
||||||
|
|
||||||
|
/mob/living/heavy_vehicle/premade/hoverpod/spawn_mech_equipment()
|
||||||
|
..()
|
||||||
|
install_system(new /obj/item/mecha_equipment/drill(src), HARDPOINT_LEFT_HAND)
|
||||||
|
install_system(new /obj/item/mecha_equipment/clamp(src), HARDPOINT_RIGHT_HAND)
|
||||||
|
|
||||||
|
/obj/item/mech_component/propulsion/hover
|
||||||
|
name = "hover thrusters"
|
||||||
|
exosuit_desc_string = "hover thrusters"
|
||||||
|
desc = "An ancient set of hover thrusters capable of keeping a exosuit aloft."
|
||||||
|
icon_state = "hoverlegs"
|
||||||
|
max_damage = 40
|
||||||
|
move_delay = 4
|
||||||
|
turn_delay = 2
|
||||||
|
power_use = 3000
|
||||||
|
trample_damage = 0
|
||||||
|
hover = TRUE
|
||||||
|
|
||||||
|
/obj/item/mech_component/chassis/pod
|
||||||
|
name = "spherical exosuit chassis"
|
||||||
|
hatch_descriptor = "window"
|
||||||
|
pilot_coverage = 100
|
||||||
|
transparent_cabin = TRUE
|
||||||
|
hide_pilot = TRUE
|
||||||
|
exosuit_desc_string = "a spherical chassis"
|
||||||
|
icon_state = "pod_body"
|
||||||
|
max_damage = 70
|
||||||
|
power_use = 5
|
||||||
|
has_hardpoints = list(HARDPOINT_BACK)
|
||||||
|
desc = "A simple spherical exosuit cockpit commonly used in space pods."
|
||||||
|
|
||||||
|
/obj/item/mech_component/chassis/pod/prebuild()
|
||||||
|
. = ..()
|
||||||
|
mech_armor = new /obj/item/robot_parts/robot_component/armor/mech/radproof(src)
|
||||||
@@ -21,15 +21,3 @@
|
|||||||
color = COLOR_WHITE
|
color = COLOR_WHITE
|
||||||
mech_step_sound = 'sound/mecha/tanktread.ogg'
|
mech_step_sound = 'sound/mecha/tanktread.ogg'
|
||||||
trample_damage = 25
|
trample_damage = 25
|
||||||
|
|
||||||
/obj/item/mech_component/chassis/pod
|
|
||||||
name = "spherical exosuit chassis"
|
|
||||||
hatch_descriptor = "hatch"
|
|
||||||
pilot_coverage = 100
|
|
||||||
transparent_cabin = TRUE
|
|
||||||
exosuit_desc_string = "a spherical chassis"
|
|
||||||
icon_state = "pod_body"
|
|
||||||
max_damage = 70
|
|
||||||
power_use = 5
|
|
||||||
has_hardpoints = list(HARDPOINT_BACK)
|
|
||||||
desc = "A simple spherical exosuit cockpit commonly used in space pods."
|
|
||||||
@@ -77,6 +77,10 @@
|
|||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/mob/living/carbon/human/zMove(direction)
|
/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(.)
|
if(.)
|
||||||
for(var/obj/item/grab/G in list(l_hand, r_hand))
|
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))
|
if((locate(/obj/structure/disposalpipe/up) in below) || (locate(/obj/machinery/atmospherics/pipe/zpipe/up) in below))
|
||||||
return FALSE
|
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)
|
/mob/living/heavy_vehicle/can_fall(turf/below, turf/simulated/open/dest = src.loc)
|
||||||
// The var/climbers API is implemented here.
|
// The var/climbers API is implemented here.
|
||||||
if (LAZYLEN(dest.climbers) && (src in dest.climbers))
|
if (LAZYLEN(dest.climbers) && (src in dest.climbers))
|
||||||
@@ -328,6 +345,12 @@
|
|||||||
if(!A.CanPass(src, dest))
|
if(!A.CanPass(src, dest))
|
||||||
return FALSE
|
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.
|
// True otherwise.
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
|
|||||||
@@ -213,6 +213,20 @@
|
|||||||
build_path = /obj/item/mech_component/propulsion/spider
|
build_path = /obj/item/mech_component/propulsion/spider
|
||||||
req_tech = list(TECH_ENGINEERING = 2)
|
req_tech = list(TECH_ENGINEERING = 2)
|
||||||
|
|
||||||
|
/datum/design/item/mechfab/exosuit/hover_torso
|
||||||
|
name = "hoverpod torso"
|
||||||
|
id = "hoverpod_body"
|
||||||
|
time = 40
|
||||||
|
materials = list(DEFAULT_WALL_MATERIAL = 30000)
|
||||||
|
build_path = /obj/item/mech_component/chassis/pod
|
||||||
|
|
||||||
|
/datum/design/item/mechfab/exosuit/hover_legs
|
||||||
|
name = "hover thrusters"
|
||||||
|
id = "hover_thrusters"
|
||||||
|
time = 35
|
||||||
|
materials = list(DEFAULT_WALL_MATERIAL = 14000)
|
||||||
|
build_path = /obj/item/mech_component/propulsion/hover
|
||||||
|
|
||||||
/datum/design/item/mechfab/exosuit/track
|
/datum/design/item/mechfab/exosuit/track
|
||||||
name = "armored treads"
|
name = "armored treads"
|
||||||
id = "treads"
|
id = "treads"
|
||||||
|
|||||||
8
html/changelogs/geeves - hoverpods.yml
Normal file
8
html/changelogs/geeves - hoverpods.yml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
author: Geeves
|
||||||
|
|
||||||
|
delete-after: True
|
||||||
|
|
||||||
|
changes:
|
||||||
|
- rscadd: "Added a hoverpod mech."
|
||||||
|
- bugfix: "Jetpacking downwards while in a mech no longer teleports you through the floor."
|
||||||
|
- rscadd: "Mechs with hover thrusters can now float over open turfs, as well as move up and down z-levels."
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
Reference in New Issue
Block a user