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

Project ARES: Supply Drop logging. #6084

Merged
merged 2 commits into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions code/game/supplyshuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new())

/obj/structure/machinery/computer/supply_drop_console/proc/handle_supplydrop()
SHOULD_NOT_SLEEP(TRUE)
var/obj/structure/closet/crate/C = check_pad()
if(!C)
var/obj/structure/closet/crate/crate = check_pad()
if(!crate)
to_chat(usr, "[icon2html(src, usr)] [SPAN_WARNING("No crate was detected on the drop pad. Get Requisitions on the line!")]")
return

Expand All @@ -316,19 +316,21 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new())
to_chat(usr, "[icon2html(src, usr)] [SPAN_WARNING("The landing zone appears to be obstructed or out of bounds. Package would be lost on drop.")]")
return

C.visible_message(SPAN_WARNING("\The [C] loads into a launch tube. Stand clear!"))
current_squad.send_message("'[C.name]' supply drop incoming. Heads up!")
current_squad.send_maptext(C.name, "Incoming Supply Drop:")
crate.visible_message(SPAN_WARNING("\The [crate] loads into a launch tube. Stand clear!"))
current_squad.send_message("'[crate.name]' supply drop incoming. Heads up!")
current_squad.send_maptext(crate.name, "Incoming Supply Drop:")
COOLDOWN_START(src, next_fire, drop_cooldown)
if(ismob(usr))
var/mob/M = usr
M.count_niche_stat(STATISTICS_NICHE_CRATES)

playsound(C.loc,'sound/effects/bamf.ogg', 50, 1) //Ehh
var/obj/structure/droppod/supply/pod = new(null, C)
C.forceMove(pod)
playsound(crate.loc,'sound/effects/bamf.ogg', 50, 1) //Ehh
var/obj/structure/droppod/supply/pod = new(null, crate)
crate.forceMove(pod)
pod.launch(T)
visible_message("[icon2html(src, viewers(src))] [SPAN_BOLDNOTICE("'[C.name]' supply drop launched! Another launch will be available in five minutes.")]")
log_ares_requisition("Supply Drop", "Launch [crate.name] to X[x_supply], Y[y_supply].", usr.real_name)
log_game("[key_name(usr)] launched supply drop '[crate.name]' to X[x_coord], Y[y_coord].")
visible_message("[icon2html(src, viewers(src))] [SPAN_BOLDNOTICE("'[crate.name]' supply drop launched! Another launch will be available in five minutes.")]")

//A limited version of the above console
//Can't pick squads, drops less often
Expand Down
16 changes: 9 additions & 7 deletions code/modules/cm_marines/overwatch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -816,8 +816,8 @@
to_chat(usr, "[icon2html(src, usr)] [SPAN_WARNING("The [name] is busy processing another action!")]")
return

var/obj/structure/closet/crate/C = locate() in current_squad.drop_pad.loc //This thing should ALWAYS exist.
if(!istype(C))
var/obj/structure/closet/crate/crate = locate() in current_squad.drop_pad.loc //This thing should ALWAYS exist.
if(!istype(crate))
to_chat(usr, "[icon2html(src, usr)] [SPAN_WARNING("No crate was detected on the drop pad. Get Requisitions on the line!")]")
return

Expand All @@ -844,17 +844,19 @@
return

busy = TRUE
C.visible_message(SPAN_WARNING("\The [C] loads into a launch tube. Stand clear!"))
SEND_SIGNAL(C, COMSIG_STRUCTURE_CRATE_SQUAD_LAUNCHED, current_squad)
crate.visible_message(SPAN_WARNING("\The [crate] loads into a launch tube. Stand clear!"))
SEND_SIGNAL(crate, COMSIG_STRUCTURE_CRATE_SQUAD_LAUNCHED, current_squad)
COOLDOWN_START(current_squad, next_supplydrop, 500 SECONDS)
if(ismob(usr))
var/mob/M = usr
M.count_niche_stat(STATISTICS_NICHE_CRATES)

playsound(C.loc,'sound/effects/bamf.ogg', 50, 1) //Ehh
var/obj/structure/droppod/supply/pod = new(null, C)
playsound(crate.loc,'sound/effects/bamf.ogg', 50, 1) //Ehh
var/obj/structure/droppod/supply/pod = new(null, crate)
pod.launch(T)
visible_message("[icon2html(src, viewers(src))] [SPAN_BOLDNOTICE("'[C.name]' supply drop launched! Another launch will be available in five minutes.")]")
log_ares_requisition("Supply Drop", "Launch [crate.name] to X[x_supply], Y[y_supply].", usr.real_name)
log_game("[key_name(usr)] launched supply drop '[crate.name]' to X[x_coord], Y[y_coord].")
visible_message("[icon2html(src, viewers(src))] [SPAN_BOLDNOTICE("'[crate.name]' supply drop launched! Another launch will be available in five minutes.")]")
busy = FALSE

/obj/structure/machinery/computer/overwatch/almayer
Expand Down
Loading