Skip to content

Commit

Permalink
Project ARES: Orbital Cannon loading log (#6157)
Browse files Browse the repository at this point in the history
# About the pull request
Adds an ARES log for chambering the OB Cannon, and if it has been
misfueled or not.

# Explain why it's good for the game
Logs who fires it, makes sense to log who loaded it.

# 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 an ARES Log for chambering the OB Cannon.
/:cl:

---------

Co-authored-by: Drathek <[email protected]>
  • Loading branch information
realforest2001 and Drulikar committed Apr 20, 2024
1 parent 51d31a7 commit c1b8470
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions code/game/machinery/ARES/ARES_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
var/datum/ares_datacore/datacore = GLOB.ares_datacore
datacore.records_bioscan.Add(new /datum/ares_record/bioscan(title, input))

/proc/log_ares_bombardment(user_name, ob_name, coordinates)
/proc/log_ares_bombardment(user_name, ob_name, message)
if(!ares_can_log())
return FALSE
var/datum/ares_datacore/datacore = GLOB.ares_datacore
datacore.records_bombardment.Add(new /datum/ares_record/bombardment(ob_name, "Bombardment fired at [coordinates].", user_name))
datacore.records_bombardment.Add(new /datum/ares_record/bombardment(ob_name, message, user_name))

/proc/log_ares_announcement(title, message)
if(!ares_can_log())
Expand Down
3 changes: 3 additions & 0 deletions code/modules/cm_marines/orbital_cannon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,12 @@ GLOBAL_LIST(ob_type_fuel_requirements)
chambered_tray = TRUE
var/misfuel = get_misfuel_amount()
var/message = "[key_name(user)] chambered the Orbital Bombardment cannon."
var/ares_message = "Shell chambered."
if(misfuel)
message += " It is misfueled by [misfuel] units!"
ares_message += " Fuel imbalance detected!"
message_admins(message, x, y, z)
log_ares_bombardment(user, lowertext(tray.warhead.name), ares_message)

update_icon()

Expand Down
2 changes: 1 addition & 1 deletion code/modules/cm_marines/overwatch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@
notify_ghosts(header = "Bombardment Inbound", message = "\A [ob_name] targeting [get_area(T)] has been fired!", source = T, alert_overlay = warhead_appearance, extra_large = TRUE)

/// Project ARES interface log.
log_ares_bombardment(user.name, ob_name, "X[x_bomb], Y[y_bomb] in [get_area(T)]")
log_ares_bombardment(user.name, ob_name, "Bombardment fired at X[x_bomb], Y[y_bomb] in [get_area(T)]")

busy = FALSE
if(istype(T))
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/interfaces/AresAdmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ const BombardmentLogs = (props, context) => {
User
</Flex.Item>
<Flex.Item width="30rem" textAlign="center">
Coordinates
Details
</Flex.Item>
</Flex>
)}
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/interfaces/AresInterface.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ const BombardmentLogs = (props) => {
User
</Flex.Item>
<Flex.Item width="30rem" textAlign="center">
Coordinates
Details
</Flex.Item>
</Flex>
)}
Expand Down

0 comments on commit c1b8470

Please sign in to comment.