Force LF line endings with gitattributes and convert repo (#52266)

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
This commit is contained in:
jdawg1290
2020-07-16 03:02:40 +03:00
committed by GitHub
co-authored by Aleksej Komarov
parent 39e8bd721f
commit 62676e72a8
1133 changed files with 266492 additions and 266454 deletions
+125 -125
View File
@@ -1,125 +1,125 @@
/obj/item/clipboard
name = "clipboard"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "clipboard"
inhand_icon_state = "clipboard"
throwforce = 0
w_class = WEIGHT_CLASS_SMALL
throw_speed = 3
throw_range = 7
var/obj/item/pen/haspen //The stored pen.
var/obj/item/paper/toppaper //The topmost piece of paper.
slot_flags = ITEM_SLOT_BELT
resistance_flags = FLAMMABLE
/obj/item/clipboard/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] begins putting [user.p_their()] head into the clip of \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return BRUTELOSS//the clipboard's clip is very strong. industrial duty. can kill a man easily.
/obj/item/clipboard/Initialize()
update_icon()
. = ..()
/obj/item/clipboard/Destroy()
QDEL_NULL(haspen)
QDEL_NULL(toppaper) //let movable/Destroy handle the rest
return ..()
/obj/item/clipboard/update_overlays()
. = ..()
if(toppaper)
. += toppaper.icon_state
. += toppaper.overlays
if(haspen)
. += "clipboard_pen"
. += "clipboard_over"
/obj/item/clipboard/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/paper))
if(!user.transferItemToLoc(W, src))
return
toppaper = W
to_chat(user, "<span class='notice'>You clip the paper onto \the [src].</span>")
update_icon()
else if(toppaper)
toppaper.attackby(user.get_active_held_item(), user)
update_icon()
/obj/item/clipboard/attack_self(mob/user)
var/dat = "<title>Clipboard</title>"
if(haspen)
dat += "<A href='?src=[REF(src)];pen=1'>Remove Pen</A><BR><HR>"
else
dat += "<A href='?src=[REF(src)];addpen=1'>Add Pen</A><BR><HR>"
//The topmost paper. You can't organise contents directly in byond, so this is what we're stuck with. -Pete
if(toppaper)
var/obj/item/paper/P = toppaper
dat += "<A href='?src=[REF(src)];write=[REF(P)]'>Write</A> <A href='?src=[REF(src)];remove=[REF(P)]'>Remove</A> - <A href='?src=[REF(src)];read=[REF(P)]'>[P.name]</A><BR><HR>"
for(P in src)
if(P == toppaper)
continue
dat += "<A href='?src=[REF(src)];write=[REF(P)]'>Write</A> <A href='?src=[REF(src)];remove=[REF(P)]'>Remove</A> <A href='?src=[REF(src)];top=[REF(P)]'>Move to top</A> - <A href='?src=[REF(src)];read=[REF(P)]'>[P.name]</A><BR>"
user << browse(dat, "window=clipboard")
onclose(user, "clipboard")
add_fingerprint(usr)
/obj/item/clipboard/Topic(href, href_list)
..()
if(usr.stat || usr.restrained())
return
if(usr.contents.Find(src))
if(href_list["pen"])
if(haspen)
haspen.forceMove(usr.loc)
usr.put_in_hands(haspen)
haspen = null
if(href_list["addpen"])
if(!haspen)
var/obj/item/held = usr.get_active_held_item()
if(istype(held, /obj/item/pen))
var/obj/item/pen/W = held
if(!usr.transferItemToLoc(W, src))
return
haspen = W
to_chat(usr, "<span class='notice'>You slot [W] into [src].</span>")
if(href_list["write"])
var/obj/item/P = locate(href_list["write"]) in src
if(istype(P))
if(usr.get_active_held_item())
P.attackby(usr.get_active_held_item(), usr)
if(href_list["remove"])
var/obj/item/P = locate(href_list["remove"]) in src
if(istype(P))
P.forceMove(usr.loc)
usr.put_in_hands(P)
if(P == toppaper)
toppaper = null
var/obj/item/paper/newtop = locate(/obj/item/paper) in src
if(newtop && (newtop != P))
toppaper = newtop
else
toppaper = null
if(href_list["read"])
var/obj/item/paper/P = locate(href_list["read"]) in src
if(istype(P))
usr.examinate(P)
if(href_list["top"])
var/obj/item/P = locate(href_list["top"]) in src
if(istype(P))
toppaper = P
to_chat(usr, "<span class='notice'>You move [P.name] to the top.</span>")
//Update everything
attack_self(usr)
update_icon()
/obj/item/clipboard
name = "clipboard"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "clipboard"
inhand_icon_state = "clipboard"
throwforce = 0
w_class = WEIGHT_CLASS_SMALL
throw_speed = 3
throw_range = 7
var/obj/item/pen/haspen //The stored pen.
var/obj/item/paper/toppaper //The topmost piece of paper.
slot_flags = ITEM_SLOT_BELT
resistance_flags = FLAMMABLE
/obj/item/clipboard/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] begins putting [user.p_their()] head into the clip of \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return BRUTELOSS//the clipboard's clip is very strong. industrial duty. can kill a man easily.
/obj/item/clipboard/Initialize()
update_icon()
. = ..()
/obj/item/clipboard/Destroy()
QDEL_NULL(haspen)
QDEL_NULL(toppaper) //let movable/Destroy handle the rest
return ..()
/obj/item/clipboard/update_overlays()
. = ..()
if(toppaper)
. += toppaper.icon_state
. += toppaper.overlays
if(haspen)
. += "clipboard_pen"
. += "clipboard_over"
/obj/item/clipboard/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/paper))
if(!user.transferItemToLoc(W, src))
return
toppaper = W
to_chat(user, "<span class='notice'>You clip the paper onto \the [src].</span>")
update_icon()
else if(toppaper)
toppaper.attackby(user.get_active_held_item(), user)
update_icon()
/obj/item/clipboard/attack_self(mob/user)
var/dat = "<title>Clipboard</title>"
if(haspen)
dat += "<A href='?src=[REF(src)];pen=1'>Remove Pen</A><BR><HR>"
else
dat += "<A href='?src=[REF(src)];addpen=1'>Add Pen</A><BR><HR>"
//The topmost paper. You can't organise contents directly in byond, so this is what we're stuck with. -Pete
if(toppaper)
var/obj/item/paper/P = toppaper
dat += "<A href='?src=[REF(src)];write=[REF(P)]'>Write</A> <A href='?src=[REF(src)];remove=[REF(P)]'>Remove</A> - <A href='?src=[REF(src)];read=[REF(P)]'>[P.name]</A><BR><HR>"
for(P in src)
if(P == toppaper)
continue
dat += "<A href='?src=[REF(src)];write=[REF(P)]'>Write</A> <A href='?src=[REF(src)];remove=[REF(P)]'>Remove</A> <A href='?src=[REF(src)];top=[REF(P)]'>Move to top</A> - <A href='?src=[REF(src)];read=[REF(P)]'>[P.name]</A><BR>"
user << browse(dat, "window=clipboard")
onclose(user, "clipboard")
add_fingerprint(usr)
/obj/item/clipboard/Topic(href, href_list)
..()
if(usr.stat || usr.restrained())
return
if(usr.contents.Find(src))
if(href_list["pen"])
if(haspen)
haspen.forceMove(usr.loc)
usr.put_in_hands(haspen)
haspen = null
if(href_list["addpen"])
if(!haspen)
var/obj/item/held = usr.get_active_held_item()
if(istype(held, /obj/item/pen))
var/obj/item/pen/W = held
if(!usr.transferItemToLoc(W, src))
return
haspen = W
to_chat(usr, "<span class='notice'>You slot [W] into [src].</span>")
if(href_list["write"])
var/obj/item/P = locate(href_list["write"]) in src
if(istype(P))
if(usr.get_active_held_item())
P.attackby(usr.get_active_held_item(), usr)
if(href_list["remove"])
var/obj/item/P = locate(href_list["remove"]) in src
if(istype(P))
P.forceMove(usr.loc)
usr.put_in_hands(P)
if(P == toppaper)
toppaper = null
var/obj/item/paper/newtop = locate(/obj/item/paper) in src
if(newtop && (newtop != P))
toppaper = newtop
else
toppaper = null
if(href_list["read"])
var/obj/item/paper/P = locate(href_list["read"]) in src
if(istype(P))
usr.examinate(P)
if(href_list["top"])
var/obj/item/P = locate(href_list["top"]) in src
if(istype(P))
toppaper = P
to_chat(usr, "<span class='notice'>You move [P.name] to the top.</span>")
//Update everything
attack_self(usr)
update_icon()
+223 -223
View File
@@ -1,223 +1,223 @@
/* 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 = TRUE
anchored = TRUE
/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 = FALSE
/obj/structure/filingcabinet/filingcabinet //not changing the path to avoid unnecessary 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(I.w_class < WEIGHT_CLASS_NORMAL) //there probably shouldn't be anything placed ontop of filing cabinets in a map that isn't meant to go in them
I.forceMove(src)
/obj/structure/filingcabinet/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
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(P.tool_behaviour == TOOL_WRENCH && user.a_intent != INTENT_HELP)
to_chat(user, "<span class='notice'>You begin to [anchored ? "unwrench" : "wrench"] [src].</span>")
if(P.use_tool(src, user, 20, volume=50))
to_chat(user, "<span class='notice'>You successfully [anchored ? "unwrench" : "wrench"] [src].</span>")
anchored = !anchored
else if(P.w_class < WEIGHT_CLASS_NORMAL)
if(!user.transferItemToLoc(P, src))
return
to_chat(user, "<span class='notice'>You put [P] in [src].</span>")
icon_state = "[initial(icon_state)]-open"
sleep(5)
icon_state = initial(icon_state)
updateUsrDialog()
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/ui_interact(mob/user)
. = ..()
if(contents.len <= 0)
to_chat(user, "<span class='notice'>[src] is empty.</span>")
return
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><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><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.forceMove(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(!usr.canUseTopic(src, BE_CLOSE, ismonkey(usr)))
return
if(href_list["retrieve"])
usr << browse("", "window=filingcabinet") // Close the menu
var/obj/item/P = locate(href_list["retrieve"]) in src //contents[retrieveindex]
if(istype(P) && in_range(src, usr))
usr.put_in_hands(P)
updateUsrDialog()
icon_state = "[initial(icon_state)]-open"
addtimer(VARSET_CALLBACK(src, icon_state, initial(icon_state)), 5)
/*
* 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/paper/P = new /obj/item/paper(src)
P.info = "<CENTER><B>Security Record</B></CENTER><BR>"
P.info += "Name: [G.fields["name"]] ID: [G.fields["id"]]<BR>\nGender: [G.fields["gender"]]<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>\nCrimes: [S.fields["crim"]]<BR>\nDetails: [S.fields["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/paper/P = new /obj/item/paper(src)
P.info = "<CENTER><B>Medical Record</B></CENTER><BR>"
P.info += "Name: [G.fields["name"]] ID: [G.fields["id"]]<BR>\nGender: [G.fields["gender"]]<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.
//ATTACK HAND IGNORING PARENT RETURN VALUE
/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/Initialize()
. = ..()
GLOB.employmentCabinets += src
/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
var/datum/mind/M = G.fields["mindref"]
if(M && ishuman(M.current))
addFile(M.current)
/obj/structure/filingcabinet/employment/proc/addFile(mob/living/carbon/human/employee)
new /obj/item/paper/contract/employment(src, employee)
/obj/structure/filingcabinet/employment/interact(mob/user)
if(!cooldown)
if(virgin)
fillCurrent()
virgin = 0
cooldown = TRUE
// prevents the devil from just instantly emptying the cabinet, ensuring an easy win.
addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 10 SECONDS)
else
to_chat(user, "<span class='warning'>[src] is jammed, give it a few seconds.</span>")
..()
/* 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 = TRUE
anchored = TRUE
/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 = FALSE
/obj/structure/filingcabinet/filingcabinet //not changing the path to avoid unnecessary 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(I.w_class < WEIGHT_CLASS_NORMAL) //there probably shouldn't be anything placed ontop of filing cabinets in a map that isn't meant to go in them
I.forceMove(src)
/obj/structure/filingcabinet/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
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(P.tool_behaviour == TOOL_WRENCH && user.a_intent != INTENT_HELP)
to_chat(user, "<span class='notice'>You begin to [anchored ? "unwrench" : "wrench"] [src].</span>")
if(P.use_tool(src, user, 20, volume=50))
to_chat(user, "<span class='notice'>You successfully [anchored ? "unwrench" : "wrench"] [src].</span>")
anchored = !anchored
else if(P.w_class < WEIGHT_CLASS_NORMAL)
if(!user.transferItemToLoc(P, src))
return
to_chat(user, "<span class='notice'>You put [P] in [src].</span>")
icon_state = "[initial(icon_state)]-open"
sleep(5)
icon_state = initial(icon_state)
updateUsrDialog()
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/ui_interact(mob/user)
. = ..()
if(contents.len <= 0)
to_chat(user, "<span class='notice'>[src] is empty.</span>")
return
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><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><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.forceMove(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(!usr.canUseTopic(src, BE_CLOSE, ismonkey(usr)))
return
if(href_list["retrieve"])
usr << browse("", "window=filingcabinet") // Close the menu
var/obj/item/P = locate(href_list["retrieve"]) in src //contents[retrieveindex]
if(istype(P) && in_range(src, usr))
usr.put_in_hands(P)
updateUsrDialog()
icon_state = "[initial(icon_state)]-open"
addtimer(VARSET_CALLBACK(src, icon_state, initial(icon_state)), 5)
/*
* 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/paper/P = new /obj/item/paper(src)
P.info = "<CENTER><B>Security Record</B></CENTER><BR>"
P.info += "Name: [G.fields["name"]] ID: [G.fields["id"]]<BR>\nGender: [G.fields["gender"]]<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>\nCrimes: [S.fields["crim"]]<BR>\nDetails: [S.fields["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/paper/P = new /obj/item/paper(src)
P.info = "<CENTER><B>Medical Record</B></CENTER><BR>"
P.info += "Name: [G.fields["name"]] ID: [G.fields["id"]]<BR>\nGender: [G.fields["gender"]]<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.
//ATTACK HAND IGNORING PARENT RETURN VALUE
/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/Initialize()
. = ..()
GLOB.employmentCabinets += src
/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
var/datum/mind/M = G.fields["mindref"]
if(M && ishuman(M.current))
addFile(M.current)
/obj/structure/filingcabinet/employment/proc/addFile(mob/living/carbon/human/employee)
new /obj/item/paper/contract/employment(src, employee)
/obj/structure/filingcabinet/employment/interact(mob/user)
if(!cooldown)
if(virgin)
fillCurrent()
virgin = 0
cooldown = TRUE
// prevents the devil from just instantly emptying the cabinet, ensuring an easy win.
addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 10 SECONDS)
else
to_chat(user, "<span class='warning'>[src] is jammed, give it a few seconds.</span>")
..()
+132 -132
View File
@@ -1,132 +1,132 @@
/obj/item/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/folder/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] begins filing an imaginary death warrant! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return OXYLOSS
/obj/item/folder/blue
desc = "A blue folder."
icon_state = "folder_blue"
/obj/item/folder/red
desc = "A red folder."
icon_state = "folder_red"
/obj/item/folder/yellow
desc = "A yellow folder."
icon_state = "folder_yellow"
/obj/item/folder/white
desc = "A white folder."
icon_state = "folder_white"
/obj/item/folder/update_overlays()
. = ..()
if(contents.len)
. += "folder_paper"
/obj/item/folder/attackby(obj/item/W, mob/user, params)
if(burn_paper_product_attackby_check(W, user))
return
if(istype(W, /obj/item/paper) || istype(W, /obj/item/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/pen))
if(!user.is_literate())
to_chat(user, "<span class='notice'>You scribble illegibly on the cover of [src]!</span>")
return
var/inputvalue = stripped_input(user, "What would you like to label the folder?", "Folder Labelling", "", MAX_NAME_LEN)
if(!inputvalue)
return
if(user.canUseTopic(src, BE_CLOSE))
name = "folder[(inputvalue ? " - '[inputvalue]'" : null)]"
/obj/item/folder/Destroy()
for(var/obj/important_thing in contents)
if(!(important_thing.resistance_flags & INDESTRUCTIBLE))
continue
important_thing.forceMove(drop_location()) //don't destroy round critical content such as objective documents.
return ..()
/obj/item/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/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"]) in src
if(istype(I))
I.forceMove(usr.loc)
usr.put_in_hands(I)
if(href_list["read"])
var/obj/item/I = locate(href_list["read"]) in src
if(istype(I))
usr.examinate(I)
//Update everything
attack_self(usr)
update_icon()
/obj/item/folder/documents
name = "folder- 'TOP SECRET'"
desc = "A folder stamped \"Top Secret - Property of Nanotrasen Corporation. Unauthorized distribution is punishable by death.\""
/obj/item/folder/documents/Initialize()
. = ..()
new /obj/item/documents/nanotrasen(src)
update_icon()
/obj/item/folder/syndicate
icon_state = "folder_syndie"
name = "folder- 'TOP SECRET'"
desc = "A folder stamped \"Top Secret - Property of The Syndicate.\""
/obj/item/folder/syndicate/red
icon_state = "folder_sred"
/obj/item/folder/syndicate/red/Initialize()
. = ..()
new /obj/item/documents/syndicate/red(src)
update_icon()
/obj/item/folder/syndicate/blue
icon_state = "folder_sblue"
/obj/item/folder/syndicate/blue/Initialize()
. = ..()
new /obj/item/documents/syndicate/blue(src)
update_icon()
/obj/item/folder/syndicate/mining/Initialize()
. = ..()
new /obj/item/documents/syndicate/mining(src)
update_icon()
/obj/item/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/folder/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] begins filing an imaginary death warrant! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return OXYLOSS
/obj/item/folder/blue
desc = "A blue folder."
icon_state = "folder_blue"
/obj/item/folder/red
desc = "A red folder."
icon_state = "folder_red"
/obj/item/folder/yellow
desc = "A yellow folder."
icon_state = "folder_yellow"
/obj/item/folder/white
desc = "A white folder."
icon_state = "folder_white"
/obj/item/folder/update_overlays()
. = ..()
if(contents.len)
. += "folder_paper"
/obj/item/folder/attackby(obj/item/W, mob/user, params)
if(burn_paper_product_attackby_check(W, user))
return
if(istype(W, /obj/item/paper) || istype(W, /obj/item/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/pen))
if(!user.is_literate())
to_chat(user, "<span class='notice'>You scribble illegibly on the cover of [src]!</span>")
return
var/inputvalue = stripped_input(user, "What would you like to label the folder?", "Folder Labelling", "", MAX_NAME_LEN)
if(!inputvalue)
return
if(user.canUseTopic(src, BE_CLOSE))
name = "folder[(inputvalue ? " - '[inputvalue]'" : null)]"
/obj/item/folder/Destroy()
for(var/obj/important_thing in contents)
if(!(important_thing.resistance_flags & INDESTRUCTIBLE))
continue
important_thing.forceMove(drop_location()) //don't destroy round critical content such as objective documents.
return ..()
/obj/item/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/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"]) in src
if(istype(I))
I.forceMove(usr.loc)
usr.put_in_hands(I)
if(href_list["read"])
var/obj/item/I = locate(href_list["read"]) in src
if(istype(I))
usr.examinate(I)
//Update everything
attack_self(usr)
update_icon()
/obj/item/folder/documents
name = "folder- 'TOP SECRET'"
desc = "A folder stamped \"Top Secret - Property of Nanotrasen Corporation. Unauthorized distribution is punishable by death.\""
/obj/item/folder/documents/Initialize()
. = ..()
new /obj/item/documents/nanotrasen(src)
update_icon()
/obj/item/folder/syndicate
icon_state = "folder_syndie"
name = "folder- 'TOP SECRET'"
desc = "A folder stamped \"Top Secret - Property of The Syndicate.\""
/obj/item/folder/syndicate/red
icon_state = "folder_sred"
/obj/item/folder/syndicate/red/Initialize()
. = ..()
new /obj/item/documents/syndicate/red(src)
update_icon()
/obj/item/folder/syndicate/blue
icon_state = "folder_sblue"
/obj/item/folder/syndicate/blue/Initialize()
. = ..()
new /obj/item/documents/syndicate/blue(src)
update_icon()
/obj/item/folder/syndicate/mining/Initialize()
. = ..()
new /obj/item/documents/syndicate/mining(src)
update_icon()
+122 -122
View File
@@ -1,122 +1,122 @@
/obj/item/hand_labeler
name = "hand labeler"
desc = "A combined label printer, applicator, and remover, all in a single portable device. Designed to be easy to operate and use."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "labeler0"
inhand_icon_state = "flight"
var/label = null
var/labels_left = 30
var/mode = 0
/obj/item/hand_labeler/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is pointing [src] at [user.p_them()]self. [user.p_theyre(TRUE)] going to label [user.p_them()]self as a suicide!</span>")
labels_left = max(labels_left - 1, 0)
var/old_real_name = user.real_name
user.real_name += " (suicide)"
// no conflicts with their identification card
for(var/atom/A in user.GetAllContents())
if(istype(A, /obj/item/card/id))
var/obj/item/card/id/their_card = A
// only renames their card, as opposed to tagging everyone's
if(their_card.registered_name != old_real_name)
continue
their_card.registered_name = user.real_name
their_card.update_label()
// NOT EVEN DEATH WILL TAKE AWAY THE STAIN
user.mind.name += " (suicide)"
mode = 1
icon_state = "labeler[mode]"
label = "suicide"
return OXYLOSS
/obj/item/hand_labeler/afterattack(atom/A, mob/user,proximity)
. = ..()
if(!proximity)
return
if(!mode) //if it's off, give up.
return
if(!labels_left)
to_chat(user, "<span class='warning'>No labels left!</span>")
return
if(!label || !length(label))
to_chat(user, "<span class='warning'>No text set!</span>")
return
if(length(A.name) + length(label) > 64)
to_chat(user, "<span class='warning'>Label too big!</span>")
return
if(ismob(A))
to_chat(user, "<span class='warning'>You can't label creatures!</span>") // use a collar
return
user.visible_message("<span class='notice'>[user] labels [A] with \"[label]\".</span>", \
"<span class='notice'>You label [A] with \"[label]\".</span>")
A.AddComponent(/datum/component/label, label)
playsound(A, 'sound/items/handling/component_pickup.ogg', 20, TRUE)
labels_left--
/obj/item/hand_labeler/attack_self(mob/user)
if(!user.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>You don't have the dexterity to use [src]!</span>")
return
mode = !mode
icon_state = "labeler[mode]"
if(mode)
to_chat(user, "<span class='notice'>You turn on [src].</span>")
//Now let them chose the text.
var/str = reject_bad_text(stripped_input(user, "Label text?", "Set label","", MAX_NAME_LEN))
if(!str || !length(str))
to_chat(user, "<span class='warning'>Invalid text!</span>")
return
label = str
to_chat(user, "<span class='notice'>You set the text to '[str]'.</span>")
else
to_chat(user, "<span class='notice'>You turn off [src].</span>")
/obj/item/hand_labeler/attackby(obj/item/I, mob/user, params)
..()
if(istype(I, /obj/item/hand_labeler_refill))
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
qdel(I)
labels_left = initial(labels_left) //Yes, it's capped at its initial value
/obj/item/hand_labeler/borg
name = "cyborg-hand labeler"
/obj/item/hand_labeler/borg/afterattack(atom/A, mob/user, proximity)
. = ..()
if(!proximity)
return
if(!iscyborg(user))
return
var/mob/living/silicon/robot/borgy = user
var/starting_labels = initial(labels_left)
var/diff = starting_labels - labels_left
if(diff)
labels_left = starting_labels
// 50 per label. Magical cyborg paper doesn't come cheap.
var/cost = diff * 50
// If the cyborg manages to use a module without a cell, they get the paper
// for free.
if(borgy.cell)
borgy.cell.use(cost)
/obj/item/hand_labeler_refill
name = "hand labeler paper roll"
icon = 'icons/obj/bureaucracy.dmi'
desc = "A roll of paper. Use it on a hand labeler to refill it."
icon_state = "labeler_refill"
inhand_icon_state = "electropack"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
w_class = WEIGHT_CLASS_TINY
/obj/item/hand_labeler
name = "hand labeler"
desc = "A combined label printer, applicator, and remover, all in a single portable device. Designed to be easy to operate and use."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "labeler0"
inhand_icon_state = "flight"
var/label = null
var/labels_left = 30
var/mode = 0
/obj/item/hand_labeler/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is pointing [src] at [user.p_them()]self. [user.p_theyre(TRUE)] going to label [user.p_them()]self as a suicide!</span>")
labels_left = max(labels_left - 1, 0)
var/old_real_name = user.real_name
user.real_name += " (suicide)"
// no conflicts with their identification card
for(var/atom/A in user.GetAllContents())
if(istype(A, /obj/item/card/id))
var/obj/item/card/id/their_card = A
// only renames their card, as opposed to tagging everyone's
if(their_card.registered_name != old_real_name)
continue
their_card.registered_name = user.real_name
their_card.update_label()
// NOT EVEN DEATH WILL TAKE AWAY THE STAIN
user.mind.name += " (suicide)"
mode = 1
icon_state = "labeler[mode]"
label = "suicide"
return OXYLOSS
/obj/item/hand_labeler/afterattack(atom/A, mob/user,proximity)
. = ..()
if(!proximity)
return
if(!mode) //if it's off, give up.
return
if(!labels_left)
to_chat(user, "<span class='warning'>No labels left!</span>")
return
if(!label || !length(label))
to_chat(user, "<span class='warning'>No text set!</span>")
return
if(length(A.name) + length(label) > 64)
to_chat(user, "<span class='warning'>Label too big!</span>")
return
if(ismob(A))
to_chat(user, "<span class='warning'>You can't label creatures!</span>") // use a collar
return
user.visible_message("<span class='notice'>[user] labels [A] with \"[label]\".</span>", \
"<span class='notice'>You label [A] with \"[label]\".</span>")
A.AddComponent(/datum/component/label, label)
playsound(A, 'sound/items/handling/component_pickup.ogg', 20, TRUE)
labels_left--
/obj/item/hand_labeler/attack_self(mob/user)
if(!user.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>You don't have the dexterity to use [src]!</span>")
return
mode = !mode
icon_state = "labeler[mode]"
if(mode)
to_chat(user, "<span class='notice'>You turn on [src].</span>")
//Now let them chose the text.
var/str = reject_bad_text(stripped_input(user, "Label text?", "Set label","", MAX_NAME_LEN))
if(!str || !length(str))
to_chat(user, "<span class='warning'>Invalid text!</span>")
return
label = str
to_chat(user, "<span class='notice'>You set the text to '[str]'.</span>")
else
to_chat(user, "<span class='notice'>You turn off [src].</span>")
/obj/item/hand_labeler/attackby(obj/item/I, mob/user, params)
..()
if(istype(I, /obj/item/hand_labeler_refill))
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
qdel(I)
labels_left = initial(labels_left) //Yes, it's capped at its initial value
/obj/item/hand_labeler/borg
name = "cyborg-hand labeler"
/obj/item/hand_labeler/borg/afterattack(atom/A, mob/user, proximity)
. = ..()
if(!proximity)
return
if(!iscyborg(user))
return
var/mob/living/silicon/robot/borgy = user
var/starting_labels = initial(labels_left)
var/diff = starting_labels - labels_left
if(diff)
labels_left = starting_labels
// 50 per label. Magical cyborg paper doesn't come cheap.
var/cost = diff * 50
// If the cyborg manages to use a module without a cell, they get the paper
// for free.
if(borgy.cell)
borgy.cell.use(cost)
/obj/item/hand_labeler_refill
name = "hand labeler paper roll"
icon = 'icons/obj/bureaucracy.dmi'
desc = "A roll of paper. Use it on a hand labeler to refill it."
icon_state = "labeler_refill"
inhand_icon_state = "electropack"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
w_class = WEIGHT_CLASS_TINY
+181 -181
View File
@@ -1,181 +1,181 @@
/obj/item/paper_bin
name = "paper bin"
desc = "Contains all the paper you'll never need."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "paper_bin1"
inhand_icon_state = "sheet-metal"
lefthand_file = 'icons/mob/inhands/misc/sheets_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/sheets_righthand.dmi'
throwforce = 0
w_class = WEIGHT_CLASS_NORMAL
throw_speed = 3
throw_range = 7
pressure_resistance = 8
var/papertype = /obj/item/paper
var/total_paper = 30
var/list/papers = list()
var/obj/item/pen/bin_pen
/obj/item/paper_bin/Initialize(mapload)
. = ..()
interaction_flags_item &= ~INTERACT_ITEM_ATTACK_HAND_PICKUP
if(!mapload)
return
var/obj/item/pen/P = locate(/obj/item/pen) in src.loc
if(P && !bin_pen)
P.forceMove(src)
bin_pen = P
update_icon()
/obj/item/paper_bin/Destroy()
if(papers)
for(var/i in papers)
qdel(i)
papers = null
. = ..()
/obj/item/paper_bin/fire_act(exposed_temperature, exposed_volume)
if(total_paper)
total_paper = 0
update_icon()
..()
/obj/item/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/paper_bin/attack_paw(mob/user)
return attack_hand(user)
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/paper_bin/attack_hand(mob/user)
if(isliving(user))
var/mob/living/L = user
if(!(L.mobility_flags & MOBILITY_PICKUP))
return
user.changeNext_move(CLICK_CD_MELEE)
if(bin_pen)
var/obj/item/pen/P = bin_pen
P.add_fingerprint(user)
P.forceMove(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/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.add_fingerprint(user)
P.forceMove(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)
return ..()
/obj/item/paper_bin/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/paper))
var/obj/item/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/pen) && !bin_pen)
var/obj/item/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/paper_bin/examine(mob/user)
. = ..()
if(total_paper)
. += "It contains [total_paper > 1 ? "[total_paper] papers" : " one paper"]."
else
. += "It doesn't contain anything."
/obj/item/paper_bin/update_icon_state()
if(total_paper < 1)
icon_state = "paper_bin0"
else
icon_state = "[initial(icon_state)]"
/obj/item/paper_bin/update_overlays()
. = ..()
if(bin_pen)
. += mutable_appearance(bin_pen.icon, bin_pen.icon_state)
/obj/item/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/paper/construction
/obj/item/paper_bin/bundlenatural
name = "natural paper bundle"
desc = "A bundle of paper created using traditional methods."
icon_state = "paper_bundle"
papertype = /obj/item/paper/natural
resistance_flags = FLAMMABLE
/obj/item/paper_bin/bundlenatural/attack_hand(mob/user)
..()
if(total_paper < 1)
qdel(src)
/obj/item/paper_bin/bundlenatural/fire_act(exposed_temperature, exposed_volume)
qdel(src)
/obj/item/paper_bin/bundlenatural/attackby(obj/item/W, mob/user)
if(W.get_sharpness())
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/paper/P
if(papers.len > 0)
P = papers[papers.len]
papers -= P
else
P = new papertype()
P.forceMove(T)
CHECK_TICK
qdel(src)
else
..()
/obj/item/paper_bin/carbon
name = "carbon paper bin"
desc = "Contains all the paper you'll ever need, in duplicate!"
icon_state = "paper_bin_carbon"
papertype = /obj/item/paper/carbon
/obj/item/paper_bin
name = "paper bin"
desc = "Contains all the paper you'll never need."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "paper_bin1"
inhand_icon_state = "sheet-metal"
lefthand_file = 'icons/mob/inhands/misc/sheets_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/sheets_righthand.dmi'
throwforce = 0
w_class = WEIGHT_CLASS_NORMAL
throw_speed = 3
throw_range = 7
pressure_resistance = 8
var/papertype = /obj/item/paper
var/total_paper = 30
var/list/papers = list()
var/obj/item/pen/bin_pen
/obj/item/paper_bin/Initialize(mapload)
. = ..()
interaction_flags_item &= ~INTERACT_ITEM_ATTACK_HAND_PICKUP
if(!mapload)
return
var/obj/item/pen/P = locate(/obj/item/pen) in src.loc
if(P && !bin_pen)
P.forceMove(src)
bin_pen = P
update_icon()
/obj/item/paper_bin/Destroy()
if(papers)
for(var/i in papers)
qdel(i)
papers = null
. = ..()
/obj/item/paper_bin/fire_act(exposed_temperature, exposed_volume)
if(total_paper)
total_paper = 0
update_icon()
..()
/obj/item/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/paper_bin/attack_paw(mob/user)
return attack_hand(user)
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/paper_bin/attack_hand(mob/user)
if(isliving(user))
var/mob/living/L = user
if(!(L.mobility_flags & MOBILITY_PICKUP))
return
user.changeNext_move(CLICK_CD_MELEE)
if(bin_pen)
var/obj/item/pen/P = bin_pen
P.add_fingerprint(user)
P.forceMove(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/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.add_fingerprint(user)
P.forceMove(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)
return ..()
/obj/item/paper_bin/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/paper))
var/obj/item/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/pen) && !bin_pen)
var/obj/item/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/paper_bin/examine(mob/user)
. = ..()
if(total_paper)
. += "It contains [total_paper > 1 ? "[total_paper] papers" : " one paper"]."
else
. += "It doesn't contain anything."
/obj/item/paper_bin/update_icon_state()
if(total_paper < 1)
icon_state = "paper_bin0"
else
icon_state = "[initial(icon_state)]"
/obj/item/paper_bin/update_overlays()
. = ..()
if(bin_pen)
. += mutable_appearance(bin_pen.icon, bin_pen.icon_state)
/obj/item/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/paper/construction
/obj/item/paper_bin/bundlenatural
name = "natural paper bundle"
desc = "A bundle of paper created using traditional methods."
icon_state = "paper_bundle"
papertype = /obj/item/paper/natural
resistance_flags = FLAMMABLE
/obj/item/paper_bin/bundlenatural/attack_hand(mob/user)
..()
if(total_paper < 1)
qdel(src)
/obj/item/paper_bin/bundlenatural/fire_act(exposed_temperature, exposed_volume)
qdel(src)
/obj/item/paper_bin/bundlenatural/attackby(obj/item/W, mob/user)
if(W.get_sharpness())
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/paper/P
if(papers.len > 0)
P = papers[papers.len]
papers -= P
else
P = new papertype()
P.forceMove(T)
CHECK_TICK
qdel(src)
else
..()
/obj/item/paper_bin/carbon
name = "carbon paper bin"
desc = "Contains all the paper you'll ever need, in duplicate!"
icon_state = "paper_bin_carbon"
papertype = /obj/item/paper/carbon
+268 -268
View File
@@ -1,268 +1,268 @@
/* Pens!
* Contains:
* Pens
* Sleepy Pens
* Parapens
* Edaggers
*/
/*
* Pens
*/
/obj/item/pen
desc = "It's a normal black ink pen."
name = "pen"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "pen"
inhand_icon_state = "pen"
worn_icon_state = "pen"
slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_EARS
throwforce = 0
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
throw_range = 7
custom_materials = list(/datum/material/iron=10)
pressure_resistance = 2
grind_results = list(/datum/reagent/iron = 2, /datum/reagent/iodine = 1)
var/colour = "black" //what colour the ink is!
var/degrees = 0
var/font = PEN_FONT
embedding = list()
/obj/item/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/pen/blue
desc = "It's a normal blue ink pen."
icon_state = "pen_blue"
colour = "blue"
/obj/item/pen/red
desc = "It's a normal red ink pen."
icon_state = "pen_red"
colour = "red"
throw_speed = 4 // red ones go faster (in this case, fast enough to embed!)
/obj/item/pen/invisible
desc = "It's an invisible pen marker."
icon_state = "pen"
colour = "white"
/obj/item/pen/fourcolor
desc = "It's a fancy four-color ink pen, set to black."
name = "four-color pen"
colour = "black"
/obj/item/pen/fourcolor/attack_self(mob/living/carbon/user)
switch(colour)
if("black")
colour = "red"
throw_speed++
if("red")
colour = "green"
throw_speed = initial(throw_speed)
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/pen/fountain
name = "fountain pen"
desc = "It's a common fountain pen, with a faux wood body."
icon_state = "pen-fountain"
font = FOUNTAIN_PEN_FONT
/obj/item/pen/charcoal
name = "charcoal stylus"
desc = "It's just a wooden stick with some compressed ash on the end. At least it can write."
icon_state = "pen-charcoal"
colour = "dimgray"
font = CHARCOAL_FONT
custom_materials = null
grind_results = list(/datum/reagent/ash = 5, /datum/reagent/cellulose = 10)
/datum/crafting_recipe/charcoal_stylus
name = "Charcoal Stylus"
result = /obj/item/pen/charcoal
reqs = list(/obj/item/stack/sheet/mineral/wood = 1, /datum/reagent/ash = 30)
time = 30
category = CAT_PRIMAL
/obj/item/pen/fountain/captain
name = "captain's fountain pen"
desc = "It's an expensive Oak fountain pen. The nib is quite sharp."
icon_state = "pen-fountain-o"
force = 5
throwforce = 5
throw_speed = 4
colour = "crimson"
custom_materials = list(/datum/material/gold = 750)
sharpness = IS_SHARP
resistance_flags = FIRE_PROOF
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"
)
embedding = list("embed_chance" = 75)
/obj/item/pen/fountain/captain/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 200, 115) //the pen is mightier than the sword
/obj/item/pen/fountain/captain/reskin_obj(mob/M)
..()
if(current_skin)
desc = "It's an expensive [current_skin] fountain pen. The nib is quite sharp."
/obj/item/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>")
SEND_SIGNAL(src, COMSIG_PEN_ROTATED, deg, user)
/obj/item/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
log_combat(user, M, "stabbed", src)
else
. = ..()
/obj/item/pen/afterattack(obj/O, mob/living/user, proximity)
. = ..()
//Changing Name/Description of items. Only works if they have the 'unique_rename' flag set
if(isobj(O) && proximity && (O.obj_flags & 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))
return
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))
return
if(oldname == input)
to_chat(user, "<span class='notice'>You changed \the [O.name] to... well... \the [O.name].</span>")
else
O.name = input
to_chat(user, "<span class='notice'>\The [oldname] has been successfully been renamed to \the [input].</span>")
O.renamedByPlayer = TRUE
if(penchoice == "Change description")
var/input = stripped_input(user,"Describe \the [O.name] here", ,"", 100)
if(QDELETED(O) || !user.canUseTopic(O, BE_CLOSE))
return
O.desc = input
to_chat(user, "<span class='notice'>You have successfully changed \the [O.name]'s description.</span>")
/*
* Sleepypens
*/
/obj/item/pen/sleepy/attack(mob/living/M, mob/user)
if(!istype(M))
return
if(..())
if(reagents.total_volume)
if(M.reagents)
reagents.expose(M, INJECT, reagents.total_volume)
reagents.trans_to(M, reagents.total_volume, transfered_by = user)
/obj/item/pen/sleepy/Initialize()
. = ..()
create_reagents(45, OPENCONTAINER)
reagents.add_reagent(/datum/reagent/toxin/chloralhydrate, 20)
reagents.add_reagent(/datum/reagent/toxin/mutetoxin, 15)
reagents.add_reagent(/datum/reagent/toxin/staminatoxin, 10)
/*
* (Alan) Edaggers
*/
/obj/item/pen/edagger
attack_verb = list("slashed", "stabbed", "sliced", "tore", "lacerated", "ripped", "diced", "cut") //these won't show up if the pen is off
sharpness = IS_SHARP
var/on = FALSE
/obj/item/pen/edagger/ComponentInitialize()
. = ..()
AddComponent(/datum/component/butchering, 60, 100, 0, 'sound/weapons/blade1.ogg')
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/pen/edagger/get_sharpness()
return on * sharpness
/obj/item/pen/edagger/suicide_act(mob/user)
. = BRUTELOSS
if(on)
user.visible_message("<span class='suicide'>[user] forcefully rams the pen into their mouth!</span>")
else
user.visible_message("<span class='suicide'>[user] is holding a pen up to their mouth! It looks like [user.p_theyre()] trying to commit suicide!</span>")
attack_self(user)
/obj/item/pen/edagger/attack_self(mob/living/user)
if(on)
on = FALSE
force = initial(force)
throw_speed = initial(throw_speed)
w_class = initial(w_class)
name = initial(name)
hitsound = initial(hitsound)
embedding = list(embed_chance = EMBED_CHANCE)
throwforce = initial(throwforce)
playsound(user, 'sound/weapons/saberoff.ogg', 5, TRUE)
to_chat(user, "<span class='warning'>[src] can now be concealed.</span>")
else
on = TRUE
force = 18
throw_speed = 4
w_class = WEIGHT_CLASS_NORMAL
name = "energy dagger"
hitsound = 'sound/weapons/blade1.ogg'
embedding = list(embed_chance = 100) //rule of cool
throwforce = 35
playsound(user, 'sound/weapons/saberon.ogg', 5, TRUE)
to_chat(user, "<span class='warning'>[src] is now active.</span>")
updateEmbedding()
update_icon()
/obj/item/pen/edagger/update_icon_state()
if(on)
icon_state = inhand_icon_state = "edagger"
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
else
icon_state = initial(icon_state) //looks like a normal pen when off.
inhand_icon_state = initial(inhand_icon_state)
lefthand_file = initial(lefthand_file)
righthand_file = initial(righthand_file)
/obj/item/pen/survival
name = "survival pen"
desc = "The latest in portable survival technology, this pen was designed as a miniature diamond pickaxe. Watchers find them very desirable for their diamond exterior."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "digging_pen"
inhand_icon_state = "pen"
worn_icon_state = "pen"
force = 3
w_class = WEIGHT_CLASS_TINY
custom_materials = list(/datum/material/iron=10, /datum/material/diamond=100, /datum/material/titanium = 10)
pressure_resistance = 2
grind_results = list(/datum/reagent/iron = 2, /datum/reagent/iodine = 1)
tool_behaviour = TOOL_MINING //For the classic "digging out of prison with a spoon but you're in space so this analogy doesn't work" situation.
toolspeed = 10 //You will never willingly choose to use one of these over a shovel.
/* Pens!
* Contains:
* Pens
* Sleepy Pens
* Parapens
* Edaggers
*/
/*
* Pens
*/
/obj/item/pen
desc = "It's a normal black ink pen."
name = "pen"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "pen"
inhand_icon_state = "pen"
worn_icon_state = "pen"
slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_EARS
throwforce = 0
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
throw_range = 7
custom_materials = list(/datum/material/iron=10)
pressure_resistance = 2
grind_results = list(/datum/reagent/iron = 2, /datum/reagent/iodine = 1)
var/colour = "black" //what colour the ink is!
var/degrees = 0
var/font = PEN_FONT
embedding = list()
/obj/item/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/pen/blue
desc = "It's a normal blue ink pen."
icon_state = "pen_blue"
colour = "blue"
/obj/item/pen/red
desc = "It's a normal red ink pen."
icon_state = "pen_red"
colour = "red"
throw_speed = 4 // red ones go faster (in this case, fast enough to embed!)
/obj/item/pen/invisible
desc = "It's an invisible pen marker."
icon_state = "pen"
colour = "white"
/obj/item/pen/fourcolor
desc = "It's a fancy four-color ink pen, set to black."
name = "four-color pen"
colour = "black"
/obj/item/pen/fourcolor/attack_self(mob/living/carbon/user)
switch(colour)
if("black")
colour = "red"
throw_speed++
if("red")
colour = "green"
throw_speed = initial(throw_speed)
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/pen/fountain
name = "fountain pen"
desc = "It's a common fountain pen, with a faux wood body."
icon_state = "pen-fountain"
font = FOUNTAIN_PEN_FONT
/obj/item/pen/charcoal
name = "charcoal stylus"
desc = "It's just a wooden stick with some compressed ash on the end. At least it can write."
icon_state = "pen-charcoal"
colour = "dimgray"
font = CHARCOAL_FONT
custom_materials = null
grind_results = list(/datum/reagent/ash = 5, /datum/reagent/cellulose = 10)
/datum/crafting_recipe/charcoal_stylus
name = "Charcoal Stylus"
result = /obj/item/pen/charcoal
reqs = list(/obj/item/stack/sheet/mineral/wood = 1, /datum/reagent/ash = 30)
time = 30
category = CAT_PRIMAL
/obj/item/pen/fountain/captain
name = "captain's fountain pen"
desc = "It's an expensive Oak fountain pen. The nib is quite sharp."
icon_state = "pen-fountain-o"
force = 5
throwforce = 5
throw_speed = 4
colour = "crimson"
custom_materials = list(/datum/material/gold = 750)
sharpness = IS_SHARP
resistance_flags = FIRE_PROOF
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"
)
embedding = list("embed_chance" = 75)
/obj/item/pen/fountain/captain/Initialize()
. = ..()
AddComponent(/datum/component/butchering, 200, 115) //the pen is mightier than the sword
/obj/item/pen/fountain/captain/reskin_obj(mob/M)
..()
if(current_skin)
desc = "It's an expensive [current_skin] fountain pen. The nib is quite sharp."
/obj/item/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>")
SEND_SIGNAL(src, COMSIG_PEN_ROTATED, deg, user)
/obj/item/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
log_combat(user, M, "stabbed", src)
else
. = ..()
/obj/item/pen/afterattack(obj/O, mob/living/user, proximity)
. = ..()
//Changing Name/Description of items. Only works if they have the 'unique_rename' flag set
if(isobj(O) && proximity && (O.obj_flags & 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))
return
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))
return
if(oldname == input)
to_chat(user, "<span class='notice'>You changed \the [O.name] to... well... \the [O.name].</span>")
else
O.name = input
to_chat(user, "<span class='notice'>\The [oldname] has been successfully been renamed to \the [input].</span>")
O.renamedByPlayer = TRUE
if(penchoice == "Change description")
var/input = stripped_input(user,"Describe \the [O.name] here", ,"", 100)
if(QDELETED(O) || !user.canUseTopic(O, BE_CLOSE))
return
O.desc = input
to_chat(user, "<span class='notice'>You have successfully changed \the [O.name]'s description.</span>")
/*
* Sleepypens
*/
/obj/item/pen/sleepy/attack(mob/living/M, mob/user)
if(!istype(M))
return
if(..())
if(reagents.total_volume)
if(M.reagents)
reagents.expose(M, INJECT, reagents.total_volume)
reagents.trans_to(M, reagents.total_volume, transfered_by = user)
/obj/item/pen/sleepy/Initialize()
. = ..()
create_reagents(45, OPENCONTAINER)
reagents.add_reagent(/datum/reagent/toxin/chloralhydrate, 20)
reagents.add_reagent(/datum/reagent/toxin/mutetoxin, 15)
reagents.add_reagent(/datum/reagent/toxin/staminatoxin, 10)
/*
* (Alan) Edaggers
*/
/obj/item/pen/edagger
attack_verb = list("slashed", "stabbed", "sliced", "tore", "lacerated", "ripped", "diced", "cut") //these won't show up if the pen is off
sharpness = IS_SHARP
var/on = FALSE
/obj/item/pen/edagger/ComponentInitialize()
. = ..()
AddComponent(/datum/component/butchering, 60, 100, 0, 'sound/weapons/blade1.ogg')
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/pen/edagger/get_sharpness()
return on * sharpness
/obj/item/pen/edagger/suicide_act(mob/user)
. = BRUTELOSS
if(on)
user.visible_message("<span class='suicide'>[user] forcefully rams the pen into their mouth!</span>")
else
user.visible_message("<span class='suicide'>[user] is holding a pen up to their mouth! It looks like [user.p_theyre()] trying to commit suicide!</span>")
attack_self(user)
/obj/item/pen/edagger/attack_self(mob/living/user)
if(on)
on = FALSE
force = initial(force)
throw_speed = initial(throw_speed)
w_class = initial(w_class)
name = initial(name)
hitsound = initial(hitsound)
embedding = list(embed_chance = EMBED_CHANCE)
throwforce = initial(throwforce)
playsound(user, 'sound/weapons/saberoff.ogg', 5, TRUE)
to_chat(user, "<span class='warning'>[src] can now be concealed.</span>")
else
on = TRUE
force = 18
throw_speed = 4
w_class = WEIGHT_CLASS_NORMAL
name = "energy dagger"
hitsound = 'sound/weapons/blade1.ogg'
embedding = list(embed_chance = 100) //rule of cool
throwforce = 35
playsound(user, 'sound/weapons/saberon.ogg', 5, TRUE)
to_chat(user, "<span class='warning'>[src] is now active.</span>")
updateEmbedding()
update_icon()
/obj/item/pen/edagger/update_icon_state()
if(on)
icon_state = inhand_icon_state = "edagger"
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
else
icon_state = initial(icon_state) //looks like a normal pen when off.
inhand_icon_state = initial(inhand_icon_state)
lefthand_file = initial(lefthand_file)
righthand_file = initial(righthand_file)
/obj/item/pen/survival
name = "survival pen"
desc = "The latest in portable survival technology, this pen was designed as a miniature diamond pickaxe. Watchers find them very desirable for their diamond exterior."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "digging_pen"
inhand_icon_state = "pen"
worn_icon_state = "pen"
force = 3
w_class = WEIGHT_CLASS_TINY
custom_materials = list(/datum/material/iron=10, /datum/material/diamond=100, /datum/material/titanium = 10)
pressure_resistance = 2
grind_results = list(/datum/reagent/iron = 2, /datum/reagent/iodine = 1)
tool_behaviour = TOOL_MINING //For the classic "digging out of prison with a spoon but you're in space so this analogy doesn't work" situation.
toolspeed = 10 //You will never willingly choose to use one of these over a shovel.
+345 -345
View File
@@ -1,345 +1,345 @@
/* 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"
density = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 30
active_power_usage = 200
power_channel = AREA_USAGE_EQUIP
max_integrity = 300
integrity_failure = 0.33
var/obj/item/paper/copy = null //what's in the copier!
var/obj/item/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 = FALSE
/obj/machinery/photocopier/ui_interact(mob/user)
. = ..()
var/list/dat = list("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.Join(""), "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/paper/contract/employment))
var/obj/item/paper/contract/employment/E = copy
var/obj/item/paper/contract/employment/C = new /obj/item/paper/contract/employment (loc, E.target.current)
if(C)
copy_as_paper = 0
if(copy_as_paper)
var/obj/item/paper/c = new /obj/item/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.update_icon()
c.stamps = copy.stamps
if(copy.stamped)
c.stamped = copy.stamped.Copy()
c.copy_overlays(copy, TRUE)
toner--
busy = TRUE
addtimer(CALLBACK(src, .proc/reset_busy), 1.5 SECONDS)
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
new /obj/item/photo (loc, photocopy.picture.Copy(greytoggle == "Greyscale"? TRUE : FALSE))
busy = TRUE
addtimer(CALLBACK(src, .proc/reset_busy), 1.5 SECONDS)
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 = TRUE
addtimer(CALLBACK(src, .proc/reset_busy), 1.5 SECONDS)
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(ITEM_SLOT_ICLOTHING) || ass.get_item_by_slot(ITEM_SLOT_OCLOTHING)))
to_chat(usr, "<span class='notice'>You feel kind of silly, copying [ass == usr ? "your" : ass][ass == usr ? "" : "\'s"] ass with [ass == usr ? "your" : "[ass.p_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
temp_img = icon(ass.gender == FEMALE ? 'icons/ass/assfemale.png' : 'icons/ass/assmale.png')
else if(isdrone(ass)) //Drones are hot
temp_img = icon('icons/ass/assdrone.png')
else
break
busy = TRUE
sleep(15)
var/obj/item/photo/p = new /obj/item/photo (loc)
var/datum/picture/toEmbed = new(name = "[ass]'s Ass", desc = "You see [ass]'s ass on the photo.", image = temp_img)
p.pixel_x = rand(-10, 10)
p.pixel_y = rand(-10, 10)
toEmbed.psize_x = 128
toEmbed.psize_y = 128
p.set_picture(toEmbed, TRUE, TRUE)
toner -= 5
busy = FALSE
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/mob/living/silicon/ai/tempAI = usr
if(tempAI.aicamera.stored.len == 0)
to_chat(usr, "<span class='boldannounce'>No images saved</span>")
return
var/datum/picture/selection = tempAI.aicamera.selectpicture(usr)
var/obj/item/photo/photo = new(loc, selection)
photo.pixel_x = rand(-10, 10)
photo.pixel_y = rand(-10, 10)
toner -= 5 //AI prints color pictures only, thus they can do it more efficiently
busy = TRUE
addtimer(CALLBACK(src, .proc/reset_busy), 1.5 SECONDS)
updateUsrDialog()
else if(href_list["colortoggle"])
if(greytoggle == "Greyscale")
greytoggle = "Color"
else
greytoggle = "Greyscale"
updateUsrDialog()
/obj/machinery/photocopier/proc/reset_busy()
busy = FALSE
updateUsrDialog()
/obj/machinery/photocopier/proc/do_insertion(obj/item/O, mob/user)
O.forceMove(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.forceMove(user.loc)
user.put_in_hands(O)
else
O.forceMove(drop_location())
to_chat(user, "<span class='notice'>You take [O] out of [src].</span>")
/obj/machinery/photocopier/attackby(obj/item/O, mob/user, params)
if(default_unfasten_wrench(user, O))
return
else if(istype(O, /obj/item/paper))
if(copier_empty())
if(istype(O, /obj/item/paper/contract/infernal))
to_chat(user, "<span class='warning'>[src] smokes, smelling of brimstone!</span>")
resistance_flags |= FLAMMABLE
fire_act()
else
if(!user.temporarilyRemoveItemFromInventory(O))
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/photo))
if(copier_empty())
if(!user.temporarilyRemoveItemFromInventory(O))
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.temporarilyRemoveItemFromInventory(O))
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/toner))
if(toner <= 0)
if(!user.temporarilyRemoveItemFromInventory(O))
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/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(. && 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(target) || !user.canUseTopic(src, BE_CLOSE) || target == ass || copier_blocked())
return
src.add_fingerprint(user)
if(target == user)
user.visible_message("<span class='notice'>[user] starts climbing onto the photocopier!</span>", "<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("<span class='notice'>[user] climbs onto the photocopier!</span>", "<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.forceMove(drop_location())
ass = target
if(photocopy)
photocopy.forceMove(drop_location())
visible_message("<span class='warning'>[photocopy] is shoved out of the way by [ass]!</span>")
photocopy = null
else if(copy)
copy.forceMove(drop_location())
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(ITEM_SLOT_ICLOTHING) && !ass.get_item_by_slot(ITEM_SLOT_OCLOTHING))
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/toner
name = "toner cartridge"
icon = 'icons/obj/device.dmi'
icon_state = "tonercartridge"
grind_results = list(/datum/reagent/iodine = 40, /datum/reagent/iron = 10)
var/charges = 5
var/max_charges = 5
/obj/item/toner/large
name = "large toner cartridge"
grind_results = list(/datum/reagent/iodine = 90, /datum/reagent/iron = 10)
charges = 15
max_charges = 15
/obj/item/toner/extreme
name = "extremely large toner cartridge"
desc = "Why would ANYONE need THIS MUCH TONER?"
charges = 200
max_charges = 200
/* 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"
density = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 30
active_power_usage = 200
power_channel = AREA_USAGE_EQUIP
max_integrity = 300
integrity_failure = 0.33
var/obj/item/paper/copy = null //what's in the copier!
var/obj/item/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 = FALSE
/obj/machinery/photocopier/ui_interact(mob/user)
. = ..()
var/list/dat = list("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.Join(""), "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/paper/contract/employment))
var/obj/item/paper/contract/employment/E = copy
var/obj/item/paper/contract/employment/C = new /obj/item/paper/contract/employment (loc, E.target.current)
if(C)
copy_as_paper = 0
if(copy_as_paper)
var/obj/item/paper/c = new /obj/item/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.update_icon()
c.stamps = copy.stamps
if(copy.stamped)
c.stamped = copy.stamped.Copy()
c.copy_overlays(copy, TRUE)
toner--
busy = TRUE
addtimer(CALLBACK(src, .proc/reset_busy), 1.5 SECONDS)
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
new /obj/item/photo (loc, photocopy.picture.Copy(greytoggle == "Greyscale"? TRUE : FALSE))
busy = TRUE
addtimer(CALLBACK(src, .proc/reset_busy), 1.5 SECONDS)
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 = TRUE
addtimer(CALLBACK(src, .proc/reset_busy), 1.5 SECONDS)
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(ITEM_SLOT_ICLOTHING) || ass.get_item_by_slot(ITEM_SLOT_OCLOTHING)))
to_chat(usr, "<span class='notice'>You feel kind of silly, copying [ass == usr ? "your" : ass][ass == usr ? "" : "\'s"] ass with [ass == usr ? "your" : "[ass.p_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
temp_img = icon(ass.gender == FEMALE ? 'icons/ass/assfemale.png' : 'icons/ass/assmale.png')
else if(isdrone(ass)) //Drones are hot
temp_img = icon('icons/ass/assdrone.png')
else
break
busy = TRUE
sleep(15)
var/obj/item/photo/p = new /obj/item/photo (loc)
var/datum/picture/toEmbed = new(name = "[ass]'s Ass", desc = "You see [ass]'s ass on the photo.", image = temp_img)
p.pixel_x = rand(-10, 10)
p.pixel_y = rand(-10, 10)
toEmbed.psize_x = 128
toEmbed.psize_y = 128
p.set_picture(toEmbed, TRUE, TRUE)
toner -= 5
busy = FALSE
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/mob/living/silicon/ai/tempAI = usr
if(tempAI.aicamera.stored.len == 0)
to_chat(usr, "<span class='boldannounce'>No images saved</span>")
return
var/datum/picture/selection = tempAI.aicamera.selectpicture(usr)
var/obj/item/photo/photo = new(loc, selection)
photo.pixel_x = rand(-10, 10)
photo.pixel_y = rand(-10, 10)
toner -= 5 //AI prints color pictures only, thus they can do it more efficiently
busy = TRUE
addtimer(CALLBACK(src, .proc/reset_busy), 1.5 SECONDS)
updateUsrDialog()
else if(href_list["colortoggle"])
if(greytoggle == "Greyscale")
greytoggle = "Color"
else
greytoggle = "Greyscale"
updateUsrDialog()
/obj/machinery/photocopier/proc/reset_busy()
busy = FALSE
updateUsrDialog()
/obj/machinery/photocopier/proc/do_insertion(obj/item/O, mob/user)
O.forceMove(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.forceMove(user.loc)
user.put_in_hands(O)
else
O.forceMove(drop_location())
to_chat(user, "<span class='notice'>You take [O] out of [src].</span>")
/obj/machinery/photocopier/attackby(obj/item/O, mob/user, params)
if(default_unfasten_wrench(user, O))
return
else if(istype(O, /obj/item/paper))
if(copier_empty())
if(istype(O, /obj/item/paper/contract/infernal))
to_chat(user, "<span class='warning'>[src] smokes, smelling of brimstone!</span>")
resistance_flags |= FLAMMABLE
fire_act()
else
if(!user.temporarilyRemoveItemFromInventory(O))
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/photo))
if(copier_empty())
if(!user.temporarilyRemoveItemFromInventory(O))
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.temporarilyRemoveItemFromInventory(O))
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/toner))
if(toner <= 0)
if(!user.temporarilyRemoveItemFromInventory(O))
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/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(. && 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(target) || !user.canUseTopic(src, BE_CLOSE) || target == ass || copier_blocked())
return
src.add_fingerprint(user)
if(target == user)
user.visible_message("<span class='notice'>[user] starts climbing onto the photocopier!</span>", "<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("<span class='notice'>[user] climbs onto the photocopier!</span>", "<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.forceMove(drop_location())
ass = target
if(photocopy)
photocopy.forceMove(drop_location())
visible_message("<span class='warning'>[photocopy] is shoved out of the way by [ass]!</span>")
photocopy = null
else if(copy)
copy.forceMove(drop_location())
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(ITEM_SLOT_ICLOTHING) && !ass.get_item_by_slot(ITEM_SLOT_OCLOTHING))
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/toner
name = "toner cartridge"
icon = 'icons/obj/device.dmi'
icon_state = "tonercartridge"
grind_results = list(/datum/reagent/iodine = 40, /datum/reagent/iron = 10)
var/charges = 5
var/max_charges = 5
/obj/item/toner/large
name = "large toner cartridge"
grind_results = list(/datum/reagent/iodine = 90, /datum/reagent/iron = 10)
charges = 15
max_charges = 15
/obj/item/toner/extreme
name = "extremely large toner cartridge"
desc = "Why would ANYONE need THIS MUCH TONER?"
charges = 200
max_charges = 200
+90 -90
View File
@@ -1,90 +1,90 @@
/obj/item/stamp
name = "\improper GRANTED rubber stamp"
desc = "A rubber stamp for stamping important documents."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "stamp-ok"
inhand_icon_state = "stamp"
throwforce = 0
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
throw_range = 7
custom_materials = list(/datum/material/iron=60)
pressure_resistance = 2
attack_verb = list("stamped")
/obj/item/stamp/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] stamps 'VOID' on [user.p_their()] forehead, then promptly falls over, dead.</span>")
return (OXYLOSS)
/obj/item/stamp/qm
name = "quartermaster's rubber stamp"
icon_state = "stamp-qm"
dye_color = DYE_QM
/obj/item/stamp/law
name = "law office's rubber stamp"
icon_state = "stamp-law"
dye_color = DYE_LAW
/obj/item/stamp/captain
name = "captain's rubber stamp"
icon_state = "stamp-cap"
dye_color = DYE_CAPTAIN
/obj/item/stamp/hop
name = "head of personnel's rubber stamp"
icon_state = "stamp-hop"
dye_color = DYE_HOP
/obj/item/stamp/hos
name = "head of security's rubber stamp"
icon_state = "stamp-hos"
dye_color = DYE_HOS
/obj/item/stamp/ce
name = "chief engineer's rubber stamp"
icon_state = "stamp-ce"
dye_color = DYE_CE
/obj/item/stamp/rd
name = "research director's rubber stamp"
icon_state = "stamp-rd"
dye_color = DYE_RD
/obj/item/stamp/cmo
name = "chief medical officer's rubber stamp"
icon_state = "stamp-cmo"
dye_color = DYE_CMO
/obj/item/stamp/denied
name = "\improper DENIED rubber stamp"
icon_state = "stamp-deny"
dye_color = DYE_REDCOAT
/obj/item/stamp/clown
name = "clown's rubber stamp"
icon_state = "stamp-clown"
dye_color = DYE_CLOWN
/obj/item/stamp/mime
name = "mime's rubber stamp"
icon_state = "stamp-mime"
dye_color = DYE_MIME
/obj/item/stamp/chap
name = "chaplain's rubber stamp"
icon_state = "stamp-chap"
dye_color = DYE_CHAP
/obj/item/stamp/centcom
name = "CentCom rubber stamp"
icon_state = "stamp-centcom"
dye_color = DYE_CENTCOM
/obj/item/stamp/syndicate
name = "Syndicate rubber stamp"
icon_state = "stamp-syndicate"
dye_color = DYE_SYNDICATE
/obj/item/stamp/attack_paw(mob/user)
return attack_hand(user)
/obj/item/stamp
name = "\improper GRANTED rubber stamp"
desc = "A rubber stamp for stamping important documents."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "stamp-ok"
inhand_icon_state = "stamp"
throwforce = 0
w_class = WEIGHT_CLASS_TINY
throw_speed = 3
throw_range = 7
custom_materials = list(/datum/material/iron=60)
pressure_resistance = 2
attack_verb = list("stamped")
/obj/item/stamp/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] stamps 'VOID' on [user.p_their()] forehead, then promptly falls over, dead.</span>")
return (OXYLOSS)
/obj/item/stamp/qm
name = "quartermaster's rubber stamp"
icon_state = "stamp-qm"
dye_color = DYE_QM
/obj/item/stamp/law
name = "law office's rubber stamp"
icon_state = "stamp-law"
dye_color = DYE_LAW
/obj/item/stamp/captain
name = "captain's rubber stamp"
icon_state = "stamp-cap"
dye_color = DYE_CAPTAIN
/obj/item/stamp/hop
name = "head of personnel's rubber stamp"
icon_state = "stamp-hop"
dye_color = DYE_HOP
/obj/item/stamp/hos
name = "head of security's rubber stamp"
icon_state = "stamp-hos"
dye_color = DYE_HOS
/obj/item/stamp/ce
name = "chief engineer's rubber stamp"
icon_state = "stamp-ce"
dye_color = DYE_CE
/obj/item/stamp/rd
name = "research director's rubber stamp"
icon_state = "stamp-rd"
dye_color = DYE_RD
/obj/item/stamp/cmo
name = "chief medical officer's rubber stamp"
icon_state = "stamp-cmo"
dye_color = DYE_CMO
/obj/item/stamp/denied
name = "\improper DENIED rubber stamp"
icon_state = "stamp-deny"
dye_color = DYE_REDCOAT
/obj/item/stamp/clown
name = "clown's rubber stamp"
icon_state = "stamp-clown"
dye_color = DYE_CLOWN
/obj/item/stamp/mime
name = "mime's rubber stamp"
icon_state = "stamp-mime"
dye_color = DYE_MIME
/obj/item/stamp/chap
name = "chaplain's rubber stamp"
icon_state = "stamp-chap"
dye_color = DYE_CHAP
/obj/item/stamp/centcom
name = "CentCom rubber stamp"
icon_state = "stamp-centcom"
dye_color = DYE_CENTCOM
/obj/item/stamp/syndicate
name = "Syndicate rubber stamp"
icon_state = "stamp-syndicate"
dye_color = DYE_SYNDICATE
/obj/item/stamp/attack_paw(mob/user)
return attack_hand(user)