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.pixel_x = 0
user.pixel_y = 0
user.forceMove(get_turf(system))
user.apply_effect(5, WEAKEN)
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)
2 changes: 2 additions & 0 deletions code/modules/shuttle/shuttles/dropship.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

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