job titles

This commit is contained in:
Metis
2024-11-02 03:16:16 -04:00
parent 7fc23c7acf
commit f6af059a06
11 changed files with 189 additions and 16 deletions

View File

@@ -17,9 +17,9 @@ GLOBAL_LIST_EMPTY(announcement_systems)
circuit = /obj/item/circuitboard/machine/announcement_system
var/obj/item/radio/headset/radio
var/arrival = "%PERSON has signed up as %RANK"
var/arrival = "%PERSON has signed up as %DISP_RANK (%RANK)"
var/arrivalToggle = TRUE
var/newhead = "%PERSON, %RANK, is the department head."
var/newhead = "%PERSON, %DISP_RANK (%RANK), is the department head."
var/newheadToggle = TRUE
var/cryostorage = "%PERSON, %RANK, has been moved into cryogenic storage." // this shouldnt be changed
@@ -70,23 +70,24 @@ GLOBAL_LIST_EMPTY(announcement_systems)
else
return ..()
/obj/machinery/announcement_system/proc/CompileText(str, user, rank) //replaces user-given variables with actual thingies.
/obj/machinery/announcement_system/proc/CompileText(str, user, rank, displayed_rank) //replaces user-given variables with actual thingies.
str = replacetext(str, "%PERSON", "[user]")
str = replacetext(str, "%RANK", "[rank]")
str = replacetext(str, "%DISP_RANK", "[displayed_rank]")
return str
/obj/machinery/announcement_system/proc/announce(message_type, user, rank, list/channels)
/obj/machinery/announcement_system/proc/announce(message_type, user, rank, displayed_rank, list/channels)
if(!is_operational())
return
var/message
if(message_type == "ARRIVAL" && arrivalToggle)
message = CompileText(arrival, user, rank)
message = CompileText(arrival, user, rank, displayed_rank)
else if(message_type == "NEWHEAD" && newheadToggle)
message = CompileText(newhead, user, rank)
message = CompileText(newhead, user, rank, displayed_rank)
else if(message_type == "CRYOSTORAGE")
message = CompileText(cryostorage, user, rank)
message = CompileText(cryostorage, user, rank, displayed_rank)
else if(message_type == "ARRIVALS_BROKEN")
message = "The arrivals shuttle has been damaged. Docking for repairs..."