diff --git a/aurorastation.dme b/aurorastation.dme index 588deba8e77..09735fe362a 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -1524,6 +1524,7 @@ #include "code\modules\heavy_vehicle\premade\_premade.dm" #include "code\modules\heavy_vehicle\premade\combat.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\misc.dm" #include "code\modules\heavy_vehicle\premade\powerloader.dm" diff --git a/code/modules/heavy_vehicle/components/legs.dm b/code/modules/heavy_vehicle/components/legs.dm index fa72714378d..1ff33980fa8 100644 --- a/code/modules/heavy_vehicle/components/legs.dm +++ b/code/modules/heavy_vehicle/components/legs.dm @@ -9,6 +9,7 @@ var/mech_turn_sound = 'sound/mecha/mechturn.ogg' var/mech_step_sound = 'sound/mecha/mechstep.ogg' var/trample_damage = 5 + var/hover = FALSE // Can this leg allow you to easily travel z-levels? /obj/item/mech_component/propulsion/Destroy() QDEL_NULL(motivator) diff --git a/code/modules/heavy_vehicle/mech_interaction.dm b/code/modules/heavy_vehicle/mech_interaction.dm index f1d60a50ce4..f68bed83fba 100644 --- a/code/modules/heavy_vehicle/mech_interaction.dm +++ b/code/modules/heavy_vehicle/mech_interaction.dm @@ -470,7 +470,7 @@ if(!isliving(H)) return - if(legs) + if(legs?.trample_damage) if(ishuman(H)) var/mob/living/carbon/human/D = H if(D.lying) diff --git a/code/modules/heavy_vehicle/premade/hoverpod.dm b/code/modules/heavy_vehicle/premade/hoverpod.dm new file mode 100644 index 00000000000..2dd5a1b97de --- /dev/null +++ b/code/modules/heavy_vehicle/premade/hoverpod.dm @@ -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) \ No newline at end of file diff --git a/code/modules/heavy_vehicle/premade/misc.dm b/code/modules/heavy_vehicle/premade/misc.dm index f08b611d8a1..5f8cd57e54f 100644 --- a/code/modules/heavy_vehicle/premade/misc.dm +++ b/code/modules/heavy_vehicle/premade/misc.dm @@ -20,16 +20,4 @@ power_use = 7500 color = COLOR_WHITE mech_step_sound = 'sound/mecha/tanktread.ogg' - 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." \ No newline at end of file + trample_damage = 25 \ No newline at end of file diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index 98df713ef7d..b31dbe8d022 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -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 diff --git a/code/modules/research/designs/mechfab/mechs/designs_exosuits.dm b/code/modules/research/designs/mechfab/mechs/designs_exosuits.dm index 13b85fb3a55..4c302425e86 100644 --- a/code/modules/research/designs/mechfab/mechs/designs_exosuits.dm +++ b/code/modules/research/designs/mechfab/mechs/designs_exosuits.dm @@ -213,6 +213,20 @@ build_path = /obj/item/mech_component/propulsion/spider 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 name = "armored treads" id = "treads" diff --git a/html/changelogs/geeves - hoverpods.yml b/html/changelogs/geeves - hoverpods.yml new file mode 100644 index 00000000000..84e75600474 --- /dev/null +++ b/html/changelogs/geeves - hoverpods.yml @@ -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." diff --git a/icons/mecha/mech_parts.dmi b/icons/mecha/mech_parts.dmi index 62c94493da0..37935132840 100644 Binary files a/icons/mecha/mech_parts.dmi and b/icons/mecha/mech_parts.dmi differ