July 5th TG sync (#1883)

July 5th TG sync
This commit is contained in:
Poojawa
2017-07-05 22:14:19 -05:00
committed by GitHub
parent 454b9c3d68
commit b1b4826c0c
1264 changed files with 149689 additions and 570309 deletions
+219 -219
View File
@@ -1,220 +1,220 @@
/* Filing cabinets!
* Contains:
* Filing Cabinets
* Security Record Cabinets
* Medical Record Cabinets
* Employment Contract Cabinets
*/
/*
* Filing Cabinets
*/
/obj/structure/filingcabinet
name = "filing cabinet"
desc = "A large cabinet with drawers."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "filingcabinet"
density = 1
anchored = 1
/obj/structure/filingcabinet/chestdrawer
name = "chest drawer"
icon_state = "chestdrawer"
/obj/structure/filingcabinet/chestdrawer/wheeled
name = "rolling chest drawer"
desc = "A small cabinet with drawers. This one has wheels!"
anchored = 0
/obj/structure/filingcabinet/filingcabinet //not changing the path to avoid unecessary map issues, but please don't name stuff like this in the future -Pete
icon_state = "tallcabinet"
/obj/structure/filingcabinet/Initialize(mapload)
/* Filing cabinets!
* Contains:
* Filing Cabinets
* Security Record Cabinets
* Medical Record Cabinets
* Employment Contract Cabinets
*/
/*
* Filing Cabinets
*/
/obj/structure/filingcabinet
name = "filing cabinet"
desc = "A large cabinet with drawers."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "filingcabinet"
density = 1
anchored = 1
/obj/structure/filingcabinet/chestdrawer
name = "chest drawer"
icon_state = "chestdrawer"
/obj/structure/filingcabinet/chestdrawer/wheeled
name = "rolling chest drawer"
desc = "A small cabinet with drawers. This one has wheels!"
anchored = 0
/obj/structure/filingcabinet/filingcabinet //not changing the path to avoid unecessary map issues, but please don't name stuff like this in the future -Pete
icon_state = "tallcabinet"
/obj/structure/filingcabinet/Initialize(mapload)
. = ..()
if(mapload)
for(var/obj/item/I in loc)
if(istype(I, /obj/item/weapon/paper) || istype(I, /obj/item/weapon/folder) || istype(I, /obj/item/weapon/photo))
I.loc = src
/obj/structure/filingcabinet/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
new /obj/item/stack/sheet/metal(loc, 2)
for(var/obj/item/I in src)
I.forceMove(loc)
qdel(src)
/obj/structure/filingcabinet/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/folder) || istype(P, /obj/item/weapon/photo) || istype(P, /obj/item/documents))
if(!user.drop_item())
return
to_chat(user, "<span class='notice'>You put [P] in [src].</span>")
P.loc = src
icon_state = "[initial(icon_state)]-open"
sleep(5)
icon_state = initial(icon_state)
updateUsrDialog()
else if(istype(P, /obj/item/weapon/wrench))
to_chat(user, "<span class='notice'>You begin to [anchored ? "unwrench" : "wrench"] [src].</span>")
playsound(loc, P.usesound, 50, 1)
if(do_after(user, 20, target = src))
to_chat(user, "<span class='notice'>You successfully [anchored ? "unwrench" : "wrench"] [src].</span>")
anchored = !anchored
else if(user.a_intent != INTENT_HARM)
to_chat(user, "<span class='warning'>You can't put [P] in [src]!</span>")
else
return ..()
/obj/structure/filingcabinet/attack_hand(mob/user)
if(contents.len <= 0)
to_chat(user, "<span class='notice'>[src] is empty.</span>")
return
user.set_machine(src)
var/dat = "<center><table>"
var/i
for(i=contents.len, i>=1, i--)
var/obj/item/P = contents[i]
dat += "<tr><td><a href='?src=\ref[src];retrieve=\ref[P]'>[P.name]</a></td></tr>"
dat += "</table></center>"
user << browse("<html><head><title>[name]</title></head><body>[dat]</body></html>", "window=filingcabinet;size=350x300")
/obj/structure/filingcabinet/attack_tk(mob/user)
if(anchored)
attack_self_tk(user)
else
..()
/obj/structure/filingcabinet/attack_self_tk(mob/user)
if(contents.len)
if(prob(40 + contents.len * 5))
var/obj/item/I = pick(contents)
I.loc = loc
if(prob(25))
step_rand(I)
to_chat(user, "<span class='notice'>You pull \a [I] out of [src] at random.</span>")
return
to_chat(user, "<span class='notice'>You find nothing in [src].</span>")
/obj/structure/filingcabinet/Topic(href, href_list)
if(href_list["retrieve"])
usr << browse("", "window=filingcabinet") // Close the menu
//var/retrieveindex = text2num(href_list["retrieve"])
var/obj/item/P = locate(href_list["retrieve"])//contents[retrieveindex]
if(istype(P) && P.loc == src && in_range(src, usr))
usr.put_in_hands(P)
updateUsrDialog()
icon_state = "[initial(icon_state)]-open"
sleep(5)
icon_state = initial(icon_state)
/*
* Security Record Cabinets
*/
/obj/structure/filingcabinet/security
var/virgin = 1
/obj/structure/filingcabinet/security/proc/populate()
if(virgin)
for(var/datum/data/record/G in GLOB.data_core.general)
var/datum/data/record/S = find_record("name", G.fields["name"], GLOB.data_core.security)
if(!S)
continue
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src)
P.info = "<CENTER><B>Security Record</B></CENTER><BR>"
P.info += "Name: [G.fields["name"]] ID: [G.fields["id"]]<BR>\nSex: [G.fields["sex"]]<BR>\nAge: [G.fields["age"]]<BR>\nFingerprint: [G.fields["fingerprint"]]<BR>\nPhysical Status: [G.fields["p_stat"]]<BR>\nMental Status: [G.fields["m_stat"]]<BR>"
P.info += "<BR>\n<CENTER><B>Security Data</B></CENTER><BR>\nCriminal Status: [S.fields["criminal"]]<BR>\n<BR>\nMinor Crimes: [S.fields["mi_crim"]]<BR>\nDetails: [S.fields["mi_crim_d"]]<BR>\n<BR>\nMajor Crimes: [S.fields["ma_crim"]]<BR>\nDetails: [S.fields["ma_crim_d"]]<BR>\n<BR>\nImportant Notes:<BR>\n\t[S.fields["notes"]]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>"
var/counter = 1
while(S.fields["com_[counter]"])
P.info += "[S.fields["com_[counter]"]]<BR>"
counter++
P.info += "</TT>"
P.name = "paper - '[G.fields["name"]]'"
virgin = 0 //tabbing here is correct- it's possible for people to try and use it
//before the records have been generated, so we do this inside the loop.
/obj/structure/filingcabinet/security/attack_hand()
populate()
..()
/obj/structure/filingcabinet/security/attack_tk()
populate()
..()
/*
* Medical Record Cabinets
*/
/obj/structure/filingcabinet/medical
var/virgin = 1
/obj/structure/filingcabinet/medical/proc/populate()
if(virgin)
for(var/datum/data/record/G in GLOB.data_core.general)
var/datum/data/record/M = find_record("name", G.fields["name"], GLOB.data_core.medical)
if(!M)
continue
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src)
P.info = "<CENTER><B>Medical Record</B></CENTER><BR>"
P.info += "Name: [G.fields["name"]] ID: [G.fields["id"]]<BR>\nSex: [G.fields["sex"]]<BR>\nAge: [G.fields["age"]]<BR>\nFingerprint: [G.fields["fingerprint"]]<BR>\nPhysical Status: [G.fields["p_stat"]]<BR>\nMental Status: [G.fields["m_stat"]]<BR>"
P.info += "<BR>\n<CENTER><B>Medical Data</B></CENTER><BR>\nBlood Type: [M.fields["blood_type"]]<BR>\nDNA: [M.fields["b_dna"]]<BR>\n<BR>\nMinor Disabilities: [M.fields["mi_dis"]]<BR>\nDetails: [M.fields["mi_dis_d"]]<BR>\n<BR>\nMajor Disabilities: [M.fields["ma_dis"]]<BR>\nDetails: [M.fields["ma_dis_d"]]<BR>\n<BR>\nAllergies: [M.fields["alg"]]<BR>\nDetails: [M.fields["alg_d"]]<BR>\n<BR>\nCurrent Diseases: [M.fields["cdi"]] (per disease info placed in log/comment section)<BR>\nDetails: [M.fields["cdi_d"]]<BR>\n<BR>\nImportant Notes:<BR>\n\t[M.fields["notes"]]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>"
var/counter = 1
while(M.fields["com_[counter]"])
P.info += "[M.fields["com_[counter]"]]<BR>"
counter++
P.info += "</TT>"
P.name = "paper - '[G.fields["name"]]'"
virgin = 0 //tabbing here is correct- it's possible for people to try and use it
//before the records have been generated, so we do this inside the loop.
/obj/structure/filingcabinet/medical/attack_hand()
populate()
..()
/obj/structure/filingcabinet/medical/attack_tk()
populate()
..()
/*
* Employment contract Cabinets
*/
GLOBAL_LIST_EMPTY(employmentCabinets)
/obj/structure/filingcabinet/employment
var/cooldown = 0
icon_state = "employmentcabinet"
var/virgin = 1
/obj/structure/filingcabinet/employment/New()
GLOB.employmentCabinets += src
return ..()
/obj/structure/filingcabinet/employment/Destroy()
GLOB.employmentCabinets -= src
return ..()
/obj/structure/filingcabinet/employment/proc/fillCurrent()
//This proc fills the cabinet with the current crew.
for(var/record in GLOB.data_core.locked)
var/datum/data/record/G = record
if(!G)
continue
if(G.fields["reference"])
addFile(G.fields["reference"])
/obj/structure/filingcabinet/employment/proc/addFile(mob/living/carbon/human/employee)
new /obj/item/weapon/paper/contract/employment(src, employee)
/obj/structure/filingcabinet/employment/attack_hand(mob/user)
if(!cooldown)
if(virgin)
fillCurrent()
virgin = 0
cooldown = 1
..()
sleep(100) // prevents the devil from just instantly emptying the cabinet, ensuring an easy win.
cooldown = 0
else
to_chat(user, "<span class='warning'>The [src] is jammed, give it a few seconds.</span>")
if(mapload)
for(var/obj/item/I in loc)
if(istype(I, /obj/item/weapon/paper) || istype(I, /obj/item/weapon/folder) || istype(I, /obj/item/weapon/photo))
I.loc = src
/obj/structure/filingcabinet/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
new /obj/item/stack/sheet/metal(loc, 2)
for(var/obj/item/I in src)
I.forceMove(loc)
qdel(src)
/obj/structure/filingcabinet/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/folder) || istype(P, /obj/item/weapon/photo) || istype(P, /obj/item/documents))
if(!user.drop_item())
return
to_chat(user, "<span class='notice'>You put [P] in [src].</span>")
P.loc = src
icon_state = "[initial(icon_state)]-open"
sleep(5)
icon_state = initial(icon_state)
updateUsrDialog()
else if(istype(P, /obj/item/weapon/wrench))
to_chat(user, "<span class='notice'>You begin to [anchored ? "unwrench" : "wrench"] [src].</span>")
playsound(loc, P.usesound, 50, 1)
if(do_after(user, 20, target = src))
to_chat(user, "<span class='notice'>You successfully [anchored ? "unwrench" : "wrench"] [src].</span>")
anchored = !anchored
else if(user.a_intent != INTENT_HARM)
to_chat(user, "<span class='warning'>You can't put [P] in [src]!</span>")
else
return ..()
/obj/structure/filingcabinet/attack_hand(mob/user)
if(contents.len <= 0)
to_chat(user, "<span class='notice'>[src] is empty.</span>")
return
user.set_machine(src)
var/dat = "<center><table>"
var/i
for(i=contents.len, i>=1, i--)
var/obj/item/P = contents[i]
dat += "<tr><td><a href='?src=\ref[src];retrieve=\ref[P]'>[P.name]</a></td></tr>"
dat += "</table></center>"
user << browse("<html><head><title>[name]</title></head><body>[dat]</body></html>", "window=filingcabinet;size=350x300")
/obj/structure/filingcabinet/attack_tk(mob/user)
if(anchored)
attack_self_tk(user)
else
..()
/obj/structure/filingcabinet/attack_self_tk(mob/user)
if(contents.len)
if(prob(40 + contents.len * 5))
var/obj/item/I = pick(contents)
I.loc = loc
if(prob(25))
step_rand(I)
to_chat(user, "<span class='notice'>You pull \a [I] out of [src] at random.</span>")
return
to_chat(user, "<span class='notice'>You find nothing in [src].</span>")
/obj/structure/filingcabinet/Topic(href, href_list)
if(href_list["retrieve"])
usr << browse("", "window=filingcabinet") // Close the menu
//var/retrieveindex = text2num(href_list["retrieve"])
var/obj/item/P = locate(href_list["retrieve"])//contents[retrieveindex]
if(istype(P) && P.loc == src && in_range(src, usr))
usr.put_in_hands(P)
updateUsrDialog()
icon_state = "[initial(icon_state)]-open"
sleep(5)
icon_state = initial(icon_state)
/*
* Security Record Cabinets
*/
/obj/structure/filingcabinet/security
var/virgin = 1
/obj/structure/filingcabinet/security/proc/populate()
if(virgin)
for(var/datum/data/record/G in GLOB.data_core.general)
var/datum/data/record/S = find_record("name", G.fields["name"], GLOB.data_core.security)
if(!S)
continue
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src)
P.info = "<CENTER><B>Security Record</B></CENTER><BR>"
P.info += "Name: [G.fields["name"]] ID: [G.fields["id"]]<BR>\nSex: [G.fields["sex"]]<BR>\nAge: [G.fields["age"]]<BR>\nFingerprint: [G.fields["fingerprint"]]<BR>\nPhysical Status: [G.fields["p_stat"]]<BR>\nMental Status: [G.fields["m_stat"]]<BR>"
P.info += "<BR>\n<CENTER><B>Security Data</B></CENTER><BR>\nCriminal Status: [S.fields["criminal"]]<BR>\n<BR>\nMinor Crimes: [S.fields["mi_crim"]]<BR>\nDetails: [S.fields["mi_crim_d"]]<BR>\n<BR>\nMajor Crimes: [S.fields["ma_crim"]]<BR>\nDetails: [S.fields["ma_crim_d"]]<BR>\n<BR>\nImportant Notes:<BR>\n\t[S.fields["notes"]]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>"
var/counter = 1
while(S.fields["com_[counter]"])
P.info += "[S.fields["com_[counter]"]]<BR>"
counter++
P.info += "</TT>"
P.name = "paper - '[G.fields["name"]]'"
virgin = 0 //tabbing here is correct- it's possible for people to try and use it
//before the records have been generated, so we do this inside the loop.
/obj/structure/filingcabinet/security/attack_hand()
populate()
..()
/obj/structure/filingcabinet/security/attack_tk()
populate()
..()
/*
* Medical Record Cabinets
*/
/obj/structure/filingcabinet/medical
var/virgin = 1
/obj/structure/filingcabinet/medical/proc/populate()
if(virgin)
for(var/datum/data/record/G in GLOB.data_core.general)
var/datum/data/record/M = find_record("name", G.fields["name"], GLOB.data_core.medical)
if(!M)
continue
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src)
P.info = "<CENTER><B>Medical Record</B></CENTER><BR>"
P.info += "Name: [G.fields["name"]] ID: [G.fields["id"]]<BR>\nSex: [G.fields["sex"]]<BR>\nAge: [G.fields["age"]]<BR>\nFingerprint: [G.fields["fingerprint"]]<BR>\nPhysical Status: [G.fields["p_stat"]]<BR>\nMental Status: [G.fields["m_stat"]]<BR>"
P.info += "<BR>\n<CENTER><B>Medical Data</B></CENTER><BR>\nBlood Type: [M.fields["blood_type"]]<BR>\nDNA: [M.fields["b_dna"]]<BR>\n<BR>\nMinor Disabilities: [M.fields["mi_dis"]]<BR>\nDetails: [M.fields["mi_dis_d"]]<BR>\n<BR>\nMajor Disabilities: [M.fields["ma_dis"]]<BR>\nDetails: [M.fields["ma_dis_d"]]<BR>\n<BR>\nAllergies: [M.fields["alg"]]<BR>\nDetails: [M.fields["alg_d"]]<BR>\n<BR>\nCurrent Diseases: [M.fields["cdi"]] (per disease info placed in log/comment section)<BR>\nDetails: [M.fields["cdi_d"]]<BR>\n<BR>\nImportant Notes:<BR>\n\t[M.fields["notes"]]<BR>\n<BR>\n<CENTER><B>Comments/Log</B></CENTER><BR>"
var/counter = 1
while(M.fields["com_[counter]"])
P.info += "[M.fields["com_[counter]"]]<BR>"
counter++
P.info += "</TT>"
P.name = "paper - '[G.fields["name"]]'"
virgin = 0 //tabbing here is correct- it's possible for people to try and use it
//before the records have been generated, so we do this inside the loop.
/obj/structure/filingcabinet/medical/attack_hand()
populate()
..()
/obj/structure/filingcabinet/medical/attack_tk()
populate()
..()
/*
* Employment contract Cabinets
*/
GLOBAL_LIST_EMPTY(employmentCabinets)
/obj/structure/filingcabinet/employment
var/cooldown = 0
icon_state = "employmentcabinet"
var/virgin = 1
/obj/structure/filingcabinet/employment/New()
GLOB.employmentCabinets += src
return ..()
/obj/structure/filingcabinet/employment/Destroy()
GLOB.employmentCabinets -= src
return ..()
/obj/structure/filingcabinet/employment/proc/fillCurrent()
//This proc fills the cabinet with the current crew.
for(var/record in GLOB.data_core.locked)
var/datum/data/record/G = record
if(!G)
continue
if(G.fields["reference"])
addFile(G.fields["reference"])
/obj/structure/filingcabinet/employment/proc/addFile(mob/living/carbon/human/employee)
new /obj/item/weapon/paper/contract/employment(src, employee)
/obj/structure/filingcabinet/employment/attack_hand(mob/user)
if(!cooldown)
if(virgin)
fillCurrent()
virgin = 0
cooldown = 1
..()
sleep(100) // prevents the devil from just instantly emptying the cabinet, ensuring an easy win.
cooldown = 0
else
to_chat(user, "<span class='warning'>The [src] is jammed, give it a few seconds.</span>")
+101 -101
View File
@@ -1,110 +1,110 @@
/obj/item/weapon/folder
name = "folder"
desc = "A folder."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "folder"
w_class = WEIGHT_CLASS_SMALL
pressure_resistance = 2
resistance_flags = FLAMMABLE
/obj/item/weapon/folder/blue
desc = "A blue folder."
icon_state = "folder_blue"
/obj/item/weapon/folder/red
desc = "A red folder."
icon_state = "folder_red"
/obj/item/weapon/folder/yellow
desc = "A yellow folder."
icon_state = "folder_yellow"
/obj/item/weapon/folder/white
desc = "A white folder."
icon_state = "folder_white"
/obj/item/weapon/folder/update_icon()
cut_overlays()
if(contents.len)
add_overlay("folder_paper")
/obj/item/weapon/folder/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/paper) || istype(W, /obj/item/weapon/photo) || istype(W, /obj/item/documents))
if(!user.transferItemToLoc(W, src))
return
to_chat(user, "<span class='notice'>You put [W] into [src].</span>")
update_icon()
else if(istype(W, /obj/item/weapon/pen))
var/n_name = copytext(sanitize(input(user, "What would you like to label the folder?", "Folder Labelling", null) as text), 1, MAX_NAME_LEN)
if((in_range(src,user) && user.stat == CONSCIOUS))
name = "folder[(n_name ? " - '[n_name]'" : null)]"
/obj/item/weapon/folder/attack_self(mob/user)
var/dat = "<title>[name]</title>"
for(var/obj/item/I in src)
dat += "<A href='?src=\ref[src];remove=\ref[I]'>Remove</A> - <A href='?src=\ref[src];read=\ref[I]'>[I.name]</A><BR>"
user << browse(dat, "window=folder")
onclose(user, "folder")
add_fingerprint(usr)
/obj/item/weapon/folder/Topic(href, href_list)
..()
if(usr.stat || usr.restrained())
return
if(usr.contents.Find(src))
if(href_list["remove"])
var/obj/item/I = locate(href_list["remove"])
if(istype(I) && I.loc == src)
I.loc = usr.loc
usr.put_in_hands(I)
if(href_list["read"])
var/obj/item/I = locate(href_list["read"])
if(istype(I) && I.loc == src)
usr.examinate(I)
//Update everything
attack_self(usr)
update_icon()
/obj/item/weapon/folder/documents
name = "folder- 'TOP SECRET'"
desc = "A folder stamped \"Top Secret - Property of Nanotrasen Corporation. Unauthorized distribution is punishable by death.\""
/obj/item/weapon/folder
name = "folder"
desc = "A folder."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "folder"
w_class = WEIGHT_CLASS_SMALL
pressure_resistance = 2
resistance_flags = FLAMMABLE
/obj/item/weapon/folder/blue
desc = "A blue folder."
icon_state = "folder_blue"
/obj/item/weapon/folder/red
desc = "A red folder."
icon_state = "folder_red"
/obj/item/weapon/folder/yellow
desc = "A yellow folder."
icon_state = "folder_yellow"
/obj/item/weapon/folder/white
desc = "A white folder."
icon_state = "folder_white"
/obj/item/weapon/folder/update_icon()
cut_overlays()
if(contents.len)
add_overlay("folder_paper")
/obj/item/weapon/folder/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/paper) || istype(W, /obj/item/weapon/photo) || istype(W, /obj/item/documents))
if(!user.transferItemToLoc(W, src))
return
to_chat(user, "<span class='notice'>You put [W] into [src].</span>")
update_icon()
else if(istype(W, /obj/item/weapon/pen))
var/n_name = copytext(sanitize(input(user, "What would you like to label the folder?", "Folder Labelling", null) as text), 1, MAX_NAME_LEN)
if((in_range(src,user) && user.stat == CONSCIOUS))
name = "folder[(n_name ? " - '[n_name]'" : null)]"
/obj/item/weapon/folder/attack_self(mob/user)
var/dat = "<title>[name]</title>"
for(var/obj/item/I in src)
dat += "<A href='?src=\ref[src];remove=\ref[I]'>Remove</A> - <A href='?src=\ref[src];read=\ref[I]'>[I.name]</A><BR>"
user << browse(dat, "window=folder")
onclose(user, "folder")
add_fingerprint(usr)
/obj/item/weapon/folder/Topic(href, href_list)
..()
if(usr.stat || usr.restrained())
return
if(usr.contents.Find(src))
if(href_list["remove"])
var/obj/item/I = locate(href_list["remove"])
if(istype(I) && I.loc == src)
I.loc = usr.loc
usr.put_in_hands(I)
if(href_list["read"])
var/obj/item/I = locate(href_list["read"])
if(istype(I) && I.loc == src)
usr.examinate(I)
//Update everything
attack_self(usr)
update_icon()
/obj/item/weapon/folder/documents
name = "folder- 'TOP SECRET'"
desc = "A folder stamped \"Top Secret - Property of Nanotrasen Corporation. Unauthorized distribution is punishable by death.\""
/obj/item/weapon/folder/documents/Initialize()
. = ..()
new /obj/item/documents/nanotrasen(src)
update_icon()
/obj/item/weapon/folder/syndicate
icon_state = "folder_syndie"
name = "folder- 'TOP SECRET'"
desc = "A folder stamped \"Top Secret - Property of The Syndicate.\""
/obj/item/weapon/folder/syndicate/red
icon_state = "folder_sred"
new /obj/item/documents/nanotrasen(src)
update_icon()
/obj/item/weapon/folder/syndicate
icon_state = "folder_syndie"
name = "folder- 'TOP SECRET'"
desc = "A folder stamped \"Top Secret - Property of The Syndicate.\""
/obj/item/weapon/folder/syndicate/red
icon_state = "folder_sred"
/obj/item/weapon/folder/syndicate/red/Initialize()
. = ..()
new /obj/item/documents/syndicate/red(src)
update_icon()
/obj/item/weapon/folder/syndicate/blue
icon_state = "folder_sblue"
new /obj/item/documents/syndicate/red(src)
update_icon()
/obj/item/weapon/folder/syndicate/blue
icon_state = "folder_sblue"
/obj/item/weapon/folder/syndicate/blue/Initialize()
. = ..()
new /obj/item/documents/syndicate/blue(src)
update_icon()
new /obj/item/documents/syndicate/blue(src)
update_icon()
/obj/item/weapon/folder/syndicate/mining/Initialize()
. = ..()
new /obj/item/documents/syndicate/mining(src)
new /obj/item/documents/syndicate/mining(src)
update_icon()
+10 -1
View File
@@ -383,6 +383,15 @@
. = ..()
color = pick("FF0000", "#33cc33", "#ffb366", "#551A8B", "#ff80d5", "#4d94ff")
/*
* Natural paper
*/
/obj/item/weapon/paper/natural/Initialize()
. = ..()
color = "#FFF5ED"
/*
* Premade paper
*/
@@ -393,7 +402,7 @@
/obj/item/weapon/paper/Toxin
name = "paper- 'Chemical Information'"
info = "Known Onboard Toxins:<BR>\n\tGrade A Semi-Liquid Plasma:<BR>\n\t\tHighly poisonous. You cannot sustain concentrations above 15 units.<BR>\n\t\tA gas mask fails to filter plasma after 50 units.<BR>\n\t\tWill attempt to diffuse like a gas.<BR>\n\t\tFiltered by scrubbers.<BR>\n\t\tThere is a bottled version which is very different<BR>\n\t\t\tfrom the version found in canisters!<BR>\n<BR>\n\t\tWARNING: Highly Flammable. Keep away from heat sources<BR>\n\t\texcept in a enclosed fire area!<BR>\n\t\tWARNING: It is a crime to use this without authorization.<BR>\nKnown Onboard Anti-Toxin:<BR>\n\tAnti-Toxin Type 01P: Works against Grade A Plasma.<BR>\n\t\tBest if injected directly into bloodstream.<BR>\n\t\tA full injection is in every regular Med-Kit.<BR>\n\t\tSpecial toxin Kits hold around 7.<BR>\n<BR>\nKnown Onboard Chemicals (other):<BR>\n\tRejuvenation T#001:<BR>\n\t\tEven 1 unit injected directly into the bloodstream<BR>\n\t\t\twill cure paralysis and sleep toxins.<BR>\n\t\tIf administered to a dying patient it will prevent<BR>\n\t\t\tfurther damage for about units*3 seconds.<BR>\n\t\t\tit will not cure them or allow them to be cured.<BR>\n\t\tIt can be administeredd to a non-dying patient<BR>\n\t\t\tbut the chemicals disappear just as fast.<BR>\n\tMorphine T#054:<BR>\n\t\t5 units wilkl induce precisely 1 minute of sleep.<BR>\n\t\t\tThe effect are cumulative.<BR>\n\t\tWARNING: It is a crime to use this without authorization"
info = "Known Onboard Toxins:<BR>\n\tGrade A Semi-Liquid Plasma:<BR>\n\t\tHighly poisonous. You cannot sustain concentrations above 15 units.<BR>\n\t\tA gas mask fails to filter plasma after 50 units.<BR>\n\t\tWill attempt to diffuse like a gas.<BR>\n\t\tFiltered by scrubbers.<BR>\n\t\tThere is a bottled version which is very different<BR>\n\t\t\tfrom the version found in canisters!<BR>\n<BR>\n\t\tWARNING: Highly Flammable. Keep away from heat sources<BR>\n\t\texcept in a enclosed fire area!<BR>\n\t\tWARNING: It is a crime to use this without authorization.<BR>\nKnown Onboard Anti-Toxin:<BR>\n\tAnti-Toxin Type 01P: Works against Grade A Plasma.<BR>\n\t\tBest if injected directly into bloodstream.<BR>\n\t\tA full injection is in every regular Med-Kit.<BR>\n\t\tSpecial toxin Kits hold around 7.<BR>\n<BR>\nKnown Onboard Chemicals (other):<BR>\n\tRejuvenation T#001:<BR>\n\t\tEven 1 unit injected directly into the bloodstream<BR>\n\t\t\twill cure unconscious and sleep toxins.<BR>\n\t\tIf administered to a dying patient it will prevent<BR>\n\t\t\tfurther damage for about units*3 seconds.<BR>\n\t\t\tit will not cure them or allow them to be cured.<BR>\n\t\tIt can be administeredd to a non-dying patient<BR>\n\t\t\tbut the chemicals disappear just as fast.<BR>\n\tMorphine T#054:<BR>\n\t\t5 units wilkl induce precisely 1 minute of sleep.<BR>\n\t\t\tThe effect are cumulative.<BR>\n\t\tWARNING: It is a crime to use this without authorization"
/obj/item/weapon/paper/courtroom
name = "paper- 'A Crash Course in Legal SOP on SS13'"
+170 -140
View File
@@ -1,144 +1,174 @@
/obj/item/weapon/paper_bin
name = "paper bin"
desc = "Contains all the paper you'll never need."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "paper_bin1"
item_state = "sheet-metal"
throwforce = 0
w_class = WEIGHT_CLASS_NORMAL
throw_speed = 3
throw_range = 7
pressure_resistance = 8
var/papertype = /obj/item/weapon/paper
var/total_paper = 30
var/list/papers = list()
var/obj/item/weapon/pen/bin_pen
/obj/item/weapon/paper_bin/Initialize(mapload)
/obj/item/weapon/paper_bin
name = "paper bin"
desc = "Contains all the paper you'll never need."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "paper_bin1"
item_state = "sheet-metal"
throwforce = 0
w_class = WEIGHT_CLASS_NORMAL
throw_speed = 3
throw_range = 7
pressure_resistance = 8
var/papertype = /obj/item/weapon/paper
var/total_paper = 30
var/list/papers = list()
var/obj/item/weapon/pen/bin_pen
/obj/item/weapon/paper_bin/Initialize(mapload)
. = ..()
if(!mapload)
return
var/obj/item/weapon/pen/P = locate(/obj/item/weapon/pen) in src.loc
if(P && !bin_pen)
P.loc = src
bin_pen = P
update_icon()
var/static/warned = FALSE
if(P.type == /obj/item/weapon/pen && !warned)
warning("one or more paperbins ate a pen duing initialize()")
warned = TRUE
/obj/item/weapon/paper_bin/fire_act(exposed_temperature, exposed_volume)
if(!total_paper)
return
..()
/obj/item/weapon/paper_bin/Destroy()
if(papers)
for(var/i in papers)
qdel(i)
papers = null
. = ..()
/obj/item/weapon/paper_bin/fire_act(exposed_temperature, exposed_volume)
if(total_paper)
total_paper = 0
update_icon()
..()
/obj/item/weapon/paper_bin/MouseDrop(atom/over_object)
var/mob/living/M = usr
if(!istype(M) || M.incapacitated() || !Adjacent(M))
return
if(over_object == M)
M.put_in_hands(src)
else if(istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
add_fingerprint(M)
/obj/item/weapon/paper_bin/attack_paw(mob/user)
return attack_hand(user)
/obj/item/weapon/paper_bin/attack_hand(mob/user)
if(user.lying)
return
user.changeNext_move(CLICK_CD_MELEE)
if(bin_pen)
var/obj/item/weapon/pen/P = bin_pen
P.loc = user.loc
user.put_in_hands(P)
to_chat(user, "<span class='notice'>You take [P] out of \the [src].</span>")
bin_pen = null
update_icon()
else if(total_paper >= 1)
total_paper--
update_icon()
// If there's any custom paper on the stack, use that instead of creating a new paper.
var/obj/item/weapon/paper/P
if(papers.len > 0)
P = papers[papers.len]
papers.Remove(P)
else
P = new papertype(src)
if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS])
if(prob(30))
P.info = "<font face=\"[CRAYON_FONT]\" color=\"red\"><b>HONK HONK HONK HONK HONK HONK HONK<br>HOOOOOOOOOOOOOOOOOOOOOONK<br>APRIL FOOLS</b></font>"
P.rigged = 1
P.updateinfolinks()
P.loc = user.loc
user.put_in_hands(P)
to_chat(user, "<span class='notice'>You take [P] out of \the [src].</span>")
else
to_chat(user, "<span class='warning'>[src] is empty!</span>")
add_fingerprint(user)
/obj/item/weapon/paper_bin/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/paper))
var/obj/item/weapon/paper/P = I
if(!user.transferItemToLoc(P, src))
return
to_chat(user, "<span class='notice'>You put [P] in [src].</span>")
papers.Add(P)
total_paper++
update_icon()
if(!mapload)
return
var/obj/item/weapon/pen/P = locate(/obj/item/weapon/pen) in src.loc
if(P && !bin_pen)
P.loc = src
bin_pen = P
update_icon()
var/static/warned = FALSE
if(P.type == /obj/item/weapon/pen && !warned)
warning("one or more paperbins ate a pen duing initialize()")
warned = TRUE
/obj/item/weapon/paper_bin/fire_act(exposed_temperature, exposed_volume)
if(!total_paper)
return
..()
/obj/item/weapon/paper_bin/Destroy()
if(papers)
for(var/i in papers)
qdel(i)
papers = null
. = ..()
/obj/item/weapon/paper_bin/fire_act(exposed_temperature, exposed_volume)
if(total_paper)
total_paper = 0
update_icon()
..()
/obj/item/weapon/paper_bin/MouseDrop(atom/over_object)
var/mob/living/M = usr
if(!istype(M) || M.incapacitated() || !Adjacent(M))
return
if(over_object == M)
M.put_in_hands(src)
else if(istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
add_fingerprint(M)
/obj/item/weapon/paper_bin/attack_paw(mob/user)
return attack_hand(user)
/obj/item/weapon/paper_bin/attack_hand(mob/user)
if(user.lying)
return
user.changeNext_move(CLICK_CD_MELEE)
if(bin_pen)
var/obj/item/weapon/pen/P = bin_pen
P.loc = user.loc
user.put_in_hands(P)
to_chat(user, "<span class='notice'>You take [P] out of \the [src].</span>")
bin_pen = null
update_icon()
else if(total_paper >= 1)
total_paper--
update_icon()
// If there's any custom paper on the stack, use that instead of creating a new paper.
var/obj/item/weapon/paper/P
if(papers.len > 0)
P = papers[papers.len]
papers.Remove(P)
else
P = new papertype(src)
if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS])
if(prob(30))
P.info = "<font face=\"[CRAYON_FONT]\" color=\"red\"><b>HONK HONK HONK HONK HONK HONK HONK<br>HOOOOOOOOOOOOOOOOOOOOOONK<br>APRIL FOOLS</b></font>"
P.rigged = 1
P.updateinfolinks()
P.loc = user.loc
user.put_in_hands(P)
to_chat(user, "<span class='notice'>You take [P] out of \the [src].</span>")
else
to_chat(user, "<span class='warning'>[src] is empty!</span>")
add_fingerprint(user)
/obj/item/weapon/paper_bin/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/paper))
var/obj/item/weapon/paper/P = I
if(!user.transferItemToLoc(P, src))
return
to_chat(user, "<span class='notice'>You put [P] in [src].</span>")
papers.Add(P)
total_paper++
update_icon()
else if(istype(I, /obj/item/weapon/pen) && !bin_pen)
var/obj/item/weapon/pen/P = I
if(!user.transferItemToLoc(P, src))
return
to_chat(user, "<span class='notice'>You put [P] in [src].</span>")
bin_pen = P
update_icon()
else
return ..()
/obj/item/weapon/paper_bin/examine(mob/user)
..()
if(total_paper)
to_chat(user, "It contains " + (total_paper > 1 ? "[total_paper] papers" : " one paper")+".")
else
to_chat(user, "It doesn't contain anything.")
/obj/item/weapon/paper_bin/update_icon()
if(total_paper < 1)
var/obj/item/weapon/pen/P = I
if(!user.transferItemToLoc(P, src))
return
to_chat(user, "<span class='notice'>You put [P] in [src].</span>")
bin_pen = P
update_icon()
else
return ..()
/obj/item/weapon/paper_bin/examine(mob/user)
..()
if(total_paper)
to_chat(user, "It contains " + (total_paper > 1 ? "[total_paper] papers" : " one paper")+".")
else
to_chat(user, "It doesn't contain anything.")
/obj/item/weapon/paper_bin/update_icon()
if(total_paper < 1)
icon_state = "paper_bin0"
else
icon_state = "[initial(icon_state)]"
cut_overlays()
if(bin_pen)
else
icon_state = "[initial(icon_state)]"
cut_overlays()
if(bin_pen)
add_overlay(mutable_appearance(bin_pen.icon, bin_pen.icon_state))
/obj/item/weapon/paper_bin/construction
name = "construction paper bin"
desc = "Contains all the paper you'll never need, IN COLOR!"
icon_state = "paper_binc"
papertype = /obj/item/weapon/paper/construction
/obj/item/weapon/paper_bin/construction
name = "construction paper bin"
desc = "Contains all the paper you'll never need, IN COLOR!"
icon_state = "paper_binc"
papertype = /obj/item/weapon/paper/construction
/obj/item/weapon/paper_bin/bundlenatural
name = "natural paper bundle"
desc = "A bundle of paper created using traditional methods."
icon_state = "paper_bundle"
papertype = /obj/item/weapon/paper/natural
resistance_flags = FLAMMABLE
/obj/item/weapon/paper_bin/bundlenatural/attack_hand(mob/user)
..()
if(total_paper < 1)
qdel(src)
/obj/item/weapon/paper_bin/bundlenatural/fire_act(exposed_temperature, exposed_volume)
qdel(src)
/obj/item/weapon/paper_bin/bundlenatural/attackby(obj/item/weapon/W, mob/user)
if(W.is_sharp())
to_chat(user, "<span class='notice'>You snip \the [src], spilling paper everywhere.</span>")
var/turf/T = get_turf(src.loc)
while(total_paper > 0)
total_paper--
var/obj/item/weapon/paper/P
if(papers.len > 0)
P = papers[papers.len]
papers -= P
else
P = new papertype()
P.forceMove(T)
CHECK_TICK
qdel(src)
else
..()
+3 -3
View File
@@ -32,8 +32,8 @@
internalPaper = null
return ..()
/obj/item/weapon/paperplane/suicide_act(mob/user)
user.Stun(10)
/obj/item/weapon/paperplane/suicide_act(mob/living/user)
user.Stun(200)
user.visible_message("<span class='suicide'>[user] jams the [src] in [user.p_their()] nose. It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.adjust_blurriness(6)
user.adjust_eye_damage(rand(6,8))
@@ -96,7 +96,7 @@
visible_message("<span class='danger'>\The [src] hits [H] in the eye!</span>")
H.adjust_blurriness(6)
H.adjust_eye_damage(rand(6,8))
H.Weaken(2)
H.Knockdown(40)
H.emote("scream")
/obj/item/weapon/paper/AltClick(mob/living/carbon/user, obj/item/I)
+207 -215
View File
@@ -1,70 +1,70 @@
/* Pens!
* Contains:
* Pens
* Sleepy Pens
* Parapens
* Edaggers
*/
/*
* Pens
*/
/obj/item/weapon/pen
desc = "It's a normal black ink pen."
name = "pen"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "pen"
item_state = "pen"
slot_flags = SLOT_BELT | SLOT_EARS
throwforce = 0
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
throw_range = 7
materials = list(MAT_METAL=10)
pressure_resistance = 2
var/colour = "black" //what colour the ink is!
var/traitor_unlock_degrees = 0
var/degrees = 0
/* Pens!
* Contains:
* Pens
* Sleepy Pens
* Parapens
* Edaggers
*/
/*
* Pens
*/
/obj/item/weapon/pen
desc = "It's a normal black ink pen."
name = "pen"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "pen"
item_state = "pen"
slot_flags = SLOT_BELT | SLOT_EARS
throwforce = 0
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
throw_range = 7
materials = list(MAT_METAL=10)
pressure_resistance = 2
var/colour = "black" //what colour the ink is!
var/traitor_unlock_degrees = 0
var/degrees = 0
var/font = PEN_FONT
/obj/item/weapon/pen/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is scribbling numbers all over [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit sudoku...</span>")
return(BRUTELOSS)
/obj/item/weapon/pen/blue
desc = "It's a normal blue ink pen."
icon_state = "pen_blue"
colour = "blue"
/obj/item/weapon/pen/red
desc = "It's a normal red ink pen."
icon_state = "pen_red"
colour = "red"
/obj/item/weapon/pen/invisible
desc = "It's an invisble pen marker."
icon_state = "pen"
colour = "white"
/obj/item/weapon/pen/fourcolor
desc = "It's a fancy four-color ink pen, set to black."
name = "four-color pen"
colour = "black"
/obj/item/weapon/pen/fourcolor/attack_self(mob/living/carbon/user)
switch(colour)
if("black")
colour = "red"
if("red")
colour = "green"
if("green")
colour = "blue"
else
colour = "black"
to_chat(user, "<span class='notice'>\The [src] will now write in [colour].</span>")
desc = "It's a fancy four-color ink pen, set to [colour]."
/obj/item/weapon/pen/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is scribbling numbers all over [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit sudoku...</span>")
return(BRUTELOSS)
/obj/item/weapon/pen/blue
desc = "It's a normal blue ink pen."
icon_state = "pen_blue"
colour = "blue"
/obj/item/weapon/pen/red
desc = "It's a normal red ink pen."
icon_state = "pen_red"
colour = "red"
/obj/item/weapon/pen/invisible
desc = "It's an invisble pen marker."
icon_state = "pen"
colour = "white"
/obj/item/weapon/pen/fourcolor
desc = "It's a fancy four-color ink pen, set to black."
name = "four-color pen"
colour = "black"
/obj/item/weapon/pen/fourcolor/attack_self(mob/living/carbon/user)
switch(colour)
if("black")
colour = "red"
if("red")
colour = "green"
if("green")
colour = "blue"
else
colour = "black"
to_chat(user, "<span class='notice'>\The [src] will now write in [colour].</span>")
desc = "It's a fancy four-color ink pen, set to [colour]."
/obj/item/weapon/pen/fountain
name = "fountain pen"
desc = "It's a common fountain pen, with a faux wood body."
@@ -82,155 +82,147 @@
materials = list(MAT_GOLD = 750)
sharpness = IS_SHARP
resistance_flags = FIRE_PROOF
var/unique_reskin = TRUE
var/list/skins = list("Oak" = "pen-fountain-o", "Gold" = "pen-fountain-g", "Rosewood" = "pen-fountain-r", "Black and Silver" = "pen-fountain-b","Command Blue" = "pen-fountain-cb")
unique_reskin = list("Oak" = "pen-fountain-o",
"Gold" = "pen-fountain-g",
"Rosewood" = "pen-fountain-r",
"Black and Silver" = "pen-fountain-b",
"Command Blue" = "pen-fountain-cb"
)
/obj/item/weapon/pen/fountain/captain/AltClick()
var/mob/living/carbon/user = usr
if(!istype(user))
return
if(unique_reskin)
var/choice = input(user,"Choose the finish for your pen.","Reskin Pen") as null|anything in skins
if(!QDELETED(src) && choice && !user.incapacitated() && in_range(user,src))
icon_state = skins[choice]
unique_reskin = FALSE
to_chat(user, "Your pen now has a [choice] finish.")
desc = "It's an expensive [choice] fountain pen. The nib is quite sharp."
/obj/item/weapon/pen/fountain/captain/examine(mob/user)
/obj/item/weapon/pen/fountain/captain/reskin_obj(mob/M)
..()
if(unique_reskin)
to_chat(user, "<span class='notice'>This item can be reskinned. Alt-click to select a skin.</span>")
/obj/item/weapon/pen/attack_self(mob/living/carbon/user)
var/deg = input(user, "What angle would you like to rotate the pen head to? (1-360)", "Rotate Pen Head") as null|num
if(deg && (deg > 0 && deg <= 360))
degrees = deg
to_chat(user, "<span class='notice'>You rotate the top of the pen to [degrees] degrees.</span>")
if(hidden_uplink && degrees == traitor_unlock_degrees)
to_chat(user, "<span class='warning'>Your pen makes a clicking noise, before quickly rotating back to 0 degrees!</span>")
degrees = 0
hidden_uplink.interact(user)
/obj/item/weapon/pen/attackby(obj/item/I, mob/user, params)
if(hidden_uplink)
return hidden_uplink.attackby(I, user, params)
else
return ..()
/obj/item/weapon/pen/attack(mob/living/M, mob/user,stealth)
if(!istype(M))
return
if(!force)
if(M.can_inject(user, 1))
to_chat(user, "<span class='warning'>You stab [M] with the pen.</span>")
if(!stealth)
to_chat(M, "<span class='danger'>You feel a tiny prick!</span>")
. = 1
add_logs(user, M, "stabbed", src)
else
. = ..()
/obj/item/weapon/pen/afterattack(obj/O, mob/living/user, proximity)
//Changing Name/Description of items. Only works if they have the 'unique_rename' var set
if(isobj(O) && proximity)
if(O.unique_rename)
var/penchoice = input(user, "What would you like to edit?", "Rename or change description?") as null|anything in list("Rename","Change description")
if(!QDELETED(O) && user.canUseTopic(O, be_close = TRUE))
if(penchoice == "Rename")
var/input = stripped_input(user,"What do you want to name \the [O.name]?", ,"", MAX_NAME_LEN)
var/oldname = O.name
if(!QDELETED(O) && user.canUseTopic(O, be_close = TRUE))
if(oldname == input)
to_chat(user, "You changed \the [O.name] to... well... \the [O.name].")
return
else
O.name = input
to_chat(user, "\The [oldname] has been successfully been renamed to \the [input].")
return
else
to_chat(user, "You are too far away!")
if(penchoice == "Change description")
var/input = stripped_input(user,"Describe \the [O.name] here", ,"", 100)
if(!QDELETED(O) && user.canUseTopic(O, be_close = TRUE))
O.desc = input
to_chat(user, "You have successfully changed \the [O.name]'s description.")
return
else
to_chat(user, "You are too far away!")
else
to_chat(user, "You are too far away!")
return
else
return
/*
* Sleepypens
*/
/obj/item/weapon/pen/sleepy
origin_tech = "engineering=4;syndicate=2"
container_type = OPENCONTAINER
/obj/item/weapon/pen/sleepy/attack(mob/living/M, mob/user)
if(!istype(M))
return
if(..())
if(reagents.total_volume)
if(M.reagents)
reagents.trans_to(M, reagents.total_volume)
/obj/item/weapon/pen/sleepy/New()
create_reagents(45)
if(current_skin)
desc = "It's an expensive [current_skin] fountain pen. The nib is quite sharp."
/obj/item/weapon/pen/attack_self(mob/living/carbon/user)
var/deg = input(user, "What angle would you like to rotate the pen head to? (1-360)", "Rotate Pen Head") as null|num
if(deg && (deg > 0 && deg <= 360))
degrees = deg
to_chat(user, "<span class='notice'>You rotate the top of the pen to [degrees] degrees.</span>")
if(hidden_uplink && degrees == traitor_unlock_degrees)
to_chat(user, "<span class='warning'>Your pen makes a clicking noise, before quickly rotating back to 0 degrees!</span>")
degrees = 0
hidden_uplink.interact(user)
/obj/item/weapon/pen/attackby(obj/item/I, mob/user, params)
if(hidden_uplink)
return hidden_uplink.attackby(I, user, params)
else
return ..()
/obj/item/weapon/pen/attack(mob/living/M, mob/user,stealth)
if(!istype(M))
return
if(!force)
if(M.can_inject(user, 1))
to_chat(user, "<span class='warning'>You stab [M] with the pen.</span>")
if(!stealth)
to_chat(M, "<span class='danger'>You feel a tiny prick!</span>")
. = 1
add_logs(user, M, "stabbed", src)
else
. = ..()
/obj/item/weapon/pen/afterattack(obj/O, mob/living/user, proximity)
//Changing Name/Description of items. Only works if they have the 'unique_rename' var set
if(isobj(O) && proximity)
if(O.unique_rename)
var/penchoice = input(user, "What would you like to edit?", "Rename or change description?") as null|anything in list("Rename","Change description")
if(!QDELETED(O) && user.canUseTopic(O, be_close = TRUE))
if(penchoice == "Rename")
var/input = stripped_input(user,"What do you want to name \the [O.name]?", ,"", MAX_NAME_LEN)
var/oldname = O.name
if(!QDELETED(O) && user.canUseTopic(O, be_close = TRUE))
if(oldname == input)
to_chat(user, "You changed \the [O.name] to... well... \the [O.name].")
return
else
O.name = input
to_chat(user, "\The [oldname] has been successfully been renamed to \the [input].")
return
else
to_chat(user, "You are too far away!")
if(penchoice == "Change description")
var/input = stripped_input(user,"Describe \the [O.name] here", ,"", 100)
if(!QDELETED(O) && user.canUseTopic(O, be_close = TRUE))
O.desc = input
to_chat(user, "You have successfully changed \the [O.name]'s description.")
return
else
to_chat(user, "You are too far away!")
else
to_chat(user, "You are too far away!")
return
else
return
/*
* Sleepypens
*/
/obj/item/weapon/pen/sleepy
origin_tech = "engineering=4;syndicate=2"
container_type = OPENCONTAINER
/obj/item/weapon/pen/sleepy/attack(mob/living/M, mob/user)
if(!istype(M))
return
if(..())
if(reagents.total_volume)
if(M.reagents)
reagents.trans_to(M, reagents.total_volume)
/obj/item/weapon/pen/sleepy/New()
create_reagents(45)
reagents.add_reagent("chloralhydrate2", 20)
reagents.add_reagent("mutetoxin", 15)
reagents.add_reagent("tirizene", 10)
..()
/*
* (Alan) Edaggers
*/
/obj/item/weapon/pen/edagger
origin_tech = "combat=3;syndicate=1"
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") //these wont show up if the pen is off
var/on = 0
/obj/item/weapon/pen/edagger/attack_self(mob/living/user)
if(on)
on = 0
force = initial(force)
w_class = initial(w_class)
name = initial(name)
hitsound = initial(hitsound)
embed_chance = initial(embed_chance)
throwforce = initial(throwforce)
playsound(user, 'sound/weapons/saberoff.ogg', 5, 1)
to_chat(user, "<span class='warning'>[src] can now be concealed.</span>")
else
on = 1
force = 18
w_class = WEIGHT_CLASS_NORMAL
name = "energy dagger"
hitsound = 'sound/weapons/blade1.ogg'
embed_chance = 100 //rule of cool
throwforce = 35
playsound(user, 'sound/weapons/saberon.ogg', 5, 1)
to_chat(user, "<span class='warning'>[src] is now active.</span>")
update_icon()
/obj/item/weapon/pen/edagger/update_icon()
if(on)
icon_state = "edagger"
item_state = "edagger"
else
icon_state = initial(icon_state) //looks like a normal pen when off.
item_state = initial(item_state)
reagents.add_reagent("mutetoxin", 15)
reagents.add_reagent("tirizene", 10)
..()
/*
* (Alan) Edaggers
*/
/obj/item/weapon/pen/edagger
origin_tech = "combat=3;syndicate=1"
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") //these wont show up if the pen is off
var/on = 0
/obj/item/weapon/pen/edagger/attack_self(mob/living/user)
if(on)
on = 0
force = initial(force)
w_class = initial(w_class)
name = initial(name)
hitsound = initial(hitsound)
embed_chance = initial(embed_chance)
throwforce = initial(throwforce)
playsound(user, 'sound/weapons/saberoff.ogg', 5, 1)
to_chat(user, "<span class='warning'>[src] can now be concealed.</span>")
else
on = 1
force = 18
w_class = WEIGHT_CLASS_NORMAL
name = "energy dagger"
hitsound = 'sound/weapons/blade1.ogg'
embed_chance = 100 //rule of cool
throwforce = 35
playsound(user, 'sound/weapons/saberon.ogg', 5, 1)
to_chat(user, "<span class='warning'>[src] is now active.</span>")
update_icon()
/obj/item/weapon/pen/edagger/update_icon()
if(on)
icon_state = "edagger"
item_state = "edagger"
else
icon_state = initial(icon_state) //looks like a normal pen when off.
item_state = initial(item_state)
+392 -392
View File
@@ -1,396 +1,396 @@
/* Photocopiers!
* Contains:
* Photocopier
* Toner Cartridge
*/
/*
* Photocopier
*/
/obj/machinery/photocopier
name = "photocopier"
desc = "Used to copy important documents and anatomy studies."
icon = 'icons/obj/library.dmi'
icon_state = "photocopier"
anchored = 1
density = 1
/* Photocopiers!
* Contains:
* Photocopier
* Toner Cartridge
*/
/*
* Photocopier
*/
/obj/machinery/photocopier
name = "photocopier"
desc = "Used to copy important documents and anatomy studies."
icon = 'icons/obj/library.dmi'
icon_state = "photocopier"
anchored = 1
density = 1
use_power = IDLE_POWER_USE
idle_power_usage = 30
active_power_usage = 200
power_channel = EQUIP
obj_integrity = 300
max_integrity = 300
integrity_failure = 100
var/obj/item/weapon/paper/copy = null //what's in the copier!
var/obj/item/weapon/photo/photocopy = null
var/obj/item/documents/doccopy = null
var/copies = 1 //how many copies to print!
var/toner = 40 //how much toner is left! woooooo~
var/maxcopies = 10 //how many copies can be copied at once- idea shamelessly stolen from bs12's copier!
var/greytoggle = "Greyscale"
var/mob/living/ass //i can't believe i didn't write a stupid-ass comment about this var when i first coded asscopy.
var/busy = 0
/obj/machinery/photocopier/attack_ai(mob/user)
return attack_hand(user)
/obj/machinery/photocopier/attack_paw(mob/user)
return attack_hand(user)
/obj/machinery/photocopier/attack_hand(mob/user)
user.set_machine(src)
var/dat = "Photocopier<BR><BR>"
if(copy || photocopy || doccopy || (ass && (ass.loc == src.loc)))
dat += "<a href='byond://?src=\ref[src];remove=1'>Remove Paper</a><BR>"
if(toner)
dat += "<a href='byond://?src=\ref[src];copy=1'>Copy</a><BR>"
dat += "Printing: [copies] copies."
dat += "<a href='byond://?src=\ref[src];min=1'>-</a> "
dat += "<a href='byond://?src=\ref[src];add=1'>+</a><BR><BR>"
if(photocopy)
dat += "Printing in <a href='byond://?src=\ref[src];colortoggle=1'>[greytoggle]</a><BR><BR>"
else if(toner)
dat += "Please insert paper to copy.<BR><BR>"
if(isAI(user))
dat += "<a href='byond://?src=\ref[src];aipic=1'>Print photo from database</a><BR><BR>"
dat += "Current toner level: [toner]"
if(!toner)
dat +="<BR>Please insert a new toner cartridge!"
user << browse(dat, "window=copier")
onclose(user, "copier")
/obj/machinery/photocopier/Topic(href, href_list)
if(..())
return
if(href_list["copy"])
if(copy)
for(var/i = 0, i < copies, i++)
if(toner > 0 && !busy && copy)
var/copy_as_paper = 1
if(istype(copy, /obj/item/weapon/paper/contract/employment))
var/obj/item/weapon/paper/contract/employment/E = copy
var/obj/item/weapon/paper/contract/employment/C = new /obj/item/weapon/paper/contract/employment (loc, E.target.current)
if(C)
copy_as_paper = 0
if(copy_as_paper)
var/obj/item/weapon/paper/c = new /obj/item/weapon/paper (loc)
if(length(copy.info) > 0) //Only print and add content if the copied doc has words on it
if(toner > 10) //lots of toner, make it dark
c.info = "<font color = #101010>"
else //no toner? shitty copies for you!
c.info = "<font color = #808080>"
var/copied = copy.info
copied = replacetext(copied, "<font face=\"[PEN_FONT]\" color=", "<font face=\"[PEN_FONT]\" nocolor=") //state of the art techniques in action
copied = replacetext(copied, "<font face=\"[CRAYON_FONT]\" color=", "<font face=\"[CRAYON_FONT]\" nocolor=") //This basically just breaks the existing color tag, which we need to do because the innermost tag takes priority.
c.info += copied
c.info += "</font>"
c.name = copy.name
c.fields = copy.fields
c.update_icon()
c.updateinfolinks()
c.stamps = copy.stamps
if(copy.stamped)
c.stamped = copy.stamped.Copy()
c.copy_overlays(copy, TRUE)
toner--
busy = 1
sleep(15)
busy = 0
else
break
updateUsrDialog()
else if(photocopy)
for(var/i = 0, i < copies, i++)
if(toner >= 5 && !busy && photocopy) //Was set to = 0, but if there was say 3 toner left and this ran, you would get -2 which would be weird for ink
var/obj/item/weapon/photo/p = new /obj/item/weapon/photo (loc)
var/icon/I = icon(photocopy.icon, photocopy.icon_state)
var/icon/img = icon(photocopy.img)
if(greytoggle == "Greyscale")
if(toner > 10) //plenty of toner, go straight greyscale
I.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) //I'm not sure how expensive this is, but given the many limitations of photocopying, it shouldn't be an issue.
img.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
else //not much toner left, lighten the photo
I.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(100,100,100))
img.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(100,100,100))
toner -= 5 //photos use a lot of ink!
else if(greytoggle == "Color")
if(toner >= 10)
toner -= 10 //Color photos use even more ink!
else
continue
p.icon = I
p.img = img
p.name = photocopy.name
p.desc = photocopy.desc
p.scribble = photocopy.scribble
p.pixel_x = rand(-10, 10)
p.pixel_y = rand(-10, 10)
p.blueprints = photocopy.blueprints //a copy of a picture is still good enough for the syndicate
busy = 1
sleep(15)
busy = 0
else
break
else if(doccopy)
for(var/i = 0, i < copies, i++)
if(toner > 5 && !busy && doccopy)
new /obj/item/documents/photocopy(loc, doccopy)
toner-= 6 // the sprite shows 6 papers, yes I checked
busy = 1
sleep(15)
busy = 0
else
break
updateUsrDialog()
else if(ass) //ASS COPY. By Miauw
for(var/i = 0, i < copies, i++)
var/icon/temp_img
if(ishuman(ass) && (ass.get_item_by_slot(slot_w_uniform) || ass.get_item_by_slot(slot_wear_suit)))
to_chat(usr, "<span class='notice'>You feel kind of silly, copying [ass == usr ? "your" : ass][ass == usr ? "" : "\'s"] ass with [ass == usr ? "your" : "their"] clothes on.</span>" )
break
else if(toner >= 5 && !busy && check_ass()) //You have to be sitting on the copier and either be a xeno or a human without clothes on.
if(isalienadult(ass) || istype(ass,/mob/living/simple_animal/hostile/alien)) //Xenos have their own asses, thanks to Pybro.
temp_img = icon('icons/ass/assalien.png')
else if(ishuman(ass)) //Suit checks are in check_ass
if(ass.gender == MALE)
temp_img = icon('icons/ass/assmale.png')
else if(ass.gender == FEMALE)
temp_img = icon('icons/ass/assfemale.png')
else //In case anyone ever makes the generic ass. For now I'll be using male asses.
temp_img = icon('icons/ass/assmale.png')
else if(isdrone(ass)) //Drones are hot
temp_img = icon('icons/ass/assdrone.png')
else
break
var/obj/item/weapon/photo/p = new /obj/item/weapon/photo (loc)
p.desc = "You see [ass]'s ass on the photo."
p.pixel_x = rand(-10, 10)
p.pixel_y = rand(-10, 10)
p.img = temp_img
var/icon/small_img = icon(temp_img) //Icon() is needed or else temp_img will be rescaled too >.>
var/icon/ic = icon('icons/obj/items.dmi',"photo")
small_img.Scale(8, 8)
idle_power_usage = 30
active_power_usage = 200
power_channel = EQUIP
obj_integrity = 300
max_integrity = 300
integrity_failure = 100
var/obj/item/weapon/paper/copy = null //what's in the copier!
var/obj/item/weapon/photo/photocopy = null
var/obj/item/documents/doccopy = null
var/copies = 1 //how many copies to print!
var/toner = 40 //how much toner is left! woooooo~
var/maxcopies = 10 //how many copies can be copied at once- idea shamelessly stolen from bs12's copier!
var/greytoggle = "Greyscale"
var/mob/living/ass //i can't believe i didn't write a stupid-ass comment about this var when i first coded asscopy.
var/busy = 0
/obj/machinery/photocopier/attack_ai(mob/user)
return attack_hand(user)
/obj/machinery/photocopier/attack_paw(mob/user)
return attack_hand(user)
/obj/machinery/photocopier/attack_hand(mob/user)
user.set_machine(src)
var/dat = "Photocopier<BR><BR>"
if(copy || photocopy || doccopy || (ass && (ass.loc == src.loc)))
dat += "<a href='byond://?src=\ref[src];remove=1'>Remove Paper</a><BR>"
if(toner)
dat += "<a href='byond://?src=\ref[src];copy=1'>Copy</a><BR>"
dat += "Printing: [copies] copies."
dat += "<a href='byond://?src=\ref[src];min=1'>-</a> "
dat += "<a href='byond://?src=\ref[src];add=1'>+</a><BR><BR>"
if(photocopy)
dat += "Printing in <a href='byond://?src=\ref[src];colortoggle=1'>[greytoggle]</a><BR><BR>"
else if(toner)
dat += "Please insert paper to copy.<BR><BR>"
if(isAI(user))
dat += "<a href='byond://?src=\ref[src];aipic=1'>Print photo from database</a><BR><BR>"
dat += "Current toner level: [toner]"
if(!toner)
dat +="<BR>Please insert a new toner cartridge!"
user << browse(dat, "window=copier")
onclose(user, "copier")
/obj/machinery/photocopier/Topic(href, href_list)
if(..())
return
if(href_list["copy"])
if(copy)
for(var/i = 0, i < copies, i++)
if(toner > 0 && !busy && copy)
var/copy_as_paper = 1
if(istype(copy, /obj/item/weapon/paper/contract/employment))
var/obj/item/weapon/paper/contract/employment/E = copy
var/obj/item/weapon/paper/contract/employment/C = new /obj/item/weapon/paper/contract/employment (loc, E.target.current)
if(C)
copy_as_paper = 0
if(copy_as_paper)
var/obj/item/weapon/paper/c = new /obj/item/weapon/paper (loc)
if(length(copy.info) > 0) //Only print and add content if the copied doc has words on it
if(toner > 10) //lots of toner, make it dark
c.info = "<font color = #101010>"
else //no toner? shitty copies for you!
c.info = "<font color = #808080>"
var/copied = copy.info
copied = replacetext(copied, "<font face=\"[PEN_FONT]\" color=", "<font face=\"[PEN_FONT]\" nocolor=") //state of the art techniques in action
copied = replacetext(copied, "<font face=\"[CRAYON_FONT]\" color=", "<font face=\"[CRAYON_FONT]\" nocolor=") //This basically just breaks the existing color tag, which we need to do because the innermost tag takes priority.
c.info += copied
c.info += "</font>"
c.name = copy.name
c.fields = copy.fields
c.update_icon()
c.updateinfolinks()
c.stamps = copy.stamps
if(copy.stamped)
c.stamped = copy.stamped.Copy()
c.copy_overlays(copy, TRUE)
toner--
busy = 1
sleep(15)
busy = 0
else
break
updateUsrDialog()
else if(photocopy)
for(var/i = 0, i < copies, i++)
if(toner >= 5 && !busy && photocopy) //Was set to = 0, but if there was say 3 toner left and this ran, you would get -2 which would be weird for ink
var/obj/item/weapon/photo/p = new /obj/item/weapon/photo (loc)
var/icon/I = icon(photocopy.icon, photocopy.icon_state)
var/icon/img = icon(photocopy.img)
if(greytoggle == "Greyscale")
if(toner > 10) //plenty of toner, go straight greyscale
I.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) //I'm not sure how expensive this is, but given the many limitations of photocopying, it shouldn't be an issue.
img.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
else //not much toner left, lighten the photo
I.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(100,100,100))
img.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(100,100,100))
toner -= 5 //photos use a lot of ink!
else if(greytoggle == "Color")
if(toner >= 10)
toner -= 10 //Color photos use even more ink!
else
continue
p.icon = I
p.img = img
p.name = photocopy.name
p.desc = photocopy.desc
p.scribble = photocopy.scribble
p.pixel_x = rand(-10, 10)
p.pixel_y = rand(-10, 10)
p.blueprints = photocopy.blueprints //a copy of a picture is still good enough for the syndicate
busy = 1
sleep(15)
busy = 0
else
break
else if(doccopy)
for(var/i = 0, i < copies, i++)
if(toner > 5 && !busy && doccopy)
new /obj/item/documents/photocopy(loc, doccopy)
toner-= 6 // the sprite shows 6 papers, yes I checked
busy = 1
sleep(15)
busy = 0
else
break
updateUsrDialog()
else if(ass) //ASS COPY. By Miauw
for(var/i = 0, i < copies, i++)
var/icon/temp_img
if(ishuman(ass) && (ass.get_item_by_slot(slot_w_uniform) || ass.get_item_by_slot(slot_wear_suit)))
to_chat(usr, "<span class='notice'>You feel kind of silly, copying [ass == usr ? "your" : ass][ass == usr ? "" : "\'s"] ass with [ass == usr ? "your" : "their"] clothes on.</span>" )
break
else if(toner >= 5 && !busy && check_ass()) //You have to be sitting on the copier and either be a xeno or a human without clothes on.
if(isalienadult(ass) || istype(ass,/mob/living/simple_animal/hostile/alien)) //Xenos have their own asses, thanks to Pybro.
temp_img = icon('icons/ass/assalien.png')
else if(ishuman(ass)) //Suit checks are in check_ass
if(ass.gender == MALE)
temp_img = icon('icons/ass/assmale.png')
else if(ass.gender == FEMALE)
temp_img = icon('icons/ass/assfemale.png')
else //In case anyone ever makes the generic ass. For now I'll be using male asses.
temp_img = icon('icons/ass/assmale.png')
else if(isdrone(ass)) //Drones are hot
temp_img = icon('icons/ass/assdrone.png')
else
break
var/obj/item/weapon/photo/p = new /obj/item/weapon/photo (loc)
p.desc = "You see [ass]'s ass on the photo."
p.pixel_x = rand(-10, 10)
p.pixel_y = rand(-10, 10)
p.img = temp_img
var/icon/small_img = icon(temp_img) //Icon() is needed or else temp_img will be rescaled too >.>
var/icon/ic = icon('icons/obj/items.dmi',"photo")
small_img.Scale(8, 8)
ic.Blend(small_img,ICON_OVERLAY, 13, 13)
p.icon = ic
toner -= 5
busy = 1
sleep(15)
busy = 0
else
break
updateUsrDialog()
else if(href_list["remove"])
if(copy)
remove_photocopy(copy, usr)
copy = null
else if(photocopy)
remove_photocopy(photocopy, usr)
photocopy = null
else if(doccopy)
remove_photocopy(doccopy, usr)
doccopy = null
else if(check_ass())
to_chat(ass, "<span class='notice'>You feel a slight pressure on your ass.</span>")
updateUsrDialog()
else if(href_list["min"])
if(copies > 1)
copies--
updateUsrDialog()
else if(href_list["add"])
if(copies < maxcopies)
copies++
updateUsrDialog()
else if(href_list["aipic"])
if(!isAI(usr))
return
if(toner >= 5 && !busy)
var/list/nametemp = list()
var/find
var/datum/picture/selection
var/mob/living/silicon/ai/tempAI = usr
if(tempAI.aicamera.aipictures.len == 0)
to_chat(usr, "<span class='boldannounce'>No images saved</span>")
return
for(var/datum/picture/t in tempAI.aicamera.aipictures)
nametemp += t.fields["name"]
find = input("Select image (numbered in order taken)") in nametemp
var/obj/item/weapon/photo/p = new /obj/item/weapon/photo (loc)
for(var/datum/picture/q in tempAI.aicamera.aipictures)
if(q.fields["name"] == find)
selection = q
break
var/icon/I = selection.fields["icon"]
var/icon/img = selection.fields["img"]
p.icon = I
p.img = img
p.desc = selection.fields["desc"]
p.blueprints = selection.fields["blueprints"]
p.pixel_x = rand(-10, 10)
p.pixel_y = rand(-10, 10)
toner -= 5 //AI prints color pictures only, thus they can do it more efficiently
busy = 1
sleep(15)
busy = 0
updateUsrDialog()
else if(href_list["colortoggle"])
if(greytoggle == "Greyscale")
greytoggle = "Color"
else
greytoggle = "Greyscale"
updateUsrDialog()
/obj/machinery/photocopier/proc/do_insertion(obj/item/O, mob/user)
O.loc = src
to_chat(user, "<span class ='notice'>You insert [O] into [src].</span>")
flick("photocopier1", src)
updateUsrDialog()
/obj/machinery/photocopier/proc/remove_photocopy(obj/item/O, mob/user)
if(!issilicon(user)) //surprised this check didn't exist before, putting stuff in AI's hand is bad
O.loc = user.loc
user.put_in_hands(O)
else
O.loc = src.loc
to_chat(user, "<span class='notice'>You take [O] out of [src].</span>")
/obj/machinery/photocopier/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/weapon/paper))
if(copier_empty())
if(istype(O,/obj/item/weapon/paper/contract/infernal))
to_chat(user, "<span class='warning'>[src] smokes, smelling of brimstone!</span>")
resistance_flags |= FLAMMABLE
fire_act()
else
if(!user.drop_item())
return
copy = O
do_insertion(O, user)
else
to_chat(user, "<span class='warning'>There is already something in [src]!</span>")
else if(istype(O, /obj/item/weapon/photo))
if(copier_empty())
if(!user.drop_item())
return
photocopy = O
do_insertion(O, user)
else
to_chat(user, "<span class='warning'>There is already something in [src]!</span>")
else if(istype(O, /obj/item/documents))
if(copier_empty())
if(!user.drop_item())
return
doccopy = O
do_insertion(O, user)
else
to_chat(user, "<span class='warning'>There is already something in [src]!</span>")
else if(istype(O, /obj/item/device/toner))
if(toner <= 0)
if(!user.drop_item())
return
qdel(O)
toner = 40
to_chat(user, "<span class='notice'>You insert [O] into [src].</span>")
updateUsrDialog()
else
to_chat(user, "<span class='warning'>This cartridge is not yet ready for replacement! Use up the rest of the toner.</span>")
else if(istype(O, /obj/item/weapon/wrench))
if(isinspace())
to_chat(user, "<span class='warning'>There's nothing to fasten [src] to!</span>")
return
playsound(loc, O.usesound, 50, 1)
to_chat(user, "<span class='warning'>You start [anchored ? "unwrenching" : "wrenching"] [src]...</span>")
if(do_after(user, 20*O.toolspeed, target = src))
if(QDELETED(src))
return
to_chat(user, "<span class='notice'>You [anchored ? "unwrench" : "wrench"] [src].</span>")
anchored = !anchored
p.icon = ic
toner -= 5
busy = 1
sleep(15)
busy = 0
else
break
updateUsrDialog()
else if(href_list["remove"])
if(copy)
remove_photocopy(copy, usr)
copy = null
else if(photocopy)
remove_photocopy(photocopy, usr)
photocopy = null
else if(doccopy)
remove_photocopy(doccopy, usr)
doccopy = null
else if(check_ass())
to_chat(ass, "<span class='notice'>You feel a slight pressure on your ass.</span>")
updateUsrDialog()
else if(href_list["min"])
if(copies > 1)
copies--
updateUsrDialog()
else if(href_list["add"])
if(copies < maxcopies)
copies++
updateUsrDialog()
else if(href_list["aipic"])
if(!isAI(usr))
return
if(toner >= 5 && !busy)
var/list/nametemp = list()
var/find
var/datum/picture/selection
var/mob/living/silicon/ai/tempAI = usr
if(tempAI.aicamera.aipictures.len == 0)
to_chat(usr, "<span class='boldannounce'>No images saved</span>")
return
for(var/datum/picture/t in tempAI.aicamera.aipictures)
nametemp += t.fields["name"]
find = input("Select image (numbered in order taken)") in nametemp
var/obj/item/weapon/photo/p = new /obj/item/weapon/photo (loc)
for(var/datum/picture/q in tempAI.aicamera.aipictures)
if(q.fields["name"] == find)
selection = q
break
var/icon/I = selection.fields["icon"]
var/icon/img = selection.fields["img"]
p.icon = I
p.img = img
p.desc = selection.fields["desc"]
p.blueprints = selection.fields["blueprints"]
p.pixel_x = rand(-10, 10)
p.pixel_y = rand(-10, 10)
toner -= 5 //AI prints color pictures only, thus they can do it more efficiently
busy = 1
sleep(15)
busy = 0
updateUsrDialog()
else if(href_list["colortoggle"])
if(greytoggle == "Greyscale")
greytoggle = "Color"
else
greytoggle = "Greyscale"
updateUsrDialog()
/obj/machinery/photocopier/proc/do_insertion(obj/item/O, mob/user)
O.loc = src
to_chat(user, "<span class ='notice'>You insert [O] into [src].</span>")
flick("photocopier1", src)
updateUsrDialog()
/obj/machinery/photocopier/proc/remove_photocopy(obj/item/O, mob/user)
if(!issilicon(user)) //surprised this check didn't exist before, putting stuff in AI's hand is bad
O.loc = user.loc
user.put_in_hands(O)
else
O.loc = src.loc
to_chat(user, "<span class='notice'>You take [O] out of [src].</span>")
/obj/machinery/photocopier/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/weapon/paper))
if(copier_empty())
if(istype(O,/obj/item/weapon/paper/contract/infernal))
to_chat(user, "<span class='warning'>[src] smokes, smelling of brimstone!</span>")
resistance_flags |= FLAMMABLE
fire_act()
else
if(!user.drop_item())
return
copy = O
do_insertion(O, user)
else
to_chat(user, "<span class='warning'>There is already something in [src]!</span>")
else if(istype(O, /obj/item/weapon/photo))
if(copier_empty())
if(!user.drop_item())
return
photocopy = O
do_insertion(O, user)
else
to_chat(user, "<span class='warning'>There is already something in [src]!</span>")
else if(istype(O, /obj/item/documents))
if(copier_empty())
if(!user.drop_item())
return
doccopy = O
do_insertion(O, user)
else
to_chat(user, "<span class='warning'>There is already something in [src]!</span>")
else if(istype(O, /obj/item/device/toner))
if(toner <= 0)
if(!user.drop_item())
return
qdel(O)
toner = 40
to_chat(user, "<span class='notice'>You insert [O] into [src].</span>")
updateUsrDialog()
else
to_chat(user, "<span class='warning'>This cartridge is not yet ready for replacement! Use up the rest of the toner.</span>")
else if(istype(O, /obj/item/weapon/wrench))
if(isinspace())
to_chat(user, "<span class='warning'>There's nothing to fasten [src] to!</span>")
return
playsound(loc, O.usesound, 50, 1)
to_chat(user, "<span class='warning'>You start [anchored ? "unwrenching" : "wrenching"] [src]...</span>")
if(do_after(user, 20*O.toolspeed, target = src))
if(QDELETED(src))
return
to_chat(user, "<span class='notice'>You [anchored ? "unwrench" : "wrench"] [src].</span>")
anchored = !anchored
else if(istype(O, /obj/item/areaeditor/blueprints))
to_chat(user, "<span class='warning'>The Blueprint is too large to put into the copier. You need to find something else to record the document</span>")
else
return ..()
/obj/machinery/photocopier/obj_break(damage_flag)
if(!(flags & NODECONSTRUCT))
if(toner > 0)
new /obj/effect/decal/cleanable/oil(get_turf(src))
toner = 0
/obj/machinery/photocopier/MouseDrop_T(mob/target, mob/user)
check_ass() //Just to make sure that you can re-drag somebody onto it after they moved off.
if (!istype(target) || target.anchored || target.buckled || !Adjacent(user) || !Adjacent(target) || !user.canUseTopic(src, 1) || target == ass || copier_blocked())
return
src.add_fingerprint(user)
if(target == user)
user.visible_message("[user] starts climbing onto the photocopier!", "<span class='notice'>You start climbing onto the photocopier...</span>")
else
user.visible_message("<span class='warning'>[user] starts putting [target] onto the photocopier!</span>", "<span class='notice'>You start putting [target] onto the photocopier...</span>")
if(do_after(user, 20, target = src))
if(!target || QDELETED(target) || QDELETED(src) || !Adjacent(target)) //check if the photocopier/target still exists.
return
if(target == user)
user.visible_message("[user] climbs onto the photocopier!", "<span class='notice'>You climb onto the photocopier.</span>")
else
user.visible_message("<span class='warning'>[user] puts [target] onto the photocopier!</span>", "<span class='notice'>You put [target] onto the photocopier.</span>")
target.loc = get_turf(src)
ass = target
if(photocopy)
photocopy.loc = src.loc
visible_message("<span class='warning'>[photocopy] is shoved out of the way by [ass]!</span>")
photocopy = null
else if(copy)
copy.loc = src.loc
visible_message("<span class='warning'>[copy] is shoved out of the way by [ass]!</span>")
copy = null
updateUsrDialog()
/obj/machinery/photocopier/proc/check_ass() //I'm not sure wether I made this proc because it's good form or because of the name.
if(!ass)
return 0
if(ass.loc != src.loc)
ass = null
updateUsrDialog()
return 0
else if(ishuman(ass))
if(!ass.get_item_by_slot(slot_w_uniform) && !ass.get_item_by_slot(slot_wear_suit))
return 1
else
return 0
else
return 1
/obj/machinery/photocopier/proc/copier_blocked()
if(QDELETED(src))
return
if(loc.density)
return 1
for(var/atom/movable/AM in loc)
if(AM == src)
continue
if(AM.density)
return 1
return 0
/obj/machinery/photocopier/proc/copier_empty()
if(copy || photocopy || check_ass())
return 0
else
return 1
/*
* Toner cartridge
*/
/obj/item/device/toner
name = "toner cartridge"
icon_state = "tonercartridge"
var/charges = 5
var/max_charges = 5
else
return ..()
/obj/machinery/photocopier/obj_break(damage_flag)
if(!(flags & NODECONSTRUCT))
if(toner > 0)
new /obj/effect/decal/cleanable/oil(get_turf(src))
toner = 0
/obj/machinery/photocopier/MouseDrop_T(mob/target, mob/user)
check_ass() //Just to make sure that you can re-drag somebody onto it after they moved off.
if (!istype(target) || target.anchored || target.buckled || !Adjacent(user) || !Adjacent(target) || !user.canUseTopic(src, 1) || target == ass || copier_blocked())
return
src.add_fingerprint(user)
if(target == user)
user.visible_message("[user] starts climbing onto the photocopier!", "<span class='notice'>You start climbing onto the photocopier...</span>")
else
user.visible_message("<span class='warning'>[user] starts putting [target] onto the photocopier!</span>", "<span class='notice'>You start putting [target] onto the photocopier...</span>")
if(do_after(user, 20, target = src))
if(!target || QDELETED(target) || QDELETED(src) || !Adjacent(target)) //check if the photocopier/target still exists.
return
if(target == user)
user.visible_message("[user] climbs onto the photocopier!", "<span class='notice'>You climb onto the photocopier.</span>")
else
user.visible_message("<span class='warning'>[user] puts [target] onto the photocopier!</span>", "<span class='notice'>You put [target] onto the photocopier.</span>")
target.loc = get_turf(src)
ass = target
if(photocopy)
photocopy.loc = src.loc
visible_message("<span class='warning'>[photocopy] is shoved out of the way by [ass]!</span>")
photocopy = null
else if(copy)
copy.loc = src.loc
visible_message("<span class='warning'>[copy] is shoved out of the way by [ass]!</span>")
copy = null
updateUsrDialog()
/obj/machinery/photocopier/proc/check_ass() //I'm not sure wether I made this proc because it's good form or because of the name.
if(!ass)
return 0
if(ass.loc != src.loc)
ass = null
updateUsrDialog()
return 0
else if(ishuman(ass))
if(!ass.get_item_by_slot(slot_w_uniform) && !ass.get_item_by_slot(slot_wear_suit))
return 1
else
return 0
else
return 1
/obj/machinery/photocopier/proc/copier_blocked()
if(QDELETED(src))
return
if(loc.density)
return 1
for(var/atom/movable/AM in loc)
if(AM == src)
continue
if(AM.density)
return 1
return 0
/obj/machinery/photocopier/proc/copier_empty()
if(copy || photocopy || check_ass())
return 0
else
return 1
/*
* Toner cartridge
*/
/obj/item/device/toner
name = "toner cartridge"
icon_state = "tonercartridge"
var/charges = 5
var/max_charges = 5
File diff suppressed because it is too large Load Diff