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: Admin Console #4182

Merged
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
02b9ae8
Code quality
realforest2001 Jun 28, 2023
14276e8
Started work on reports
realforest2001 Jun 28, 2023
455ec58
ID and ARES size
realforest2001 Jul 1, 2023
271d2c5
12.8.3
realforest2001 Jul 2, 2023
263e889
Merge branch 'master' into project/apollo_controller
realforest2001 Jul 2, 2023
506254e
ARES punctuation & Fixes
realforest2001 Jul 2, 2023
0713611
ui icons
realforest2001 Jul 3, 2023
708a9df
Apollo Follow
realforest2001 Jul 4, 2023
1896c2d
admin attempt
realforest2001 Jul 4, 2023
8c2868f
x
realforest2001 Jul 4, 2023
2c2e567
red
realforest2001 Jul 4, 2023
ff25d01
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Jul 12, 2023
038c520
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Aug 13, 2023
a5d6274
Working Admin Console
realforest2001 Aug 13, 2023
a155d37
logging
realforest2001 Aug 13, 2023
a2adfbd
Fix
realforest2001 Aug 13, 2023
e6e9e36
fixes
realforest2001 Aug 14, 2023
e0d7378
accurate fix
realforest2001 Aug 14, 2023
c2e3595
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Aug 18, 2023
cb4d971
attempted conflict resolution
realforest2001 Aug 18, 2023
c404aff
Updates the delete buttons
realforest2001 Aug 21, 2023
da3d3f4
flight records
realforest2001 Aug 21, 2023
2bcb065
sec fix
realforest2001 Aug 21, 2023
45c71c1
fixes
realforest2001 Aug 21, 2023
d630f96
admin flight log
realforest2001 Aug 22, 2023
4df1507
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Aug 22, 2023
50e761f
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Aug 24, 2023
d5275c5
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Aug 28, 2023
0e41a1a
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Sep 4, 2023
653e643
Access Ticket Management
realforest2001 Sep 4, 2023
2ba9163
span fix
realforest2001 Sep 4, 2023
9f23d87
button size
realforest2001 Sep 4, 2023
3594385
fixes the claim button
realforest2001 Sep 4, 2023
cc73dbf
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Sep 11, 2023
2217350
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Sep 17, 2023
448a0b9
EXPERI-PATCH - HIJACK OBJECTIVES
realforest2001 Sep 17, 2023
3456b54
EXPERI-PATCH PATCH
realforest2001 Sep 17, 2023
d954731
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Sep 19, 2023
016a752
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Oct 9, 2023
a3f99ad
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Oct 11, 2023
14dd52a
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Oct 19, 2023
057c3a7
conflicts
realforest2001 Oct 19, 2023
ee6ca39
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Oct 23, 2023
d813ac1
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Oct 25, 2023
4c67b4d
tweaks and a fix from Drathek <3
realforest2001 Oct 25, 2023
4c543dd
reverts temp patch for hijack objectives
realforest2001 Oct 25, 2023
037f7ab
second revert
realforest2001 Oct 25, 2023
af978a6
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Nov 5, 2023
00d1140
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Nov 22, 2023
c602668
SShijack
realforest2001 Nov 22, 2023
0aa2b43
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Nov 27, 2023
fa0e595
fix
realforest2001 Nov 27, 2023
5c593c7
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Nov 29, 2023
5e96654
file rename
realforest2001 Dec 11, 2023
8075845
conflict tweak
realforest2001 Dec 11, 2023
7beec8c
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Dec 14, 2023
e558327
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Dec 26, 2023
c01698a
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Dec 26, 2023
d3c4173
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Jan 2, 2024
3ea1885
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Jan 21, 2024
333e575
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Jan 24, 2024
390e098
tweak
realforest2001 Jan 24, 2024
1c81feb
defaults
realforest2001 Jan 24, 2024
953e782
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Jan 27, 2024
03e964c
Merge remote-tracking branch 'cmss13-devs/master' into project/ares/a…
realforest2001 Jan 30, 2024
0516e66
changes
realforest2001 Feb 21, 2024
d8d7454
changes
realforest2001 Feb 26, 2024
d5a2897
changes
realforest2001 Feb 26, 2024
6f123af
define number comments
realforest2001 Feb 26, 2024
8a81f22
Apply suggestions from code review
realforest2001 Mar 3, 2024
c5d4dc3
fixes
realforest2001 Mar 3, 2024
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
38 changes: 20 additions & 18 deletions code/__DEFINES/ARES.dm
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
#define ARES_ACCESS_LOGOUT 0
/// Generic access for 1:1 conversations with ARES and unrestricted commands.
#define ARES_ACCESS_BASIC 0
#define ARES_ACCESS_BASIC 1
/// Secure Access, can read ARES Announcements and Bioscans.
#define ARES_ACCESS_COMMAND 1
#define ARES_ACCESS_JOE 2
#define ARES_ACCESS_COMMAND 2
#define ARES_ACCESS_JOE 3
/// CL, can read Apollo Log and also Delete Announcements.
#define ARES_ACCESS_CORPORATE 3
#define ARES_ACCESS_CORPORATE 4
/// Senior Command, can Delete Bioscans.
#define ARES_ACCESS_SENIOR 4
#define ARES_ACCESS_SENIOR 5
/// Synth, CE & Commanding Officer, can read the access log.
#define ARES_ACCESS_CE 5
#define ARES_ACCESS_SYNTH 6
#define ARES_ACCESS_CO 7
#define ARES_ACCESS_CE 6
#define ARES_ACCESS_SYNTH 7
#define ARES_ACCESS_CO 8
/// High Command, can read the deletion log.
#define ARES_ACCESS_HIGH 8
#define ARES_ACCESS_WY_COMMAND 9
#define ARES_ACCESS_HIGH 9
#define ARES_ACCESS_WY_COMMAND 10
/// Debugging. Allows me to view everything without using a high command rank. Unlikely to stay in a full merge.
#define ARES_ACCESS_DEBUG 10
#define ARES_ACCESS_DEBUG 11

#define ARES_RECORD_ANNOUNCE "Announcement Record"
#define ARES_RECORD_ANTIAIR "AntiAir Control Log"
Expand All @@ -34,13 +35,14 @@
/// Logged in the security updates
#define ARES_LOG_SECURITY 2

/// Access levels specifically for Working Joe management console
#define APOLLO_ACCESS_REQUEST 0
#define APOLLO_ACCESS_REPORTER 1
#define APOLLO_ACCESS_TEMP 2
#define APOLLO_ACCESS_AUTHED 3
#define APOLLO_ACCESS_JOE 4
#define APOLLO_ACCESS_DEBUG 5
// Access levels specifically for Working Joe management console
#define APOLLO_ACCESS_LOGOUT 0
#define APOLLO_ACCESS_REQUEST 1
#define APOLLO_ACCESS_REPORTER 2
#define APOLLO_ACCESS_TEMP 3
#define APOLLO_ACCESS_AUTHED 4
#define APOLLO_ACCESS_JOE 5
#define APOLLO_ACCESS_DEBUG 6

/// Ticket statuses, both for Access and Maintenance
/// Pending assignment/rejection
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/ARES/ARES.dm
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@
var/current_menu = "login"
var/last_menu = ""

var/authentication = ARES_ACCESS_BASIC
var/authentication = ARES_ACCESS_LOGOUT
/// The last person to login.
var/last_login
var/last_login = "No User"
/// A record of who logged in and when.
var/list/login_list = list()

Expand Down
71 changes: 48 additions & 23 deletions code/game/machinery/ARES/ARES_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
var/obj/structure/machinery/ares/processor/interface/p_interface
var/obj/structure/machinery/ares/processor/apollo/p_apollo
var/obj/structure/machinery/ares/processor/bioscan/p_bioscan

var/obj/structure/machinery/computer/ares_console/interface
var/datum/ares_console_admin/admin_interface

var/list/obj/structure/machinery/computer/working_joe/ticket_computers = list()

/// The chat log of the apollo link. Timestamped.
Expand All @@ -33,7 +36,10 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
var/list/tickets_maintenance = list()
var/list/tickets_access = list()

/datum/ares_link/New()
admin_interface = new
/datum/ares_link/Destroy()
qdel(admin_interface)
for(var/obj/structure/machinery/ares/link in linked_systems)
link.delink()
for(var/obj/structure/machinery/computer/ares_console/interface in linked_systems)
Expand All @@ -42,6 +48,10 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
alert.delink()
..()

/* BELOW ARE IN AdminAres.dm
/datum/ares_link/tgui_interact(mob/user, datum/tgui/ui)
/datum/ares_link/ui_data(mob/user)
*/

// ------ ARES Logging Procs ------ //
/proc/log_ares_apollo(speaker, message)
Expand Down Expand Up @@ -127,40 +137,51 @@ GLOBAL_LIST_INIT(maintenance_categories, list(

/obj/structure/machinery/computer/proc/ares_auth_to_text(access_level)
switch(access_level)
if(ARES_ACCESS_BASIC)//0
if(ARES_ACCESS_LOGOUT)//0
return "Logged Out"
if(ARES_ACCESS_BASIC)//1
return "Authorized"
if(ARES_ACCESS_COMMAND)//1
if(ARES_ACCESS_COMMAND)//2
return "[MAIN_SHIP_NAME] Command"
if(ARES_ACCESS_JOE)//2
if(ARES_ACCESS_JOE)//3
return "Working Joe"
if(ARES_ACCESS_CORPORATE)//3
if(ARES_ACCESS_CORPORATE)//4
return "Weyland-Yutani"
if(ARES_ACCESS_SENIOR)//4
if(ARES_ACCESS_SENIOR)//5
return "[MAIN_SHIP_NAME] Senior Command"
if(ARES_ACCESS_CE)//5
if(ARES_ACCESS_CE)//6
return "Chief Engineer"
if(ARES_ACCESS_SYNTH)//6
if(ARES_ACCESS_SYNTH)//7
return "USCM Synthetic"
if(ARES_ACCESS_CO)//7
if(ARES_ACCESS_CO)//8
return "[MAIN_SHIP_NAME] Commanding Officer"
if(ARES_ACCESS_HIGH)//8
if(ARES_ACCESS_HIGH)//9
return "USCM High Command"
if(ARES_ACCESS_WY_COMMAND)//9
if(ARES_ACCESS_WY_COMMAND)//10
return "Weyland-Yutani Directorate"
if(ARES_ACCESS_DEBUG)//10
if(ARES_ACCESS_DEBUG)//11
realforest2001 marked this conversation as resolved.
Show resolved Hide resolved
return "AI Service Technician"


/obj/structure/machinery/computer/ares_console/proc/message_ares(text, mob/Sender, ref)
/obj/structure/machinery/computer/ares_console/proc/message_ares(text, mob/Sender, ref, fake = FALSE)
var/msg = SPAN_STAFF_IC("<b><font color=orange>ARES:</font> [key_name(Sender, 1)] [ARES_MARK(Sender)] [ADMIN_PP(Sender)] [ADMIN_VV(Sender)] [ADMIN_SM(Sender)] [ADMIN_JMP_USER(Sender)] [ARES_REPLY(Sender, ref)]:</b> [text]")
var/datum/ares_record/talk_log/conversation = locate(ref)
realforest2001 marked this conversation as resolved.
Show resolved Hide resolved
conversation.conversation += "[last_login] at [worldtime2text()], '[text]'"
if(fake)
log_say("[key_name(Sender)] faked the message '[text]' from [last_login] in ARES 1:1.")
msg = SPAN_STAFF_IC("<b><font color=orange>ARES:</font> [key_name(Sender, 1)] faked a message from '[last_login]':</b> [text]")
else
log_say("[key_name(Sender)] sent '[text]' to ARES 1:1.")
for(var/client/admin in GLOB.admins)
if(admin.prefs.toggles_sound & SOUND_ARES_MESSAGE)
playsound_client(admin, 'sound/machines/chime.ogg', vol = 25)

for(var/client/admin in GLOB.admins)
if((R_ADMIN|R_MOD) & admin.admin_holder.rights)
to_chat(admin, msg)
if(admin.prefs.toggles_sound & SOUND_ARES_MESSAGE)
playsound_client(admin, 'sound/machines/chime.ogg', vol = 25)
log_say("[key_name(Sender)] sent '[text]' to ARES 1:1.")
var/admin_user = GLOB.ares_link.admin_interface.logged_in
if(admin_user && !fake)
to_chat(admin, SPAN_STAFF_IC("<b>ADMINS/MODS: [SPAN_RED("[admin_user] is logged in to ARES Remote Interface! They may be replying to this message!")]</b>"))

/obj/structure/machinery/computer/ares_console/proc/response_from_ares(text, ref)
var/datum/ares_record/talk_log/conversation = locate(ref)
realforest2001 marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -396,13 +417,14 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
return
// -- Page Changers -- //
if("logout")
last_menu = current_menu
current_menu = "login"
last_menu = current_menu
if(sudo_holder)
access_list += "[last_login] at [worldtime2text()], Sudo Logout."
last_login = sudo_holder
sudo_holder = null
access_list += "[last_login] logged out at [worldtime2text()]."
authentication = ARES_ACCESS_LOGOUT

if("home")
last_menu = current_menu
Expand Down Expand Up @@ -620,17 +642,19 @@ GLOBAL_LIST_INIT(maintenance_categories, list(

/obj/structure/machinery/computer/working_joe/ares_auth_to_text(access_level)
switch(access_level)
if(APOLLO_ACCESS_REQUEST)//0
if(APOLLO_ACCESS_LOGOUT)//0
return "Logged Out"
if(APOLLO_ACCESS_REQUEST)//1
return "Unauthorized Personnel"
if(APOLLO_ACCESS_REPORTER)//1
if(APOLLO_ACCESS_REPORTER)//2
return "Validated Incident Reporter"
if(APOLLO_ACCESS_TEMP)//2
if(APOLLO_ACCESS_TEMP)//3
return "Authorized Visitor"
if(APOLLO_ACCESS_AUTHED)//3
if(APOLLO_ACCESS_AUTHED)//4
return "Certified Personnel"
if(APOLLO_ACCESS_JOE)//4
if(APOLLO_ACCESS_JOE)//5
return "Working Joe"
if(APOLLO_ACCESS_DEBUG)//5
if(APOLLO_ACCESS_DEBUG)//6
return "AI Service Technician"

// ------ Maintenance Controller UI ------ //
Expand Down Expand Up @@ -848,9 +872,10 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
current_menu = "main"

if("logout")
last_menu = current_menu
current_menu = "login"
last_menu = current_menu
login_list += "[last_login] logged out at [worldtime2text()]."
authentication = APOLLO_ACCESS_LOGOUT

if("home")
last_menu = current_menu
Expand Down
Loading