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
+66 -64
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"