mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Merge remote-tracking branch 'bay12-upstream/master' into development
This commit is contained in:
@@ -1,50 +1,51 @@
|
||||
/obj/item/weapon/paper/carbon
|
||||
name = "paper"
|
||||
icon_state = "paper_stack"
|
||||
item_state = "paper"
|
||||
var copied = 0
|
||||
var iscopy = 0
|
||||
|
||||
|
||||
/obj/item/weapon/paper/carbon/update_icon()
|
||||
if(iscopy)
|
||||
if(info)
|
||||
icon_state = "cpaper_words"
|
||||
return
|
||||
icon_state = "cpaper"
|
||||
else if (copied)
|
||||
if(info)
|
||||
icon_state = "paper_words"
|
||||
return
|
||||
icon_state = "paper"
|
||||
else
|
||||
if(info)
|
||||
icon_state = "paper_stack_words"
|
||||
return
|
||||
icon_state = "paper_stack"
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/paper/carbon/verb/removecopy()
|
||||
set name = "Remove carbon-copy"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if (copied == 0)
|
||||
var/obj/item/weapon/paper/carbon/c = src
|
||||
var/copycontents = html_decode(c.info)
|
||||
var/obj/item/weapon/paper/carbon/copy = new /obj/item/weapon/paper/carbon (usr.loc)
|
||||
copycontents = replacetext(copycontents, "<font face=\"[c.deffont]\" color=", "<font face=\"[c.deffont]\" nocolor=") //state of the art techniques in action
|
||||
copycontents = replacetext(copycontents, "<font face=\"[c.crayonfont]\" color=", "<font face=\"[c.crayonfont]\" nocolor=") //This basically just breaks the existing color tag, which we need to do because the innermost tag takes priority.
|
||||
copy.info += copycontents
|
||||
copy.info += "</font>"
|
||||
copy.name = "Copy - " + c.name
|
||||
copy.fields = c.fields
|
||||
copy.updateinfolinks()
|
||||
usr << "<span class='notice'>You tear off the carbon-copy!</span>"
|
||||
c.copied = 1
|
||||
copy.iscopy = 1
|
||||
copy.update_icon()
|
||||
c.update_icon()
|
||||
else
|
||||
/obj/item/weapon/paper/carbon
|
||||
name = "paper"
|
||||
icon_state = "paper_stack"
|
||||
item_state = "paper"
|
||||
var copied = 0
|
||||
var iscopy = 0
|
||||
|
||||
|
||||
/obj/item/weapon/paper/carbon/update_icon()
|
||||
if(iscopy)
|
||||
if(info)
|
||||
icon_state = "cpaper_words"
|
||||
return
|
||||
icon_state = "cpaper"
|
||||
else if (copied)
|
||||
if(info)
|
||||
icon_state = "paper_words"
|
||||
return
|
||||
icon_state = "paper"
|
||||
else
|
||||
if(info)
|
||||
icon_state = "paper_stack_words"
|
||||
return
|
||||
icon_state = "paper_stack"
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/paper/carbon/verb/removecopy()
|
||||
set name = "Remove carbon-copy"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if (copied == 0)
|
||||
var/obj/item/weapon/paper/carbon/c = src
|
||||
var/copycontents = html_decode(c.info)
|
||||
var/obj/item/weapon/paper/carbon/copy = new /obj/item/weapon/paper/carbon (usr.loc)
|
||||
// <font>
|
||||
copycontents = replacetext(copycontents, "<font face=\"[c.deffont]\" color=", "<font face=\"[c.deffont]\" nocolor=") //state of the art techniques in action
|
||||
copycontents = replacetext(copycontents, "<font face=\"[c.crayonfont]\" color=", "<font face=\"[c.crayonfont]\" nocolor=") //This basically just breaks the existing color tag, which we need to do because the innermost tag takes priority.
|
||||
copy.info += copycontents
|
||||
copy.info += "</font>"
|
||||
copy.name = "Copy - " + c.name
|
||||
copy.fields = c.fields
|
||||
copy.updateinfolinks()
|
||||
usr << "<span class='notice'>You tear off the carbon-copy!</span>"
|
||||
c.copied = 1
|
||||
copy.iscopy = 1
|
||||
copy.update_icon()
|
||||
c.update_icon()
|
||||
else
|
||||
usr << "There are no more carbon copies attached to this paper!"
|
||||
@@ -1,5 +1,5 @@
|
||||
var/list/obj/machinery/photocopier/faxmachine/allfaxes = list()
|
||||
var/list/admin_departments = list("Central Command", "Sol Government")
|
||||
var/list/admin_departments = list("[boss_name]", "Sol Government", "Supply")
|
||||
var/list/alldepartments = list()
|
||||
|
||||
var/list/arrived_faxes = list() //cache for faxes that have been sent to the admins
|
||||
@@ -10,7 +10,7 @@ var/list/sent_faxes = list() //cache for faxes that have been sent by the admins
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "fax"
|
||||
insert_anim = "faxsend"
|
||||
req_one_access = list(access_lawyer, access_heads, access_armory) //Warden needs to be able to Fax solgov too.
|
||||
req_one_access = list(access_lawyer, access_heads, access_armory, access_qm)
|
||||
|
||||
use_power = 1
|
||||
idle_power_usage = 30
|
||||
@@ -19,17 +19,15 @@ var/list/sent_faxes = list() //cache for faxes that have been sent by the admins
|
||||
var/obj/item/weapon/card/id/scan = null // identification
|
||||
var/authenticated = 0
|
||||
var/sendcooldown = 0 // to avoid spamming fax messages
|
||||
|
||||
var/department = "Unknown" // our department
|
||||
|
||||
var/destination = "Central Command" // the department we're sending to
|
||||
var/destination = null // the department we're sending to
|
||||
|
||||
var/list/obj/item/device/pda/alert_pdas = list() //A list of PDAs to alert upon arrival of the fax.
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/New()
|
||||
..()
|
||||
allfaxes += src
|
||||
|
||||
if(!destination) destination = "[boss_name]"
|
||||
if( !(("[department]" in alldepartments) || ("[department]" in admin_departments)) )
|
||||
alldepartments |= department
|
||||
|
||||
@@ -54,7 +52,7 @@ var/list/sent_faxes = list() //cache for faxes that have been sent by the admins
|
||||
dat += "<hr>"
|
||||
|
||||
if(authenticated)
|
||||
dat += "<b>Logged in to:</b> Central Command Quantum Entanglement Network<br><br>"
|
||||
dat += "<b>Logged in to:</b> [boss_name] Quantum Entanglement Network<br><br>"
|
||||
|
||||
if(copyitem)
|
||||
dat += "<a href='byond://?src=\ref[src];remove=1'>Remove Item</a><br><br>"
|
||||
@@ -128,8 +126,7 @@ var/list/sent_faxes = list() //cache for faxes that have been sent by the admins
|
||||
scan = null
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
usr.drop_item()
|
||||
if (istype(I, /obj/item/weapon/card/id) && usr.unEquip(I))
|
||||
I.loc = src
|
||||
scan = I
|
||||
authenticated = 0
|
||||
@@ -235,8 +232,8 @@ var/list/sent_faxes = list() //cache for faxes that have been sent by the admins
|
||||
|
||||
//message badmins that a fax has arrived
|
||||
switch(destination)
|
||||
if ("Central Command")
|
||||
message_admins(sender, "CENTCOMM FAX", rcvdcopy, "CentcommFaxReply", "#006100")
|
||||
if (boss_name)
|
||||
message_admins(sender, "[uppertext(boss_short)] FAX", rcvdcopy, "CentcommFaxReply", "#006100")
|
||||
if ("Sol Government")
|
||||
message_admins(sender, "SOL GOVERNMENT FAX", rcvdcopy, "CentcommFaxReply", "#1F66A0")
|
||||
//message_admins(sender, "SOL GOVERNMENT FAX", rcvdcopy, "SolGovFaxReply", "#1F66A0")
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
icon_state = "folder"
|
||||
w_class = 2
|
||||
pressure_resistance = 2
|
||||
|
||||
/obj/item/weapon/folder/blue
|
||||
desc = "A blue folder."
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
throw_range = 1
|
||||
throw_speed = 1
|
||||
layer = 4
|
||||
pressure_resistance = 1
|
||||
slot_flags = SLOT_HEAD
|
||||
body_parts_covered = HEAD
|
||||
attack_verb = list("bapped")
|
||||
@@ -107,6 +106,15 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/paper/attack_self(mob/living/user as mob)
|
||||
if(user.a_intent == I_HURT)
|
||||
if(icon_state == "scrap")
|
||||
user.show_message("<span class='warning'>\The [src] is already crumpled.</span>")
|
||||
return
|
||||
//crumple dat paper
|
||||
info = stars(info,85)
|
||||
user.visible_message("\The [user] crumples \the [src] into a ball!")
|
||||
icon_state = "scrap"
|
||||
return
|
||||
user.examinate(src)
|
||||
if(rigged && (Holiday == "April Fool's Day"))
|
||||
if(spam_flag == 0)
|
||||
@@ -268,12 +276,13 @@
|
||||
|
||||
t = "<font face=\"[crayonfont]\" color=[P ? P.colour : "black"]><b>[t]</b></font>"
|
||||
|
||||
|
||||
// t = replacetext(t, "#", "") // Junk converted to nothing!
|
||||
|
||||
//Count the fields
|
||||
var/laststart = 1
|
||||
while(1)
|
||||
var/i = findtext(t, "<span class=\"paper_field\">", laststart)
|
||||
var/i = findtext(t, "<span class=\"paper_field\">", laststart) //</span>
|
||||
if(i==0)
|
||||
break
|
||||
laststart = i+1
|
||||
@@ -281,8 +290,8 @@
|
||||
|
||||
return t
|
||||
|
||||
/obj/item/weapon/paper/proc/burnpaper(obj/item/weapon/P, mob/user)
|
||||
var/class = "<span class='warning'>"
|
||||
/obj/item/weapon/paper/proc/burnpaper(obj/item/weapon/flame/P, mob/user)
|
||||
var/class = "warning"
|
||||
|
||||
if (!user.restrained())
|
||||
if (istype(P, /obj/item/weapon/flame))
|
||||
@@ -300,16 +309,16 @@
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/weapon/flame/lighter/zippo))
|
||||
class = "<span class='rose'>"
|
||||
class = "rose"
|
||||
|
||||
user.visible_message("[class][user] holds \the [P] up to \the [src], it looks like \he's trying to burn it!", \
|
||||
"[class]You hold \the [P] up to \the [src], burning it slowly.")
|
||||
user.visible_message("<span class='[class]'>[user] holds \the [P] up to \the [src], it looks like \he's trying to burn it!</span>", \
|
||||
"<span class='[class]'>You hold \the [P] up to \the [src], burning it slowly.</span>")
|
||||
|
||||
//I was going to add do_after in here, but keeping the current method allows people to burn papers they're holding, while they move. That seems fine to keep -Nanako
|
||||
spawn(20)
|
||||
if(get_dist(src, user) < 2 && user.get_active_hand() == P)
|
||||
user.visible_message("[class][user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.", \
|
||||
"[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.")
|
||||
user.visible_message("<span class='[class]'>[user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.</span>", \
|
||||
"<span class='[class]'>You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.</span>")
|
||||
|
||||
if(user.get_inactive_hand() == src)
|
||||
user.drop_from_inventory(src)
|
||||
@@ -342,7 +351,16 @@
|
||||
var/obj/item/i = usr.get_active_hand() // Check to see if he still got that darn pen, also check if he's using a crayon or pen.
|
||||
var/iscrayon = 0
|
||||
if(!istype(i, /obj/item/weapon/pen))
|
||||
return
|
||||
if(usr.back && istype(usr.back,/obj/item/weapon/rig))
|
||||
var/obj/item/weapon/rig/r = usr.back
|
||||
var/obj/item/rig_module/device/pen/m = locate(/obj/item/rig_module/device/pen) in r.installed_modules
|
||||
if(!r.offline && m)
|
||||
i = m.device
|
||||
else
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
if(istype(i, /obj/item/weapon/pen/crayon))
|
||||
iscrayon = 1
|
||||
|
||||
@@ -448,6 +466,10 @@
|
||||
B.update_icon()
|
||||
|
||||
else if(istype(P, /obj/item/weapon/pen))
|
||||
if(icon_state == "scrap")
|
||||
usr << "<span class='warning'>\The [src] is too crumpled to write on.</span>"
|
||||
return
|
||||
|
||||
var/obj/item/weapon/pen/robopen/RP = P
|
||||
if ( istype(RP) && RP.mode == 2 )
|
||||
RP.RenamePaper(user,src)
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
throw_range = 2
|
||||
throw_speed = 1
|
||||
layer = 4
|
||||
pressure_resistance = 1
|
||||
attack_verb = list("bapped")
|
||||
var/page = 1 // current page
|
||||
var/list/pages = list() // Ordered list of pages as they are to be displayed. Can be different order than src.contents.
|
||||
@@ -67,23 +66,24 @@
|
||||
sheet.loc = src
|
||||
|
||||
pages.Insert(index, sheet)
|
||||
|
||||
if(index <= page)
|
||||
page++
|
||||
|
||||
/obj/item/weapon/paper_bundle/proc/burnpaper(obj/item/weapon/flame/P, mob/user)
|
||||
var/class = "<span class='warning'>"
|
||||
var/class = "warning"
|
||||
|
||||
if(P.lit && !user.restrained())
|
||||
if(istype(P, /obj/item/weapon/flame/lighter/zippo))
|
||||
class = "<span class='rose'>"
|
||||
class = "rose>"
|
||||
|
||||
user.visible_message("[class][user] holds \the [P] up to \the [src], it looks like \he's trying to burn it!", \
|
||||
"[class]You hold \the [P] up to \the [src], burning it slowly.")
|
||||
user.visible_message("<span class='[class]'>[user] holds \the [P] up to \the [src], it looks like \he's trying to burn it!</span>", \
|
||||
"<span class='[class]'>You hold \the [P] up to \the [src], burning it slowly.</span>")
|
||||
|
||||
spawn(20)
|
||||
if(get_dist(src, user) < 2 && user.get_active_hand() == P && P.lit)
|
||||
user.visible_message("[class][user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.", \
|
||||
"[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.")
|
||||
user.visible_message("<span class='[class]'>[user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.</span>", \
|
||||
"<span class='[class]'>You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.</span>")
|
||||
|
||||
if(user.get_inactive_hand() == src)
|
||||
user.drop_from_inventory(src)
|
||||
@@ -241,4 +241,4 @@
|
||||
if(photo)
|
||||
desc += "\nThere is a photo attached to it."
|
||||
overlays += image('icons/obj/bureaucracy.dmi', "clip")
|
||||
return
|
||||
return
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
w_class = 3
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
pressure_resistance = 10
|
||||
layer = OBJ_LAYER - 0.1
|
||||
var/amount = 30 //How much paper is in the bin.
|
||||
var/list/papers = new/list() //List of papers put in the bin for reference.
|
||||
@@ -17,13 +16,29 @@
|
||||
if((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr))))))
|
||||
if(!istype(usr, /mob/living/carbon/slime) && !istype(usr, /mob/living/simple_animal))
|
||||
if( !usr.get_active_hand() ) //if active hand is empty
|
||||
attack_hand(usr, 1, 1)
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
|
||||
|
||||
if (H.hand)
|
||||
temp = H.organs_by_name["l_hand"]
|
||||
if(temp && !temp.is_usable())
|
||||
user << "<span class='notice'>You try to move your [temp.name], but cannot!</span>"
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You pick up the [src].</span>"
|
||||
user.put_in_hands(src)
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/paper_bin/attack_hand(mob/user as mob)
|
||||
if(!user.can_use_hand())
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
|
||||
if (H.hand)
|
||||
temp = H.organs_by_name["l_hand"]
|
||||
if(temp && !temp.is_usable())
|
||||
user << "<span class='notice'>You try to move your [temp.name], but cannot!</span>"
|
||||
return
|
||||
var/response = ""
|
||||
if(!papers.len > 0)
|
||||
response = alert(user, "Do you take regular paper, or Carbon copy paper?", "Paper type request", "Regular", "Carbon-Copy", "Cancel")
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
/obj/machinery/papershredder
|
||||
name = "paper shredder"
|
||||
desc = "For those documents you don't want seen."
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
icon_state = "papershredder0"
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/max_paper = 10
|
||||
var/paperamount = 0
|
||||
var/list/shred_amounts = list(
|
||||
/obj/item/weapon/photo = 1,
|
||||
/obj/item/weapon/shreddedp = 1,
|
||||
/obj/item/weapon/paper = 1,
|
||||
/obj/item/weapon/newspaper = 3,
|
||||
/obj/item/weapon/card/id = 3,
|
||||
/obj/item/weapon/paper_bundle = 3,
|
||||
)
|
||||
|
||||
/obj/machinery/papershredder/attackby(var/obj/item/W, var/mob/user)
|
||||
|
||||
if(istype(W, /obj/item/weapon/storage))
|
||||
empty_bin(user, W)
|
||||
return
|
||||
else
|
||||
var/paper_result
|
||||
for(var/shred_type in shred_amounts)
|
||||
if(istype(W, shred_type))
|
||||
paper_result = shred_amounts[shred_type]
|
||||
if(paper_result)
|
||||
if(paperamount == max_paper)
|
||||
user << "<span class='warning'>\The [src] is full; please empty it before you continue.</span>"
|
||||
return
|
||||
paperamount += paper_result
|
||||
user.drop_from_inventory(W)
|
||||
qdel(W)
|
||||
playsound(src.loc, 'sound/items/pshred.ogg', 75, 1)
|
||||
if(paperamount > max_paper)
|
||||
user <<"<span class='danger'>\The [src] was too full, and shredded paper goes everywhere!</span>"
|
||||
for(var/i=(paperamount-max_paper);i>0;i--)
|
||||
var/obj/item/weapon/shreddedp/SP = get_shredded_paper()
|
||||
SP.loc = get_turf(src)
|
||||
SP.throw_at(get_edge_target_turf(src,pick(alldirs)),1,5)
|
||||
paperamount = max_paper
|
||||
update_icon()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/papershredder/verb/empty_contents()
|
||||
set name = "Empty bin"
|
||||
set category = "Object"
|
||||
set src in range(1)
|
||||
|
||||
if(usr.stat || usr.restrained() || usr.weakened || usr.paralysis || usr.lying || usr.stunned)
|
||||
return
|
||||
|
||||
if(!paperamount)
|
||||
usr << "<span class='notice'>\The [src] is empty.</span>"
|
||||
return
|
||||
|
||||
empty_bin(usr)
|
||||
|
||||
/obj/machinery/papershredder/proc/empty_bin(var/mob/living/user, var/obj/item/weapon/storage/empty_into)
|
||||
|
||||
// Sanity.
|
||||
if(empty_into && !istype(empty_into))
|
||||
empty_into = null
|
||||
|
||||
if(empty_into && empty_into.contents.len >= empty_into.storage_slots)
|
||||
user << "<span class='notice'>\The [empty_into] is full.</span>"
|
||||
return
|
||||
|
||||
while(paperamount)
|
||||
var/obj/item/weapon/shreddedp/SP = get_shredded_paper()
|
||||
if(!SP) break
|
||||
if(empty_into)
|
||||
empty_into.handle_item_insertion(SP)
|
||||
if(empty_into.contents.len >= empty_into.storage_slots)
|
||||
break
|
||||
if(empty_into)
|
||||
if(paperamount)
|
||||
user << "<span class='notice'>You fill \the [empty_into] with as much shredded paper as it will carry.</span>"
|
||||
else
|
||||
user << "<span class='notice'>You empty \the [src] into \the [empty_into].</span>"
|
||||
|
||||
else
|
||||
user << "<span class='notice'>You empty \the [src].</span>"
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/papershredder/proc/get_shredded_paper()
|
||||
if(!paperamount)
|
||||
return
|
||||
paperamount--
|
||||
return PoolOrNew(/obj/item/weapon/shreddedp, get_turf(src))
|
||||
|
||||
/obj/machinery/papershredder/update_icon()
|
||||
icon_state = "papershredder[max(0,min(5,Floor(paperamount/2)))]"
|
||||
|
||||
/obj/item/weapon/shreddedp/attackby(var/obj/item/W as obj, var/mob/user)
|
||||
if(istype(W, /obj/item/weapon/flame/lighter))
|
||||
burnpaper(W, user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/shreddedp/proc/burnpaper(var/obj/item/weapon/flame/lighter/P, var/mob/user)
|
||||
if(user.restrained())
|
||||
return
|
||||
if(!P.lit)
|
||||
user << "<span class='warning'>\The [P] is not lit.</span>"
|
||||
return
|
||||
user.visible_message("<span class='warning'>\The [user] holds \the [P] up to \the [src]. It looks like \he's trying to burn it!</span>", \
|
||||
"<span class='warning'>You hold \the [P] up to \the [src], burning it slowly.</span>")
|
||||
if(!do_after(user,20))
|
||||
user << "<span class='warning'>You must hold \the [P] steady to burn \the [src].</span>"
|
||||
return
|
||||
user.visible_message("<span class='danger'>\The [user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.</span>", \
|
||||
"<span class='danger'>You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.</span>")
|
||||
FireBurn()
|
||||
|
||||
/obj/item/weapon/shreddedp/proc/FireBurn()
|
||||
var/mob/living/M = loc
|
||||
if(istype(M))
|
||||
M.drop_from_inventory(src)
|
||||
PoolOrNew(/obj/effect/decal/cleanable/ash,get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/shreddedp
|
||||
name = "shredded paper"
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
icon_state = "shredp"
|
||||
throwforce = 0
|
||||
w_class = 1
|
||||
throw_range = 3
|
||||
throw_speed = 1
|
||||
|
||||
/obj/item/weapon/shreddedp/New()
|
||||
..()
|
||||
pixel_x = rand(-5,5)
|
||||
pixel_y = rand(-5,5)
|
||||
if(prob(65)) color = pick("#BABABA","#7F7F7F")
|
||||
@@ -22,7 +22,6 @@
|
||||
throw_range = 15
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 10)
|
||||
var/colour = "black" //what colour the ink is!
|
||||
pressure_resistance = 2
|
||||
|
||||
|
||||
/obj/item/weapon/pen/blue
|
||||
@@ -35,6 +34,24 @@
|
||||
icon_state = "pen_red"
|
||||
colour = "red"
|
||||
|
||||
/obj/item/weapon/pen/multi
|
||||
desc = "It's a pen with multiple colors of ink!"
|
||||
var/selectedColor = 1
|
||||
var/colors = list("black","blue","red")
|
||||
|
||||
/obj/item/weapon/pen/multi/attack_self(mob/user)
|
||||
if(++selectedColor > 3)
|
||||
selectedColor = 1
|
||||
|
||||
colour = colors[selectedColor]
|
||||
|
||||
if(colour == "black")
|
||||
icon_state = "pen"
|
||||
else
|
||||
icon_state = "pen_[colour]"
|
||||
|
||||
user << "<span class='notice'>Changed color to '[colour].'</span>"
|
||||
|
||||
/obj/item/weapon/pen/invisible
|
||||
desc = "It's an invisble pen marker."
|
||||
icon_state = "pen"
|
||||
@@ -58,6 +75,7 @@
|
||||
/obj/item/weapon/pen/reagent
|
||||
flags = OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
|
||||
|
||||
/obj/item/weapon/pen/reagent/New()
|
||||
..()
|
||||
@@ -82,7 +100,7 @@
|
||||
*/
|
||||
/obj/item/weapon/pen/reagent/sleepy
|
||||
desc = "It's a black ink pen with a sharp point and a carefully engraved \"Waffle Co.\""
|
||||
origin_tech = "materials=2;syndicate=5"
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
|
||||
|
||||
/obj/item/weapon/pen/reagent/sleepy/New()
|
||||
..()
|
||||
@@ -92,7 +110,7 @@
|
||||
/*
|
||||
* Parapens
|
||||
*/
|
||||
/obj/item/weapon/pen/reagent/paralysis
|
||||
/obj/item/weapon/pen/reagent/paralysis
|
||||
origin_tech = "materials=2;syndicate=5"
|
||||
|
||||
/obj/item/weapon/pen/reagent/paralysis/New()
|
||||
@@ -138,7 +156,7 @@
|
||||
if("Yellow")
|
||||
colour = COLOR_YELLOW
|
||||
if("Green")
|
||||
colour = COLOR_GREEN
|
||||
colour = COLOR_LIME
|
||||
if("Pink")
|
||||
colour = COLOR_PINK
|
||||
if("Blue")
|
||||
@@ -173,10 +191,6 @@
|
||||
var/instant = 0
|
||||
var/colourName = "red" //for updateIcon purposes
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "\red <b>[user] is jamming the [src.name] up \his nose and into \his brain. It looks like \he's trying to commit suicide.</b>"
|
||||
return (BRUTELOSS|OXYLOSS)
|
||||
|
||||
New()
|
||||
name = "[colourName] crayon"
|
||||
..()
|
||||
|
||||
@@ -146,15 +146,6 @@
|
||||
toner = 0
|
||||
return
|
||||
|
||||
/obj/machinery/photocopier/blob_act()
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
else
|
||||
if(toner > 0)
|
||||
new /obj/effect/decal/cleanable/blood/oil(get_turf(src))
|
||||
toner = 0
|
||||
return
|
||||
|
||||
/obj/machinery/photocopier/proc/copy(var/obj/item/weapon/paper/copy)
|
||||
var/obj/item/weapon/paper/c = new /obj/item/weapon/paper (loc)
|
||||
if(toner > 10) //lots of toner, make it dark
|
||||
@@ -165,7 +156,7 @@
|
||||
copied = replacetext(copied, "<font face=\"[c.deffont]\" color=", "<font face=\"[c.deffont]\" nocolor=") //state of the art techniques in action
|
||||
copied = replacetext(copied, "<font face=\"[c.crayonfont]\" color=", "<font face=\"[c.crayonfont]\" 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.info += "</font>"//</font>
|
||||
c.name = copy.name // -- Doohl
|
||||
c.fields = copy.fields
|
||||
c.stamps = copy.stamps
|
||||
@@ -228,7 +219,7 @@
|
||||
W = photocopy(W)
|
||||
W.loc = p
|
||||
p.pages += W
|
||||
|
||||
|
||||
p.loc = src.loc
|
||||
p.update_icon()
|
||||
p.icon_state = "paper_words"
|
||||
|
||||
@@ -165,55 +165,6 @@ var/global/photo_count = 0
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/camera/proc/get_icon(list/turfs, turf/center)
|
||||
|
||||
//Bigger icon base to capture those icons that were shifted to the next tile
|
||||
//i.e. pretty much all wall-mounted machinery
|
||||
var/icon/res = icon('icons/effects/96x96.dmi', "")
|
||||
res.Scale(size*32, size*32)
|
||||
// Initialize the photograph to black.
|
||||
res.Blend("#000", ICON_OVERLAY)
|
||||
|
||||
var/atoms[] = list()
|
||||
for(var/turf/the_turf in turfs)
|
||||
// Add outselves to the list of stuff to draw
|
||||
atoms.Add(the_turf);
|
||||
// As well as anything that isn't invisible.
|
||||
for(var/atom/A in the_turf)
|
||||
if(A.invisibility) continue
|
||||
atoms.Add(A)
|
||||
|
||||
// Sort the atoms into their layers
|
||||
var/list/sorted = sort_atoms_by_layer(atoms)
|
||||
var/center_offset = (size-1)/2 * 32 + 1
|
||||
for(var/i; i <= sorted.len; i++)
|
||||
var/atom/A = sorted[i]
|
||||
if(A)
|
||||
var/icon/img = getFlatIcon(A)//build_composite_icon(A)
|
||||
|
||||
// If what we got back is actually a picture, draw it.
|
||||
if(istype(img, /icon))
|
||||
// Check if we're looking at a mob that's lying down
|
||||
if(istype(A, /mob/living) && A:lying)
|
||||
// If they are, apply that effect to their picture.
|
||||
img.BecomeLying()
|
||||
// Calculate where we are relative to the center of the photo
|
||||
var/xoff = (A.x - center.x) * 32 + center_offset
|
||||
var/yoff = (A.y - center.y) * 32 + center_offset
|
||||
if (istype(A,/atom/movable))
|
||||
xoff+=A:step_x
|
||||
yoff+=A:step_y
|
||||
res.Blend(img, blendMode2iconMode(A.blend_mode), A.pixel_x + xoff, A.pixel_y + yoff)
|
||||
|
||||
// Lastly, render any contained effects on top.
|
||||
for(var/turf/the_turf in turfs)
|
||||
// Calculate where we are relative to the center of the photo
|
||||
var/xoff = (the_turf.x - center.x) * 32 + center_offset
|
||||
var/yoff = (the_turf.y - center.y) * 32 + center_offset
|
||||
res.Blend(getFlatIcon(the_turf.loc), blendMode2iconMode(the_turf.blend_mode),xoff,yoff)
|
||||
return res
|
||||
|
||||
|
||||
/obj/item/device/camera/proc/get_mobs(turf/the_turf as turf)
|
||||
var/mob_detail
|
||||
for(var/mob/living/carbon/A in the_turf)
|
||||
@@ -248,37 +199,39 @@ var/global/photo_count = 0
|
||||
icon_state = icon_on
|
||||
on = 1
|
||||
|
||||
/obj/item/device/camera/proc/can_capture_turf(turf/T, mob/user)
|
||||
//Proc for capturing check
|
||||
/mob/living/proc/can_capture_turf(turf/T)
|
||||
var/mob/dummy = new(T) //Go go visibility check dummy
|
||||
var/viewer = user
|
||||
if(user.client) //To make shooting through security cameras possible
|
||||
viewer = user.client.eye
|
||||
var/viewer = src
|
||||
if(src.client) //To make shooting through security cameras possible
|
||||
viewer = src.client.eye
|
||||
var/can_see = (dummy in viewers(world.view, viewer))
|
||||
|
||||
qdel(dummy)
|
||||
return can_see
|
||||
|
||||
/obj/item/device/camera/proc/captureimage(atom/target, mob/user, flag)
|
||||
/obj/item/device/camera/proc/captureimage(atom/target, mob/living/user, flag)
|
||||
var/x_c = target.x - (size-1)/2
|
||||
var/y_c = target.y + (size-1)/2
|
||||
var/z_c = target.z
|
||||
var/list/turfs = list()
|
||||
var/mobs = ""
|
||||
for(var/i = 1; i <= size; i++)
|
||||
for(var/j = 1; j <= size; j++)
|
||||
var/turf/T = locate(x_c, y_c, z_c)
|
||||
if(can_capture_turf(T, user))
|
||||
turfs.Add(T)
|
||||
if(user.can_capture_turf(T))
|
||||
mobs += get_mobs(T)
|
||||
x_c++
|
||||
y_c--
|
||||
x_c = x_c - size
|
||||
|
||||
var/obj/item/weapon/photo/p = createpicture(target, user, turfs, mobs, flag)
|
||||
var/obj/item/weapon/photo/p = createpicture(target, user, mobs, flag)
|
||||
printpicture(user, p)
|
||||
|
||||
/obj/item/device/camera/proc/createpicture(atom/target, mob/user, list/turfs, mobs, flag)
|
||||
var/icon/photoimage = get_icon(turfs, target)
|
||||
/obj/item/device/camera/proc/createpicture(atom/target, mob/user, mobs, flag)
|
||||
var/x_c = target.x - (size-1)/2
|
||||
var/y_c = target.y - (size-1)/2
|
||||
var/z_c = target.z
|
||||
var/icon/photoimage = generate_image(x_c, y_c, z_c, size, CAPTURE_MODE_REGULAR, user)
|
||||
|
||||
var/icon/small_img = icon(photoimage)
|
||||
var/icon/tiny_img = icon(photoimage)
|
||||
|
||||
@@ -69,8 +69,9 @@
|
||||
aipictures -= selection
|
||||
usr << "<span class='unconscious'>Local image deleted</span>"
|
||||
|
||||
/obj/item/device/camera/siliconcam/ai_camera/can_capture_turf(turf/T, mob/user)
|
||||
var/mob/living/silicon/ai = user
|
||||
//Capture Proc for AI / Robot
|
||||
/mob/living/silicon/ai/can_capture_turf(turf/T)
|
||||
var/mob/living/silicon/ai = src
|
||||
return ai.TurfAdjacent(T)
|
||||
|
||||
/obj/item/device/camera/siliconcam/proc/toggle_camera_mode()
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
throw_speed = 7
|
||||
throw_range = 15
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 60)
|
||||
pressure_resistance = 2
|
||||
attack_verb = list("stamped")
|
||||
|
||||
/obj/item/weapon/stamp/captain
|
||||
@@ -73,4 +72,4 @@
|
||||
|
||||
if(chosen_stamp)
|
||||
name = chosen_stamp.name
|
||||
icon_state = chosen_stamp.icon_state
|
||||
icon_state = chosen_stamp.icon_state
|
||||
|
||||
Reference in New Issue
Block a user