[MIRROR] Fully removes departmentType var from Requests Consoles [MDB IGNORE] (#19122)

* Fully removes departmentType var from Requests Consoles (#72916)

I was thinking about updating the requests console's UI, when I noticed
that #67219 started the process of moving away from the ancient
departmentType field. I have decided to put off the UI update until
later, and finished the necessary map updates using the power of
UpdatePaths.

Also autodocced the requests console vars and procs.

Finishes the removal of a deprecated (and may I say, badly named)
variable. Mappers will not accidentally try to set the outdated bitflag
fields, instead they will the more descriptive fields.

* Fully removes departmentType var from Requests Consoles

* Update CentCom.dmm

* update paths

* fix var edits

* fix

* a

---------

Co-authored-by: Profakos <profakos@gmail.com>
Co-authored-by: lessthnthree <three@lessthanthree.dk>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: John Doe <gamingskeleton3@gmail.com>
This commit is contained in:
SkyratBot
2023-03-03 18:15:35 +01:00
committed by GitHub
parent 3f8d92b66e
commit 9af8ffe4f8
12 changed files with 4711 additions and 4658 deletions

View File

@@ -383,6 +383,7 @@
/obj/machinery/porta_turret{
dir = 8;
installation = /obj/item/gun/energy/lasercannon;
},
/obj/effect/mapping_helpers/atom_injector/obj_flag{
inject_flags = 1;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -8039,15 +8039,6 @@
/obj/effect/turf_decal/tile/neutral/fourcorners,
/turf/open/floor/iron/dark,
/area/centcom/central_command_areas/control)
"Qg" = (
/obj/structure/table/wood,
/obj/item/flashlight/lamp,
/obj/machinery/requests_console/directional/north{
announcementConsole = 1;
department = "Captain's Desk";
},
/turf/open/floor/iron/grimy,
/area/centcom/central_command_areas/admin)
"Qi" = (
/obj/effect/turf_decal/tile/neutral,
/obj/effect/turf_decal/tile/neutral{
@@ -9863,6 +9854,16 @@
/obj/machinery/status_display/evac/directional/north,
/turf/open/floor/iron/dark,
/area/centcom/tdome/observation)
"Zk" = (
/obj/structure/table/wood,
/obj/item/flashlight/lamp,
/obj/machinery/requests_console/directional/north{
announcementConsole = 1;
department = "Captain's Desk";
},
/turf/open/floor/iron/grimy,
/area/centcom/central_command_areas/admin)
"Zl" = (
/obj/structure/table/reinforced,
/obj/item/clipboard,
@@ -48187,7 +48188,7 @@ On
vo
fP
On
Qg
Zk
XV
hd
To

View File

@@ -1145,7 +1145,7 @@
/obj/item/radio/intercom/directional/north,
/obj/machinery/requests_console/directional/west{
department = "Chapel";
departmentType = 2
supplies_requestable = 1
},
/obj/structure/closet,
/obj/item/storage/backpack/cultpack,

View File

@@ -234,8 +234,9 @@
},
/obj/machinery/requests_console/directional/north{
department = "Security";
departmentType = 3;
name = "Security Requests Console"
name = "Security Requests Console";
assistance_requestable = 1;
supplies_requestable = 1
},
/obj/effect/turf_decal/tile/blue/half/contrasted,
/turf/open/floor/iron/dark,

View File

@@ -113,10 +113,6 @@
#define REQ_HIGH_MESSAGE_PRIORITY 2
#define REQ_EXTREME_MESSAGE_PRIORITY 3
#define REQ_DEP_TYPE_ASSISTANCE (1<<0)
#define REQ_DEP_TYPE_SUPPLIES (1<<1)
#define REQ_DEP_TYPE_INFORMATION (1<<2)
///give this to can_receive to specify that there is no restriction on what z level this signal is sent to
#define RADIO_NO_Z_LEVEL_RESTRICTION 0

View File

@@ -31,51 +31,67 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments)
icon_state = "req_comp_off"
base_icon_state = "req_comp"
active_power_usage = BASE_MACHINE_ACTIVE_CONSUMPTION * 0.15
var/area/area // Reference to our area
var/areastring = null // Mapper helper to tie an apc to another area
var/auto_name = FALSE // Autonaming by area on?
var/department = "" //Department name (Determined from this variable on each unit) Set this to the same thing if you want several consoles in one department
var/list/messages = list() // List of all messages
var/departmentType = 0 // bitflag, DEPRECATED. If maps no longer contain this var, delete it. Use the flags. -fippe
// 0 = none (not listed, can only replied to)
// assistance = 1
// supplies = 2
// info = 4
// assistance + supplies = 3
// assistance + info = 5
// supplies + info = 6
// assistance + supplies + info = 7
var/newmessagepriority = REQ_NO_NEW_MESSAGE
var/screen = REQ_SCREEN_MAIN
// 0 = main menu,
// 1 = req. assistance,
// 2 = req. supplies
// 3 = relay information
// 4 = write msg - not used
// 5 = choose priority - not used
// 6 = sent successfully
// 7 = sent unsuccessfully
// 8 = view messages
// 9 = authentication before sending
// 10 = send announcement
var/silent = FALSE // set to 1 for it not to beep all the time
var/hackState = FALSE
var/announcementConsole = FALSE // FALSE = This console cannot be used to send department announcements, TRUE = This console can send department announcements
var/open = FALSE // TRUE if open
var/announceAuth = FALSE //Will be set to 1 when you authenticate yourself for announcements
var/msgVerified = "" //Will contain the name of the person who verified it
var/msgStamped = "" //If a message is stamped, this will contain the stamp name
var/message = ""
var/to_department = "" //the department which will be receiving the message
var/priority = REQ_NO_NEW_MESSAGE //Priority of the message being sent
var/obj/item/radio/Radio
var/emergency //If an emergency has been called by this device. Acts as both a cooldown and lets the responder know where it the emergency was triggered from
var/receive_ore_updates = FALSE // If ore redemption machines will send an update when it receives new ores.
var/assistance_requestable = FALSE // Can others request assistance from this terminal?
var/supplies_requestable = FALSE // Can others request supplies from this terminal?
var/anon_tips_receiver = FALSE // Can you relay information to this console?
max_integrity = 300
armor_type = /datum/armor/machinery_requests_console
/// Reference to our area
var/area/area
/// Mapper helper to tie a request console to another area
var/areastring = null
/// Is autonaming by area on?
var/auto_name = FALSE
/// Department name (Determined from this variable on each unit) Set this to the same thing if you want several consoles in one department
var/department = ""
/// List of all messages
var/list/messages = list()
/// Priority of the latest message
var/newmessagepriority = REQ_NO_NEW_MESSAGE
/*
Define for the currently displayed page
0 = main menu,
1 = req. assistance,
2 = req. supplies
3 = relay information
4 = write msg - not used
5 = choose priority - not used
6 = sent successfully
7 = sent unsuccessfully
8 = view messages
9 = authentication before sending
10 = send announcement
*/
var/screen = REQ_SCREEN_MAIN
// Is the console silent? Set to TRUE for it not to beep all the time
var/silent = FALSE
// Is the console hacked? Enables EXTREME priority if TRUE
var/hackState = FALSE
/// FALSE = This console cannot be used to send department announcements, TRUE = This console can send department announcements
var/announcementConsole = FALSE
// TRUE if maintenance panel is open
var/open = FALSE
/// Will be set to TRUE when you authenticate yourself for announcements
var/announceAuth = FALSE
/// Will contain the name of the person who verified it
var/msgVerified = ""
/// If a message is stamped, this will contain the stamp name
var/msgStamped = ""
/// The message to be sent
var/message = ""
/// The department which will be receiving the message
var/to_department = ""
/// Priority of the message being sent
var/priority = REQ_NO_NEW_MESSAGE
/// Reference to the internal radio
var/obj/item/radio/Radio
///If an emergency has been called by this device. Acts as both a cooldown and lets the responder know where it the emergency was triggered from
var/emergency
/// If ore redemption machines will send an update when it receives new ores.
var/receive_ore_updates = FALSE
/// Can others request assistance from this terminal?
var/assistance_requestable = FALSE
/// Can others request supplies from this terminal?
var/supplies_requestable = FALSE
/// Can you relay information to this console?
var/anon_tips_receiver = FALSE
/datum/armor/machinery_requests_console
melee = 70
@@ -140,17 +156,6 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments)
GLOB.allConsoles += src
if(departmentType) // Do we have department type flags? Old, deletable once all req consoles are cleaned
if((departmentType & REQ_DEP_TYPE_ASSISTANCE) && !(department in GLOB.req_console_assistance))
assistance_requestable = TRUE
if((departmentType & REQ_DEP_TYPE_SUPPLIES) && !(department in GLOB.req_console_supplies))
supplies_requestable = TRUE
if((departmentType & REQ_DEP_TYPE_INFORMATION) && !(department in GLOB.req_console_information))
anon_tips_receiver = TRUE
// once all request consoles on every map are cleaned, this section above can be deleted
if((assistance_requestable) && !(department in GLOB.req_console_assistance)) // adding to assistance list if not already present
GLOB.req_console_assistance += department
@@ -266,6 +271,7 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments)
popup.open()
return
/// Receives a list of department names, filters the request console list, and returns them formatted as a html table
/obj/machinery/requests_console/proc/departments_table(list/req_consoles)
var/dat = ""
dat += "<table width='100%'>"
@@ -402,11 +408,12 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments)
else
. = ..()
/// Turns the emergency console back to its normal sprite once the emergency has timed out
/obj/machinery/requests_console/proc/clear_emergency()
emergency = null
update_appearance()
//from message_server.dm: Console.createmessage(data["sender"], data["send_dpt"], data["message"], data["verified"], data["stamped"], data["priority"], data["notify_freq"])
/// From message_server.dm: Console.createmessage(data["sender"], data["send_dpt"], data["message"], data["verified"], data["stamped"], data["priority"], data["notify_freq"])
/obj/machinery/requests_console/proc/createmessage(source, source_department, message, msgVerified, msgStamped, priority, radio_freq)
var/linkedsender

View File

@@ -0,0 +1,8 @@
/obj/machinery/requests_console/@SUBTYPES{departmentType=0} : /obj/machinery/requests_console/@SUBTYPES{@OLD;departmentType=@SKIP}
/obj/machinery/requests_console/@SUBTYPES{departmentType=1} : /obj/machinery/requests_console/@SUBTYPES{@OLD;departmentType=@SKIP;assistance_requestable=1}
/obj/machinery/requests_console/@SUBTYPES{departmentType=2} : /obj/machinery/requests_console/@SUBTYPES{@OLD;departmentType=@SKIP;supplies_requestable=1}
/obj/machinery/requests_console/@SUBTYPES{departmentType=4} : /obj/machinery/requests_console/@SUBTYPES{@OLD;departmentType=@SKIP;anon_tips_receiver=1}
/obj/machinery/requests_console/@SUBTYPES{departmentType=3} : /obj/machinery/requests_console/@SUBTYPES{@OLD;departmentType=@SKIP;assistance_requestable=1;supplies_requestable=1}
/obj/machinery/requests_console/@SUBTYPES{departmentType=5} : /obj/machinery/requests_console/@SUBTYPES{@OLD;departmentType=@SKIP;assistance_requestable=1;anon_tips_receiver=1}
/obj/machinery/requests_console/@SUBTYPES{departmentType=6} : /obj/machinery/requests_console/@SUBTYPES{@OLD;departmentType=@SKIP;supplies_requestable=1;anon_tips_receiver=1}
/obj/machinery/requests_console/@SUBTYPES{departmentType=7} : /obj/machinery/requests_console/@SUBTYPES{@OLD;departmentType=@SKIP;assistance_requestable=1;supplies_requestable=1;anon_tips_receiver=1}