Files
Bubberstation/code/modules/paperwork/paperbin.dm
Kyrah Abattoir 560b50ec1b Reformatted the way objects and items structure their description text, added the little object "icon" everyone seems to be using.
Added superclass invoke for the arcane tome

Added superclass invoke to light switches, removed it's (unused) description.

FLightswitch description repetition derp

examine superclass invoke for gas flow meter, space heater, fire extinguishers, grenades/IEDs, fancy boxes and welder. Changed description for welder and fire extinguisher to show their content in a similar style.

Fixed tank, linen bins and janicart description, and added welder of previous commit (forgot to commit it)

REMOVED icon in mop_bucket description (now provided by item class).
REMOVED unused examine() override in clothing/gloves
REMOVED custom examine() for glass/rag
CHANGED using examine superclass on paperwork/paperbin, removed redundant description code
CHANGED examine superclass for power/apc
ADDED universal maxcharge readout for all the powercell types.
CHANGED using examine superclass on machinery/light, removed redundant description code

FIXED weapon/virusdish use a description field.
TWEAK lowercased some of the portable generators.

Fixed improperness of pacman names
2013-11-16 22:15:50 +01:00

90 lines
2.2 KiB
Plaintext

/obj/item/weapon/paper_bin
name = "paper bin"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "paper_bin1"
item_state = "sheet-metal"
throwforce = 1
w_class = 3
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.
/obj/item/weapon/paper_bin/MouseDrop(atom/over_object)
var/mob/M = usr
if(M.restrained() || M.stat)
return
if(over_object == M)
M.put_in_hands(src)
else if(istype(over_object, /obj/screen))
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.put_in_r_hand(src)
if("l_hand")
M.u_equip(src)
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(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(events.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
user.put_in_hands(P)
user << "<span class='notice'>You take [P] out of the [src].</span>"
else
user << "<span class='notice'>[src] is empty!</span>"
add_fingerprint(user)
/obj/item/weapon/paper_bin/attackby(obj/item/weapon/paper/i, mob/user)
if(!istype(i))
return ..()
user.drop_item()
i.loc = src
user << "<span class='notice'>You put [i] in [src].</span>"
papers.Add(i)
amount++
update_icon()
/obj/item/weapon/paper_bin/examine()
set src in oview(1)
..()
if(amount)
usr << "It contains " + (amount > 1 ? "[amount] papers" : " one paper")+"."
else
usr << "It doesn't contain anything."
/obj/item/weapon/paper_bin/update_icon()
if(amount < 1)
icon_state = "paper_bin0"
else
icon_state = "paper_bin1"