Merge branch 'master' of git://github.com/Baystation12/Baystation12

This commit is contained in:
CaelAislinn
2012-02-08 18:16:09 +10:00
35 changed files with 405 additions and 420 deletions

View File

@@ -85,28 +85,9 @@
name = "Master Air Control"
/obj/machinery/computer/card
name = "Identification Computer"
desc = "You can use this to change ID's."
icon_state = "id"
circuit = "/obj/item/weapon/circuitboard/card"
var/obj/item/weapon/card/id/scan = null
var/obj/item/weapon/card/id/modify = null
var/authenticated = 0.0
var/mode = 0.0
var/printing = null
req_access = list(access_change_ids)
/obj/machinery/computer/card/centcom
name = "CentCom Identification Computer"
circuit = "/obj/item/weapon/circuitboard/card/centcom"
req_access = list(access_cent_captain)
/obj/machinery/computer/dna
name = "DNA operations computer"
desc = "A Computer used to advanced DNA stuff."
desc = "A computer used for advanced DNA operations."
icon_state = "dna"
var/obj/item/weapon/card/data/scan = null
var/obj/item/weapon/card/data/modify = null

File diff suppressed because one or more lines are too long

View File

@@ -685,7 +685,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
M.real_name = newname
M.name = newname
/proc/clname(var/mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea
/*/proc/clname(var/mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea
var/randomname = pick(clown_names)
var/newname = input(M,"You are the clown. Would you like to change your name to something else?", "Name change",randomname)
var/oldname = M.real_name
@@ -725,7 +725,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
if(id.registered == oldname)
id.registered = newname
id.name = "[id.registered]'s ID Card ([id.assignment])"
break
break*/
/proc/ionnum()
return "[pick("!","@","#","$","%","^","&","*")][pick(pick("!","@","#","$","%","^","&","*"))][pick(pick("!","@","#","$","%","^","&","*"))][pick(pick("!","@","#","$","%","^","&","*"))]"

View File

@@ -194,7 +194,7 @@
new /obj/item/weapon/reagent_containers/glass/beaker( src )
/obj/item/weapon/paper/alchemy/
name = "paper- 'Chemistry Information'"
name = "paper - 'Chemistry Information'"
/obj/item/weapon/storage/trashcan
name = "disposal unit"

View File

@@ -182,7 +182,7 @@
comm.messagetext.Add(intercepttext)
if(!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
intercept.name = "paper- [interceptname]"
intercept.name = "paper - [interceptname]"
intercept.info = intercepttext

View File

@@ -152,7 +152,7 @@ Whitespace:Seperator;"}
for (var/obj/machinery/computer/communications/comm in world)
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
intercept.name = "paper- 'Cent. Com. Status Summary'"
intercept.name = "paper - 'Cent. Com. Status Summary'"
intercept.info = intercepttext
comm.messagetitle.Add("Cent. Com. Status Summary")

View File

@@ -47,7 +47,7 @@
for (var/obj/machinery/computer/communications/comm in world)
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
intercept.name = "paper- 'Cent. Com. Status Summary'"
intercept.name = "paper - 'Cent. Com. Status Summary'"
intercept.info = intercepttext
comm.messagetitle.Add("Cent. Com. Status Summary")
@@ -118,7 +118,7 @@
for (var/obj/machinery/computer/communications/comm in world)
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
intercept.name = "paper- 'Cent. Com. Status Summary'"
intercept.name = "paper - 'Cent. Com. Status Summary'"
intercept.info = intercepttext
comm.messagetitle.Add("Cent. Com. Status Summary")
@@ -136,7 +136,7 @@
for (var/obj/machinery/computer/communications/comm in world)
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
intercept.name = "paper- 'Cent. Com. Status Summary'"
intercept.name = "paper - 'Cent. Com. Status Summary'"
intercept.info = intercepttext
comm.messagetitle.Add("Cent. Com. Status Summary")

View File

@@ -250,9 +250,9 @@ var/global/datum/controller/occupations/job_master
else
C = new /obj/item/weapon/card/id(H)
if(C)
C.registered = H.real_name
C.registered_name = H.real_name
C.assignment = rank
C.name = "[C.registered]'s ID Card ([C.assignment])"
C.name = "[C.registered_name]'s ID Card ([C.assignment])"
C.access = get_access(C.assignment)
H.equip_if_possible(C, H.slot_wear_id)
if(!H.equip_if_possible(new /obj/item/weapon/pen(H), H.slot_r_store))
@@ -264,9 +264,9 @@ var/global/datum/controller/occupations/job_master
pda.ownjob = H.wear_id.assignment
pda.name = "PDA-[H.real_name] ([pda.ownjob])"
if(rank == "Clown")
/*if(rank == "Clown")
spawn(1)
clname(H)
clname(H)*/
return 1

View File

@@ -640,7 +640,7 @@ Auto Patrol: []"},
var/obj/item/device/pda/pda = perp:wear_id
id = pda.id
if (id)
perpname = id.registered
perpname = id.registered_name
else
var/obj/item/device/pda/pda = perp:wear_id
perpname = pda.owner

View File

@@ -616,7 +616,7 @@ Auto Patrol: []"},
var/obj/item/device/pda/pda = perp:wear_id
id = pda.id
if(id)
perpname = id.registered
perpname = id.registered_name
else
var/obj/item/device/pda/pda = perp:wear_id
perpname = pda.owner

View File

@@ -133,244 +133,6 @@ Pod/Blast Doors computer
user.reset_view(current)
return 1
/obj/machinery/computer/card/attackby(O as obj, user as mob)
if(istype(O, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/idcard = O
if(access_change_ids in idcard.access)
if(!scan)
usr.drop_item()
idcard.loc = src
scan = idcard
else if(!modify)
usr.drop_item()
idcard.loc = src
modify = idcard
else
if(!modify)
usr.drop_item()
idcard.loc = src
modify = idcard
else
..()
/obj/machinery/computer/card/attack_ai(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/card/attack_paw(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/card/attack_hand(var/mob/user as mob)
if(..())
return
user.machine = src
var/dat
if (!( ticker ))
return
if (mode) // accessing crew manifest
var/crew = ""
for(var/datum/data/record/t in 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>[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>"
else
var/header = "<div align='center'><b>Identification Card Modifier</b></div>"
var/target_name
var/target_owner
var/target_rank
if(modify)
target_name = modify.name
else
target_name = "--------"
if(modify && modify.registered)
target_owner = modify.registered
else
target_owner = "--------"
if(modify && modify.assignment)
target_rank = modify.assignment
else
target_rank = "Unassigned"
var/scan_name
if(scan)
scan_name = scan.name
else
scan_name = "--------"
if(!authenticated)
header += "<br><i>Please insert the cards into the slots</i><br>"
header += "Target: <a href='?src=\ref[src];choice=modify'>[target_name]</a><br>"
header += "Confirm Identity: <a href='?src=\ref[src];choice=scan'>[scan_name]</a><br>"
else
header += "<div align='center'><br>"
header += "<a href='?src=\ref[src];choice=modify'>Remove [target_name]</a> || "
header += "<a href='?src=\ref[src];choice=scan'>Remove [scan_name]</a> <br> "
header += "<a href='?src=\ref[src];choice=mode;mode_target=1'>Access Crew Manifest</a> || "
header += "<a href='?src=\ref[src];choice=logout'>Log Out</a></div>"
header += "<hr>"
var/jobs_all = ""
var/list/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]'>[dd_replacetext(job, " ", "&nbsp")]</a> " //make sure there isn't a line break in the middle of a job
var/body
if (authenticated && modify)
var/carddesc = {"<script type="text/javascript">
function markRed(){
var nameField = document.getElementById('namefield');
nameField.style.backgroundColor = "#FFDDDD";
}
function markGreen(){
var nameField = document.getElementById('namefield');
nameField.style.backgroundColor = "#DDFFDD";
}
function showAll(){
var allJobsSlot = document.getElementById('alljobsslot');
allJobsSlot.innerHTML = "<a href='#' onclick='hideAll()'>hide</a><br>"+ "[jobs_all]";
}
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:</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> "
var/jobs = "<span id='alljobsslot'><a href='#' onclick='showAll()'>[target_rank]</a></span>" //CHECK THIS
var/accesses = ""
if(istype(src,/obj/machinery/computer/card/centcom))
accesses += "<h5>Central Command:</h5>"
for(var/A in get_all_centcom_access())
if(A in modify.access)
accesses += "<a href='?src=\ref[src];choice=access;access_target=[A];allowed=0'><font color=\"red\">[dd_replacetext(get_centcom_access_desc(A), " ", "&nbsp")]</font></a> "
else
accesses += "<a href='?src=\ref[src];choice=access;access_target=[A];allowed=1'>[dd_replacetext(get_centcom_access_desc(A), " ", "&nbsp")]</a> "
else
accesses += "<div align='center'><b>Access</b></div>"
accesses += "<table style='width:100%'>"
accesses += "<tr>"
for(var/i = 1; i <= 7; i++)
accesses += "<td style='width:14%'><b>[get_region_accesses_name(i)]:</b></td>"
accesses += "</tr><tr>"
for(var/i = 1; i <= 7; i++)
accesses += "<td style='width:14%' valign='top'>"
for(var/A in get_region_accesses(i))
if(A in modify.access)
accesses += "<a href='?src=\ref[src];choice=access;access_target=[A];allowed=0'><font color=\"red\">[dd_replacetext(get_access_desc(A), " ", "&nbsp")]</font></a> "
else
accesses += "<a href='?src=\ref[src];choice=access;access_target=[A];allowed=1'>[dd_replacetext(get_access_desc(A), " ", "&nbsp")]</a> "
accesses += "<br>"
accesses += "</td>"
accesses += "</tr></table>"
body = "[carddesc]<br>[jobs]<br><br>[accesses]" //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>"
dat = "<tt>[header][body]<hr><br></tt>"
user << browse(dat, "window=id_com;size=900x520")
onclose(user, "id_com")
return
/obj/machinery/computer/card/Topic(href, href_list)
if(..())
return
usr.machine = src
switch(href_list["choice"])
if ("modify")
if (modify)
data_core.manifest_modify(modify.registered, modify.assignment)
modify.name = text("[modify.registered]'s ID Card ([modify.assignment])")
if(ishuman(usr))
modify.loc = usr.loc
if(!usr.get_active_hand())
usr.put_in_hand(modify)
modify = null
else
modify.loc = loc
modify = null
else
var/obj/item/I = usr.equipped()
if (istype(I, /obj/item/weapon/card/id))
usr.drop_item()
I.loc = src
modify = I
authenticated = 0
if ("scan")
if (scan)
if(ishuman(usr))
scan.loc = usr.loc
if(!usr.get_active_hand())
usr.put_in_hand(scan)
scan = null
else
scan.loc = src.loc
scan = null
else
var/obj/item/I = usr.equipped()
if (istype(I, /obj/item/weapon/card/id))
usr.drop_item()
I.loc = src
scan = I
authenticated = 0
if ("auth")
if ((!( authenticated ) && (scan || (istype(usr, /mob/living/silicon))) && (modify || mode)))
if (check_access(scan))
authenticated = 1
else if ((!( authenticated ) && (istype(usr, /mob/living/silicon))) && (!modify))
usr << "You can't modify an ID without an ID inserted to modify. Once one is in the modify slot on the computer, you can log in."
if ("logout")
authenticated = 0
if("access")
if(href_list["allowed"])
if(authenticated)
var/access_type = text2num(href_list["access_target"])
var/access_allowed = text2num(href_list["allowed"])
if(access_type in (istype(src,/obj/machinery/computer/card/centcom)?get_all_centcom_access() : get_all_accesses()))
modify.access -= access_type
if(access_allowed == 1)
modify.access += access_type
if ("assign")
if (authenticated)
var/t1 = href_list["assign_target"]
if(t1 == "Custom")
t1 = input("Enter a custom job assignment.","Assignment")
else
modify.access = ( istype(src,/obj/machinery/computer/card/centcom) ? get_centcom_access(t1) : get_access(t1) )
if (modify)
modify.assignment = t1
if ("reg")
if (authenticated)
var/t2 = modify
//var/t1 = input(usr, "What name?", "ID computer", null) as text
if ((authenticated && modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf)))
modify.registered = href_list["reg"]
if ("mode")
mode = text2num(href_list["mode_target"])
if ("print")
if (!( printing ))
printing = 1
sleep(50)
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( loc )
var/t1 = "<B>Crew Manifest:</B><BR>"
for(var/datum/data/record/t in data_core.general)
t1 += "<B>[t.fields["name"]]</B> - [t.fields["rank"]]<BR>"
P.info = t1
P.name = "paper- 'Crew Manifest'"
printing = null
if (modify)
modify.name = text("[modify.registered]'s ID Card ([modify.assignment])")
updateUsrDialog()
return
/obj/datacore/proc/manifest(var/nosleep = 0)
spawn()

View File

@@ -0,0 +1,257 @@
/obj/machinery/computer/card
name = "Identification Computer"
desc = "A computer used to modify ID cards."
icon_state = "id"
circuit = "/obj/item/weapon/circuitboard/card"
var/obj/item/weapon/card/id/scan = null
var/obj/item/weapon/card/id/modify = null
var/authenticated = 0.0
var/mode = 0.0
var/printing = null
req_access = list(access_change_ids)
/obj/machinery/computer/card/centcom
name = "CentCom Identification Computer"
circuit = "/obj/item/weapon/circuitboard/card/centcom"
req_access = list(access_cent_captain)
/obj/machinery/computer/card/attackby(O as obj, user as mob)
if(istype(O, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/idcard = O
if(access_change_ids in idcard.access)
if(!scan)
usr.drop_item()
idcard.loc = src
scan = idcard
else if(!modify)
usr.drop_item()
idcard.loc = src
modify = idcard
else
if(!modify)
usr.drop_item()
idcard.loc = src
modify = idcard
else
..()
/obj/machinery/computer/card/attack_ai(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/card/attack_paw(var/mob/user as mob)
return attack_hand(user)
/obj/machinery/computer/card/attack_hand(var/mob/user as mob)
if(..())
return
user.machine = src
var/dat
if (!( ticker ))
return
if (mode) // accessing crew manifest
var/crew = ""
for(var/datum/data/record/t in data_core.general)
crew += "[t.fields["name"]] - [t.fields["rank"]]<br>"
dat = "<tt><b>Crew Manifest:</b><br>Please use the security record computer to modify entries.<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>"
else
var/header = "<div align='center'><b>Identification Card Modifier</b></div>"
var/target_name
var/target_owner
var/target_rank
if(modify)
target_name = modify.name
else
target_name = "--------"
if(modify && modify.registered_name)
target_owner = modify.registered_name
else
target_owner = "--------"
if(modify && modify.assignment)
target_rank = modify.assignment
else
target_rank = "Unassigned"
var/scan_name
if(scan)
scan_name = scan.name
else
scan_name = "--------"
if(!authenticated)
header += "<br><i>Please insert the cards into the slots</i><br>"
header += "Target: <a href='?src=\ref[src];choice=modify'>[target_name]</a><br>"
header += "Confirm Identity: <a href='?src=\ref[src];choice=scan'>[scan_name]</a><br>"
else
header += "<div align='center'><br>"
header += "<a href='?src=\ref[src];choice=modify'>Remove [target_name]</a> || "
header += "<a href='?src=\ref[src];choice=scan'>Remove [scan_name]</a> <br> "
header += "<a href='?src=\ref[src];choice=mode;mode_target=1'>Access Crew Manifest</a> || "
header += "<a href='?src=\ref[src];choice=logout'>Log Out</a></div>"
header += "<hr>"
var/jobs_all = ""
var/list/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]'>[dd_replacetext(job, " ", "&nbsp")]</a> " //make sure there isn't a line break in the middle of a job
var/body
if (authenticated && modify)
var/carddesc = {"<script type="text/javascript">
function markRed(){
var nameField = document.getElementById('namefield');
nameField.style.backgroundColor = "#FFDDDD";
}
function markGreen(){
var nameField = document.getElementById('namefield');
nameField.style.backgroundColor = "#DDFFDD";
}
function showAll(){
var allJobsSlot = document.getElementById('alljobsslot');
allJobsSlot.innerHTML = "<a href='#' onclick='hideAll()'>hide</a><br>"+ "[jobs_all]";
}
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:</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> "
var/jobs = "<span id='alljobsslot'><a href='#' onclick='showAll()'>[target_rank]</a></span>" //CHECK THIS
var/accesses = ""
if(istype(src,/obj/machinery/computer/card/centcom))
accesses += "<h5>Central Command:</h5>"
for(var/A in get_all_centcom_access())
if(A in modify.access)
accesses += "<a href='?src=\ref[src];choice=access;access_target=[A];allowed=0'><font color=\"red\">[dd_replacetext(get_centcom_access_desc(A), " ", "&nbsp")]</font></a> "
else
accesses += "<a href='?src=\ref[src];choice=access;access_target=[A];allowed=1'>[dd_replacetext(get_centcom_access_desc(A), " ", "&nbsp")]</a> "
else
accesses += "<div align='center'><b>Access</b></div>"
accesses += "<table style='width:100%'>"
accesses += "<tr>"
for(var/i = 1; i <= 7; i++)
accesses += "<td style='width:14%'><b>[get_region_accesses_name(i)]:</b></td>"
accesses += "</tr><tr>"
for(var/i = 1; i <= 7; i++)
accesses += "<td style='width:14%' valign='top'>"
for(var/A in get_region_accesses(i))
if(A in modify.access)
accesses += "<a href='?src=\ref[src];choice=access;access_target=[A];allowed=0'><font color=\"red\">[dd_replacetext(get_access_desc(A), " ", "&nbsp")]</font></a> "
else
accesses += "<a href='?src=\ref[src];choice=access;access_target=[A];allowed=1'>[dd_replacetext(get_access_desc(A), " ", "&nbsp")]</a> "
accesses += "<br>"
accesses += "</td>"
accesses += "</tr></table>"
body = "[carddesc]<br>[jobs]<br><br>[accesses]" //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>"
dat = "<tt>[header][body]<hr><br></tt>"
user << browse(dat, "window=id_com;size=900x520")
onclose(user, "id_com")
return
/obj/machinery/computer/card/Topic(href, href_list)
if(..())
return
usr.machine = src
switch(href_list["choice"])
if ("modify")
if (modify)
data_core.manifest_modify(modify.registered_name, modify.assignment)
modify.name = text("[modify.registered_name]'s ID Card ([modify.assignment])")
if(ishuman(usr))
modify.loc = usr.loc
if(!usr.get_active_hand())
usr.put_in_hand(modify)
modify = null
else
modify.loc = loc
modify = null
else
var/obj/item/I = usr.equipped()
if (istype(I, /obj/item/weapon/card/id))
usr.drop_item()
I.loc = src
modify = I
authenticated = 0
if ("scan")
if (scan)
if(ishuman(usr))
scan.loc = usr.loc
if(!usr.get_active_hand())
usr.put_in_hand(scan)
scan = null
else
scan.loc = src.loc
scan = null
else
var/obj/item/I = usr.equipped()
if (istype(I, /obj/item/weapon/card/id))
usr.drop_item()
I.loc = src
scan = I
authenticated = 0
if ("auth")
if ((!( authenticated ) && (scan || (istype(usr, /mob/living/silicon))) && (modify || mode)))
if (check_access(scan))
authenticated = 1
else if ((!( authenticated ) && (istype(usr, /mob/living/silicon))) && (!modify))
usr << "You can't modify an ID without an ID inserted to modify. Once one is in the modify slot on the computer, you can log in."
if ("logout")
authenticated = 0
if("access")
if(href_list["allowed"])
if(authenticated)
var/access_type = text2num(href_list["access_target"])
var/access_allowed = text2num(href_list["allowed"])
if(access_type in (istype(src,/obj/machinery/computer/card/centcom)?get_all_centcom_access() : get_all_accesses()))
modify.access -= access_type
if(access_allowed == 1)
modify.access += access_type
if ("assign")
if (authenticated)
var/t1 = href_list["assign_target"]
if(t1 == "Custom")
t1 = input("Enter a custom job assignment.","Assignment")
else
modify.access = ( istype(src,/obj/machinery/computer/card/centcom) ? get_centcom_access(t1) : get_access(t1) )
if (modify)
modify.assignment = t1
if ("reg")
if (authenticated)
var/t2 = modify
//var/t1 = input(usr, "What name?", "ID computer", null) as text
if ((authenticated && modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf)))
modify.registered_name = href_list["reg"]
if ("mode")
mode = text2num(href_list["mode_target"])
if ("print")
if (!( printing ))
printing = 1
sleep(50)
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( loc )
var/t1 = "<B>Crew Manifest:</B><BR>"
for(var/datum/data/record/t in data_core.general)
t1 += "<B>[t.fields["name"]]</B> - [t.fields["rank"]]<BR>"
P.info = t1
P.name = "paper - 'Crew Manifest'"
printing = null
if (modify)
modify.name = text("[modify.registered_name]'s ID Card ([modify.assignment])")
updateUsrDialog()
return

View File

@@ -155,7 +155,7 @@
src.active1 = null
src.active2 = null
if (src.check_access(src.scan))
src.authenticated = src.scan.registered
src.authenticated = src.scan.registered_name
src.rank = src.scan.assignment
src.screen = 1
if (src.authenticated)
@@ -435,7 +435,7 @@
else
P.info += "<B>Medical Record Lost!</B><BR>"
P.info += "</TT>"
P.name = "paper- 'Medical Record'"
P.name = "paper - 'Medical Record'"
src.printing = null
if (href_list["search_dna"])

View File

@@ -221,7 +221,7 @@ What a mess.*/
active1 = null
active2 = null
if(check_access(scan))
authenticated = scan.registered
authenticated = scan.registered_name
rank = scan.assignment
screen = 1
//RECORD FUNCTIONS
@@ -304,7 +304,7 @@ What a mess.*/
else
P.info += "<B>Security Record Lost!</B><BR>"
P.info += "</TT>"
P.name = "paper- 'Security Record'"
P.name = "paper - 'Security Record'"
printing = null
//RECORD DELETE
if ("Delete All Records")

View File

@@ -73,7 +73,7 @@
I = pda.id
if (I && src.check_access(I))
src.locked = 0
src.last_configurator = I:registered
src.last_configurator = I:registered_name
if (locked)
return

View File

@@ -427,7 +427,7 @@ Neutralize All Unidentified Life Signs: []<BR>"},
var/obj/item/device/pda/pda = perp:wear_id
id = pda.id
if (id)
perpname = id.registered
perpname = id.registered_name
else
var/obj/item/device/pda/pda = perp:wear_id
perpname = pda.owner

View File

@@ -308,7 +308,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if (istype(O, /obj/item/weapon/card/id))
if(src.screen == 9)
var/obj/item/weapon/card/id/T = O
src.msgVerified = text("<font color='green'><b>Verified by [T.registered] ([T.assignment])</b></font>")
src.msgVerified = text("<font color='green'><b>Verified by [T.registered_name] ([T.assignment])</b></font>")
src.updateUsrDialog()
if(src.screen == 10)
var/obj/item/weapon/card/id/ID = O

View File

@@ -31,17 +31,17 @@
user << "\red It appears to be broken."
return
var/obj/item/weapon/card/id/I = W
if(!I || !I.registered) return
if(src.allowed(user) || !src.registered || (istype(I) && (src.registered == I.registered)))
if(!I || !I.registered_name) return
if(src.allowed(user) || !src.registered || (istype(I) && (src.registered == I.registered_name)))
//they can open all lockers, or nobody owns this, or they own this locker
src.locked = !( src.locked )
if(src.locked) src.icon_state = src.icon_locked
else src.icon_state = src.icon_closed
if(!src.registered)
src.registered = I.registered
src.desc = "Owned by [I.registered]."
src.name = "Personal Closet - [I.registered]"
src.registered = I.registered_name
src.desc = "Owned by [I.registered_name]."
src.name = "Personal Closet - [I.registered_name]"
else
user << "\red Access Denied"
else if( (istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !src.broken)

View File

@@ -168,7 +168,7 @@
if (0)
dat += "<h2>PERSONAL DATA ASSISTANT v.1.2</h2>"
dat += "Owner: [owner], [ownjob]<br>"
dat += text("ID: <A href='?src=\ref[];choice=Authenticate'>[]</A><br>", src, (id ? "[id.registered], [id.assignment]" : "----------"))
dat += text("ID: <A href='?src=\ref[];choice=Authenticate'>[]</A><br>", src, (id ? "[id.registered_name], [id.assignment]" : "----------"))
dat += "Station Time: [round(world.time / 36000)+12]:[(world.time / 600 % 60) < 10 ? add_zero(world.time / 600 % 60, 1) : world.time / 600 % 60]"//:[world.time / 100 % 6][world.time / 100 % 10]"
dat += "<br><br>"
@@ -656,7 +656,7 @@
id = I
else
var/obj/item/weapon/card/I = user.equipped()
if (istype(I, /obj/item/weapon/card/id) && I:registered)
if (istype(I, /obj/item/weapon/card/id) && I:registered_name)
if(id)//Get id and replace it.
user.drop_item()
I.loc = src
@@ -679,9 +679,9 @@
if (C:radio)
C:radio.hostpda = src
else if (istype(C, /obj/item/weapon/card/id) && C:registered)
else if (istype(C, /obj/item/weapon/card/id) && C:registered_name)
if(!owner)
owner = C:registered
owner = C:registered_name
ownjob = C:assignment
name = "PDA-[owner] ([ownjob])"
user << "\blue Card scanned."
@@ -694,11 +694,11 @@
if(input=="Insert")
id_check(user, 2)
else
if(!(owner == C:registered))
if(!(owner == C:registered_name))
user << "\blue Name on card does not match registered name. Please try again."
else if((owner == C:registered) && (ownjob == C:assignment))
else if((owner == C:registered_name) && (ownjob == C:assignment))
user << "\blue Rank is up to date."
else if((owner == C:registered) && (ownjob != C:assignment))
else if((owner == C:registered_name) && (ownjob != C:assignment))
ownjob = C:assignment
name = "PDA-[owner] ([ownjob])"
user << "\blue Rank updated."

View File

@@ -206,7 +206,7 @@
for(var/i=1,src.storedinfo.len >= i,i++)
t1 += "[src.storedinfo[i]]<BR>"
P.info = t1
P.name = "paper- 'Transcript'"
P.name = "paper - 'Transcript'"
P.overlays += "paper_words"

View File

@@ -233,7 +233,7 @@
dat += text(" <B>[]</B> - []<BR>", M.name, M.get_assignment())
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc )
P.info = dat
P.name = "paper- 'Crew Manifest'"
P.name = "paper - 'Crew Manifest'"
//SN src = null
del(src)
return

View File

@@ -4,13 +4,33 @@ DATA CARD
ID CARD
FINGERPRINT CARD HOLDER
FINGERPRINT CARD
*/
/obj/item/weapon/card
name = "card"
desc = "Does card things."
icon = 'card.dmi'
w_class = 1.0
var/list/files = list( )
/obj/item/weapon/card/emag
desc = "An identification card. Seems to have some funny chip on it, though."
name = "modified identification card"
icon_state = "emag"
item_state = "card-id"
origin_tech = "magnets=2;syndicate=2"
// DATA CARDS
/obj/item/weapon/card/data
name = "data disk"
desc = "A disk with data."
icon_state = "data"
var/function = "storage"
var/data = "null"
var/special = null
item_state = "card-id"
/obj/item/weapon/card/data/verb/label(t as text)
set name = "Label Disk"
@@ -25,9 +45,58 @@ FINGERPRINT CARD
return
// ID CARDS
/obj/item/weapon/card/id
name = "identification card"
desc = "An identification card."
icon_state = "id"
item_state = "card-id"
var/access = list()
var/registered_name = null // The name registered on the card
var/assignment = null
var/obj/item/weapon/photo/PHOTO = null
var/over_jumpsuit = 1 // If set to 0, it won't display on top of the mob's jumpsuit
var/dorm = 0 // determines if this ID has claimed a dorm already
/obj/item/weapon/card/id/gold
name = "identification card"
desc = "A golden identification card."
icon_state = "gold"
item_state = "gold_id"
/obj/item/weapon/card/id/captains_spare
name = "Captain's spare ID"
icon_state = "gold"
item_state = "gold_id"
registered_name = "Captain"
assignment = "Captain"
New()
access = get_access("Captain")
..()
/obj/item/weapon/card/id/centcom
name = "CentCom ID"
desc = "An ID straight from Cent. Com."
icon_state = "centcom"
registered_name = "Central Command"
assignment = "General"
New()
access = get_all_centcom_access()
..()
/obj/item/weapon/card/id/syndicate
name = "agent card"
desc = "Shhhhh."
access = list(access_maint_tunnels)
origin_tech = "syndicate=3"
/obj/item/weapon/card/id/syndicate_command
name = "Syndicate ID card"
desc = "An ID straight from the Syndicate."
registered_name = "Syndicate"
assignment = "Syndicate Overlord"
access = list(access_syndicate)
/obj/item/weapon/card/id/attack_self(mob/user as mob)
for(var/mob/O in viewers(user, null))
@@ -45,9 +114,9 @@ FINGERPRINT CARD
return
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
src.registered = input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)
src.registered_name = input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)
src.assignment = input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")
src.name = "[src.registered]'s ID Card ([src.assignment])"
src.name = "[src.registered_name]'s ID Card ([src.assignment])"
user << "\blue You successfully forge the ID card."
/obj/item/weapon/card/id/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -59,9 +128,9 @@ FINGERPRINT CARD
W.loc = src
//src.orient2hud(usr)
add_fingerprint(usr)
usr << "\blue You add the photo to the ID"
usr << "\blue You add the photo to the ID."
else
usr << "\blue There is already a photo on this ID"
usr << "\blue There is already a photo on this ID."
//PHOTO.loc = locate(0,0,0)
@@ -75,7 +144,7 @@ FINGERPRINT CARD
PHOTO.layer = 3
PHOTO = null
else
usr << "\blue There is no photo to remove"
usr << "\blue There is no photo to remove."
// FINGERPRINT HOLDER

View File

@@ -241,7 +241,7 @@ proc/trigger_armed_response_team()
W.access = get_access("Head of Personnel")
W.assignment = "Emergency Response Team"
W.access += list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage)//Let's add their alloted CentCom access.
W.registered = real_name
W.registered_name = real_name
equip_if_possible(W, slot_wear_id)
return 1

View File

@@ -317,8 +317,8 @@ var/list/supply_groups = new()
reqform.info += "<h3>[station_name] Supply Requisition Form</h3><hr>"
if (istype(usr:wear_id, /obj/item/weapon/card/id))
if(usr:wear_id.registered)
idname = usr:wear_id.registered
if(usr:wear_id.registered_name)
idname = usr:wear_id.registered_name
if(usr:wear_id.assignment)
idrank = usr:wear_id.assignment
if (istype(usr:wear_id, /obj/item/device/pda))

View File

@@ -448,9 +448,9 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
log_admin("[key_name(src)] has granted [M.key] full access.")
id.icon_state = "gold"
id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
id.registered = H.real_name
id.registered_name = H.real_name
id.assignment = "Captain"
id.name = "[id.registered]'s ID Card ([id.assignment])"
id.name = "[id.registered_name]'s ID Card ([id.assignment])"
H.equip_if_possible(id, H.slot_wear_id)
H.update_clothing()
else
@@ -610,7 +610,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
W.name = "[M.real_name]'s ID Card"
W.access = get_all_accesses()
W.assignment = "Tunnel Clown!"
W.registered = M.real_name
W.registered_name = M.real_name
M.equip_if_possible(W, M.slot_wear_id)
var/obj/item/weapon/fireaxe/fire_axe = new(M)
@@ -669,7 +669,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
W.name = "[M.real_name]'s ID Card"
W.access = get_all_accesses()
W.assignment = "Reaper"
W.registered = M.real_name
W.registered_name = M.real_name
M.equip_if_possible(W, M.slot_wear_id)
if("death commando")//Was looking to add this for a while.
@@ -707,7 +707,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
W.access = get_all_accesses()
W.access += list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer")
W.assignment = "CentCom Review Official"
W.registered = M.real_name
W.registered_name = M.real_name
W.over_jumpsuit = 0
M.equip_if_possible(W, M.slot_wear_id)
@@ -732,7 +732,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.assignment = "CentCom Commanding Officer"
W.registered = M.real_name
W.registered_name = M.real_name
W.over_jumpsuit = 0
M.equip_if_possible(W, M.slot_wear_id)
@@ -755,7 +755,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.assignment = "Special Operations Officer"
W.registered = M.real_name
W.registered_name = M.real_name
M.equip_if_possible(W, M.slot_wear_id)
if("blue wizard")
@@ -809,7 +809,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.assignment = "Admiral"
W.registered = M.real_name
W.registered_name = M.real_name
M.equip_if_possible(W, M.slot_wear_id)
M.update_clothing()

View File

@@ -48,7 +48,7 @@
W.access = get_all_accesses()
W.access += get_all_centcom_access()
W.assignment = "Highlander"
W.registered = H.real_name
W.registered_name = H.real_name
H.equip_if_possible(W, H.slot_wear_id)
message_admins("\blue [key_name_admin(usr)] used THERE CAN BE ONLY ONE!", 1)

View File

@@ -536,7 +536,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
for (var/obj/machinery/computer/communications/C in machines)
if(! (C.stat & (BROKEN|NOPOWER) ) )
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( C.loc )
P.name = "paper- '[command_name()] Update.'"
P.name = "paper - '[command_name()] Update.'"
P.info = input
C.messagetitle.Add("[command_name()] Update")
C.messagetext.Add(P.info)

View File

@@ -183,7 +183,7 @@ var/global/sent_strike_team = 0
W.access = get_all_accesses()//They get full station access.
W.access += list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage)//Let's add their alloted CentCom access.
W.assignment = "Death Commando"
W.registered = real_name
W.registered_name = real_name
equip_if_possible(W, slot_wear_id)
resistances += "alien_embryo"

View File

@@ -186,7 +186,7 @@ var/global/sent_syndicate_strike_team = 0
W.access = get_all_accesses()//They get full station access because obviously the syndicate has HAAAX, and can make special IDs for their most elite members.
W.access += list(access_cent_general, access_cent_specops, access_cent_living, access_cent_storage, access_syndicate)//Let's add their forged CentCom access and syndicate access.
W.assignment = "Syndicate Commando"
W.registered = real_name
W.registered_name = real_name
equip_if_possible(W, slot_wear_id)
resistances += "alien_embryo"

View File

@@ -82,7 +82,7 @@
C.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobName())]")
var/perpname = "wot"
if(istype(perp.wear_id,/obj/item/weapon/card/id))
perpname = perp.wear_id:registered
perpname = perp.wear_id:registered_name
else if(istype(perp.wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = perp.wear_id
perpname = tempPda.owner

View File

@@ -86,7 +86,7 @@
var/obj/item/device/pda/pda = src:wear_id
id = pda.owner
else
id = src.wear_id.registered
id = src.wear_id.registered_name
if (src.wear_id.PHOTO)
photo = 1
if (id != src.real_name && in_range(src, usr) && prob(10))

View File

@@ -1067,8 +1067,8 @@
if (wear_id)
if (istype(wear_id, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/id = wear_id
if (id.registered)
name = id.registered
if (id.registered_name)
name = id.registered_name
else
name = "Unknown"
else if (istype(wear_id, /obj/item/device/pda))
@@ -1083,8 +1083,8 @@
if (wear_id)
if (istype(wear_id, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/id = wear_id
if (id.registered != real_name)
name = "[real_name] (as [id.registered])"
if (id.registered_name != real_name)
name = "[real_name] (as [id.registered_name])"
else if (istype(wear_id, /obj/item/device/pda))
@@ -2209,11 +2209,11 @@ It can still be worn/put on as normal.
var/obj/item/weapon/card/id/id = wear_id
if (istype(pda))
if (pda.id)
. = pda.id.registered
. = pda.id.registered_name
else
. = pda.owner
else if (istype(id))
. = id.registered
. = id.registered_name
else
return if_no_id
return
@@ -2226,7 +2226,7 @@ It can still be worn/put on as normal.
if (istype(pda))
. = pda.owner
else if (istype(id))
. = id.registered
. = id.registered_name
else
return if_no_id
return

View File

@@ -13,7 +13,7 @@
client.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobName())]")
var/perpname = "wot"
if(istype(perp.wear_id,/obj/item/weapon/card/id))
perpname = perp.wear_id:registered
perpname = perp.wear_id:registered_name
else if(istype(perp.wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = perp.wear_id
perpname = tempPda.owner

View File

@@ -110,7 +110,7 @@
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.host.loc )
P.info = print_data
if(print_title)
P.name = "paper- '[print_title]'"
P.name = "paper - '[print_title]'"
src.printing = 0
return