Updated fire extinguisher cabinets- mini extinguishers now fit in them, and the path has changed!

/obj/structure/closet/extinguisher to /obj/structure/extinguisher_cabinet

Added Invisty's dragon dildo sprite
Updated the husk icons for carn


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3584 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
petethegoat@gmail.com
2012-05-12 15:03:02 +00:00
parent ee6ca133be
commit 537e922249
6 changed files with 96 additions and 124 deletions
+51 -80
View File
@@ -1,87 +1,58 @@
/obj/structure/closet/extinguisher
name = "extinguisher closet"
/obj/structure/extinguisher_cabinet
name = "extinguisher cabinet"
desc = "A small wall mounted cabinet designed to hold a fire extinguisher."
icon_state = "extinguisher10"
icon_opened = "extinguisher11"
icon_closed = "extinguisher10"
opened = 1
icon = 'closet.dmi'
icon_state = "extinguisher_closed"
anchored = 1
density = 0
var/obj/item/weapon/extinguisher/EXTINGUISHER = new/obj/item/weapon/extinguisher
var/localopened = 1
var/obj/item/weapon/extinguisher/has_extinguisher = new/obj/item/weapon/extinguisher
var/opened = 0
open()
/obj/structure/extinguisher_cabinet/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (isrobot(usr))
return
close()
return
attackby(var/obj/item/O as obj, var/mob/user as mob)
if (isrobot(usr))
return
if (istype(O, /obj/item/weapon/extinguisher))
if(!EXTINGUISHER)
user.drop_item(O)
src.contents += O
EXTINGUISHER = O
user << "\blue You place the extinguisher in the [src.name]."
else
localopened = !localopened
if (istype(O, /obj/item/weapon/extinguisher))
if(!has_extinguisher && opened)
user.drop_item(O)
src.contents += O
has_extinguisher = O
user << "\blue You place the extinguisher in the [src.name]."
else
localopened = !localopened
update_icon()
attack_hand(mob/user as mob)
if(localopened)
if(EXTINGUISHER)
user.put_in_hand(EXTINGUISHER)
EXTINGUISHER = null
user << "\blue You take the extinguisher from the [name]."
else
localopened = !localopened
else
localopened = !localopened
update_icon()
verb/toggle_openness() //nice name, huh? HUH?!
set name = "Open/Close"
set category = "Object"
if (isrobot(usr))
return
localopened = !localopened
update_icon()
verb/remove_extinguisher()
set name = "Remove Extinguisher"
set category = "Object"
if (isrobot(usr))
return
if (localopened)
if(EXTINGUISHER)
usr.put_in_hand(EXTINGUISHER)
EXTINGUISHER = null
usr << "\blue You take the extinguisher from the [name]."
else
usr << "\blue The [name] is empty."
else
usr << "\blue The [name] is closed."
update_icon()
attack_paw(mob/user as mob)
attack_hand(user)
return
attack_ai(mob/user as mob)
return
opened = !opened
else
opened = !opened
update_icon()
var/hasextinguisher = 0
if(EXTINGUISHER)
hasextinguisher = 1
icon_state = text("extinguisher[][]",hasextinguisher,src.localopened)
/obj/structure/extinguisher_cabinet/attack_hand(mob/user as mob)
if(has_extinguisher)
user.put_in_hand(has_extinguisher)
has_extinguisher = null
user << "\blue You take the extinguisher from the [name]."
opened = 1
else
opened = !opened
update_icon()
/obj/structure/extinguisher_cabinet/attack_paw(mob/user as mob)
attack_hand(user)
return
/obj/structure/extinguisher_cabinet/update_icon()
if(!opened)
icon_state = "extinguisher_closed"
return
if(has_extinguisher)
if(istype(has_extinguisher, /obj/item/weapon/extinguisher/mini))
icon_state = "extinguisher_mini"
else
icon_state = "extinguisher_full"
else
icon_state = "extinguisher_empty"