Moved para and sleepy pen defines out of weapon.dm.

Updated flashlight code a little.
Added inhand sprites for desk lamps.
Standardised modules/paperwork.
Decapitalised a bunch of mining items.
Slightly reverted update_icons.dm, so we're not looping through mutations more than we need to. Also, skeletons can now wear lipstick!

A few other things which aren't worth listing individually.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4855 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
petethegoat@gmail.com
2012-10-13 14:37:28 +00:00
parent 92650f1464
commit c4f9b43020
19 changed files with 222 additions and 276 deletions

View File

@@ -957,18 +957,6 @@
throw_range = 15
attack_verb = list("banned")
/obj/item/weapon/pen/sleepypen
desc = "It's a normal black ink pen with a sharp point and a carefully engraved \"Waffle Co.\""
flags = FPRINT | TABLEPASS | OPENCONTAINER
slot_flags = SLOT_BELT
origin_tech = "materials=2;biotech=1;syndicate=7"
/obj/item/weapon/pen/paralysis
desc = "It's a normal black ink pen with a sharp point."
flags = FPRINT | TABLEPASS | OPENCONTAINER
slot_flags = SLOT_BELT
origin_tech = "materials=2;biotech=1;syndicate=5"
/obj/item/weapon/rack_parts
name = "rack parts"
desc = "Parts of a rack."

View File

@@ -1,9 +1,10 @@
/obj/item/device/flashlight
name = "flashlight"
desc = "A hand-held emergency light."
icon_state = "flight0"
icon = 'icons/obj/lighting.dmi'
icon_state = "flashlight"
item_state = "flashlight"
w_class = 2
item_state = "flight"
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
m_amt = 50
@@ -11,35 +12,33 @@
icon_action_button = "action_flashlight"
var/on = 0
var/brightness_on = 4 //luminosity when on
var/icon_on = "flight1"
var/icon_off = "flight0"
/obj/item/device/flashlight/initialize()
..()
if (on)
icon_state = icon_on
src.SetLuminosity(brightness_on)
if(on)
icon_state = "[initial(icon_state)]-on"
SetLuminosity(brightness_on)
else
icon_state = icon_off
src.SetLuminosity(0)
icon_state = initial(icon_state)
SetLuminosity(0)
/obj/item/device/flashlight/proc/update_brightness(var/mob/user = null)
if(on)
icon_state = icon_on
if(src.loc == user)
icon_state = "[initial(icon_state)]-on"
if(loc == user)
user.SetLuminosity(user.luminosity + brightness_on)
else if(isturf(loc))
SetLuminosity(brightness_on)
else
icon_state = icon_off
if(src.loc == user)
icon_state = initial(icon_state)
if(loc == user)
user.SetLuminosity(user.luminosity - brightness_on)
else if(isturf(loc))
SetLuminosity(0)
/obj/item/device/flashlight/attack_self(mob/user)
if(!isturf(user.loc))
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
user << "You cannot turn the light on while in this [user.loc]." //To prevent some lighting anomalities.
return
on = !on
update_brightness(user)
@@ -47,37 +46,43 @@
/obj/item/device/flashlight/attack(mob/living/M as mob, mob/living/user as mob)
src.add_fingerprint(user)
if(src.on && user.zone_sel.selecting == "eyes")
add_fingerprint(user)
if(on && user.zone_sel.selecting == "eyes")
if (((CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))//too dumb to use flashlight properly
return ..()//just hit them in the head
if(((CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) //too dumb to use flashlight properly
return ..() //just hit them in the head
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")//don't have dexterity
usr.show_message("\red You don't have the dexterity to do this!",1)
if(!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") //don't have dexterity
user << "<span class='notice'>You don't have the dexterity to do this!</span>"
return
var/mob/living/carbon/human/H = M//mob has protective eyewear
var/mob/living/carbon/human/H = M //mob has protective eyewear
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
user << text("\blue You're going to need to remove that [] first.", ((H.head && H.head.flags & HEADCOVERSEYES) ? "helmet" : ((H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) ? "mask": "glasses")))
user << "<span class='notice'>You're going to need to remove that [(H.head && H.head.flags & HEADCOVERSEYES) ? "helmet" : (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) ? "mask": "glasses"] first.</span>"
return
for(var/mob/O in viewers(M, null))//echo message
if ((O.client && !(O.blinded )))
O.show_message("\blue [(O==user?"You direct":"[user] directs")] [src] to [(M==user? "your":"[M]")] eyes", 1)
if(M == user) //they're using it on themselves
if(!M.blinded)
flick("flash", M.flash)
M.visible_message("<span class='notice'>[M] directs [src] to \his eyes.</span>", \
"<span class='notice'>You wave the light in front of your eyes! Trippy!</span>")
else
M.visible_message("<span class='notice'>[M] directs [src] to \his eyes.</span>", \
"<span class='notice'>You wave the light in front of your eyes.</span>")
return
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey))//robots and aliens are unaffected
if(M.stat == DEAD || M.sdisabilities & BLIND)//mob is dead or fully blind
if(M!=user)
user.show_message("\red [M] pupils does not react to the light!",1)
else if(XRAY in M.mutations)//mob has X-RAY vision
if(M!=user)
user.show_message("\red [M] pupils give an eerie glow!",1)
else //nothing wrong
user.visible_message("<span class='notice'>[user] directs [src] to [M]'s eyes.</span>", \
"<span class='notice'>You direct [src] to [M]'s eyes.</span>")
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey)) //robots and aliens are unaffected
if(M.stat == DEAD || M.sdisabilities & BLIND) //mob is dead or fully blind
user << "<span class='notice'>[M] pupils does not react to the light!</span>"
else if(XRAY in M.mutations) //mob has X-RAY vision
user << "<span class='notice'>[M] pupils give an eerie glow!</span>"
else //they're okay!
if(!M.blinded)
flick("flash", M.flash)//flash the affected mob
if(M!=user)
user.show_message("\blue [M] pupils narrow",1)
flick("flash", M.flash) //flash the affected mob
user << "<span class='notice'>[M]'s pupils narrow.</span>"
else
return ..()
@@ -96,67 +101,34 @@
/obj/item/device/flashlight/pen
name = "penlight"
desc = "A pen-sized light. It shines as well as a flashlight."
icon_state = "plight0"
flags = FPRINT | TABLEPASS | CONDUCT
desc = "A pen-sized light, used by medical staff."
icon_state = "penlight"
item_state = ""
icon_on = "plight1"
icon_off = "plight0"
brightness_on = 3
flags = FPRINT | TABLEPASS | CONDUCT
brightness_on = 2
/obj/item/device/flashlight/pen/paralysis/attack(mob/M as mob, mob/user as mob)
if(!ismob(M))
return
user << "\red You stab [M] with the pen."
M << "\red You feel a tiny prick!"
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stabbed with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to stab [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) Used the [src.name] to stab [M.name] ([M.ckey])</font>")
..()
return
/obj/item/device/flashlight/pen/paralysis/New()
var/datum/reagents/R = new/datum/reagents(15)
reagents = R
R.my_atom = src
R.add_reagent("zombiepowder", 15)
..()
return
/obj/item/device/flashlight/pen/paralysis/attack(mob/M as mob, mob/user as mob)
if (!( istype(M, /mob) ))
return
..()
if (reagents.total_volume)
if(M.reagents) reagents.trans_to(M, 15)
return
// the desk lamps are a bit special
/obj/item/device/flashlight/lamp
name = "desk lamp"
desc = "A desk lamp"
icon = 'icons/obj/lighting.dmi'
icon_state = "lamp0"
desc = "A desk lamp with an adjustable mount."
icon_state = "lamp"
item_state = "lamp"
brightness_on = 5
icon_on = "lamp1"
icon_off = "lamp0"
w_class = 4
flags = FPRINT | TABLEPASS | CONDUCT
m_amt = 0
g_amt = 0
on = 1
// green-shaded desk lamp
/obj/item/device/flashlight/lamp/green
icon_state = "green0"
icon_on = "green1"
icon_off = "green0"
desc = "A green-shaded desk lamp"
desc = "A classic green-shaded desk lamp."
icon_state = "lampgreen"
item_state = "lampgreen"
brightness_on = 5
/obj/item/device/flashlight/lamp/verb/toggle_light()
set name = "Toggle light"

View File

@@ -31,4 +31,8 @@
<br><br><b>A New World</b><br>\
As a participant in the Nanotrasen Gateway Project, you will be on the frontiers of space. \
Though complete safety is assured, participants are advised to prepare for inhospitable \
environs."
environs."
//we don't want the silly text overlay!
/obj/item/weapon/paper/pamphlet/update_icon()
return

View File

@@ -10,7 +10,7 @@
/**********************Miner Lockers**************************/
/obj/structure/closet/secure_closet/miner
name = "Miner's Equipment"
name = "miner's equipment"
icon_state = "miningsec1"
icon_closed = "miningsec"
icon_locked = "miningsec1"
@@ -95,7 +95,7 @@ proc/move_mining_shuttle()
return
/obj/machinery/computer/mining_shuttle
name = "Mining Shuttle Console"
name = "mining shuttle console"
icon = 'icons/obj/computer.dmi'
icon_state = "shuttle"
req_access = list(access_mining)
@@ -158,29 +158,15 @@ proc/move_mining_shuttle()
/******************************Lantern*******************************/
/obj/item/device/flashlight/lantern
name = "Mining Lantern"
icon_state = "lantern-off"
desc = "A miner's lantern"
anchored = 0
icon_on = "lantern-on"
icon_off = "lantern-off"
var/brightness = 12 // luminosity when on
/obj/item/device/flashlight/lantern/New()
luminosity = 0
on = 0
return
/obj/item/device/flashlight/lantern/attack_self(mob/user)
src.add_fingerprint(user)
on = !on
update_brightness(user)
return
name = "lantern"
icon_state = "lantern"
desc = "A mining lantern."
brightness_on = 6 // luminosity when on
/*****************************Pickaxe********************************/
/obj/item/weapon/pickaxe
name = "Miner's pickaxe"
name = "pickaxe"
icon = 'icons/obj/items.dmi'
icon_state = "pickaxe"
flags = FPRINT | TABLEPASS| CONDUCT
@@ -195,12 +181,12 @@ proc/move_mining_shuttle()
attack_verb = list("hit", "pierced", "sliced", "attacked")
hammer
name = "Mining Sledge Hammer"
name = "sledgehammer"
//icon_state = "sledgehammer" Waiting on sprite
desc = "A mining hammer made of reinforced metal. You feel like smashing your boss in the face with this."
silver
name = "Silver Pickaxe"
name = "silver pickaxe"
icon_state = "spickaxe"
item_state = "spickaxe"
digspeed = 30
@@ -208,7 +194,7 @@ proc/move_mining_shuttle()
desc = "This makes no metallurgic sense."
drill
name = "Mining Drill" // Can dig sand as well!
name = "mining drill" // Can dig sand as well!
icon_state = "handdrill"
item_state = "jackhammer"
digspeed = 30
@@ -216,7 +202,7 @@ proc/move_mining_shuttle()
desc = "Yours is the drill that will pierce through the rock walls."
jackhammer
name = "Sonic Jackhammer"
name = "sonic jackhammer"
icon_state = "jackhammer"
item_state = "jackhammer"
digspeed = 20 //faster than drill, but cannot dig
@@ -224,7 +210,7 @@ proc/move_mining_shuttle()
desc = "Cracks rocks with sonic blasts, perfect for killing cave lizards."
gold
name = "Golden Pickaxe"
name = "golden pickaxe"
icon_state = "gpickaxe"
item_state = "gpickaxe"
digspeed = 20
@@ -232,7 +218,7 @@ proc/move_mining_shuttle()
desc = "This makes no metallurgic sense."
plasmacutter
name = "Plasma Cutter"
name = "plasma cutter"
icon_state = "plasmacutter"
item_state = "gun"
w_class = 3.0 //it is smaller than the pickaxe
@@ -242,7 +228,7 @@ proc/move_mining_shuttle()
desc = "A rock cutter that uses bursts of hot plasma. You could use it to cut limbs off of xenos! Or, you know, mine stuff."
diamond
name = "Diamond Pickaxe"
name = "diamond pickaxe"
icon_state = "dpickaxe"
item_state = "dpickaxe"
digspeed = 10
@@ -250,7 +236,7 @@ proc/move_mining_shuttle()
desc = "A pickaxe with a diamond pick head, this is just like minecraft."
diamonddrill //When people ask about the badass leader of the mining tools, they are talking about ME!
name = "Diamond Mining Drill"
name = "diamond mining drill"
icon_state = "diamonddrill"
item_state = "jackhammer"
digspeed = 5 //Digs through walls, girders, and can dig up sand
@@ -258,7 +244,7 @@ proc/move_mining_shuttle()
desc = "Yours is the drill that will pierce the heavens!"
borgdrill
name = "Cyborg Mining Drill"
name = "cyborg mining drill"
icon_state = "diamonddrill"
item_state = "jackhammer"
digspeed = 15

View File

@@ -183,18 +183,21 @@ Please contact me on #coderbus IRC. ~Carn x
if(stand_icon) del(stand_icon)
if(lying_icon) del(lying_icon)
if(dna && dna.mutantrace) return
//var/husk = (HUSK in src.mutations) //100% unnecessary -Agouri
//var/fat = (FAT in src.mutations)
var/husk = (HUSK in src.mutations) //100% unnecessary -Agouri //nope, do you really want to iterate through src.mutations repeatedly? -Pete
var/fat = (FAT in src.mutations)
var/skeleton = (SKELETON in src.mutations)
var/g = "m"
if(gender == FEMALE) g = "f"
//Base mob icon
if(HUSK in src.mutations)
if(husk)
stand_icon = new /icon('icons/mob/human.dmi', "husk_s")
lying_icon = new /icon('icons/mob/human.dmi', "husk_l")
else if(FAT in src.mutations)
else if(fat)
stand_icon = new /icon('icons/mob/human.dmi', "fatbody_s")
lying_icon = new /icon('icons/mob/human.dmi', "fatbody_l")
else if(SKELETON in src.mutations)
else if(skeleton)
stand_icon = new /icon('icons/mob/human.dmi', "skeleton_s")
lying_icon = new /icon('icons/mob/human.dmi', "skeleton_l")
else
@@ -202,7 +205,7 @@ Please contact me on #coderbus IRC. ~Carn x
lying_icon = new /icon('icons/mob/human.dmi', "body_[g]_l")
//Skin tone
if((SKELETON in src.mutations) == 0)
if(!skeleton)
if(s_tone >= 0)
stand_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
lying_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
@@ -211,7 +214,7 @@ Please contact me on #coderbus IRC. ~Carn x
lying_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
//Eyes
if((SKELETON in src.mutations) == 0)
if(!skeleton)
var/icon/eyes_s = new/icon('icons/mob/human_face.dmi', "eyes_s")
var/icon/eyes_l = new/icon('icons/mob/human_face.dmi', "eyes_l")
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
@@ -220,13 +223,13 @@ Please contact me on #coderbus IRC. ~Carn x
lying_icon.Blend(eyes_l, ICON_OVERLAY)
//Mouth (lipstick!)
if(lip_style && (SKELETON in src.mutations) == 0)
if(lip_style) //skeletons are allowed to wear lipstick no matter what you think, agouri.
stand_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[lip_style]_s"), ICON_OVERLAY)
lying_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[lip_style]_l"), ICON_OVERLAY)
//Underwear
if(underwear >0 && underwear < 12)
if((FAT in src.mutations) == 0 && (SKELETON in src.mutations) == 0)
if(!fat && !skeleton)
stand_icon.Blend(new /icon('icons/mob/human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
lying_icon.Blend(new /icon('icons/mob/human.dmi', "underwear[underwear]_[g]_l"), ICON_OVERLAY)
if(update_icons) update_icons()
@@ -274,7 +277,7 @@ Please contact me on #coderbus IRC. ~Carn x
/mob/living/carbon/human/update_mutations(var/update_icons=1)
var/fat
if( FAT in mutations )
if(FAT in mutations)
fat = "fat"
var/image/lying = image("icon" = 'icons/effects/genetics.dmi')

View File

@@ -17,9 +17,9 @@
update_icon()
/obj/item/weapon/clipboard/MouseDrop(obj/over_object as obj) //Quick clipboard fix. -Agouri
if(ishuman(usr) || ismonkey(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~
if(ishuman(usr))
var/mob/M = usr
if (!(istype(over_object, /obj/screen) ))
if(!(istype(over_object, /obj/screen) ))
return ..()
if(!M.restrained() && !M.stat)
@@ -31,7 +31,7 @@
M.u_equip(src)
M.put_in_l_hand(src)
src.add_fingerprint(usr)
add_fingerprint(usr)
return
/obj/item/weapon/clipboard/update_icon()
@@ -58,7 +58,7 @@
/obj/item/weapon/clipboard/attack_self(mob/user as mob)
var/dat = "<title>Clipboard</title>"
if (haspen)
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>"
@@ -79,10 +79,10 @@
/obj/item/weapon/clipboard/Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()))
if((usr.stat || usr.restrained()))
return
if (usr.contents.Find(src))
if(usr.contents.Find(src))
if(href_list["pen"])
if(haspen)

View File

@@ -2,22 +2,16 @@
name = "filing cabinet"
desc = "A large cabinet with drawers."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "filing_cabinet0"
var/icon_closed = "filing_cabinet0"
var/icon_open = "filing_cabinet1"
icon_state = "filing_cabinet"
density = 1
anchored = 1
/obj/structure/filingcabinet/chestdrawer
name = "chest drawer"
icon_state = "chestdrawer"
icon_closed = "chestdrawer"
icon_open = "chestdrawer-open"
/obj/structure/filingcabinet/filingcabinet
icon_state = "filingcabinet"
icon_closed = "filingcabinet"
icon_open = "filingcabinet-open"
/obj/structure/filingcabinet/filingcabinet //not changing the path to avoid unecessary map issues, but please don't name stuff like this in future -Pete
icon_state = "tallcabinet"
/obj/structure/filingcabinet/initialize()
for(var/obj/item/I in loc)
@@ -29,9 +23,9 @@
user << "<span class='notice'>You put [P] in [src].</span>"
user.drop_item()
P.loc = src
icon_state = icon_open
icon_state = "[initial(icon_state)]-open"
sleep(5)
icon_state = icon_closed
icon_state = initial(icon_state)
updateUsrDialog()
else if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
@@ -65,8 +59,7 @@
if(P && in_range(src, usr))
usr.put_in_hands(P)
updateUsrDialog()
icon_state = icon_open
icon_state = "[initial(icon_state)]-open"
sleep(5)
icon_state = icon_closed
icon_state = initial(icon_state)

View File

@@ -36,7 +36,7 @@
update_icon()
else if(istype(W, /obj/item/weapon/pen))
var/n_name = copytext(sanitize(input(usr, "What would you like to label the folder?", "Folder Labelling", null) as text),1,MAX_NAME_LEN)
if ((loc == usr && usr.stat == 0))
if((loc == usr && usr.stat == 0))
name = "folder[(n_name ? text("- '[n_name]'") : null)]"
return
@@ -54,10 +54,10 @@
/obj/item/weapon/folder/Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()))
if((usr.stat || usr.restrained()))
return
if (usr.contents.Find(src))
if(usr.contents.Find(src))
if(href_list["remove"])
var/obj/item/P = locate(href_list["remove"])

View File

@@ -10,7 +10,7 @@
/obj/item/weapon/hand_labeler/afterattack(atom/A, mob/user as mob)
if(!mode) //if it's off, give up.
return
if(A==loc) // if placing the labeller into something (e.g. backpack)
if(A == loc) // if placing the labeller into something (e.g. backpack)
return // don't set a label
if(!labels_left)
@@ -29,22 +29,21 @@
user << "<span class='notice'>You can't label cyborgs.</span>"
return
for(var/mob/M in viewers())
if ((M.client && !( M.blinded )))
M << "\blue [user] labels [A] as [label]."
user.visible_message("<span class='notice'>[user] labels [A] as [label].</span>", \
"<span class='notice'>You label [A] as [label].</span>")
A.name = "[A.name] ([label])"
/obj/item/weapon/hand_labeler/attack_self()
/obj/item/weapon/hand_labeler/attack_self(mob/user as mob)
mode = !mode
icon_state = "labeler[mode]"
if(mode)
usr << "<span class='notice'>You turn on \the [src].</span>"
user << "<span class='notice'>You turn on \the [src].</span>"
//Now let them chose the text.
var/str = copytext(reject_bad_text(input(usr,"Label text?","Set label","")),1,MAX_NAME_LEN)
var/str = copytext(reject_bad_text(input(user,"Label text?","Set label","")),1,MAX_NAME_LEN)
if(!str || !length(str))
usr << "<span class='notice'>Invalid text.</span>"
user << "<span class='notice'>Invalid text.</span>"
return
label = str
usr << "<span class='notice'>You set the text to '[str]'.</span>"
user << "<span class='notice'>You set the text to '[str]'.</span>"
else
usr << "<span class='notice'>You turn off \the [src].</span>"
user << "<span class='notice'>You turn off \the [src].</span>"

View File

@@ -13,10 +13,10 @@
body_parts_covered = HEAD
attack_verb = list("")
var/info //What's actually written on the paper.
var/info_links //A different version of the paper which includes html links at fields and EOF
var/stamps //The (text for the) stamps on the paper.
var/fields //Amount of user created fields
var/info //What's actually written on the paper.
var/info_links //A different version of the paper which includes html links at fields and EOF
var/stamps //The (text for the) stamps on the paper.
var/fields //Amount of user created fields
var/list/stamped
var/rigged = 0
var/spam_flag = 0
@@ -29,25 +29,24 @@
/obj/item/weapon/paper/New()
..()
src.pixel_y = rand(-8, 8)
src.pixel_x = rand(-9, 9)
pixel_y = rand(-8, 8)
pixel_x = rand(-9, 9)
spawn(2)
if(src.info)
src.overlays += "paper_words"
update_icon()
updateinfolinks()
return
/obj/item/weapon/paper/update_icon()
if(src.info)
src.overlays += "paper_words"
if(info)
overlays += "paper_words"
return
/obj/item/weapon/paper/examine()
set src in oview(1)
// ..() //We don't want them to see the dumb "this is a paper" thing every time.
// I didn't like the idea that people can read tiny pieces of paper from across the room.
// Now you need to be next to the paper in order to read it.
// I didn't like the idea that people can read tiny pieces of paper from across the room.
// Now you need to be next to the paper in order to read it.
if(in_range(usr, src))
if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon)))
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)][stamps]</BODY></HTML>", "window=[name]")
@@ -64,12 +63,12 @@
set category = "Object"
set src in usr
if ((CLUMSY in usr.mutations) && prob(50))
if((CLUMSY in usr.mutations) && prob(50))
usr << "<span class='warning'>You cut yourself on the paper.</span>"
return
var/n_name = input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text
n_name = copytext(n_name, 1, 32)
if ((loc == usr && usr.stat == 0))
if((loc == usr && usr.stat == 0))
name = "paper[(n_name ? text("- '[n_name]'") : null)]"
add_fingerprint(usr)
return
@@ -79,18 +78,18 @@
if(rigged && (Holiday == "April Fool's Day"))
if(spam_flag == 0)
spam_flag = 1
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1)
spawn(20)
spam_flag = 0
return
/obj/item/weapon/paper/attack_ai(var/mob/living/silicon/ai/user as mob)
var/dist
if (istype(user) && user.current) //is AI
if(istype(user) && user.current) //is AI
dist = get_dist(src, user.current)
else //cyborg or AI not seeing through a camera
dist = get_dist(src, user)
if (dist < 2)
if(dist < 2)
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
else
@@ -187,7 +186,7 @@
// t = dd_replacetext(t, "#", "") // Junk converted to nothing!
//Count the fields
//Count the fields
var/laststart = 1
while(1)
var/i = findtext(t, "<span class=\"paper_field\">", laststart)
@@ -222,7 +221,7 @@
/obj/item/weapon/paper/Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()))
if((usr.stat || usr.restrained()))
return
if(href_list["write"])
@@ -237,7 +236,7 @@
iscrayon = 1
if ((!in_range(src, usr) && src.loc != usr && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != usr && usr.get_active_hand() != i)) // Some check to see if he's allowed to write
if((!in_range(src, usr) && loc != usr && !( istype(loc, /obj/item/weapon/clipboard) ) && loc.loc != usr && usr.get_active_hand() != i)) // Some check to see if he's allowed to write
return
t = parsepencode(t, i, usr, iscrayon) // Encode everything from pencode to html
@@ -259,12 +258,12 @@
if(user.mind && (user.mind.assigned_role == "Clown"))
clown = 1
if (istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon))
if(istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon))
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links][stamps]</BODY></HTML>", "window=[name]")
//openhelp(user)
return
else if(istype(P, /obj/item/weapon/stamp))
if ((!in_range(src, usr) && src.loc != user && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != user && user.get_active_hand() != P))
if((!in_range(src, usr) && loc != user && !( istype(loc, /obj/item/weapon/clipboard) ) && loc.loc != user && user.get_active_hand() != P))
return
stamps += (stamps=="" ? "<HR>" : "<BR>") + "<i>This paper has been stamped with the [P.name].</i>"
@@ -285,7 +284,7 @@
if(/obj/item/weapon/stamp/denied)
overlays += "paper_stamped_denied"
if(/obj/item/weapon/stamp/clown)
if (!clown)
if(!clown)
usr << "<span class='notice'>You are totally unable to use the stamp. HONK!</span>"
return
else

View File

@@ -1,5 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
/obj/item/weapon/paper_bin
name = "paper bin"
icon = 'icons/obj/bureaucracy.dmi'
@@ -10,74 +8,78 @@
throw_speed = 3
throw_range = 7
pressure_resistance = 10
var/amount = 30 //How much paper is in the bin.
var/list/papers = new/list() //List of papers put in the bin for reference.
var/sealed = 1 //If it's brandnew and unopened, it's sealed.
var/amount = 30 //How much paper is in the bin.
var/list/papers = new/list() //List of papers put in the bin for reference.
MouseDrop(mob/user as mob)
if ((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr))))))
if(!istype(usr, /mob/living/carbon/metroid) && !istype(usr, /mob/living/simple_animal))
if( !usr.get_active_hand() ) //if active hand is empty
attack_hand(usr, 1, 1)
/obj/item/weapon/paper_bin/MouseDrop(mob/user as mob)
if((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr))))))
if(!istype(usr, /mob/living/carbon/metroid) && !istype(usr, /mob/living/simple_animal))
if( !usr.get_active_hand() ) //if active hand is empty
attack_hand(usr, 1, 1)
return
/obj/item/weapon/paper_bin/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/item/weapon/paper_bin/attack_hand(mob/user as mob)
if(amount >= 1)
amount--
if(amount==0)
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(Holiday == "April Fool's Day")
if(prob(30))
P.info = "<font face=\"[P.crayonfont]\" 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
if(ishuman(user))
user.put_in_hands(P)
user << "<span class='notice'>You take a paper out of the bin.</span>"
else
P.loc = get_turf_loc(src)
user << "<span class='notice'>You take a paper out of the bin.</span>"
else
user << "<span class='notice'>The paper bin is empty!</span>"
add_fingerprint(user)
return
/obj/item/weapon/paper_bin/attackby(obj/item/weapon/paper/i as obj, mob/user as mob)
if(!istype(i))
return
user.drop_item()
i.loc = src
usr << "<span class='notice'>You put the paper on the top of the paper bin.</span>"
papers.Add(i)
amount++
attack_paw(mob/user as mob)
return src.attack_hand(user)
attack_hand(mob/user as mob)
if (amount >= 1)
amount--
if(amount==0)
update_icon()
/obj/item/weapon/paper_bin/examine()
set src in oview(1)
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(Holiday == "April Fool's Day")
if(prob(30))
P.info = "<font face=\"[P.crayonfont]\" color=\"red\"><b>HONK HONK HONK HONK HONK HONK HONK<br>HOOOOOOOOOOOOOOOOOOOOOONK<br>APRIL FOOLS</b></font>"
P.rigged = 1
P.updateinfolinks()
if(amount)
usr << "<span class='notice'>There " + (amount > 1 ? "are [amount] papers" : "is one paper") + " in the bin.</span>"
else
usr << "<span class='notice'>There are no papers in the bin.</span>"
return
P.loc = user.loc
if(ishuman(user))
user.put_in_hands(P)
user << "<span class='notice'>You take a paper out of the bin.</span>"
else
P.loc = get_turf_loc(src)
user << "<span class='notice'>You take a paper out of the bin.</span>"
else
user << "<span class='notice'>The paper bin is empty!</span>"
add_fingerprint(user)
return
attackby(obj/item/weapon/paper/i as obj, mob/user as mob)
if(!istype(i))
return
user.drop_item()
i.loc = src
usr << "<span class='notice'>You put the paper on the top of the paper bin.</span>"
papers.Add(i)
amount++
examine()
set src in oview(1)
if(amount)
usr << "<span class='notice'>There " + (amount > 1 ? "are [amount] papers" : "is one paper") + " in the bin.</span>"
else
usr << "<span class='notice'>There are no papers in the bin.</span>"
return
update_icon()
if(amount < 1)
icon_state = "paper_bin0"
else
icon_state = "paper_bin1"
/obj/item/weapon/paper_bin/update_icon()
if(amount < 1)
icon_state = "paper_bin0"
else
icon_state = "paper_bin1"

View File

@@ -25,6 +25,7 @@
var/colour = "black" //what colour the ink is!
pressure_resistance = 5
/obj/item/weapon/pen/blue
desc = "It's a normal blue ink pen."
icon_state = "pen_blue"
@@ -40,32 +41,28 @@
icon_state = "pen"
colour = "white"
/obj/item/weapon/pen/invisble
desc = "It's an invisble pen marker."
icon_state = "pen"
colour = "white"
/obj/item/weapon/pen/attack(mob/M as mob, mob/user as mob)
if(!ismob(M))
return
user << "\red You stab [M] with the pen."
user << "<span class='warning'>You stab [M] with the pen.</span>"
M << "\red You feel a tiny prick!"
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stabbed with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to stab [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stabbed with [name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to stab [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) Used the [src.name] to stab [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[user.name] ([user.ckey]) Used the [name] to stab [M.name] ([M.ckey])</font>")
return
/*
* Sleepy Pens
*/
/obj/item/weapon/pen/sleepypen
origin_tech = "syndicate=5"
desc = "It's a black ink pen with a sharp point and a carefully engraved \"Waffle Co.\""
flags = FPRINT | TABLEPASS | OPENCONTAINER
slot_flags = SLOT_BELT
origin_tech = "materials=2;syndicate=5"
/obj/item/weapon/pen/sleepypen/attack_paw(mob/user as mob)
return src.attack_hand(user)
return
/obj/item/weapon/pen/sleepypen/New()
var/datum/reagents/R = new/datum/reagents(30) //Used to be 300
@@ -75,6 +72,7 @@
..()
return
/obj/item/weapon/pen/sleepypen/attack(mob/M as mob, mob/user as mob)
if(!(istype(M,/mob)))
return
@@ -87,10 +85,11 @@
/*
* Parapens
*/
/obj/item/weapon/pen/paralysis
flags = FPRINT | TABLEPASS | OPENCONTAINER
slot_flags = SLOT_BELT
origin_tech = "materials=2;syndicate=5"
/obj/item/weapon/pen/paralysis/attack_paw(mob/user as mob)
return src.attack_hand(user)
return
/obj/item/weapon/pen/paralysis/attack(mob/M as mob, mob/user as mob)
if(!(istype(M,/mob)))
@@ -100,6 +99,7 @@
if(M.reagents) reagents.trans_to(M, 50)
return
/obj/item/weapon/pen/paralysis/New()
var/datum/reagents/R = new/datum/reagents(50)
reagents = R

View File

@@ -17,10 +17,10 @@
var/maxcopies = 10 //how many copies can be copied at once- idea shamelessly stolen from bs12's copier!
attack_ai(mob/user as mob)
return src.attack_hand(user)
return attack_hand(user)
attack_paw(mob/user as mob)
return src.attack_hand(user)
return attack_hand(user)
attack_hand(mob/user as mob)
user.machine = src
@@ -47,7 +47,7 @@
if(copy)
for(var/i = 0, i < copies, i++)
if(toner > 0)
var/obj/item/weapon/paper/c = new /obj/item/weapon/paper (src.loc)
var/obj/item/weapon/paper/c = new /obj/item/weapon/paper (loc)
if(toner > 10) //lots of toner, make it dark
c.info = "<font color = #101010>"
else //no toner? shitty copies for you!
@@ -68,7 +68,7 @@
else if(photocopy)
for(var/i = 0, i < copies, i++)
if(toner > 0)
var/obj/item/weapon/photo/p = new /obj/item/weapon/photo (src.loc)
var/obj/item/weapon/photo/p = new /obj/item/weapon/photo (loc)
var/icon/I = icon(photocopy.icon, photocopy.icon_state)
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.

View File

@@ -56,4 +56,4 @@
/obj/item/weapon/stamp/attack_paw(mob/user as mob)
return src.attack_hand(user)
return attack_hand(user)