Merge pull request #6936 from VOREStation/aro-gunpods

Small mech tweaks, adds gunpods
This commit is contained in:
Aronai Sieyes
2020-03-21 00:56:25 -04:00
committed by GitHub
9 changed files with 308 additions and 51 deletions
@@ -27,16 +27,16 @@
/obj/item/mecha_parts/mecha_equipment/repair_droid/attach(obj/mecha/M as obj)
..()
droid_overlay = new(src.icon, icon_state = "repair_droid")
M.overlays += droid_overlay
M.add_overlay(droid_overlay)
return
/obj/item/mecha_parts/mecha_equipment/repair_droid/destroy()
chassis.overlays -= droid_overlay
chassis.cut_overlay(droid_overlay)
..()
return
/obj/item/mecha_parts/mecha_equipment/repair_droid/detach()
chassis.overlays -= droid_overlay
chassis.cut_overlay(droid_overlay)
pr_repair_droid.stop()
..()
return
@@ -49,7 +49,7 @@
/obj/item/mecha_parts/mecha_equipment/repair_droid/Topic(href, href_list)
..()
if(href_list["toggle_repairs"])
chassis.overlays -= droid_overlay
chassis.cut_overlay(droid_overlay)
if(pr_repair_droid.toggle())
droid_overlay = new(src.icon, icon_state = "repair_droid_a")
log_message("Activated.")
@@ -57,7 +57,7 @@
droid_overlay = new(src.icon, icon_state = "repair_droid")
log_message("Deactivated.")
set_ready_state(1)
chassis.overlays += droid_overlay
chassis.add_overlay(droid_overlay)
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info())
return
+44 -6
View File
@@ -259,7 +259,9 @@
/obj/mecha/proc/check_for_support()
if(locate(/obj/structure/grille, orange(1, src)) || locate(/obj/structure/lattice, orange(1, src)) || locate(/turf/simulated, orange(1, src)) || locate(/turf/unsimulated, orange(1, src)))
var/list/things = orange(1, src)
if(locate(/obj/structure/grille in things) || locate(/obj/structure/lattice in things) || locate(/turf/simulated in things) || locate(/turf/unsimulated in things))
return 1
else
return 0
@@ -397,21 +399,26 @@
/obj/mecha/relaymove(mob/user,direction)
if(user != src.occupant) //While not "realistic", this piece is player friendly.
if(istype(user,/mob/living/carbon/brain))
to_chat(user, "You try to move, but you are not the pilot! The exosuit doesn't respond.")
to_chat(user, "<span class='warning'>You try to move, but you are not the pilot! The exosuit doesn't respond.</span>")
return 0
user.forceMove(get_turf(src))
to_chat(user, "You climb out from [src]")
return 0
if(connected_port)
if(world.time - last_message > 20)
src.occupant_message("Unable to move while connected to the air system port")
src.occupant_message("<span class='warning'>Unable to move while connected to the air system port</span>")
last_message = world.time
return 0
if(state)
occupant_message("<font color='red'>Maintenance protocols in effect</font>")
occupant_message("<span class='warning'>Maintenance protocols in effect</span>")
return
return domove(direction)
/obj/mecha/proc/can_ztravel()
for(var/obj/item/mecha_parts/mecha_equipment/tool/jetpack/jp in equipment)
return jp.equip_ready
return FALSE
/obj/mecha/proc/domove(direction)
return call((proc_res["dyndomove"]||src), "dyndomove")(direction)
@@ -423,20 +430,51 @@
return 0
if(!has_charge(step_energy_drain))
return 0
var/move_result = 0
if(hasInternalDamage(MECHA_INT_CONTROL_LOST))
move_result = mechsteprand()
else if(src.dir!=direction)
//Up/down zmove
else if(direction & UP || direction & DOWN)
if(!can_ztravel())
occupant_message("<span class='warning'>Your vehicle lacks the capacity to move in that direction!</span>")
return FALSE
//We're using locs because some mecha are 2x2 turfs. So thicc!
var/result = TRUE
for(var/turf/T in locs)
if(!T.CanZPass(src,direction))
occupant_message("<span class='warning'>You can't move that direction from here!</span>")
result = FALSE
break
var/turf/dest = direction & UP ? GetAbove(T) : GetBelow(T)
if(!dest)
occupant_message("<span class='notice'>There is nothing of interest in this direction.</span>")
result = FALSE
break
if(!dest.CanZPass(src,direction))
occupant_message("<span class='warning'>There's something blocking your movement in that direction!</span>")
result = FALSE
break
if(result)
move_result = mechstep(direction)
//Turning
else if(src.dir != direction)
move_result = mechturn(direction)
//Stepping
else
move_result = mechstep(direction)
if(move_result)
can_move = 0
use_power(step_energy_drain)
if(istype(src.loc, /turf/space))
if(!src.check_for_support())
src.pr_inertial_movement.start(list(src,direction))
src.log_message("Movement control lost. Inertial movement started.")
src.log_message("<span class='warning'>Movement control lost. Inertial movement started.</span>")
if(do_after(step_in))
can_move = 1
return 1
+127
View File
@@ -0,0 +1,127 @@
/obj/mecha/working/hoverpod/gunpod
name = "Gunpod"
desc = "A more advanced (and angrier) variant of the hoverpod."
catalogue_data = list(/datum/category_item/catalogue/technology/gunpod)
icon = 'icons/mecha/mecha64x64.dmi'
icon_state = "gunpod"
initial_icon = "gunpod"
internal_damage_threshold = 90
step_in = 2
step_energy_drain = 5
max_temperature = 20000
health = 400
maxhealth = 400
infra_luminosity = 6
wreckage = /obj/effect/decal/mecha_wreckage/gunpod
cargo_capacity = 3
max_equip = 3
opacity = FALSE
stomp_sound = 'sound/machines/generator/generator_end.ogg'
swivel_sound = 'sound/machines/hiss.ogg'
// Paint colors! Null if not set.
var/stripe1_color
var/stripe2_color
var/image/stripe1_overlay
var/image/stripe2_overlay
bound_height = 64
bound_width = 64
max_hull_equip = 2
max_weapon_equip = 2
max_utility_equip = 1
max_universal_equip = 1
max_special_equip = 1
/obj/mecha/working/hoverpod/gunpod/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
ME.attach(src)
update_icon() //In case we were mapped in with paint
/obj/mecha/working/hoverpod/gunpod/heavy/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/combat_shield
ME.attach(src)
/obj/mecha/working/hoverpod/gunpod/agile/Initialize()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/teleporter
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/repair_droid
ME.attach(src)
/obj/mecha/working/hoverpod/gunpod/handle_equipment_movement()
. = ..()
if(has_gravity())
start_hover()
else
stop_hover()
/obj/mecha/working/hoverpod/gunpod/proc/start_hover()
if(!ion_trail.on)
ion_trail.start()
/obj/mecha/working/hoverpod/gunpod/proc/stop_hover()
if(ion_trail.on)
ion_trail.stop()
/obj/mecha/working/hoverpod/gunpod/check_for_support()
if (has_charge(step_energy_drain) && stabilization_enabled)
return 1
var/list/things = orange(1, src)
if(locate(/obj/structure/grille in things) || locate(/obj/structure/lattice in things) || locate(/turf/simulated in things) || locate(/turf/unsimulated in things))
return 1
else
return 0
/obj/mecha/working/hoverpod/gunpod/update_icon()
cut_overlays()
..()
if(stripe1_color)
stripe1_overlay = image("gunpod_stripes1")
stripe1_overlay.color = stripe1_color
add_overlay(stripe1_overlay)
if(stripe2_overlay)
stripe2_overlay = image("gunpod_stripes2")
stripe2_overlay.color = stripe2_color
add_overlay(stripe2_overlay)
/obj/mecha/working/hoverpod/gunpod/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/device/multitool) && state == 1)
var/new_paint_location = input("Please select a target zone.", "Paint Zone", null) as null|anything in list("Fore Stripe", "Aft Stripe", "CANCEL")
if(new_paint_location && new_paint_location != "CANCEL")
var/new_paint_color = input("Please select a paint color.", "Paint Color", null) as color|null
if(new_paint_color)
switch(new_paint_location)
if("Fore Stripe")
stripe1_color = new_paint_color
if("Aft Stripe")
stripe2_color = new_paint_color
update_icon()
else ..()
/obj/effect/decal/mecha_wreckage/gunpod
name = "Gunpod wreckage"
desc = "Remains of some unfortunate gunpod. Completely unrepairable."
icon = 'icons/mecha/mecha64x64.dmi'
icon_state = "gunpod-broken"
bound_width = 64
bound_height = 64
/datum/category_item/catalogue/technology/gunpod
name = "Voidcraft - Gunpod"
desc = "This is a small space-capable fightercraft that has an arrowhead design. Can hold up to one pilot, \
and sometimes one or two passengers, with the right modifications made. \
Typically used as small fighter craft, the gunpod can't carry much of a payload, though it's still capable of holding it's own."
value = CATALOGUER_REWARD_MEDIUM
+17 -5
View File
@@ -26,11 +26,20 @@
max_universal_equip = 1
max_special_equip = 1
/obj/mecha/working/hoverpod/New()
..()
/obj/mecha/working/hoverpod/Initialize()
. = ..()
ion_trail = new /datum/effect/effect/system/ion_trail_follow()
ion_trail.set_up(src)
ion_trail.start()
/obj/mecha/working/hoverpod/moved_inside(var/mob/living/carbon/human/H as mob)
. = ..(H)
if(.)
ion_trail.start()
/obj/mecha/working/hoverpod/go_out()
. = ..()
if(!occupant)
ion_trail.stop()
//Modified phazon code
/obj/mecha/working/hoverpod/Topic(href, href_list)
@@ -52,6 +61,9 @@
output += ..()
return output
/obj/mecha/working/hoverpod/can_ztravel()
return (stabilization_enabled && has_charge(step_energy_drain))
// No space drifting
/obj/mecha/working/hoverpod/check_for_support()
//does the hoverpod have enough charge left to stabilize itself?
@@ -106,7 +118,7 @@
max_special_equip = 1
/obj/mecha/working/hoverpod/combatpod/Initialize()
..()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive
@@ -117,7 +129,7 @@
desc = "Who knew a tiny ball could fit three people?"
/obj/mecha/working/hoverpod/shuttlepod/Initialize()
..()
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/passenger
ME.attach(src)
ME = new /obj/item/mecha_parts/mecha_equipment/tool/passenger
+5 -19
View File
@@ -41,44 +41,30 @@
max_universal_equip = 1
max_special_equip = 1
/obj/mecha/working/hoverpod/Initialize()
..()
ion_trail.stop()
/obj/mecha/working/hoverpod/shuttlecraft/moved_inside(var/mob/living/carbon/human/H as mob)
. = ..(H)
if(.)
ion_trail.start()
/obj/mecha/working/hoverpod/shuttlecraft/go_out()
. = ..()
if(!occupant)
ion_trail.stop()
/obj/mecha/working/hoverpod/shuttlecraft/update_icon()
overlays.Cut()
cut_overlays()
..()
if(base_paint)
if(!base_paint_mask)
base_paint_mask = image(icon, "[initial_icon]-mask+base", src.layer + 1)
base_paint_mask.color = base_paint
overlays |= base_paint_mask
add_overlay(base_paint_mask)
if(front_paint)
if(!front_paint_mask)
front_paint_mask = image(icon, "[initial_icon]-mask+front", src.layer + 1)
front_paint_mask.color = front_paint
overlays |= front_paint_mask
add_overlay(front_paint_mask)
if(engine_paint)
if(!engine_paint_mask)
engine_paint_mask = image(icon, "[initial_icon]-mask+engine", src.layer + 1)
engine_paint_mask.color = engine_paint
overlays |= engine_paint_mask
add_overlay(engine_paint_mask)
if(central_paint)
if(!engine_paint_mask)
central_paint_mask = image(icon, "[initial_icon]-mask+central", src.layer + 2)
central_paint_mask.color = central_paint
overlays |= central_paint_mask
add_overlay(central_paint_mask)
/obj/mecha/working/hoverpod/shuttlecraft/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/device/multitool) && state == 1)
+4
View File
@@ -15,6 +15,10 @@
/mob/proc/zMove(direction)
if(eyeobj)
return eyeobj.zMove(direction)
if(istype(loc,/obj/mecha))
var/obj/mecha/mech = loc
return mech.relaymove(src,direction)
if(!can_ztravel())
to_chat(src, "<span class='warning'>You lack means of travel in that direction.</span>")
return
Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 91 KiB

+105 -16
View File
@@ -2978,6 +2978,9 @@
/obj/effect/floor_decal/corner_techfloor_grid{
dir = 9
},
/obj/machinery/mech_recharger{
icon = 'icons/turf/shuttle_alien_blue.dmi'
},
/turf/simulated/floor/tiled/techfloor,
/area/ship/aro/midshipshangars)
"gf" = (
@@ -3001,6 +3004,10 @@
icon_state = "corner_techfloor_grid";
dir = 6
},
/obj/machinery/mech_recharger{
icon = 'icons/turf/shuttle_alien_blue.dmi'
},
/obj/mecha/working/hoverpod/gunpod/agile,
/turf/simulated/floor/tiled/techfloor,
/area/ship/aro/midshipshangars)
"gh" = (
@@ -3349,6 +3356,88 @@
/obj/effect/overmap/visitable/ship/aro,
/turf/space,
/area/space)
"iU" = (
/obj/effect/floor_decal/techfloor/orange{
dir = 1
},
/obj/structure/table/rack/shelf/steel,
/obj/item/mecha_parts/mecha_equipment/crisis_drone,
/turf/simulated/floor/tiled/techfloor,
/area/ship/aro/midshipshangars)
"lD" = (
/obj/machinery/light{
icon_state = "tube1";
dir = 8
},
/obj/machinery/portable_atmospherics/canister/phoron,
/obj/effect/floor_decal/industrial/danger/full,
/turf/simulated/floor/tiled/techfloor,
/area/ship/aro/midshipshangars)
"tu" = (
/obj/machinery/atmospherics/binary/pump,
/turf/simulated/floor/reinforced,
/area/ship/aro/midshipshangars)
"uO" = (
/obj/effect/floor_decal/techfloor/orange,
/turf/simulated/floor/tiled/techfloor,
/area/ship/aro/midshipshangars)
"uZ" = (
/obj/effect/floor_decal/techfloor/orange,
/obj/structure/table/rack/shelf/steel,
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay,
/turf/simulated/floor/tiled/techfloor,
/area/ship/aro/midshipshangars)
"xu" = (
/obj/effect/floor_decal/techfloor/orange{
dir = 1
},
/obj/structure/table/rack/shelf/steel,
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/cannon,
/turf/simulated/floor/tiled/techfloor,
/area/ship/aro/midshipshangars)
"CW" = (
/obj/machinery/atmospherics/portables_connector{
dir = 1
},
/obj/effect/floor_decal/industrial/outline,
/turf/simulated/floor/tiled/techfloor,
/area/ship/aro/midshipshangars)
"HK" = (
/obj/effect/floor_decal/techfloor/orange,
/obj/structure/table/rack/shelf/steel,
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive,
/turf/simulated/floor/tiled/techfloor,
/area/ship/aro/midshipshangars)
"Lp" = (
/obj/effect/floor_decal/techfloor/orange{
dir = 1
},
/obj/machinery/atmospherics/pipe/simple/hidden/purple,
/turf/simulated/floor/tiled/techfloor,
/area/ship/aro/midshipshangars)
"Md" = (
/obj/machinery/atmospherics/portables_connector,
/obj/machinery/portable_atmospherics/canister/air,
/obj/effect/floor_decal/industrial/outline,
/turf/simulated/floor/reinforced,
/area/ship/aro/midshipshangars)
"PJ" = (
/obj/mecha/working/hoverpod/gunpod/agile,
/obj/machinery/atmospherics/portables_connector{
dir = 1
},
/obj/effect/floor_decal/industrial/outline,
/turf/simulated/floor/tiled/techfloor,
/area/ship/aro/midshipshangars)
"TU" = (
/obj/machinery/light{
icon_state = "tube1";
dir = 4
},
/obj/machinery/portable_atmospherics/canister/phoron,
/obj/effect/floor_decal/industrial/danger/full,
/turf/simulated/floor/tiled/techfloor,
/area/ship/aro/midshipshangars)
(1,1,1) = {"
aa
@@ -11105,9 +11194,9 @@ ek
ek
ek
fy
fy
gd
fy
iU
lD
uZ
fy
fy
fy
@@ -11245,11 +11334,11 @@ ek
ek
ek
ek
fy
fy
fy
fy
fy
Md
tu
Lp
PJ
uO
fy
fy
fy
@@ -12239,11 +12328,11 @@ ek
ek
ek
ek
fy
fy
fy
fy
fy
Md
tu
Lp
CW
uO
fy
fy
fy
@@ -12383,9 +12472,9 @@ ek
ek
ek
fy
fy
gh
fy
xu
TU
HK
fy
gI
fy
+1
View File
@@ -966,6 +966,7 @@
#include "code\game\mecha\micro\micro_equipment.dm"
#include "code\game\mecha\micro\security.dm"
#include "code\game\mecha\micro\utility.dm"
#include "code\game\mecha\space\gunpod_vr.dm"
#include "code\game\mecha\space\hoverpod.dm"
#include "code\game\mecha\space\shuttle.dm"
#include "code\game\mecha\working\ripley.dm"