Skip to content

Commit

Permalink
Project ARES: Supply Drop logging. (#6084)
Browse files Browse the repository at this point in the history
# About the pull request
Adds ARES Interface (& staff) logs for launching Req supply drops.
<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game

I don't know how we never added staff logs for this, so here we go. ARES
just makes it more useful from an IC perspective.


# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
add: Added ARES logging for launching supply drops.
admin: Added staff logs for launching supply drops.
/:cl:
  • Loading branch information
realforest2001 authored Apr 6, 2024
1 parent 44fa600 commit 3e24233
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
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

0 comments on commit 3e24233

Please sign in to comment.