TG: 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

Revision: r3584
Author: 	 petethegoat

-New sound effects for circular saws and surgical drills.
-New sprites for mass-spectrometers and advanced mass-spectrometers.
-Sprites for empty bookshelves and book overlays added to library.dmi.

Revision: r3585
Author: 	 d_h2...@yahoo.com
This commit is contained in:
Erthilo
2012-05-13 02:19:36 +01:00
parent 8c3659b1c7
commit 1443df2beb
7 changed files with 53 additions and 80 deletions

View File

@@ -1,87 +1,57 @@
/obj/structure/closet/extinguisher
name = "extinguisher closet"
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
open()
/obj/structure/closet/extinguisher/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/closet/extinguisher/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/closet/extinguisher/attack_paw(mob/user as mob)
attack_hand(user)
return
/obj/structure/closet/extinguisher/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"