Skip to content

Commit

Permalink
Project ARES - Apollo Controller (#3783)
Browse files Browse the repository at this point in the history
# About the pull request
Further to #3298 develops the Apollo Maintenance Controller to be
functional properly.
At present it only functions for maintenance tickets, but will
eventually allow for proper use of access tickets, and remote access of
the console by working joes (hopefully)
<!-- 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
# 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: Adds functional maintenance ticket control to the Apollo Console
add: Adds a unique ID system for each ticket. Credit to Ben10083 for the
idea.
add: Adds procs for vents to spew gas within a radius. Not currently
usable without proccall.
code: Starts work on Access Tickets.
code: START of contribs from Ben10083 
add: ARES now announces when Bioscan fails.
code: new procs to see if ARES can talk, or log something. Bioscan proc
renamed for consistency.
admin: Admins can now force an ARES announcement or communication if
subsystem is offline.
add: new emergency protocol from ARES; call General Quarters, which sets
the ship to immediate Red Alert.
add: New APOLLO maintenance ticket categories; Janitorial and Support.
Fire now a priority ticket
qol: Claimed APOLLO tickets can be unclaimed
qol: APOLLO tickets can be rejected/completed if unclaimed by any
Working Joe
code: END of contribs from Ben10083
/:cl:

---------

Co-authored-by: Ben10083 <[email protected]>
Co-authored-by: Ben <[email protected]>
Co-authored-by: harryob <[email protected]>
  • Loading branch information
4 people committed Jul 24, 2023
1 parent 4ef3b9e commit b98f57b
Show file tree
Hide file tree
Showing 18 changed files with 752 additions and 102 deletions.
13 changes: 11 additions & 2 deletions code/__DEFINES/ARES.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,20 @@
#define APOLLO_ACCESS_DEBUG 5

/// Ticket statuses, both for Access and Maintenance
/// Pending assignment/rejection
#define TICKET_PENDING "pending"
/// Assigned to a WJ
#define TICKET_ASSIGNED "assigned"
#define TICKET_REJECTED "rejected"
/// Cancelled by reporter
#define TICKET_CANCELLED "cancelled"
#define TICKET_COMPLETED "complete"
/// Rejected by WJs
#define TICKET_REJECTED "rejected"
/// Completed by WJs
#define TICKET_COMPLETED "completed"

/// Checks for if buttons can be used, these may yet be removed and internalised to the UI programming
#define TICKET_OPEN "OPEN"
#define TICKET_CLOSED "CLOSED"

/// Cooldowns
#define COOLDOWN_ARES_SENSOR 60 SECONDS
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@

/// This was a define, but I changed it to a variable so it can be changed in-game.(kept the all-caps definition because... code...) -Errorage
var/MAX_EXPLOSION_RANGE = 14

/// Used in /obj/structure/pipes/vents/proc/create_gas
#define VENT_GAS_SMOKE "Smoke"
#define VENT_GAS_CN20 "CN20 Nerve Gas"
1 change: 1 addition & 0 deletions code/__DEFINES/typecheck/mobs_generic.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#define isAI(A) (istype(A, /mob/living/silicon/ai))
#define isARES(A) (istype(A, /mob/living/silicon/decoy/ship_ai))
#define isSilicon(A) (istype(A, /mob/living/silicon))
#define isRemoteControlling(M) (M && M.client && M.client.remote_control)
#define isRemoteControllingOrAI(M) ((M && M.client && M.client.remote_control) || (istype(M, /mob/living/silicon/ai)))
Expand Down
6 changes: 3 additions & 3 deletions code/defines/procs/announcement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
targets.Remove(H)

var/datum/ares_link/link = GLOB.ares_link
if(link.interface && !(link.interface.inoperable()))
if(ares_can_log())
switch(logging)
if(ARES_LOG_MAIN)
link.log_ares_announcement(title, message)
Expand Down Expand Up @@ -99,7 +99,7 @@
INVOKE_ASYNC(AI, TYPE_PROC_REF(/mob/living/silicon/decoy/ship_ai, say), message)

var/datum/ares_link/link = GLOB.ares_link
if(link.interface && !(link.interface.inoperable()))
if(ares_can_log())
switch(logging)
if(ARES_LOG_MAIN)
link.log_ares_announcement("[MAIN_AI_SYSTEM] Comms Update", message)
Expand Down Expand Up @@ -151,7 +151,7 @@
targets.Remove(T)

var/datum/ares_link/link = GLOB.ares_link
if(link.interface && !(link.interface.inoperable()))
if(ares_can_log())
link.log_ares_announcement("[title] Shipwide Update", message)

announcement_helper(message, title, targets, sound_to_play)
Expand Down
21 changes: 15 additions & 6 deletions code/game/bioscans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ GLOBAL_DATUM_INIT(bioscan_data, /datum/bioscan_data, new)


/// This will do something after Project ARES.
/datum/bioscan_data/proc/can_ares_bioscan()
/datum/bioscan_data/proc/ares_can_bioscan()
var/datum/ares_link/link = GLOB.ares_link
if(!istype(link))
return FALSE
Expand All @@ -120,8 +120,15 @@ GLOBAL_DATUM_INIT(bioscan_data, /datum/bioscan_data, new)

/// The announcement to all Humans. Slightly off for the planet and elsewhere, accurate for the ship.
/datum/bioscan_data/proc/ares_bioscan(forced = FALSE, variance = 2)
if(!forced && !can_ares_bioscan())
message_admins("BIOSCAN: An ARES bioscan has failed.")
var/datum/ares_link/link = GLOB.ares_link
if(!forced && !ares_can_bioscan())
message_admins("An ARES Bioscan has failed.")
var/name = "[MAIN_AI_SYSTEM] Bioscan Status"
var/input = "Bioscan failed. \n\nInvestigation into Bioscan subsystem recommended."
if(ares_can_log())
link.log_ares_bioscan(name, input)
if(ares_can_interface())
marine_announcement(input, name, 'sound/misc/interference.ogg', logging = ARES_LOG_NONE)
return
//Adjust the randomness there so everyone gets the same thing
var/fake_xenos_on_planet = max(0, xenos_on_planet + rand(-variance, variance))
Expand All @@ -130,10 +137,12 @@ GLOBAL_DATUM_INIT(bioscan_data, /datum/bioscan_data, new)

log_game("BIOSCAN: ARES bioscan completed. [input]")

var/datum/ares_link/link = GLOB.ares_link
link.log_ares_bioscan(name, input)
if(forced || (link.p_interface && !link.p_interface.inoperable()))
if(forced || ares_can_log())
link.log_ares_bioscan(name, input) //if interface is down, bioscan still logged, just have to go read it.
if(forced || ares_can_interface())
marine_announcement(input, name, 'sound/AI/bioscan.ogg', logging = ARES_LOG_NONE)
else
message_admins("An ARES Bioscan has succeeded, but was not announced.")

/// The announcement to all Xenos. Slightly off for the human ship, accurate otherwise.
/datum/bioscan_data/proc/qm_bioscan(variance = 2)
Expand Down
Loading

0 comments on commit b98f57b

Please sign in to comment.