mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
ID console fixes and other tweaks.
This commit is contained in:
@@ -199,6 +199,8 @@ GLOBAL_LIST_INIT(heavyfootmob, typecacheof(list(
|
||||
|
||||
#define isitem(A) (istype(A, /obj/item))
|
||||
|
||||
#define isidcard(I) (istype(I, /obj/item/card/id))
|
||||
|
||||
#define isstructure(A) (istype(A, /obj/structure))
|
||||
|
||||
#define ismachinery(A) (istype(A, /obj/machinery))
|
||||
|
||||
@@ -92,9 +92,7 @@
|
||||
if(!usr || !usr.canUseTopic(src) || stat || QDELETED(src))
|
||||
return
|
||||
if(href_list["authenticate"])
|
||||
var/obj/item/card/id/ID = usr.get_active_held_item()
|
||||
if(!istype(ID))
|
||||
ID = usr.get_idcard()
|
||||
var/obj/item/card/id/ID = usr.get_idcard(TRUE)
|
||||
if(ID && istype(ID))
|
||||
if(check_access(ID))
|
||||
authenticated = TRUE
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
//increase the slots of many jobs.
|
||||
GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
|
||||
#define JOB_ALLOWED 1
|
||||
#define JOB_COOLDOWN -2
|
||||
#define JOB_MAX_POSITIONS -1 // Trying to reduce the number of slots below that of current holders of that job, or trying to open more slots than allowed
|
||||
#define JOB_DENIED 0
|
||||
|
||||
/obj/machinery/computer/card
|
||||
name = "identification console"
|
||||
desc = "You can use this to manage jobs and ID access."
|
||||
@@ -29,7 +34,8 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
"Head of Security",
|
||||
"Chief Engineer",
|
||||
"Research Director",
|
||||
"Chief Medical Officer")
|
||||
"Chief Medical Officer",
|
||||
"Quartermaster")
|
||||
|
||||
//The scaling factor of max total positions in relation to the total amount of people on board the station in %
|
||||
var/max_relative_positions = 30 //30%: Seems reasonable, limit of 6 @ 20 players
|
||||
@@ -44,8 +50,14 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/machinery/computer/card/proc/get_jobs()
|
||||
return get_all_jobs()
|
||||
|
||||
/obj/machinery/computer/card/centcom/get_jobs()
|
||||
return get_all_centcom_jobs()
|
||||
|
||||
/obj/machinery/computer/card/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(inserted_scan_id || inserted_modify_id)
|
||||
to_chat(user, "<span class='notice'>Alt-click to eject the ID card.</span>")
|
||||
|
||||
@@ -53,33 +65,24 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
. = ..()
|
||||
change_position_cooldown = CONFIG_GET(number/id_console_jobslot_delay)
|
||||
|
||||
/obj/machinery/computer/card/examine(mob/user)
|
||||
. = ..()
|
||||
if(inserted_scan_id || inserted_modify_id)
|
||||
to_chat(user, "<span class='notice'>Alt-click to eject the ID card.</span>")
|
||||
|
||||
/obj/machinery/computer/card/attackby(obj/I, mob/user, params)
|
||||
if(istype(I, /obj/item/card/id))
|
||||
if(!inserted_scan_id)
|
||||
if(isidcard(I))
|
||||
if(check_access(I) && !inserted_scan_id)
|
||||
if(id_insert(user, I, inserted_scan_id))
|
||||
inserted_scan_id = I
|
||||
return
|
||||
if(!inserted_modify_id)
|
||||
updateUsrDialog()
|
||||
else if(!inserted_modify_id)
|
||||
if(id_insert(user, I, inserted_modify_id))
|
||||
inserted_modify_id = I
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There's already an ID card in the console!</span>")
|
||||
updateUsrDialog()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/card/Destroy()
|
||||
if(inserted_scan_id)
|
||||
qdel(inserted_scan_id)
|
||||
inserted_scan_id = null
|
||||
QDEL_NULL(inserted_scan_id)
|
||||
if(inserted_modify_id)
|
||||
qdel(inserted_modify_id)
|
||||
inserted_modify_id = null
|
||||
QDEL_NULL(inserted_modify_id)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/card/handle_atom_del(atom/A)
|
||||
@@ -111,10 +114,10 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
if((job.total_positions <= GLOB.player_list.len * (max_relative_positions / 100)))
|
||||
var/delta = (world.time / 10) - GLOB.time_last_changed_position
|
||||
if((change_position_cooldown < delta) || (opened_positions[job.title] < 0))
|
||||
return 1
|
||||
return -2
|
||||
return -1
|
||||
return 0
|
||||
return JOB_ALLOWED
|
||||
return JOB_COOLDOWN
|
||||
return JOB_MAX_POSITIONS
|
||||
return JOB_DENIED
|
||||
|
||||
//Logic check for Topic() if you can close the job
|
||||
/obj/machinery/computer/card/proc/can_close_job(datum/job/job)
|
||||
@@ -123,34 +126,44 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
if(job.total_positions > job.current_positions)
|
||||
var/delta = (world.time / 10) - GLOB.time_last_changed_position
|
||||
if((change_position_cooldown < delta) || (opened_positions[job.title] > 0))
|
||||
return 1
|
||||
return -2
|
||||
return -1
|
||||
return 0
|
||||
return JOB_ALLOWED
|
||||
return JOB_COOLDOWN
|
||||
return JOB_MAX_POSITIONS
|
||||
return JOB_DENIED
|
||||
|
||||
/obj/machinery/computer/card/proc/id_insert(mob/user, obj/item/card/id/I, target)
|
||||
if(istype(I))
|
||||
if(target)
|
||||
to_chat(user, "<span class='warning'>There's already an ID card in the console!</span>")
|
||||
return FALSE
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return FALSE
|
||||
user.visible_message("<span class='notice'>[user] inserts an ID card into the console.</span>", \
|
||||
"<span class='notice'>You insert the ID card into the console.</span>")
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
|
||||
updateUsrDialog()
|
||||
return TRUE
|
||||
/obj/machinery/computer/card/proc/id_insert(mob/user, obj/item/inserting_item, obj/item/target)
|
||||
var/obj/item/card/id/card_to_insert = inserting_item
|
||||
var/holder_item = FALSE
|
||||
|
||||
if(!isidcard(card_to_insert))
|
||||
card_to_insert = inserting_item.RemoveID()
|
||||
holder_item = TRUE
|
||||
|
||||
if(!card_to_insert || !user.transferItemToLoc(card_to_insert, src))
|
||||
return FALSE
|
||||
|
||||
if(target)
|
||||
if(holder_item && inserting_item.InsertID(target))
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
|
||||
else
|
||||
id_eject(user, target)
|
||||
|
||||
user.visible_message("<span class='notice'>[user] inserts \the [card_to_insert] into \the [src].</span>",
|
||||
"<span class='notice'>You insert \the [card_to_insert] into \the [src].</span>")
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
|
||||
updateUsrDialog()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/card/proc/id_eject(mob/user, obj/target)
|
||||
if(!target)
|
||||
to_chat(user, "<span class='warning'>There's no ID card in the console!</span>")
|
||||
to_chat(user, "<span class='warning'>That slot is empty!</span>")
|
||||
return FALSE
|
||||
else
|
||||
target.forceMove(drop_location())
|
||||
if(!issilicon(user) && Adjacent(user))
|
||||
user.put_in_hands(target)
|
||||
user.visible_message("<span class='notice'>[user] gets an ID card from the console.</span>", \
|
||||
"<span class='notice'>You get the ID card from the console.</span>")
|
||||
user.visible_message("<span class='notice'>[user] gets \the [target] from \the [src].</span>", \
|
||||
"<span class='notice'>You get \the [target] from \the [src].</span>")
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
|
||||
updateUsrDialog()
|
||||
return TRUE
|
||||
@@ -162,86 +175,68 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
if(inserted_modify_id)
|
||||
if(id_eject(user, inserted_modify_id))
|
||||
inserted_modify_id = null
|
||||
authenticated = FALSE
|
||||
updateUsrDialog()
|
||||
return
|
||||
if(inserted_scan_id)
|
||||
if(id_eject(user, inserted_scan_id))
|
||||
inserted_scan_id = null
|
||||
authenticated = FALSE
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/card/ui_interact(mob/user)
|
||||
. = ..()
|
||||
var/dat
|
||||
if(!SSticker)
|
||||
return
|
||||
var/list/dat = list()
|
||||
if (mode == 1) // accessing crew manifest
|
||||
var/crew = ""
|
||||
dat += "<tt><b>Crew Manifest:</b><br>Please use security record computer to modify entries.<br><br>"
|
||||
for(var/datum/data/record/t in sortRecord(GLOB.data_core.general))
|
||||
crew += t.fields["name"] + " - " + t.fields["rank"] + "<br>"
|
||||
dat = "<tt><b>Crew Manifest:</b><br>Please use security record computer to modify entries.<br><br>[crew]<a href='?src=[REF(src)];choice=print'>Print</a><br><br><a href='?src=[REF(src)];choice=mode;mode_target=0'>Access ID modification console.</a><br></tt>"
|
||||
dat += {"[t.fields["name"]] - [t.fields["rank"]]<br>"}
|
||||
dat += "<a href='?src=[REF(src)];choice=print'>Print</a><br><br><a href='?src=[REF(src)];choice=mode;mode_target=0'>Access ID modification console.</a><br></tt>"
|
||||
|
||||
else if(mode == 2)
|
||||
// JOB MANAGEMENT
|
||||
dat = "<a href='?src=[REF(src)];choice=return'>Return</a>"
|
||||
dat += " || Confirm Identity: "
|
||||
var/S
|
||||
if(inserted_scan_id)
|
||||
S = html_encode(inserted_scan_id.name)
|
||||
else
|
||||
S = "--------"
|
||||
dat += "<a href='?src=[REF(src)];choice=inserted_scan_id'>[S]</a>"
|
||||
dat += "<table>"
|
||||
dat += "<tr><td style='width:25%'><b>Job</b></td><td style='width:25%'><b>Slots</b></td><td style='width:25%'><b>Open job</b></td><td style='width:25%'><b>Close job</b><td style='width:25%'><b>Prioritize</b></td></td></tr>"
|
||||
var/ID
|
||||
if(inserted_scan_id && (ACCESS_CHANGE_IDS in inserted_scan_id.access) && !target_dept)
|
||||
ID = 1
|
||||
else
|
||||
ID = 0
|
||||
dat += {"<a href='?src=[REF(src)];choice=return'>Return</a>
|
||||
<table><tr><td style='width:25%'><b>Job</b></td><td style='width:25%'><b>Slots</b></td>
|
||||
<td style='width:25%'><b>Open job</b></td><td style='width:25%'><b>Close job</b><td style='width:25%'><b>Prioritize</b></td></td></tr>"}
|
||||
for(var/datum/job/job in SSjob.occupations)
|
||||
dat += "<tr>"
|
||||
if(job.title in blacklisted)
|
||||
continue
|
||||
dat += "<td>[job.title]</td>"
|
||||
dat += "<td>[job.current_positions]/[job.total_positions]</td>"
|
||||
dat += "<td>"
|
||||
dat += {"<td>[job.title]</td>
|
||||
<td>[job.current_positions]/[job.total_positions]</td>
|
||||
<td>"}
|
||||
switch(can_open_job(job))
|
||||
if(1)
|
||||
if(ID)
|
||||
if(JOB_ALLOWED)
|
||||
if(authenticated == 2)
|
||||
dat += "<a href='?src=[REF(src)];choice=make_job_available;job=[job.title]'>Open Position</a><br>"
|
||||
else
|
||||
dat += "Open Position"
|
||||
if(-1)
|
||||
dat += "Denied"
|
||||
if(-2)
|
||||
if(JOB_COOLDOWN)
|
||||
var/time_to_wait = round(change_position_cooldown - ((world.time / 10) - GLOB.time_last_changed_position), 1)
|
||||
var/mins = round(time_to_wait / 60)
|
||||
var/seconds = time_to_wait - (60*mins)
|
||||
dat += "Cooldown ongoing: [mins]:[(seconds < 10) ? "0[seconds]" : "[seconds]"]"
|
||||
if(0)
|
||||
else
|
||||
dat += "Denied"
|
||||
dat += "</td><td>"
|
||||
switch(can_close_job(job))
|
||||
if(1)
|
||||
if(ID)
|
||||
if(JOB_ALLOWED)
|
||||
if(authenticated == 2)
|
||||
dat += "<a href='?src=[REF(src)];choice=make_job_unavailable;job=[job.title]'>Close Position</a>"
|
||||
else
|
||||
dat += "Close Position"
|
||||
if(-1)
|
||||
dat += "Denied"
|
||||
if(-2)
|
||||
if(-JOB_COOLDOWN)
|
||||
var/time_to_wait = round(change_position_cooldown - ((world.time / 10) - GLOB.time_last_changed_position), 1)
|
||||
var/mins = round(time_to_wait / 60)
|
||||
var/seconds = time_to_wait - (60*mins)
|
||||
dat += "Cooldown ongoing: [mins]:[(seconds < 10) ? "0[seconds]" : "[seconds]"]"
|
||||
if(0)
|
||||
else
|
||||
dat += "Denied"
|
||||
dat += "</td><td>"
|
||||
switch(job.total_positions)
|
||||
if(0)
|
||||
dat += "Denied"
|
||||
else
|
||||
if(ID)
|
||||
if(authenticated == 2)
|
||||
if(job in SSjob.prioritized_jobs)
|
||||
dat += "<a href='?src=[REF(src)];choice=prioritize_job;job=[job.title]'>Deprioritize</a>"
|
||||
else
|
||||
@@ -255,57 +250,35 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
dat += "</td></tr>"
|
||||
dat += "</table>"
|
||||
else
|
||||
var/header = ""
|
||||
|
||||
var/target_name
|
||||
var/target_owner
|
||||
var/target_rank
|
||||
if(inserted_modify_id)
|
||||
target_name = html_encode(inserted_modify_id.name)
|
||||
else
|
||||
target_name = "--------"
|
||||
if(inserted_modify_id && inserted_modify_id.registered_name)
|
||||
target_owner = html_encode(inserted_modify_id.registered_name)
|
||||
else
|
||||
target_owner = "--------"
|
||||
if(inserted_modify_id && inserted_modify_id.assignment)
|
||||
target_rank = html_encode(inserted_modify_id.assignment)
|
||||
else
|
||||
target_rank = "Unassigned"
|
||||
|
||||
var/scan_name
|
||||
if(inserted_scan_id)
|
||||
scan_name = html_encode(inserted_scan_id.name)
|
||||
else
|
||||
scan_name = "--------"
|
||||
var/list/header = list()
|
||||
var/scan_name = inserted_scan_id ? html_encode(inserted_scan_id.name) : "--------"
|
||||
var/target_name = inserted_modify_id ? html_encode(inserted_modify_id.name) : "--------"
|
||||
var/target_owner = (inserted_modify_id && inserted_modify_id.registered_name) ? html_encode(inserted_modify_id.registered_name) : "--------"
|
||||
var/target_rank = (inserted_modify_id && inserted_modify_id.assignment) ? html_encode(inserted_modify_id.assignment) : "Unassigned"
|
||||
|
||||
if(!authenticated)
|
||||
header += "<br><i>Please insert the cards into the slots</i><br>"
|
||||
header += "Target: <a href='?src=[REF(src)];choice=inserted_modify_id'>[target_name]</a><br>"
|
||||
header += "Confirm Identity: <a href='?src=[REF(src)];choice=inserted_scan_id'>[scan_name]</a><br>"
|
||||
header += {"<br><i>Please insert the cards into the slots</i><br>
|
||||
Target: <a href='?src=[REF(src)];choice=inserted_modify_id'>[target_name]</a><br>
|
||||
Confirm Identity: <a href='?src=[REF(src)];choice=inserted_scan_id'>[scan_name]</a><br>"}
|
||||
else
|
||||
header += "<div align='center'><br>"
|
||||
header += "<a href='?src=[REF(src)];choice=inserted_modify_id'>Remove [target_name]</a> || "
|
||||
header += "<a href='?src=[REF(src)];choice=inserted_scan_id'>Remove [scan_name]</a> <br> "
|
||||
header += "<a href='?src=[REF(src)];choice=mode;mode_target=1'>Access Crew Manifest</a> <br> "
|
||||
header += "<a href='?src=[REF(src)];choice=logout'>Log Out</a></div>"
|
||||
header += {"<div align='center'><br>"
|
||||
Target: <a href='?src=[REF(src)];choice=inserted_modify_id'>Remove [target_name]</a> ||
|
||||
Confirm Identity: <a href='?src=[REF(src)];choice=inserted_scan_id'>Remove [scan_name]</a><br>
|
||||
<a href='?src=[REF(src)];choice=mode;mode_target=1'>Access Crew Manifest</a><br>
|
||||
[!target_dept ? "<a href='?src=[REF(src)];choice=mode;mode_target=2'>Job Management</a><br>" : ""]
|
||||
<a href='?src=[REF(src)];choice=logout'>Log Out</a></div>"}
|
||||
|
||||
header += "<hr>"
|
||||
|
||||
var/jobs_all = ""
|
||||
var/list/alljobs = list("Unassigned")
|
||||
alljobs += (istype(src, /obj/machinery/computer/card/centcom)? get_all_centcom_jobs() : get_all_jobs()) + "Custom"
|
||||
for(var/job in alljobs)
|
||||
jobs_all += "<a href='?src=[REF(src)];choice=assign;assign_target=[job]'>[replacetext(job, " ", " ")]</a> " //make sure there isn't a line break in the middle of a job
|
||||
|
||||
|
||||
var/body
|
||||
|
||||
if (authenticated && inserted_modify_id)
|
||||
|
||||
var/carddesc = text("")
|
||||
var/jobs = text("")
|
||||
if( authenticated == 2)
|
||||
var/list/carddesc = list()
|
||||
var/list/jobs = list()
|
||||
if (authenticated == 2)
|
||||
var/list/jobs_all = list()
|
||||
for(var/job in (list("Unassigned") + get_jobs() + "Custom"))
|
||||
jobs_all += "<a href='?src=[REF(src)];choice=assign;assign_target=[job]'>[replacetext(job, " ", " ")]</a> " //make sure there isn't a line break in the middle of a job
|
||||
carddesc += {"<script type="text/javascript">
|
||||
function markRed(){
|
||||
var nameField = document.getElementById('namefield');
|
||||
@@ -317,20 +290,20 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
}
|
||||
function showAll(){
|
||||
var allJobsSlot = document.getElementById('alljobsslot');
|
||||
allJobsSlot.innerHTML = "<a href='#' onclick='hideAll()'>hide</a><br>"+ "[jobs_all]";
|
||||
allJobsSlot.innerHTML = "<a href='#' onclick='hideAll()'>hide</a><br>"+ "[jobs_all.Join()]";
|
||||
}
|
||||
function hideAll(){
|
||||
var allJobsSlot = document.getElementById('alljobsslot');
|
||||
allJobsSlot.innerHTML = "<a href='#' onclick='showAll()'>show</a>";
|
||||
}
|
||||
</script>"}
|
||||
carddesc += "<form name='cardcomp' action='?src=[REF(src)]' method='get'>"
|
||||
carddesc += "<input type='hidden' name='src' value='[REF(src)]'>"
|
||||
carddesc += "<input type='hidden' name='choice' value='reg'>"
|
||||
carddesc += "<b>registered name:</b> <input type='text' id='namefield' name='reg' value='[target_owner]' style='width:250px; background-color:white;' onchange='markRed()'>"
|
||||
carddesc += "<input type='submit' value='Rename' onclick='markGreen()'>"
|
||||
carddesc += "</form>"
|
||||
carddesc += "<b>Assignment:</b> "
|
||||
carddesc += {"<form name='cardcomp' action='?src=[REF(src)]' method='get'>"
|
||||
<input type='hidden' name='src' value='[REF(src)]'>
|
||||
<input type='hidden' name='choice' value='reg'>
|
||||
<b>registered name:</b> <input type='text' id='namefield' name='reg' value='[target_owner]' style='width:250px; background-color:white;' onchange='markRed()'>
|
||||
<input type='submit' value='Rename' onclick='markGreen()'>
|
||||
</form>
|
||||
<b>Assignment:</b> "}
|
||||
|
||||
jobs += "<span id='alljobsslot'><a href='#' onclick='showAll()'>[target_rank]</a></span>" //CHECK THIS
|
||||
|
||||
@@ -338,18 +311,18 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
carddesc += "<b>registered_name:</b> [target_owner]</span>"
|
||||
jobs += "<b>Assignment:</b> [target_rank] (<a href='?src=[REF(src)];choice=demote'>Demote</a>)</span>"
|
||||
|
||||
var/accesses = ""
|
||||
if(istype(src, /obj/machinery/computer/card/centcom))
|
||||
var/list/accesses = list()
|
||||
if(istype(src, /obj/machinery/computer/card/centcom)) //REE
|
||||
accesses += "<h5>Central Command:</h5>"
|
||||
for(var/A in get_all_centcom_access())
|
||||
if(A in inserted_modify_id.access)
|
||||
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=0'><font color=\"red\">[replacetext(get_centcom_access_desc(A), " ", " ")]</font></a> "
|
||||
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=0'><font color=\"6bc473\">[replacetext(get_centcom_access_desc(A), " ", " ")]</font></a> "
|
||||
else
|
||||
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=1'>[replacetext(get_centcom_access_desc(A), " ", " ")]</a> "
|
||||
else
|
||||
accesses += "<div align='center'><b>Access</b></div>"
|
||||
accesses += "<table style='width:100%'>"
|
||||
accesses += "<tr>"
|
||||
accesses += {"<div align='center'><b>Access</b></div>
|
||||
<table style='width:100%'>
|
||||
<tr>"}
|
||||
for(var/i = 1; i <= 7; i++)
|
||||
if(authenticated == 1 && !(i in region_access))
|
||||
continue
|
||||
@@ -361,23 +334,23 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
accesses += "<td style='width:14%' valign='top'>"
|
||||
for(var/A in get_region_accesses(i))
|
||||
if(A in inserted_modify_id.access)
|
||||
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=0'><font color=\"red\">[replacetext(get_access_desc(A), " ", " ")]</font></a> "
|
||||
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=0'><font color=\"6bc473\">[replacetext(get_access_desc(A), " ", " ")]</font></a> "
|
||||
else
|
||||
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=1'>[replacetext(get_access_desc(A), " ", " ")]</a> "
|
||||
accesses += "<br>"
|
||||
accesses += "</td>"
|
||||
accesses += "</tr></table>"
|
||||
body = "[carddesc]<br>[jobs]<br><br>[accesses]" //CHECK THIS
|
||||
body = "[carddesc.Join()]<br>[jobs]<br><br>[accesses.Join()]<hr>" //CHECK THIS
|
||||
|
||||
else
|
||||
body = "<a href='?src=[REF(src)];choice=auth'>{Log in}</a> <br><hr>"
|
||||
body += "<a href='?src=[REF(src)];choice=mode;mode_target=1'>Access Crew Manifest</a>"
|
||||
else if (!authenticated)
|
||||
body = {"<a href='?src=[REF(src)];choice=auth'>Log In</a> <br><hr>
|
||||
<a href='?src=[REF(src)];choice=mode;mode_target=1'>Access Crew Manifest</a><br><hr>"}
|
||||
if(!target_dept)
|
||||
body += "<br><hr><a href = '?src=[REF(src)];choice=mode;mode_target=2'>Job Management</a>"
|
||||
body += "<br><hr><a href='?src=[REF(src)];choice=mode;mode_target=2'>Job Management</a><hr>"
|
||||
|
||||
dat = "<tt>[header][body]<hr><br></tt>"
|
||||
dat = list("<tt>", header.Join(), body, "<br></tt>")
|
||||
var/datum/browser/popup = new(user, "id_com", src.name, 900, 620)
|
||||
popup.set_content(dat)
|
||||
popup.set_content(dat.Join())
|
||||
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
|
||||
popup.open()
|
||||
|
||||
@@ -393,25 +366,31 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
usr.set_machine(src)
|
||||
switch(href_list["choice"])
|
||||
if ("inserted_modify_id")
|
||||
if (inserted_modify_id)
|
||||
if (inserted_modify_id && !usr.get_active_held_item())
|
||||
if(id_eject(usr, inserted_modify_id))
|
||||
inserted_modify_id = null
|
||||
else
|
||||
var/mob/M = usr
|
||||
var/obj/item/card/id/I = M.get_idcard(TRUE)
|
||||
if(id_insert(usr, I, inserted_modify_id))
|
||||
inserted_modify_id = I
|
||||
updateUsrDialog()
|
||||
return
|
||||
if(usr.get_id_in_hand())
|
||||
var/obj/item/held_item = usr.get_active_held_item()
|
||||
var/obj/item/card/id/id_to_insert = held_item.GetID()
|
||||
if(id_insert(usr, held_item, inserted_modify_id))
|
||||
inserted_modify_id = id_to_insert
|
||||
updateUsrDialog()
|
||||
if ("inserted_scan_id")
|
||||
if (inserted_scan_id)
|
||||
if (inserted_scan_id && !usr.get_active_held_item())
|
||||
if(id_eject(usr, inserted_scan_id))
|
||||
inserted_scan_id = null
|
||||
else
|
||||
var/mob/M = usr
|
||||
var/obj/item/card/id/I = M.get_idcard(TRUE)
|
||||
if(id_insert(usr, I, inserted_scan_id))
|
||||
inserted_scan_id = I
|
||||
updateUsrDialog()
|
||||
return
|
||||
if(usr.get_id_in_hand())
|
||||
var/obj/item/held_item = usr.get_active_held_item()
|
||||
var/obj/item/card/id/id_to_insert = held_item.GetID()
|
||||
if(id_insert(usr, held_item, inserted_modify_id))
|
||||
inserted_scan_id = id_to_insert
|
||||
updateUsrDialog()
|
||||
if ("auth")
|
||||
if ((!( authenticated ) && (inserted_scan_id || issilicon(usr)) && (inserted_modify_id || mode)))
|
||||
if ((!( authenticated ) && (inserted_scan_id || issilicon(usr)) || mode))
|
||||
if (check_access(inserted_scan_id))
|
||||
region_access = list()
|
||||
head_subordinates = list()
|
||||
@@ -519,7 +498,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
|
||||
if("make_job_available")
|
||||
// MAKE ANOTHER JOB POSITION AVAILABLE FOR LATE JOINERS
|
||||
if(inserted_scan_id && (ACCESS_CHANGE_IDS in inserted_scan_id.access) && !target_dept)
|
||||
if(authenticated && (ACCESS_CHANGE_IDS in inserted_scan_id.access) && !target_dept)
|
||||
var/edit_job_target = href_list["job"]
|
||||
var/datum/job/j = SSjob.GetJob(edit_job_target)
|
||||
if(!j)
|
||||
@@ -536,7 +515,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
|
||||
if("make_job_unavailable")
|
||||
// MAKE JOB POSITION UNAVAILABLE FOR LATE JOINERS
|
||||
if(inserted_scan_id && (ACCESS_CHANGE_IDS in inserted_scan_id.access) && !target_dept)
|
||||
if(authenticated && (ACCESS_CHANGE_IDS in inserted_scan_id.access) && !target_dept)
|
||||
var/edit_job_target = href_list["job"]
|
||||
var/datum/job/j = SSjob.GetJob(edit_job_target)
|
||||
if(!j)
|
||||
@@ -554,7 +533,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
|
||||
if ("prioritize_job")
|
||||
// TOGGLE WHETHER JOB APPEARS AS PRIORITIZED IN THE LOBBY
|
||||
if(inserted_scan_id && (ACCESS_CHANGE_IDS in inserted_scan_id.access) && !target_dept)
|
||||
if(authenticated && (ACCESS_CHANGE_IDS in inserted_scan_id.access) && !target_dept)
|
||||
var/priority_target = href_list["job"]
|
||||
var/datum/job/j = SSjob.GetJob(priority_target)
|
||||
if(!j)
|
||||
@@ -642,3 +621,8 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
icon_screen = "idqm"
|
||||
|
||||
light_color = LIGHT_COLOR_ORANGE
|
||||
|
||||
#undef JOB_ALLOWED
|
||||
#undef JOB_COOLDOWN
|
||||
#undef JOB_MAX_POSITIONS
|
||||
#undef JOB_DENIED
|
||||
@@ -70,9 +70,7 @@
|
||||
if("login")
|
||||
var/mob/M = usr
|
||||
|
||||
var/obj/item/card/id/I = M.get_active_held_item()
|
||||
if(!istype(I))
|
||||
I = M.get_idcard()
|
||||
var/obj/item/card/id/I = M.get_idcard(TRUE)
|
||||
|
||||
if(I && istype(I))
|
||||
if(check_access(I))
|
||||
|
||||
@@ -203,6 +203,9 @@
|
||||
/obj/item/card/id/GetID()
|
||||
return src
|
||||
|
||||
/obj/item/card/id/RemoveID()
|
||||
return src
|
||||
|
||||
/*
|
||||
Usage:
|
||||
update_label()
|
||||
|
||||
@@ -200,6 +200,18 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
/obj/item/pda/GetID()
|
||||
return id
|
||||
|
||||
/obj/item/pda/RemoveID()
|
||||
return do_remove_id()
|
||||
|
||||
/obj/item/pda/InsertID(obj/item/inserting_item)
|
||||
var/obj/item/card/inserting_id = inserting_item.RemoveID()
|
||||
if(!inserting_id)
|
||||
return
|
||||
insert_id(inserting_id)
|
||||
if(id == inserting_id)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/pda/update_icon(alert = FALSE, new_overlays = FALSE)
|
||||
if(new_overlays)
|
||||
set_new_overlays()
|
||||
@@ -688,15 +700,27 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
return
|
||||
|
||||
/obj/item/pda/proc/remove_id()
|
||||
|
||||
if(issilicon(usr) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
do_remove_id(usr)
|
||||
|
||||
if (id)
|
||||
usr.put_in_hands(id)
|
||||
to_chat(usr, "<span class='notice'>You remove the ID from the [name].</span>")
|
||||
id = null
|
||||
update_icon()
|
||||
/obj/item/pda/proc/do_remove_id(mob/user)
|
||||
if(!id)
|
||||
return
|
||||
if(user)
|
||||
user.put_in_hands(id)
|
||||
to_chat(user, "<span class='notice'>You remove the ID from the [name].</span>")
|
||||
else
|
||||
id.forceMove(get_turf(src))
|
||||
|
||||
. = id
|
||||
id = null
|
||||
update_icon()
|
||||
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(H.wear_id == src)
|
||||
H.sec_hud_set_ID()
|
||||
|
||||
/obj/item/pda/proc/msg_input(mob/living/U = usr)
|
||||
var/t = stripped_input(U, "Please enter message", name)
|
||||
@@ -878,17 +902,25 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
if(istype(C))
|
||||
I = C
|
||||
|
||||
if(I && I.registered_name)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return FALSE
|
||||
var/obj/old_id = id
|
||||
id = I
|
||||
if(old_id)
|
||||
user.put_in_hands(old_id)
|
||||
if(I?.registered_name)
|
||||
insert_id(I, user)
|
||||
update_icon()
|
||||
playsound(src, 'sound/machines/button.ogg', 50, 1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/pda/proc/insert_id(obj/item/card/id/inserting_id, mob/user)
|
||||
var/obj/old_id = id
|
||||
id = inserting_id
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/human_wearer = loc
|
||||
if(human_wearer.wear_id == src)
|
||||
human_wearer.sec_hud_set_ID()
|
||||
if(old_id)
|
||||
if(user)
|
||||
user.put_in_hands(old_id)
|
||||
else
|
||||
old_id.forceMove(get_turf(src))
|
||||
|
||||
// access to status display signals
|
||||
/obj/item/pda/attackby(obj/item/C, mob/user, params)
|
||||
if(istype(C, /obj/item/cartridge) && !cartridge)
|
||||
|
||||
@@ -68,6 +68,21 @@
|
||||
/obj/item/storage/wallet/GetID()
|
||||
return front_id
|
||||
|
||||
/obj/item/storage/wallet/RemoveID()
|
||||
if(!front_id)
|
||||
return
|
||||
. = front_id
|
||||
front_id.forceMove(get_turf(src))
|
||||
|
||||
/obj/item/storage/wallet/InsertID(obj/item/inserting_item)
|
||||
var/obj/item/card/inserting_id = inserting_item.RemoveID()
|
||||
if(!inserting_id)
|
||||
return FALSE
|
||||
attackby(inserting_id)
|
||||
if(inserting_id in contents)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/storage/wallet/GetAccess()
|
||||
if(LAZYLEN(combined_access))
|
||||
return combined_access
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#define PRINTER_TIMEOUT 10
|
||||
|
||||
|
||||
|
||||
/obj/machinery/computer/bounty
|
||||
name = "Nanotrasen bounty console"
|
||||
desc = "Used to check and claim bounties offered by Nanotrasen"
|
||||
@@ -24,9 +26,9 @@
|
||||
for(var/datum/bounty/B in GLOB.bounties_list)
|
||||
if(B.claimed)
|
||||
continue
|
||||
info += "<h3>[B.name]</h3>"
|
||||
info += "<ul><li>Reward: [B.reward_string()]</li>"
|
||||
info += "<li>Completed: [B.completion_string()]</li></ul>"
|
||||
info += {"<h3>[B.name]</h3>
|
||||
<ul><li>Reward: [B.reward_string()]</li>
|
||||
<li>Completed: [B.completion_string()]</li></ul>"}
|
||||
|
||||
/obj/machinery/computer/bounty/ui_interact(mob/user)
|
||||
. = ..()
|
||||
@@ -34,39 +36,36 @@
|
||||
if(!GLOB.bounties_list.len)
|
||||
setup_bounties()
|
||||
|
||||
var/dat = ""
|
||||
dat += "<a href='?src=[REF(src)];refresh=1'>Refresh</a>"
|
||||
dat += "<a href='?src=[REF(src)];refresh=1;choice=Print'>Print Paper</a>"
|
||||
dat += "<p>Credits: <b>[SSshuttle.points]</b></p>"
|
||||
dat += {"<table style="text-align:center;" border="1" cellspacing="0" width="100%">"}
|
||||
dat += "<tr><th>Name</th><th>Description</th><th>Reward</th><th>Completion</th><th>Status</th></tr>"
|
||||
var/list/dat = list({"<a href='?src=[REF(src)];refresh=1'>Refresh</a>
|
||||
<a href='?src=[REF(src)];refresh=1;choice=Print'>Print Paper</a>
|
||||
<p>Credits: <b>[SSshuttle.points]</b></p>
|
||||
<table style="text-align:center;" border="1" cellspacing="0" width="100%">
|
||||
<tr><th>Name</th><th>Description</th><th>Reward</th><th>Completion</th><th>Status</th></tr>"})
|
||||
for(var/datum/bounty/B in GLOB.bounties_list)
|
||||
var/background
|
||||
if(B.can_claim())
|
||||
background = "'background-color:#4F7529;'"
|
||||
else if(B.claimed)
|
||||
background = "'background-color:#294675;'"
|
||||
if(B.claimed)
|
||||
dat += "<tr style='background-color:#294675;'>"
|
||||
else if(B.can_claim())
|
||||
dat += "<tr style='background-color:#4F7529;'>"
|
||||
else
|
||||
background = "'background-color:#990000;'"
|
||||
dat += "<tr style=[background]>"
|
||||
dat += "<tr style='background-color:#990000;'>"
|
||||
if(B.high_priority)
|
||||
dat += text("<td><b>[]</b></td>", B.name)
|
||||
dat += text("<td><b>High Priority:</b> []</td>", B.description)
|
||||
dat += text("<td><b>[]</b></td>", B.reward_string())
|
||||
dat += {"<td><b>[B.name]</b></td>
|
||||
<td><b>High Priority:</b> [B.description]</td>
|
||||
<td><b>[B.reward_string()]</b></td>"}
|
||||
else
|
||||
dat += text("<td>[]</td>", B.name)
|
||||
dat += text("<td>[]</td>", B.description)
|
||||
dat += text("<td>[]</td>", B.reward_string())
|
||||
dat += text("<td>[]</td>", B.completion_string())
|
||||
if(B.can_claim())
|
||||
dat += text("<td><A href='?src=[REF(src)];refresh=1;choice=Claim;d_rec=[REF(B)]'>Claim</a></td>")
|
||||
else if(B.claimed)
|
||||
dat += text("<td>Claimed</td>")
|
||||
dat += {"<td>[B.name]</td>
|
||||
<td>[B.description]</td>
|
||||
<td>[B.reward_string()]</td>"}
|
||||
dat += "<td>[B.completion_string()]</td>"
|
||||
if(B.claimed)
|
||||
dat += "<td>Claimed</td>"
|
||||
else if(B.can_claim())
|
||||
dat += "<td><A href='?src=[REF(src)];refresh=1;choice=Claim;d_rec=[REF(B)]'>Claim</a></td>"
|
||||
else
|
||||
dat += text("<td>Unclaimed</td>")
|
||||
dat += "<td>Unclaimed</td>"
|
||||
dat += "</tr>"
|
||||
dat += "</table>"
|
||||
|
||||
dat = dat.Join()
|
||||
var/datum/browser/popup = new(user, "bounties", "Nanotrasen Bounties", 700, 600)
|
||||
popup.set_content(dat)
|
||||
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
|
||||
@@ -91,4 +90,3 @@
|
||||
playsound(src, "terminal_type", 25, 0)
|
||||
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
name = H.get_authentification_name()
|
||||
rank = H.get_assignment()
|
||||
rank = H.get_assignment(hand_first = TRUE)
|
||||
else if(issilicon(usr))
|
||||
name = usr.real_name
|
||||
rank = "Silicon"
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
name = H.get_authentification_name()
|
||||
rank = H.get_assignment()
|
||||
rank = H.get_assignment(hand_first = TRUE)
|
||||
else if(issilicon(usr))
|
||||
name = usr.real_name
|
||||
rank = "Silicon"
|
||||
|
||||
@@ -35,6 +35,12 @@
|
||||
/obj/item/proc/GetID()
|
||||
return null
|
||||
|
||||
/obj/item/proc/RemoveID()
|
||||
return null
|
||||
|
||||
/obj/item/proc/InsertID()
|
||||
return FALSE
|
||||
|
||||
/obj/proc/text2access(access_text)
|
||||
. = list()
|
||||
if(!access_text)
|
||||
|
||||
@@ -574,7 +574,7 @@
|
||||
return threatcount
|
||||
|
||||
//Check for ID
|
||||
var/obj/item/card/id/idcard = get_idcard()
|
||||
var/obj/item/card/id/idcard = get_idcard(FALSE)
|
||||
if( (judgement_criteria & JUDGE_IDCHECK) && !idcard && name=="Unknown")
|
||||
threatcount += 4
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
//gets assignment from ID or ID inside PDA or PDA itself
|
||||
//Useful when player do something with computers
|
||||
/mob/living/carbon/human/proc/get_assignment(if_no_id = "No id", if_no_job = "No job")
|
||||
var/obj/item/card/id/id = get_idcard()
|
||||
/mob/living/carbon/human/proc/get_assignment(if_no_id = "No id", if_no_job = "No job", hand_first = TRUE)
|
||||
var/obj/item/card/id/id = get_idcard(hand_first)
|
||||
if(id)
|
||||
. = id.assignment
|
||||
else
|
||||
@@ -27,7 +27,7 @@
|
||||
//gets name from ID or ID inside PDA or PDA itself
|
||||
//Useful when player do something with computers
|
||||
/mob/living/carbon/human/proc/get_authentification_name(if_no_id = "Unknown")
|
||||
var/obj/item/card/id/id = get_idcard()
|
||||
var/obj/item/card/id/id = get_idcard(FALSE)
|
||||
if(id)
|
||||
return id.registered_name
|
||||
var/obj/item/pda/pda = wear_id
|
||||
@@ -86,10 +86,15 @@
|
||||
return
|
||||
|
||||
//gets ID card object from special clothes slot or null.
|
||||
/mob/living/carbon/human/get_idcard()
|
||||
if(wear_id)
|
||||
return wear_id.GetID()
|
||||
|
||||
/mob/living/carbon/human/get_idcard(hand_first = TRUE)
|
||||
. = ..()
|
||||
if(. && hand_first)
|
||||
return
|
||||
//Check inventory slots
|
||||
var/obj/item/card/id/id_card = wear_id?.GetID()
|
||||
if(!id_card)
|
||||
id_card = belt?.GetID()
|
||||
return id_card || .
|
||||
|
||||
/mob/living/carbon/human/IsAdvancedToolUser()
|
||||
if(HAS_TRAIT(src, TRAIT_MONKEYLIKE))
|
||||
@@ -100,7 +105,6 @@
|
||||
return dna.species.handle_chemicals(R,src)
|
||||
// if it returns 0, it will run the usual on_mob_life for that reagent. otherwise, it will stop after running handle_chemicals for the species.
|
||||
|
||||
|
||||
/mob/living/carbon/human/can_track(mob/living/user)
|
||||
if(wear_id && istype(wear_id.GetID(), /obj/item/card/id/syndicate))
|
||||
return 0
|
||||
|
||||
@@ -462,8 +462,8 @@
|
||||
return
|
||||
sync_lighting_plane_alpha()
|
||||
|
||||
/mob/living/simple_animal/get_idcard()
|
||||
return access_card
|
||||
/mob/living/simple_animal/get_idcard(hand_first = TRUE)
|
||||
return ..() || access_card
|
||||
|
||||
/mob/living/simple_animal/OpenCraftingMenu()
|
||||
if(dextrous)
|
||||
|
||||
@@ -930,10 +930,6 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
|
||||
/mob/proc/can_hold_items()
|
||||
return FALSE
|
||||
|
||||
/mob/proc/get_idcard()
|
||||
return
|
||||
|
||||
|
||||
/mob/vv_get_dropdown()
|
||||
. = ..()
|
||||
. += "---"
|
||||
|
||||
@@ -518,3 +518,17 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
else if(HAS_TRAIT_FROM(src, TRAIT_DISSECTED,"Thorough Dissection"))
|
||||
dissectionmsg = " via Thorough Dissection"
|
||||
. += "<span class='notice'>This body has been dissected and analyzed[dissectionmsg].</span><br>"
|
||||
|
||||
//gets ID card object from special clothes slot or null.
|
||||
/mob/proc/get_idcard(hand_first = TRUE)
|
||||
var/obj/item/held_item = get_active_held_item()
|
||||
. = held_item?.GetID()
|
||||
if(!.) //If so, then check the inactive hand
|
||||
held_item = get_inactive_held_item()
|
||||
. = held_item?.GetID()
|
||||
|
||||
/mob/proc/get_id_in_hand()
|
||||
var/obj/item/held_item = get_active_held_item()
|
||||
if(!held_item)
|
||||
return
|
||||
return held_item.GetID()
|
||||
|
||||
@@ -157,6 +157,21 @@
|
||||
return card_slot.GetID()
|
||||
return ..()
|
||||
|
||||
/obj/item/modular_computer/RemoveID()
|
||||
var/obj/item/computer_hardware/card_slot/card_slot = all_components[MC_CARD]
|
||||
if(!card_slot)
|
||||
return
|
||||
return card_slot.RemoveID()
|
||||
|
||||
/obj/item/modular_computer/InsertID(obj/item/inserting_item)
|
||||
var/obj/item/computer_hardware/card_slot/card_slot = all_components[MC_CARD]
|
||||
if(!card_slot)
|
||||
return FALSE
|
||||
var/obj/item/card/inserting_id = inserting_item.RemoveID()
|
||||
if(!inserting_id)
|
||||
return FALSE
|
||||
return card_slot.try_insert(inserting_id)
|
||||
|
||||
/obj/item/modular_computer/MouseDrop(obj/over_object, src_location, over_location)
|
||||
var/mob/M = usr
|
||||
if((!istype(over_object, /obj/screen)) && usr.canUseTopic(src))
|
||||
|
||||
@@ -97,14 +97,8 @@
|
||||
card_slot = computer.all_components[MC_CARD]
|
||||
D = card_slot.GetID()
|
||||
var/mob/living/carbon/human/h = user
|
||||
var/obj/item/card/id/I = h.get_idcard()
|
||||
var/obj/item/card/id/C = h.get_active_held_item()
|
||||
if(C)
|
||||
C = C.GetID()
|
||||
if(!(C && istype(C)))
|
||||
C = null
|
||||
|
||||
if(!I && !C && !D)
|
||||
var/obj/item/card/id/I = h.get_idcard(TRUE)
|
||||
if(!I && !D)
|
||||
if(loud)
|
||||
to_chat(user, "<span class='danger'>\The [computer] flashes an \"RFID Error - Unable to scan ID\" warning.</span>")
|
||||
return 0
|
||||
@@ -112,9 +106,6 @@
|
||||
if(I)
|
||||
if(access_to_check in I.GetAccess())
|
||||
return 1
|
||||
else if(C)
|
||||
if(access_to_check in C.GetAccess())
|
||||
return 1
|
||||
else if(D)
|
||||
if(access_to_check in D.GetAccess())
|
||||
return 1
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
else
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/h = user
|
||||
user_id_card = h.get_idcard()
|
||||
user_id_card = h.get_idcard(TRUE)
|
||||
|
||||
switch(action)
|
||||
if("PRG_switchm")
|
||||
|
||||
@@ -29,6 +29,17 @@
|
||||
return stored_card2
|
||||
return ..()
|
||||
|
||||
/obj/item/computer_hardware/card_slot/RemoveID()
|
||||
if(stored_card)
|
||||
. = stored_card
|
||||
if(!try_eject(1))
|
||||
return null
|
||||
return
|
||||
if(stored_card2)
|
||||
. = stored_card2
|
||||
if(!try_eject(2))
|
||||
return null
|
||||
|
||||
/obj/item/computer_hardware/card_slot/on_install(obj/item/modular_computer/M, mob/living/user = null)
|
||||
M.add_verb(device_type)
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
var/mob/user = usr
|
||||
. = FALSE
|
||||
|
||||
var/obj/item/card/id/ID = user.get_idcard()
|
||||
var/obj/item/card/id/ID = user.get_idcard(TRUE)
|
||||
|
||||
if(!ID)
|
||||
to_chat(user, "<span class='warning'>You don't have an ID.</span>")
|
||||
@@ -93,7 +93,7 @@
|
||||
minor_announce("Early launch authorization revoked, [remaining] authorizations needed")
|
||||
|
||||
/obj/machinery/computer/emergency_shuttle/proc/authorize(mob/user, source)
|
||||
var/obj/item/card/id/ID = user.get_idcard()
|
||||
var/obj/item/card/id/ID = user.get_idcard(TRUE)
|
||||
|
||||
if(ID in authorized)
|
||||
return FALSE
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
if(H.mind && H.mind.assigned_role == "Bartender")
|
||||
return TRUE
|
||||
|
||||
var/obj/item/card/id/ID = user.get_idcard()
|
||||
var/obj/item/card/id/ID = user.get_idcard(FALSE)
|
||||
if(ID && (ACCESS_CENT_BAR in ID.access))
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
/obj/machinery/computer/card
|
||||
list/blacklisted = list(
|
||||
"Quartermaster")
|
||||
@@ -2996,7 +2996,6 @@
|
||||
#include "modular_citadel\code\game\machinery\toylathe.dm"
|
||||
#include "modular_citadel\code\game\machinery\vending.dm"
|
||||
#include "modular_citadel\code\game\machinery\wishgranter.dm"
|
||||
#include "modular_citadel\code\game\machinery\computer\card.dm"
|
||||
#include "modular_citadel\code\game\machinery\doors\airlock.dm"
|
||||
#include "modular_citadel\code\game\machinery\doors\airlock_types.dm"
|
||||
#include "modular_citadel\code\game\objects\cit_screenshake.dm"
|
||||
|
||||
Reference in New Issue
Block a user