ID console fixes and other tweaks.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user