adds: ability to make automated staff request in fax TGUI

Adds a new jsx element to the login screen when using fax machines, a button in the top right corner which when pushed calls the request_roles() verb, and thus initiates the auto fax dialogue for the player.

This element has a tooltip to explain what it does when hovered.

Furthermore, for when EITHER the fax machine has an ID && logged in, BUT no paper is inserted OR paper is inserted && target destination is part of admin_departments (centcom, job board, supply) - it displays a blurb about automated staff requests with some semi-IC, semi-OOC text and the same button.

adds a new general functionality to LoginScreen.js

Adds a new JSX element to the LoginScreen file that takes machine type as its prop and returns a per-machine relevant element. This is needed for the fax functionality, and already has it defined.
This commit is contained in:
Runa Dacino
2023-08-04 16:25:38 +02:00
parent 86d5fa4299
commit 6d2511c996
4 changed files with 90 additions and 6 deletions
+4 -1
View File
@@ -51,10 +51,10 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
return
if(L.stat || L.restrained())
return
if(!scan)
to_chat(L, span_notice("There is no I.D card to remove!"))
return
scan.forceMove(loc)
if(ishuman(usr) && !usr.get_active_hand())
usr.put_in_hands(scan)
@@ -154,6 +154,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
data["rank"] = rank
data["isAI"] = isAI(user)
data["isRobot"] = isrobot(user)
data["adminDepartments"] = admin_departments
data["bossName"] = using_map.boss_name
data["copyItem"] = copyitem
@@ -211,6 +212,8 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
usr.put_in_hands(copyitem)
to_chat(usr, "<span class='notice'>You take \the [copyitem] out of \the [src].</span>")
copyitem = null
if("send_automated_staff_request")
request_roles()
if(!authenticated)
return