Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STARS #131

Merged
merged 13 commits into from
Mar 11, 2024
93 changes: 93 additions & 0 deletions code/game/objects/items/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
morrowwolf marked this conversation as resolved.
Show resolved Hide resolved
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.apply_effect(5, WEAKEN)
user.pixel_x = 0
user.pixel_y = 0
user.forceMove(get_turf(system))
if(prob(25))
user.do_vomit()
morrowwolf marked this conversation as resolved.
Show resolved Hide resolved

/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)
3 changes: 3 additions & 0 deletions code/modules/admin/verbs/shuttlepanel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
set_mode(SHUTTLE_IGNITING)
on_ignition()
setTimer(ignitionTime)
if(istype(src, /obj/docking_port/mobile/marine_dropship))
AndroBetel marked this conversation as resolved.
Show resolved Hide resolved
var/obj/docking_port/mobile/marine_dropship/MD = src
MD.in_flyby = TRUE

if("Delete Shuttle")
if(alert(user, "Really delete [name || id]?", "Delete Shuttle", "Cancel", "Really!") != "Really!")
Expand Down
Binary file modified icons/mob/hud/actions.dmi
Binary file not shown.
Binary file modified icons/obj/items/clothing/belts.dmi
Binary file not shown.
Binary file modified icons/turf/dropship.dmi
Binary file not shown.
12 changes: 10 additions & 2 deletions maps/shuttles/dropship_midway.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -746,7 +754,7 @@ dB
Hz
"}
(4,1,1) = {"
nH
ok
OB
Cr
hL
Expand Down Expand Up @@ -786,7 +794,7 @@ Kw
Kw
"}
(6,1,1) = {"
nH
ok
Pc
go
Gf
Expand Down
Loading