Adds in Headphones

This commit is contained in:
Fox-McCloud
2016-08-06 19:55:08 -04:00
parent a8f309f12f
commit f5826a0c2b
7 changed files with 49 additions and 20 deletions
+3
View File
@@ -173,6 +173,9 @@
/datum/action/item_action/toggle_mister
name = "Toggle Mister"
/datum/action/item_action/toggle_headphones
name = "Toggle Headphones"
/datum/action/item_action/toggle_helmet_light
name = "Toggle Helmet Light"
@@ -39,6 +39,10 @@
display_name = "a deck of cards"
path = /obj/item/toy/cards/deck
/datum/gear/headphones
display_name = "a pair of headphones"
path = /obj/item/clothing/ears/headphones
/datum/gear/blackbandana
display_name = "bandana, black"
path = /obj/item/clothing/mask/bandana/black
+13 -20
View File
@@ -85,10 +85,11 @@
slot_flags = SLOT_EARS
burn_state = FIRE_PROOF
/obj/item/clothing/ears/attack_hand(mob/user as mob)
if(!user) return
/obj/item/clothing/ears/attack_hand(mob/user)
if(!user)
return
if(src.loc != user || !istype(user,/mob/living/carbon/human))
if(loc != user || !ishuman(user))
..()
return
@@ -104,7 +105,7 @@
if(slot_flags & SLOT_TWOEARS )
O = (H.l_ear == src ? H.r_ear : H.l_ear)
user.unEquip(O)
if(!istype(src,/obj/item/clothing/ears/offear))
if(!istype(src, /obj/item/clothing/ears/offear))
qdel(O)
O = src
else
@@ -116,9 +117,10 @@
user.put_in_hands(O)
O.add_fingerprint(user)
if(istype(src,/obj/item/clothing/ears/offear))
if(istype(src, /obj/item/clothing/ears/offear))
qdel(src)
/obj/item/clothing/ears/offear
name = "Other ear"
w_class = 5
@@ -126,22 +128,13 @@
icon_state = "block"
slot_flags = SLOT_EARS | SLOT_TWOEARS
New(var/obj/O)
name = O.name
desc = O.desc
icon = O.icon
icon_state = O.icon_state
dir = O.dir
/obj/item/clothing/ears/offear/New(var/obj/O)
name = O.name
desc = O.desc
icon = O.icon
icon_state = O.icon_state
dir = O.dir
/obj/item/clothing/ears/earmuffs
name = "earmuffs"
desc = "Protects your hearing from loud noises, and quiet ones as well."
icon_state = "earmuffs"
item_state = "earmuffs"
flags = EARBANGPROTECT
strip_delay = 15
put_on_delay = 25
burn_state = FLAMMABLE
//Glasses
/obj/item/clothing/glasses
+28
View File
@@ -0,0 +1,28 @@
/obj/item/clothing/ears/earmuffs
name = "earmuffs"
desc = "Protects your hearing from loud noises, and quiet ones as well."
icon_state = "earmuffs"
item_state = "earmuffs"
flags = EARBANGPROTECT
strip_delay = 15
put_on_delay = 25
burn_state = FLAMMABLE
/obj/item/clothing/ears/headphones
name = "headphones"
desc = "Unce unce unce unce."
var/on = 0
icon_state = "headphones0"
item_state = "earmuffs"
actions_types = list(/datum/action/item_action/toggle_headphones)
burn_state = FLAMMABLE
/obj/item/clothing/ears/headphones/attack_self(mob/user)
on = !on
icon_state = "headphones[on]"
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
user.update_inv_ears()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 114 KiB

+1
View File
@@ -1130,6 +1130,7 @@
#include "code\modules\client\preference\loadout\loadout_suit.dm"
#include "code\modules\client\preference\loadout\loadout_uniform.dm"
#include "code\modules\clothing\clothing.dm"
#include "code\modules\clothing\ears\ears.dm"
#include "code\modules\clothing\glasses\glasses.dm"
#include "code\modules\clothing\glasses\hud.dm"
#include "code\modules\clothing\gloves\boxing.dm"