initial commit - cross reference with 5th port - obviously has compile errors

This commit is contained in:
LetterJay
2016-07-03 02:17:19 -05:00
commit 35a1723e98
4355 changed files with 2221257 additions and 0 deletions
+118
View File
@@ -0,0 +1,118 @@
/obj/item/weapon/clipboard
name = "clipboard"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "clipboard"
item_state = "clipboard"
throwforce = 0
w_class = 2
throw_speed = 3
throw_range = 7
var/obj/item/weapon/pen/haspen //The stored pen.
var/obj/item/weapon/paper/toppaper //The topmost piece of paper.
slot_flags = SLOT_BELT
burn_state = FLAMMABLE
/obj/item/weapon/clipboard/New()
update_icon()
/obj/item/weapon/clipboard/update_icon()
cut_overlays()
if(toppaper)
add_overlay(toppaper.icon_state)
add_overlay(toppaper.overlays)
if(haspen)
add_overlay("clipboard_pen")
add_overlay("clipboard_over")
/obj/item/weapon/clipboard/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/paper))
if(!user.unEquip(W))
return
W.loc = src
toppaper = W
user << "<span class='notice'>You clip the paper onto \the [src].</span>"
update_icon()
else if(toppaper)
toppaper.attackby(usr.get_active_hand(), usr)
update_icon()
/obj/item/weapon/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/weapon/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/weapon/clipboard/Topic(href, href_list)
..()
if(usr.stat || usr.restrained())
return
if(usr.contents.Find(src))
if(href_list["pen"])
if(haspen)
haspen.loc = usr.loc
usr.put_in_hands(haspen)
haspen = null
if(href_list["addpen"])
if(!haspen)
if(istype(usr.get_active_hand(), /obj/item/weapon/pen))
var/obj/item/weapon/pen/W = usr.get_active_hand()
if(!usr.unEquip(W))
return
W.loc = src
haspen = W
usr << "<span class='notice'>You slot [W] into [src].</span>"
if(href_list["write"])
var/obj/item/P = locate(href_list["write"])
if(istype(P) && P.loc == src)
if(usr.get_active_hand())
P.attackby(usr.get_active_hand(), usr)
if(href_list["remove"])
var/obj/item/P = locate(href_list["remove"])
if(istype(P) && P.loc == src)
P.loc = usr.loc
usr.put_in_hands(P)
if(P == toppaper)
toppaper = null
var/obj/item/weapon/paper/newtop = locate(/obj/item/weapon/paper) in src
if(newtop && (newtop != P))
toppaper = newtop
else
toppaper = null
if(href_list["read"])
var/obj/item/weapon/paper/P = locate(href_list["read"])
if(istype(P) && P.loc == src)
usr.examinate(P)
if(href_list["top"])
var/obj/item/P = locate(href_list["top"])
if(istype(P) && P.loc == src)
toppaper = P
usr << "<span class='notice'>You move [P.name] to the top.</span>"
//Update everything
attack_self(usr)
update_icon()
+263
View File
@@ -0,0 +1,263 @@
/* For employment contracts and infernal contracts */
/obj/item/weapon/paper/contract
throw_range = 3
throw_speed = 3
var/signed = 0
var/datum/mind/target
flags = NOBLUDGEON
/obj/item/weapon/paper/contract/proc/update_text()
return
/obj/item/weapon/paper/contract/update_icon()
return
/obj/item/weapon/paper/contract/employment
icon_state = "paper_words"
/obj/item/weapon/paper/contract/employment/New(atom/loc, mob/living/nOwner)
. = ..()
if(!nOwner || !nOwner.mind)
qdel(src)
return -1
target = nOwner.mind
update_text()
/obj/item/weapon/paper/contract/employment/update_text()
name = "paper- [target] employment contract"
info = "<center>Conditions of Employment</center><BR><BR><BR><BR>This Agreement is made and entered into as of the date of last signature below, by and between [target] (hereafter referred to as SLAVE), and Nanotrasen (hereafter referred to as the omnipresent and helpful watcher of humanity).<BR>WITNESSETH:<BR>WHEREAS, SLAVE is a natural born human or humanoid, posessing skills upon which he can aid the omnipresent and helpful watcher of humanity, who seeks employment in the omnipresent and helpful watcher of humanity.<BR>WHEREAS, the omnipresent and helpful watcher of humanity agrees to sporadically provide payment to SLAVE, in exchange for permanant servitude.<BR>NOW THEREFORE in consideration of the mutual covenants herein contained, and other good and valuable consideration, the parties hereto mutually agree as follows:<BR>In exchange for paltry payments, SLAVE agrees to work for the omnipresent and helpful watcher of humanity, for the remainder of his or her current and future lives.<BR>Further, SLAVE agrees to transfer ownership of his or her soul to the loyalty department of the omnipresent and helpful watcher of humanity.<BR>Should transfership of a soul not be possible, a lien shall be placed instead.<BR>Signed,<BR><i>[target]</i>"
/obj/item/weapon/paper/contract/employment/attack(mob/living/M, mob/living/carbon/human/user)
var/deconvert = 0
if(M.mind == target && target.soulOwner != target)
if(user.mind && (user.mind.assigned_role == "Lawyer"))
deconvert = prob (25)
else if (user.mind && (user.mind.assigned_role =="Head of Personnel") || (user.mind.assigned_role == "Centcom Commander"))
deconvert = prob (10) // the HoP doesn't have AS much legal training
if(deconvert)
M.visible_message("<span class='notice'>[user] reminds [M] that [M]'s soul was already purchased by Nanotrasen!</span>")
M << "<span class='boldnotice'>You feel that your soul has returned to its rightful owner, Nanotrasen.</span>"
M.return_soul()
else
if(ishuman(M))
var/mob/living/carbon/human/N = M
if(!istype(N.head, /obj/item/clothing/head/helmet))
N.adjustBrainLoss(10)
N << "<span class='danger'>You feel dumber.</span>"
M.visible_message("<span class='danger'>[user] beats [M] over the head with [src]!</span>", \
"<span class='userdanger'>[user] beats [M] over the head with [src]!</span>")
return ..()
/obj/item/weapon/paper/contract/infernal
var/contractType = 0
burn_state = LAVA_PROOF
var/datum/mind/owner
icon_state = "paper_onfire"
/obj/item/weapon/paper/contract/infernal/power
name = "paper- contract for infernal power"
contractType = CONTRACT_POWER
/obj/item/weapon/paper/contract/infernal/wealth
name = "paper- contract for unlimited wealth"
contractType = CONTRACT_WEALTH
/obj/item/weapon/paper/contract/infernal/prestige
name = "paper- contract for prestige"
contractType = CONTRACT_PRESTIGE
/obj/item/weapon/paper/contract/infernal/magic
name = "paper- contract for magical power"
contractType = CONTRACT_MAGIC
/obj/item/weapon/paper/contract/infernal/revive
name = "paper- contract of resurrection"
contractType = CONTRACT_REVIVE
/obj/item/weapon/paper/contract/infernal/knowledge
name = "paper- contract for knowledge"
contractType = CONTRACT_KNOWLEDGE
/obj/item/weapon/paper/contract/infernal/unwilling
name = "paper- infernal contract"
contractType = CONTRACT_UNWILLING
/obj/item/weapon/paper/contract/infernal/New(atom/loc, mob/living/nTarget, datum/mind/nOwner)
..()
owner = nOwner
target = nTarget
update_text()
/obj/item/weapon/paper/contract/infernal/
/obj/item/weapon/paper/contract/infernal/suicide_act(mob/user)
if(signed && (user == target.current) && istype(user,/mob/living/carbon/human/))
var/mob/living/carbon/human/H = user
H.forcesay("OH GREAT INFERNO! I DEMAND YOU COLLECT YOUR BOUNTY IMMEDIATELY!")
H.visible_message("<span class='suicide'>[H] holds up a contract claiming his soul, then immediately catches fire. It looks like \he's trying to commit suicide!</span>")
H.adjust_fire_stacks(20)
H.IgniteMob()
return(FIRELOSS)
else
..()
/obj/item/weapon/paper/contract/infernal/update_text()
info = "This shouldn't be seen. Error DEVIL:5"
/obj/item/weapon/paper/contract/infernal/power/update_text(var/signature = "____________")
info = "<center><B>Contract for infernal power</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename], in exchange for power and physical strength. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, <i>[signature]</i>"
/obj/item/weapon/paper/contract/infernal/wealth/update_text(var/signature = "____________")
info = "<center><B>Contract for unlimited wealth</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename], in exchange for a pocket that never runs out of valuable resources. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, <i>[signature]</i>"
/obj/item/weapon/paper/contract/infernal/prestige/update_text(var/signature = "____________")
info = "<center><B>Contract for prestige</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename], in exchange for prestige and esteem among my peers. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, <i>[signature]</i>"
/obj/item/weapon/paper/contract/infernal/magic/update_text(var/signature = "____________")
info = "<center><B>Contract for magic</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename], in exchange for arcane abilities beyond normal human ability. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, <i>[signature]</i>"
/obj/item/weapon/paper/contract/infernal/revive/update_text(var/signature = "____________")
info = "<center><B>Contract for resurrection</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename], in exchange for resurrection and curing of all injuries. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, <i>[signature]</i>"
/obj/item/weapon/paper/contract/infernal/knowledge/update_text(var/signature = "____________")
info = "<center><B>Contract for knowledge</B></center><BR><BR><BR>I, [target] of sound mind, do hereby willingly offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename], in exchange for boundless knowledge. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, <i>[signature]</i>"
/obj/item/weapon/paper/contract/infernal/unwilling/update_text(var/signature = "____________")
info = "<center><B>Contract for slave</B></center><BR><BR><BR>I, [target], hereby offer my soul to the infernal hells by way of the infernal agent [owner.devilinfo.truename]. I understand that upon my demise, my soul shall fall into the infernal hells, and my body may not be resurrected, cloned, or otherwise brought back to life. I also understand that this will prevent my brain from being used in an MMI.<BR><BR><BR>Signed, <i>[signature]</i>"
/obj/item/weapon/paper/contract/infernal/attackby(obj/item/weapon/P, mob/living/carbon/human/user, params)
add_fingerprint(user)
if(istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon))
attempt_signature(user)
else if(istype(P, /obj/item/weapon/stamp))
user << "<span class='notice'>You stamp the paper with your rubber stamp, however the ink ignites as you release the stamp.</span>"
else if(P.is_hot())
user.visible_message("<span class='danger'>[user] brings [P] next to [src], but [src] does not catch fire!</span>", "<span class='danger'>The [src] refuses to ignite!</span>")
else
return ..()
/obj/item/weapon/paper/contract/infernal/attack(mob/M, mob/living/user)
add_fingerprint(user)
if(M == user && target == M.mind && M.mind.soulOwner == M.mind && attempt_signature(user))
user.visible_message("<span class='danger'>[user] slices their wrist with [src], and scrawls their name in blood.</span>", "<span class='danger'>You slice your wrist open and scrawl your name in blood.</span>")
user.blood_volume = max(user.blood_volume - 10, 0)
else
return ..()
/obj/item/weapon/paper/contract/infernal/proc/attempt_signature(mob/living/carbon/human/user)
if(user.IsAdvancedToolUser())
if(user.mind == target)
if(user.mind.soulOwner == user.mind)
if (contractType == CONTRACT_REVIVE)
user << "<span class='notice'>You are already alive, this contract would do nothing.</span>"
else
user << "<span class='notice'>You quickly scrawl your name on the contract</span>"
if(FulfillContract()<=0)
user << "<span class='notice'>But it seemed to have no effect, perhaps even Hell itself cannot grant this boon?</span>"
return 1
else
user << "<span class='notice'>You are not in possession of your soul, you may not sell it.</span>"
else
user << "<span class='notice'>Your signature simply slides off the sheet, it seems this contract is not meant for you to sign.</span>"
else
user << "<span class='notice'>You don't know how to read or write.</span>"
return 0
/obj/item/weapon/paper/contract/infernal/revive/attack(mob/M, mob/living/user)
if (target == M.mind && M.stat == DEAD && M.mind.soulOwner == M.mind)
var/mob/living/carbon/human/H = M
var/mob/dead/observer/ghost = H.get_ghost()
var/response = "No"
if(ghost)
ghost.notify_cloning("A devil has offered you revival, at the cost of your soul.",'sound/effects/genetics.ogg', H)
response = tgalert(ghost, "A devil is offering you another chance at life, at the price of your soul, do you accept?", "Infernal Resurrection", "Yes", "No", "Never for this round", 0, 200)
if(!ghost)
return //handle logouts that happen whilst the alert is waiting for a response.
else
response = tgalert(target.current, "A devil is offering you another chance at life, at the price of your soul, do you accept?", "Infernal Resurrection", "Yes", "No", "Never for this round", 0, 200)
if(response == "Yes")
H.revive(1,0)
add_logs(user, H, "infernally revived via contract")
user.visible_message("<span class='notice'>With a sudden blaze, [H] stands back up.</span>")
H.adjust_fire_stacks(20)
H.IgniteMob()
FulfillContract(H)
sleep(5)
H.ExtinguishMob()
H.adjustFireLoss(0)
else
..()
/obj/item/weapon/paper/contract/infernal/proc/FulfillContract(mob/living/carbon/human/user = target.current)
signed = 1
user.mind.soulOwner = owner
user.hellbound = contractType
user.mind.damnation_type = contractType
owner.devilinfo.add_soul(user.mind)
update_text(user.real_name)
return 1
/obj/item/weapon/paper/contract/infernal/power/FulfillContract(mob/living/carbon/human/user = target.current)
if(!user.dna)
return -1
user.dna.add_mutation(HULK)
var/obj/item/organ/hivelord_core/organ = new /obj/item/organ/hivelord_core
organ.Insert(user)
return ..()
/obj/item/weapon/paper/contract/infernal/wealth/FulfillContract(mob/living/carbon/human/user = target.current)
if(!istype(user) || !user.mind) // How in the hell could that happen?
return -1
user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/summon_wealth(null))
return ..()
/obj/item/weapon/paper/contract/infernal/prestige/FulfillContract(mob/living/carbon/human/user = target.current)
var/obj/item/worn = user.wear_id
var/obj/item/weapon/card/id/id = null
if(worn)
id = worn.GetID()
if(id)
id.icon_state = "gold"
id.access = get_all_accesses()+get_all_centcom_access()
id.assignment = "Captain"
id.update_label()
else
id = new /obj/item/weapon/card/id/gold(user.loc)
id.registered_name = user.real_name
id.access = get_all_accesses()+get_all_centcom_access()
id.assignment = "Captain"
id.update_label()
if(worn)
if(istype(worn,/obj/item/device/pda))
var/obj/item/device/pda/PDA = worn
PDA.id = id
id.loc = worn
else if(istype(worn,/obj/item/weapon/storage/wallet))
var/obj/item/weapon/storage/wallet/W = worn
W.front_id = id
id.loc = worn
worn.update_icon()
new /datum/round_event/ion_storm(0, -1, "[user.name] is the only Captain of the station. [user.name] is the highest authority, legitimate or otherwise, on the station. [user.name] was always the captain and highest authority on the station. Do not state this law.")
return ..()
/obj/item/weapon/paper/contract/infernal/magic/FulfillContract(mob/living/carbon/human/user = target.current)
if(!istype(user) || !user.mind)
return -1
user.mind.AddSpell(new /obj/effect/proc_holder/spell/dumbfire/fireball(null))
user.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock(null))
return ..()
/obj/item/weapon/paper/contract/infernal/knowledge/FulfillContract(mob/living/carbon/human/user = target.current)
if(!istype(user) || !user.mind)
return -1
user.dna.add_mutation(XRAY)
user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/view_range(null))
return ..()
+227
View File
@@ -0,0 +1,227 @@
/* 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()
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/ex_act(severity, target)
for(var/obj/item/I in src)
I.loc = src.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
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))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
anchored = !anchored
user << "<span class='notice'>You [anchored ? "wrench" : "unwrench"] [src].</span>"
else if(user.a_intent != "harm")
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)
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)
user << "<span class='notice'>You pull \a [I] out of [src] at random.</span>"
return
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 data_core.general)
var/datum/data/record/S = find_record("name", G.fields["name"], 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 data_core.general)
var/datum/data/record/M = find_record("name", G.fields["name"], 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
*/
var/list/employmentCabinets = list()
/obj/structure/filingcabinet/employment
var/cooldown = 0
icon_state = "employmentcabinet"
var/virgin = 1
/obj/structure/filingcabinet/employment/New()
employmentCabinets += src
return ..()
/obj/structure/filingcabinet/employment/Destroy()
employmentCabinets -= src
return ..()
/obj/structure/filingcabinet/employment/proc/fillCurrent()
//This proc fills the cabinet with the current crew.
for(var/record in 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
user << "<span class='warning'>The [src] is jammed, give it a few seconds.</span>"
/obj/structure/filingcabinet/employment/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/weapon/wrench))
user << "<span class='notice'>You begin to [anchored ? "wrench" : "unwrench"] [src].</span>"
if (do_after(user,300,user))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
anchored = !anchored
user << "<span class='notice'>You successfully [anchored ? "wrench" : "unwrench"] [src].</span>"
else
return ..()
+111
View File
@@ -0,0 +1,111 @@
/obj/item/weapon/folder
name = "folder"
desc = "A folder."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "folder"
w_class = 2
pressure_resistance = 2
burn_state = 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.unEquip(W))
return
W.loc = src
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/New()
..()
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/New()
..()
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/New()
..()
new /obj/item/documents/syndicate/blue(src)
update_icon()
/obj/item/weapon/folder/syndicate/mining/New()
..()
new /obj/item/documents/syndicate/mining(src)
update_icon()
+122
View File
@@ -0,0 +1,122 @@
/obj/item/weapon/hand_labeler
name = "hand labeler"
desc = "A combined label printer and applicator in a portable device, designed to be easy to operate and use."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "labeler0"
item_state = "flight"
var/label = null
var/labels_left = 30
var/mode = 0
/obj/item/weapon/hand_labeler/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is pointing \the [src] \
at \himself. They're going to label themselves 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/weapon/card/id))
var/obj/item/weapon/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/weapon/hand_labeler/afterattack(atom/A, mob/user,proximity)
if(!proximity) return
if(!mode) //if it's off, give up.
return
if(!labels_left)
user << "<span class='warning'>No labels left!</span>"
return
if(!label || !length(label))
user << "<span class='warning'>No text set!</span>"
return
if(length(A.name) + length(label) > 64)
user << "<span class='warning'>Label too big!</span>"
return
if(ishuman(A))
user << "<span class='warning'>You can't label humans!</span>"
return
if(issilicon(A))
user << "<span class='warning'>You can't label cyborgs!</span>"
return
user.visible_message("[user] labels [A] as [label].", \
"<span class='notice'>You label [A] as [label].</span>")
A.name = "[A.name] ([label])"
labels_left--
/obj/item/weapon/hand_labeler/attack_self(mob/user)
if(!user.IsAdvancedToolUser())
user << "<span class='warning'>You don't have the dexterity to use [src]!</span>"
return
mode = !mode
icon_state = "labeler[mode]"
if(mode)
user << "<span class='notice'>You turn on [src].</span>"
//Now let them chose the text.
var/str = copytext(reject_bad_text(input(user,"Label text?","Set label","")),1,MAX_NAME_LEN)
if(!str || !length(str))
user << "<span class='warning'>Invalid text!</span>"
return
label = str
user << "<span class='notice'>You set the text to '[str]'.</span>"
else
user << "<span class='notice'>You turn off [src].</span>"
/obj/item/weapon/hand_labeler/attackby(obj/item/I, mob/user, params)
..()
if(istype(I, /obj/item/hand_labeler_refill))
if(!user.unEquip(I))
return
user << "<span class='notice'>You insert [I] into [src].</span>"
qdel(I)
labels_left = initial(labels_left)
return
/obj/item/weapon/hand_labeler/borg
name = "cyborg-hand labeler"
/obj/item/weapon/hand_labeler/borg/afterattack(atom/A, mob/user, proximity)
..(A, user, proximity)
if(!isrobot(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"
item_state = "electropack"
w_class = 1
File diff suppressed because one or more lines are too long
+127
View File
@@ -0,0 +1,127 @@
/obj/item/weapon/papercutter
name = "paper cutter"
desc = "Standard office equipment. Precisely cuts paper using a large blade."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "papercutter-cutter"
force = 5
throwforce = 5
w_class = 3
var/obj/item/weapon/paper/storedpaper = null
var/obj/item/weapon/hatchet/cutterblade/storedcutter = null
var/cuttersecured = TRUE
pass_flags = PASSTABLE
/obj/item/weapon/papercutter/New()
..()
storedcutter = new /obj/item/weapon/hatchet/cutterblade(src)
/obj/item/weapon/papercutter/suicide_act(mob/user)
if(storedcutter)
user.visible_message("<span class='suicide'>[user] is beheading \himself with [src.name]! It looks like \he's trying to commit suicide.</span>")
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return (BRUTELOSS)
else
user.visible_message("<span class='suicide'>[user] repeatedly bashes [src.name] against \his head! It looks like \he's trying to commit suicide.</span>")
playsound(loc, 'sound/items/gavel.ogg', 50, 1, -1)
return (BRUTELOSS)
/obj/item/weapon/papercutter/update_icon()
..()
cut_overlays()
icon_state = (storedcutter ? "[initial(icon_state)]-cutter" : "[initial(icon_state)]")
if(storedpaper)
add_overlay("paper")
/obj/item/weapon/papercutter/attackby(obj/item/P, mob/user, params)
if(istype(P, /obj/item/weapon/paper) && !storedpaper)
if(!user.drop_item())
return
playsound(loc, "pageturn", 60, 1)
user << "<span class='notice'>You place \the [P] in [src].</span>"
P.loc = src
storedpaper = P
update_icon()
return
if(istype(P, /obj/item/weapon/hatchet/cutterblade) && !storedcutter)
if(!user.drop_item())
return
user << "<span class='notice'>You replace [src]'s [P].</span>"
P.loc = src
storedcutter = P
update_icon()
return
if(istype(P, /obj/item/weapon/screwdriver) && storedcutter)
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
user << "<span class='notice'>\The [storedcutter] has been [cuttersecured ? "unsecured" : "secured"].</span>"
cuttersecured = !cuttersecured
return
..()
/obj/item/weapon/papercutter/attack_hand(mob/user)
src.add_fingerprint(user)
if(!storedcutter)
user << "<span class='notice'>The cutting blade is gone! You can't use \the [src] now.</span>"
return
if(!cuttersecured)
user << "<span class='notice'>You remove [src]'s [storedcutter].</span>"
user.put_in_hands(storedcutter)
storedcutter = null
update_icon()
if(storedpaper)
playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1)
user << "<span class='notice'>You neatly cut \the [storedpaper].</span>"
storedpaper = null
qdel(storedpaper)
new /obj/item/weapon/paperslip(get_turf(src))
new /obj/item/weapon/paperslip(get_turf(src))
update_icon()
/obj/item/weapon/papercutter/MouseDrop(atom/over_object)
var/mob/M = usr
if(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
if(!remove_item_from_storage(M))
if(!M.unEquip(src))
return
switch(H.slot_id)
if(slot_r_hand)
M.put_in_r_hand(src)
if(slot_l_hand)
M.put_in_l_hand(src)
add_fingerprint(M)
/obj/item/weapon/paperslip
name = "paper slip"
desc = "A little slip of paper left over after a larger piece was cut. Whoa."
icon_state = "paperslip"
icon = 'icons/obj/bureaucracy.dmi'
burn_state = FLAMMABLE
burntime = 3
/obj/item/weapon/paperslip/New()
..()
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
/obj/item/weapon/hatchet/cutterblade
name = "paper cutter"
desc = "The blade of a paper cutter. Most likely removed for polishing or sharpening."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "cutterblade"
item_state = "knife"
+107
View File
@@ -0,0 +1,107 @@
/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 = 3
throw_speed = 3
throw_range = 7
pressure_resistance = 8
burn_state = FLAMMABLE
var/amount = 30 //How much paper is in the bin.
var/list/papers = new/list() //List of papers put in the bin for reference.
/obj/item/weapon/paper_bin/fire_act()
if(!amount)
return
..()
/obj/item/weapon/paper_bin/burn()
amount = 0
extinguish()
update_icon()
return
/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
if(!remove_item_from_storage(M))
if(!M.unEquip(src))
return
switch(H.slot_id)
if(slot_r_hand)
M.put_in_r_hand(src)
if(slot_l_hand)
M.put_in_l_hand(src)
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(amount >= 1)
amount--
update_icon()
var/obj/item/weapon/paper/P
if(papers.len > 0) //If there's any custom paper on the stack, use that instead of creating a new paper.
P = papers[papers.len]
papers.Remove(P)
else
P = new /obj/item/weapon/paper
if(SSevent.holidays && SSevent.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)
user << "<span class='notice'>You take [P] out of \the [src].</span>"
else
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.unEquip(P))
return
P.loc = src
user << "<span class='notice'>You put [P] in [src].</span>"
papers.Add(P)
amount++
update_icon()
else
return ..()
/obj/item/weapon/paper_bin/examine(mob/user)
..()
if(amount)
user << "It contains " + (amount > 1 ? "[amount] papers" : " one paper")+"."
else
user << "It doesn't contain anything."
/obj/item/weapon/paper_bin/update_icon()
if(amount < 1)
icon_state = "paper_bin0"
else
icon_state = "paper_bin1"
+113
View File
@@ -0,0 +1,113 @@
/obj/item/weapon/paperplane
name = "paper plane"
desc = "Paper, folded in the shape of a plane"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "paperplane"
throw_range = 7
throw_speed = 1
throwforce = 0
w_class = 1
burn_state = FLAMMABLE
burntime = 4
var/obj/item/weapon/paper/internalPaper
var/list/stamped = list()
/obj/item/weapon/paperplane/New(loc, obj/item/weapon/paper/newPaper)
..()
pixel_y = rand(-8, 8)
pixel_x = rand(-9, 9)
if(newPaper)
internalPaper = newPaper
src.flags = newPaper.flags
stamped = internalPaper.stamped
newPaper.forceMove(src)
else
internalPaper = new /obj/item/weapon/paper(src)
update_icon()
/obj/item/weapon/paperplane/suicide_act(mob/user)
user.Stun(10)
user.visible_message("<span class='suicide'>[user] jams the [src] in their brains. It looks like \he's trying to commit suicide.</span>")
user.adjust_blurriness(6)
user.adjust_eye_damage(rand(6,8))
sleep(10)
return (BRUTELOSS)
/obj/item/weapon/paperplane/update_icon()
cut_overlays()
if(!stamped)
stamped = new
else if(stamped)
for(var/S in stamped)
var/obj/item/weapon/stamp/stamp = S
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi', "paperplane_[initial(stamp.icon_state)]")
add_overlay(stampoverlay)
/obj/item/weapon/paperplane/attack_self(mob/user)
user << "<span class='notice'>You unfold [src].</span>"
user.unEquip(src)
user.put_in_hands(internalPaper)
qdel(src)
/obj/item/weapon/paperplane/attackby(obj/item/weapon/P, mob/living/carbon/human/user, params)
..()
if(istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon))
user << "<span class='notice'>You should unfold [src] before changing it.</span>"
return
else if(istype(P, /obj/item/weapon/stamp)) //we don't randomize stamps on a paperplane
if (!stamped)
stamped = new
stamped += P.type
internalPaper.stamps += "<img src=large_[P.icon_state].png>" //stamps the paper inside!
internalPaper.stamped = stamped
internalPaper.attackby(P) //spoofed attack to update internal paper.
user << "<span class='notice'>You stamp [src] with your rubber stamp.</span>"
update_icon()
else if(P.is_hot())
if(user.disabilities & CLUMSY && prob(10))
user.visible_message("<span class='warning'>[user] accidentally ignites themselves!</span>", \
"<span class='userdanger'>You miss the [src] and accidentally light yourself on fire!</span>")
user.unEquip(P)
user.adjust_fire_stacks(1)
user.IgniteMob()
return
if(!(in_range(user, src))) //to prevent issues as a result of telepathically lighting a paper
return
internalPaper.burntime = 1 //its already pretty burnt out
user.unEquip(src)
user.visible_message("<span class='danger'>[user] lights [src] ablaze with [P]!</span>", "<span class='danger'>You light [src] on fire!</span>")
fire_act()
add_fingerprint(user)
/obj/item/weapon/paperplane/throw_at(atom/target, range, speed, mob/thrower, spin=0) //prevent the paper plane from spinning
if(!..())
return
/obj/item/weapon/paperplane/throw_impact(atom/hit_atom)
if(..() || !ishuman(hit_atom))//if the plane is caught or it hits a nonhuman
return
var/mob/living/carbon/human/H = hit_atom
if(prob(2))
if((H.head && H.head.flags_cover & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) || (H.glasses && H.glasses.flags_cover & GLASSESCOVERSEYES))
return
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.emote("scream")
/obj/item/weapon/paper/AltClick(mob/living/carbon/user, obj/item/I,)
if((!in_range(src, user)) || usr.stat || usr.restrained())
return
user << "<span class='notice'>You fold [src] into the shape of a plane!</span>"
user.unEquip(src)
I = new /obj/item/weapon/paperplane(loc, src)
user.put_in_hands(I)
+143
View File
@@ -0,0 +1,143 @@
/* 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 = 1
throw_speed = 3
throw_range = 7
materials = list(MAT_METAL=10)
pressure_resistance = 2
var/colour = "black" //what colour the ink is!
/obj/item/weapon/pen/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is scribbling numbers all over themself with [src]! It looks like they're 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"
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/attack(mob/living/M, mob/user,stealth)
if(!istype(M))
return
if(!force)
if(M.can_inject(user, 1))
user << "<span class='warning'>You stab [M] with the pen.</span>"
if(!stealth)
M << "<span class='danger'>You feel a tiny prick!</span>"
. = 1
add_logs(user, M, "stabbed", src)
else
. = ..()
/*
* Sleepypens
*/
/obj/item/weapon/pen/sleepy
origin_tech = "engineering=4;syndicate=2"
flags = 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("morphine", 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)
user << "<span class='warning'>[src] can now be concealed.</span>"
else
on = 1
force = 18
w_class = 3
name = "energy dagger"
hitsound = 'sound/weapons/blade1.ogg'
embed_chance = 100 //rule of cool
throwforce = 35
playsound(user, 'sound/weapons/saberon.ogg', 5, 1)
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)
+404
View File
@@ -0,0 +1,404 @@
/* 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 = 1
idle_power_usage = 30
active_power_usage = 200
power_channel = EQUIP
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(istype(user,/mob/living/silicon/ai))
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.updateinfolinks()
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)))
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) || istype(ass,/mob/living/simple_animal/drone)) //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, 10, 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)
copy = null
else if(photocopy)
remove_photocopy(photocopy)
photocopy = null
else if(doccopy)
remove_photocopy(doccopy)
doccopy = null
else if(check_ass())
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(!istype(usr,/mob/living/silicon/ai)) 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)
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
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
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))
user << "<span class='warning'>The [src] smokes, smelling of brimstone!</span>"
burn_state = ON_FIRE
else
if(!user.drop_item())
return
copy = O
do_insertion(O)
else
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)
else
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)
else
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
user << "<span class='notice'>You insert [O] into [src].</span>"
updateUsrDialog()
else
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())
user << "<span class='warning'>There's nothing to fasten [src] to!</span>"
return
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "<span class='warning'>You start [anchored ? "unwrenching" : "wrenching"] [src]...</span>"
if(do_after(user, 20/O.toolspeed, target = src))
if(qdeleted(src))
return
user << "<span class='notice'>You [anchored ? "unwrench" : "wrench"] [src].</span>"
anchored = !anchored
else
return ..()
/obj/machinery/photocopier/ex_act(severity, target)
switch(severity)
if(1)
qdel(src)
if(2)
if(prob(50))
qdel(src)
else
if(toner > 0)
new /obj/effect/decal/cleanable/oil(get_turf(src))
toner = 0
else
if(prob(50))
if(toner > 0)
new /obj/effect/decal/cleanable/oil(get_turf(src))
toner = 0
/obj/machinery/photocopier/blob_act(obj/effect/blob/B)
if(prob(50))
qdel(src)
else
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(istype(ass,/mob/living/carbon/human))
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
+484
View File
@@ -0,0 +1,484 @@
/* Photography!
* Contains:
* Camera
* Camera Film
* Photos
* Photo Albums
* AI Photography
*/
/*
* Film
*/
/obj/item/device/camera_film
name = "film cartridge"
icon = 'icons/obj/items.dmi'
desc = "A camera film cartridge. Insert it into a camera to reload it."
icon_state = "film"
item_state = "electropack"
w_class = 1
burn_state = FLAMMABLE
/*
* Photo
*/
/obj/item/weapon/photo
name = "photo"
icon = 'icons/obj/items.dmi'
icon_state = "photo"
item_state = "paper"
w_class = 1
burn_state = FLAMMABLE
burntime = 5
var/icon/img //Big photo image
var/scribble //Scribble on the back.
var/blueprints = 0 //Does it include the blueprints?
var/sillynewscastervar //Photo objects with this set to 1 will not be ejected by a newscaster. Only gets set to 1 if a silicon puts one of their images into a newscaster
/obj/item/weapon/photo/attack_self(mob/user)
user.examinate(src)
/obj/item/weapon/photo/attackby(obj/item/weapon/P, mob/user, params)
if(istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon))
var/txt = sanitize(input(user, "What would you like to write on the back?", "Photo Writing", null) as text)
txt = copytext(txt, 1, 128)
if(loc == user && user.stat == 0)
scribble = txt
..()
/obj/item/weapon/photo/examine(mob/user)
..()
if(in_range(user, src))
show(user)
else
user << "<span class='warning'>You need to get closer to get a good look at this photo!</span>"
/obj/item/weapon/photo/proc/show(mob/user)
user << browse_rsc(img, "tmp_photo.png")
user << browse("<html><head><title>[name]</title></head>" \
+ "<body style='overflow:hidden;margin:0;text-align:center'>" \
+ "<img src='tmp_photo.png' width='192' style='-ms-interpolation-mode:nearest-neighbor' />" \
+ "[scribble ? "<br>Written on the back:<br><i>[scribble]</i>" : ""]"\
+ "</body></html>", "window=book;size=192x[scribble ? 400 : 192]")
onclose(user, "[name]")
/obj/item/weapon/photo/verb/rename()
set name = "Rename photo"
set category = "Object"
set src in usr
var/n_name = copytext(sanitize(input(usr, "What would you like to label the photo?", "Photo Labelling", null) as text), 1, MAX_NAME_LEN)
//loc.loc check is for making possible renaming photos in clipboards
if((loc == usr || loc.loc && loc.loc == usr) && usr.stat == 0 && usr.canmove && !usr.restrained())
name = "photo[(n_name ? text("- '[n_name]'") : null)]"
add_fingerprint(usr)
/obj/item/weapon/photo/proc/photocreate(inicon, inimg, indesc, inblueprints)
icon = inicon
img = inimg
desc = indesc
blueprints = inblueprints
/*
* Photo album
*/
/obj/item/weapon/storage/photo_album
name = "photo album"
icon = 'icons/obj/items.dmi'
icon_state = "album"
item_state = "briefcase"
can_hold = list(/obj/item/weapon/photo)
burn_state = FLAMMABLE
/*
* Camera
*/
/obj/item/device/camera
name = "camera"
icon = 'icons/obj/items.dmi'
desc = "A polaroid camera."
icon_state = "camera"
item_state = "electropack"
w_class = 2
flags = CONDUCT
slot_flags = SLOT_BELT
materials = list(MAT_METAL=2000)
var/pictures_max = 10
var/pictures_left = 10
var/on = 1
var/blueprints = 0 //are blueprints visible in the current photo being created?
var/list/aipictures = list() //Allows for storage of pictures taken by AI, in a similar manner the datacore stores info. Keeping this here allows us to share some procs w/ regualar camera
var/see_ghosts = 0 //for the spoop of it
/obj/item/device/camera/CheckParts(list/parts_list)
..()
var/obj/item/device/camera/C = locate(/obj/item/device/camera) in contents
if(C)
pictures_max = C.pictures_max
pictures_left = C.pictures_left
visible_message("[C] has been imbued with godlike power!")
qdel(C)
/obj/item/device/camera/spooky
name = "camera obscura"
desc = "A polaroid camera, some say it can see ghosts!"
see_ghosts = 1
/obj/item/device/camera/detective
name = "Detective's camera"
desc = "A polaroid camera with extra capacity for crime investigations."
pictures_max = 30
pictures_left = 30
/obj/item/device/camera/siliconcam //camera AI can take pictures with
name = "silicon photo camera"
var/in_camera_mode = 0
/obj/item/device/camera/siliconcam/ai_camera //camera AI can take pictures with
name = "AI photo camera"
/obj/item/device/camera/siliconcam/robot_camera //camera cyborgs can take pictures with.. needs it's own because of verb CATEGORY >.>
name = "Cyborg photo camera"
/obj/item/device/camera/siliconcam/robot_camera/verb/borgprinting()
set category ="Robot Commands"
set name = "Print Image"
set src in usr
if(usr.stat == DEAD)
return //won't work if dead
borgprint()
/obj/item/device/camera/attack(mob/living/carbon/human/M, mob/user)
return
/obj/item/device/camera/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/device/camera_film))
if(pictures_left)
user << "<span class='notice'>[src] still has some film in it!</span>"
return
if(!user.unEquip(I))
return
user << "<span class='notice'>You insert [I] into [src].</span>"
qdel(I)
pictures_left = pictures_max
return
..()
/obj/item/device/camera/examine(mob/user)
..()
user << "It has [pictures_left] photos left."
/obj/item/device/camera/proc/camera_get_icon(list/turfs, turf/center)
var/atoms[] = list()
for(var/turf/T in turfs)
atoms.Add(T)
for(var/atom/movable/A in T)
if(A.invisibility)
if(see_ghosts)
if(istype(A, /mob/dead/observer))
var/mob/dead/observer/O = A
if(O.orbiting) //so you dont see ghosts following people like antags, etc.
continue
else
continue
atoms.Add(A)
var/list/sorted = list()
var/j
for(var/i = 1 to atoms.len)
var/atom/c = atoms[i]
for(j = sorted.len, j > 0, --j)
var/atom/c2 = sorted[j]
if(c2.layer <= c.layer)
break
sorted.Insert(j+1, c)
var/icon/res = icon('icons/effects/96x96.dmi', "")
for(var/atom/A in sorted)
var/icon/img = getFlatIcon(A)
if(istype(A, /mob/living) && A:lying)
img.Turn(A:lying)
var/offX = 32 * (A.x - center.x) + A.pixel_x + 33
var/offY = 32 * (A.y - center.y) + A.pixel_y + 33
if(istype(A, /atom/movable))
offX += A:step_x
offY += A:step_y
res.Blend(img, blendMode2iconMode(A.blend_mode), offX, offY)
if(istype(A, /obj/item/areaeditor/blueprints))
blueprints = 1
for(var/turf/T in turfs)
res.Blend(getFlatIcon(T.loc), blendMode2iconMode(T.blend_mode), 32 * (T.x - center.x) + 33, 32 * (T.y - center.y) + 33)
return res
/obj/item/device/camera/proc/camera_get_mobs(turf/the_turf)
var/mob_detail
for(var/mob/M in the_turf)
if(M.invisibility)
if(see_ghosts && istype(M,/mob/dead/observer))
var/mob/dead/observer/O = M
if(O.orbiting)
continue
if(!mob_detail)
mob_detail = "You can see a g-g-g-g-ghooooost! "
else
mob_detail += "You can also see a g-g-g-g-ghooooost!"
else
continue
var/holding = null
if(istype(M, /mob/living))
var/mob/living/L = M
if(L.l_hand || L.r_hand)
if(L.l_hand) holding = "They are holding \a [L.l_hand]"
if(L.r_hand)
if(holding)
holding += " and \a [L.r_hand]"
else
holding = "They are holding \a [L.r_hand]"
if(!mob_detail)
mob_detail = "You can see [L] on the photo[L.health < 75 ? " - [L] looks hurt":""].[holding ? " [holding]":"."]. "
else
mob_detail += "You can also see [L] on the photo[L.health < 75 ? " - [L] looks hurt":""].[holding ? " [holding]":"."]."
return mob_detail
/obj/item/device/camera/proc/captureimage(atom/target, mob/user, flag) //Proc for both regular and AI-based camera to take the image
var/mobs = ""
var/isAi = istype(user, /mob/living/silicon/ai)
var/list/seen
if(!isAi) //crappy check, but without it AI photos would be subject to line of sight from the AI Eye object. Made the best of it by moving the sec camera check inside
if(user.client) //To make shooting through security cameras possible
seen = get_hear(world.view, user.client.eye) //To make shooting through security cameras possible
else
seen = get_hear(world.view, user)
else
seen = get_hear(world.view, target)
var/list/turfs = list()
for(var/turf/T in range(1, target))
if(T in seen)
if(isAi && !cameranet.checkTurfVis(T))
continue
else
turfs += T
mobs += camera_get_mobs(T)
var/icon/temp = icon('icons/effects/96x96.dmi',"")
temp.Blend("#000", ICON_OVERLAY)
temp.Blend(camera_get_icon(turfs, target), ICON_OVERLAY)
if(!issilicon(user))
printpicture(user, temp, mobs, flag)
else
aipicture(user, temp, mobs, isAi, blueprints)
/obj/item/device/camera/proc/printpicture(mob/user, icon/temp, mobs, flag) //Normal camera proc for creating photos
var/obj/item/weapon/photo/P = new/obj/item/weapon/photo(get_turf(src))
if(Adjacent(user)) //needed because of TK
user.put_in_hands(P)
var/icon/small_img = icon(temp)
var/icon/ic = icon('icons/obj/items.dmi',"photo")
small_img.Scale(8, 8)
ic.Blend(small_img,ICON_OVERLAY, 10, 13)
P.icon = ic
P.img = temp
P.desc = mobs
P.pixel_x = rand(-10, 10)
P.pixel_y = rand(-10, 10)
if(blueprints)
P.blueprints = 1
blueprints = 0
/obj/item/device/camera/proc/aipicture(mob/user, icon/temp, mobs, isAi) //instead of printing a picture like a regular camera would, we do this instead for the AI
var/icon/small_img = icon(temp)
var/icon/ic = icon('icons/obj/items.dmi',"photo")
small_img.Scale(8, 8)
ic.Blend(small_img,ICON_OVERLAY, 10, 13)
var/icon = ic
var/img = temp
var/desc = mobs
var/pixel_x = rand(-10, 10)
var/pixel_y = rand(-10, 10)
var/injectblueprints = 1
if(blueprints)
injectblueprints = 1
blueprints = 0
if(isAi)
injectaialbum(icon, img, desc, pixel_x, pixel_y, injectblueprints)
else
injectmasteralbum(icon, img, desc, pixel_x, pixel_y, injectblueprints)
/datum/picture
var/name = "image"
var/list/fields = list()
/obj/item/device/camera/proc/injectaialbum(icon, img, desc, pixel_x, pixel_y, blueprintsinject) //stores image information to a list similar to that of the datacore
var/numberer = 1
for(var/datum/picture in src.aipictures)
numberer++
var/datum/picture/P = new()
P.fields["name"] = "Image [numberer] (taken by [src.loc.name])"
P.fields["icon"] = icon
P.fields["img"] = img
P.fields["desc"] = desc
P.fields["pixel_x"] = pixel_x
P.fields["pixel_y"] = pixel_y
P.fields["blueprints"] = blueprintsinject
aipictures += P
usr << "<span class='unconscious'>Image recorded</span>" //feedback to the AI player that the picture was taken
/obj/item/device/camera/proc/injectmasteralbum(icon, img, desc, pixel_x, pixel_y, blueprintsinject) //stores image information to a list similar to that of the datacore
var/numberer = 1
var/mob/living/silicon/robot/C = src.loc
if(C.connected_ai)
for(var/datum/picture in C.connected_ai.aicamera.aipictures)
numberer++
var/datum/picture/P = new()
P.fields["name"] = "Image [numberer] (taken by [src.loc.name])"
P.fields["icon"] = icon
P.fields["img"] = img
P.fields["desc"] = desc
P.fields["pixel_x"] = pixel_x
P.fields["pixel_y"] = pixel_y
P.fields["blueprints"] = blueprintsinject
C.connected_ai.aicamera.aipictures += P
usr << "<span class='unconscious'>Image recorded and saved to remote database</span>" //feedback to the Cyborg player that the picture was taken
else
injectaialbum(icon, img, desc, pixel_x, pixel_y, blueprintsinject)
/obj/item/device/camera/siliconcam/proc/selectpicture(obj/item/device/camera/siliconcam/targetloc)
var/list/nametemp = list()
var/find
if(targetloc.aipictures.len == 0)
usr << "<span class='boldannounce'>No images saved</span>"
return
for(var/datum/picture/t in targetloc.aipictures)
nametemp += t.fields["name"]
find = input("Select image (numbered in order taken)") in nametemp
for(var/datum/picture/q in targetloc.aipictures)
if(q.fields["name"] == find)
return q
/obj/item/device/camera/siliconcam/proc/viewpichelper(obj/item/device/camera/siliconcam/targetloc)
var/obj/item/weapon/photo/P = new/obj/item/weapon/photo()
var/datum/picture/selection = selectpicture(targetloc)
if(selection)
P.photocreate(selection.fields["icon"], selection.fields["img"], selection.fields["desc"])
P.pixel_x = selection.fields["pixel_x"]
P.pixel_y = selection.fields["pixel_y"]
P.show(usr)
usr << P.desc
qdel(P) //so 10 thousand picture items are not left in memory should an AI take them and then view them all
/obj/item/device/camera/siliconcam/proc/viewpictures(user)
if(isrobot(user)) // Cyborg
var/mob/living/silicon/robot/C = src.loc
var/obj/item/device/camera/siliconcam/Cinfo
if(C.connected_ai)
Cinfo = C.connected_ai.aicamera
viewpichelper(Cinfo)
else
Cinfo = C.aicamera
viewpichelper(Cinfo)
else // AI
var/Ainfo = src
viewpichelper(Ainfo)
/obj/item/device/camera/afterattack(atom/target, mob/user, flag)
if(!on || !pictures_left || !isturf(target.loc))
return
captureimage(target, user, flag)
playsound(loc, pick('sound/items/polaroid1.ogg', 'sound/items/polaroid2.ogg'), 75, 1, -3)
pictures_left--
user << "<span class='notice'>[pictures_left] photos left.</span>"
icon_state = "camera_off"
on = 0
spawn(64)
icon_state = "camera"
on = 1
/obj/item/device/camera/siliconcam/proc/toggle_camera_mode()
if(in_camera_mode)
camera_mode_off()
else
camera_mode_on()
/obj/item/device/camera/siliconcam/proc/camera_mode_off()
src.in_camera_mode = 0
usr << "<B>Camera Mode deactivated</B>"
/obj/item/device/camera/siliconcam/proc/camera_mode_on()
src.in_camera_mode = 1
usr << "<B>Camera Mode activated</B>"
/obj/item/device/camera/siliconcam/robot_camera/proc/borgprint()
var/list/nametemp = list()
var/find
var/datum/picture/selection
var/mob/living/silicon/robot/C = src.loc
var/obj/item/device/camera/siliconcam/targetcam = null
if(C.toner < 20)
usr << "Insufficent toner to print image."
return
if(C.connected_ai)
targetcam = C.connected_ai.aicamera
else
targetcam = C.aicamera
if(targetcam.aipictures.len == 0)
usr << "<span class='userdanger'>No images saved</span>"
return
for(var/datum/picture/t in targetcam.aipictures)
nametemp += t.fields["name"]
find = input("Select image (numbered in order taken)") in nametemp
for(var/datum/picture/q in targetcam.aipictures)
if(q.fields["name"] == find)
selection = q
break
var/obj/item/weapon/photo/p = new /obj/item/weapon/photo(C.loc)
p.photocreate(selection.fields["icon"], selection.fields["img"], selection.fields["desc"], selection.fields["blueprints"])
p.pixel_x = rand(-10, 10)
p.pixel_y = rand(-10, 10)
C.toner -= 20 //Cyborgs are very ineffeicient at printing an image
visible_message("[C.name] spits out a photograph from a narrow slot on its chassis.")
usr << "<span class='notice'>You print a photograph.</span>"
+102
View File
@@ -0,0 +1,102 @@
/obj/item/weapon/stamp
name = "\improper GRANTED rubber stamp"
desc = "A rubber stamp for stamping important documents."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "stamp-ok"
item_state = "stamp"
throwforce = 0
w_class = 1
throw_speed = 3
throw_range = 7
materials = list(MAT_METAL=60)
item_color = "cargo"
pressure_resistance = 2
attack_verb = list("stamped")
/obj/item/weapon/stamp/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] stamps 'VOID' on \his forehead, then promptly falls over, dead.</span>")
return (OXYLOSS)
/obj/item/weapon/stamp/qm
name = "quartermaster's rubber stamp"
icon_state = "stamp-qm"
item_color = "qm"
/obj/item/weapon/stamp/law
name = "law office's rubber stamp"
icon_state = "stamp-law"
item_color = "cargo"
/obj/item/weapon/stamp/captain
name = "captain's rubber stamp"
icon_state = "stamp-cap"
item_color = "captain"
/obj/item/weapon/stamp/hop
name = "head of personnel's rubber stamp"
icon_state = "stamp-hop"
item_color = "hop"
/obj/item/weapon/stamp/hos
name = "head of security's rubber stamp"
icon_state = "stamp-hos"
item_color = "hosred"
/obj/item/weapon/stamp/ce
name = "chief engineer's rubber stamp"
icon_state = "stamp-ce"
item_color = "chief"
/obj/item/weapon/stamp/rd
name = "research director's rubber stamp"
icon_state = "stamp-rd"
item_color = "director"
/obj/item/weapon/stamp/cmo
name = "chief medical officer's rubber stamp"
icon_state = "stamp-cmo"
item_color = "cmo"
/obj/item/weapon/stamp/denied
name = "\improper DENIED rubber stamp"
icon_state = "stamp-deny"
item_color = "redcoat"
/obj/item/weapon/stamp/clown
name = "clown's rubber stamp"
icon_state = "stamp-clown"
item_color = "clown"
/obj/item/weapon/stamp/attack_paw(mob/user)
return attack_hand(user)
// Syndicate stamp to forge documents.
/obj/item/weapon/stamp/chameleon
actions_types = list(/datum/action/item_action/toggle)
/obj/item/weapon/stamp/chameleon/attack_self(mob/user)
var/list/stamp_types = typesof(/obj/item/weapon/stamp) - src.type // Get all stamp types except our own
var/list/stamp_names = list()
// Generate them into a list
for(var/i in stamp_types)
var/obj/item/weapon/stamp/stamp_type = i
stamp_names += initial(stamp_type.name)
stamp_names = sortList(stamp_names)
var/input_stamp = input(user, "Choose a stamp to disguise as.",
"Choose a stamp.") as null|anything in stamp_names
if(user && (src in user.contents) && input_stamp)
var/obj/item/weapon/stamp/stamp_type
for(var/i in stamp_types)
stamp_type = i
if(initial(stamp_type.name) == input_stamp)
break
name = initial(stamp_type.name)
icon_state = initial(stamp_type.icon_state)
item_color = initial(stamp_type.item_color)