diff --git a/code/game/objects/items/misc.dm b/code/game/objects/items/misc.dm index 50c5cd7555..dfbfbddff1 100644 --- a/code/game/objects/items/misc.dm +++ b/code/game/objects/items/misc.dm @@ -300,3 +300,96 @@ item_state = "rappel_harness" w_class = SIZE_MASSIVE flags_equip_slot = SLOT_WAIST + +/obj/item/rappel_harness/extract + name = "dual purpose rappel-fulton harness" + desc = "A fulton Surface To Air Recovery System (STARS). Special latch/hook assembly allows for aircraft on flyby equipped with a rappel system to pick up the attached item or person. The complex assembly of venlar rigging and secured buckles takes some time to set up though." + icon_state = "rappel_harness_adv" + var/shuttle_id = DROPSHIP_MIDWAY + actions_types = list(/datum/action/item_action/STARS) + +/obj/item/rappel_harness/extract/proc/try_extract(mob/living/carbon/human/user) + var/obj/docking_port/mobile/marine_dropship/shuttle = SSshuttle.getShuttle(shuttle_id) + + if(!shuttle) + return + + if(!shuttle.in_flyby) + to_chat(user, SPAN_WARNING("No shuttle detected in lower orbit, aborting extraction.")) + return + + var/obj/structure/dropship_equipment/rappel_system/rapsys = locate() in shuttle.equipments + if(!rapsys) + to_chat(user, SPAN_WARNING("No rappel system detected in shuttle, aborting extraction.")) + return + + user.visible_message(SPAN_DANGER("[user] gets snatched off the ground with a tremendous force!")) + if(prob(50)) + user.emote("scream") + user.apply_effect(10, STUN) + animate(user, time = 2, pixel_x = 360, pixel_y = 360, flags = ANIMATION_PARALLEL) + playsound(user,'sound/effects/bamf.ogg', 50, 1) + addtimer(CALLBACK(src, PROC_REF(on_extract), user, rapsys), 1.5 SECONDS) + +/obj/item/rappel_harness/extract/attack(mob/living/carbon/human/H, mob/living/carbon/human/user) + if(H.belt) + to_chat(user, SPAN_WARNING("Remove their belt first!")) + return + + if(!is_ground_level(H.z)) + return + + var/area/location_area = get_area(H) + if(CEILING_IS_PROTECTED(location_area.ceiling, CEILING_PROTECTION_TIER_1)) + to_chat(H, SPAN_WARNING("There's no space for fulton balloon to fly in this area.")) + return + + user.visible_message(SPAN_DANGER("[user] begins to adjust the fulton device on [H] for extraction!")) + playsound(H, 'sound/items/fulton.ogg', 50, 1) + if(!do_after(user, (10 SECONDS), INTERRUPT_ALL, BUSY_ICON_HOSTILE, H)) + return + + if(H.belt) + to_chat(user, SPAN_WARNING("Remove their belt!")) + return + user.drop_inv_item_to_loc(src, H) + H.equip_to_slot_if_possible(src, WEAR_WAIST) + try_extract(H) + +/obj/item/rappel_harness/extract/proc/on_extract(mob/living/carbon/human/user, obj/structure/dropship_equipment/rappel_system/system) + flick("rappel_hatch_opening", system) + user.pixel_x = 0 + user.pixel_y = 0 + user.forceMove(get_turf(system)) + user.apply_effect(5, WEAKEN) + if(prob(25)) + user.do_vomit() + +/datum/action/item_action/STARS/New(Target, obj/item/holder) + . = ..() + name = "Attempt Extraction" + action_icon_state = "extract" + button.name = name + button.overlays.Cut() + button.overlays += image('icons/mob/hud/actions.dmi', button, action_icon_state) + +/datum/action/item_action/STARS/action_activate() + . = ..() + var/obj/item/rappel_harness/extract/harness = holder_item + var/mob/living/carbon/human/H = usr + if(H.belt != harness) + to_chat(H, SPAN_WARNING("You have to equip the harness on your belt!")) + return + if(!is_ground_level(H.z)) + return + + var/area/location_area = get_area(H) + if(CEILING_IS_PROTECTED(location_area.ceiling, CEILING_PROTECTION_TIER_1)) + to_chat(H, SPAN_WARNING("There's no space for fulton balloon to fly in this area.")) + return + H.visible_message(SPAN_DANGER("[H] begins to adjust the fulton device for self-extraction!")) + playsound(H, 'sound/items/fulton.ogg', 50, 1) + if(!do_after(H, (10 SECONDS), INTERRUPT_ALL, BUSY_ICON_HOSTILE, harness)) + return + + harness.try_extract(H) diff --git a/code/modules/shuttle/shuttles/dropship.dm b/code/modules/shuttle/shuttles/dropship.dm index ccfcde1606..8cb8711c93 100644 --- a/code/modules/shuttle/shuttles/dropship.dm +++ b/code/modules/shuttle/shuttles/dropship.dm @@ -83,6 +83,8 @@ /obj/docking_port/mobile/marine_dropship/enterTransit() . = ..() + if(!destination) + in_flyby = TRUE if(SSticker?.mode && !(SSticker.mode.flags_round_type & MODE_DS_LANDED)) //Launching on first drop. SSticker.mode.ds_first_drop(src) diff --git a/icons/mob/hud/actions.dmi b/icons/mob/hud/actions.dmi index 9021db895e..98026781a1 100644 Binary files a/icons/mob/hud/actions.dmi and b/icons/mob/hud/actions.dmi differ diff --git a/icons/obj/items/clothing/belts.dmi b/icons/obj/items/clothing/belts.dmi index 9e41266789..f164928fff 100644 Binary files a/icons/obj/items/clothing/belts.dmi and b/icons/obj/items/clothing/belts.dmi differ diff --git a/icons/turf/dropship.dmi b/icons/turf/dropship.dmi index 88a220eb6f..7e0bfb67b0 100644 Binary files a/icons/turf/dropship.dmi and b/icons/turf/dropship.dmi differ diff --git a/maps/shuttles/dropship_midway.dmm b/maps/shuttles/dropship_midway.dmm index 4502191a37..d890d8cb1f 100644 --- a/maps/shuttles/dropship_midway.dmm +++ b/maps/shuttles/dropship_midway.dmm @@ -201,6 +201,14 @@ }, /turf/template_noop, /area/shuttle/midway) +"ok" = ( +/obj/structure/shuttle/part/dropship1/transparent/nose_center{ + name = "\improper Midway"; + icon_state = "105" + }, +/obj/effect/attach_point/electronics/midway, +/turf/template_noop, +/area/shuttle/midway) "ro" = ( /turf/closed/shuttle/midway/transparent{ icon_state = "80" @@ -746,7 +754,7 @@ dB Hz "} (4,1,1) = {" -nH +ok OB Cr hL @@ -786,7 +794,7 @@ Kw Kw "} (6,1,1) = {" -nH +ok Pc go Gf