Merge pull request #1934 from Citadel-Station-13/upstream-merge-28993

[MIRROR] Adds Headphones!
This commit is contained in:
LetterJay
2017-07-07 15:16:47 -05:00
committed by GitHub
11 changed files with 64 additions and 25 deletions
+9
View File
@@ -207,6 +207,15 @@
/datum/action/item_action/toggle_helmet_light
name = "Toggle Helmet Light"
/datum/action/item_action/toggle_headphones
name = "Toggle Headphones"
desc = "UNTZ UNTZ UNTZ"
/datum/action/item_action/toggle_headphones/Trigger()
var/obj/item/clothing/ears/headphones/H = target
if(istype(H))
H.toggle(owner)
/datum/action/item_action/toggle_unfriendly_fire
name = "Toggle Friendly Fire \[ON\]"
desc = "Toggles if the club's blasts cause friendly fire."
+4 -2
View File
@@ -1051,7 +1051,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
/obj/item/clothing/mask/joy = 1,
/obj/item/clothing/head/cueball = 1,
/obj/item/clothing/under/scratch = 1,
/obj/item/clothing/under/sailor = 1)
/obj/item/clothing/under/sailor = 1,
/obj/item/clothing/ears/headphones = 2)
contraband = list(/obj/item/clothing/suit/judgerobe = 1,/obj/item/clothing/head/powdered_wig = 1,/obj/item/weapon/gun/magic/wand = 2,/obj/item/clothing/glasses/sunglasses/garb = 2, /obj/item/clothing/glasses/sunglasses/blindfold = 1, /obj/item/clothing/mask/muzzle = 2)
premium = list(/obj/item/clothing/suit/pirate/captain = 2, /obj/item/clothing/head/pirate/captain = 2, /obj/item/clothing/head/helmet/roman = 1, /obj/item/clothing/head/helmet/roman/legionaire = 1, /obj/item/clothing/under/roman = 1, /obj/item/clothing/shoes/roman = 1, /obj/item/weapon/shield/riot/roman = 1, /obj/item/weapon/skub = 1)
refill_canister = /obj/item/weapon/vending_refill/autodrobe
@@ -1175,7 +1176,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
/obj/item/clothing/head/beanie=1, /obj/item/clothing/head/beanie/black=1, /obj/item/clothing/head/beanie/red=1, /obj/item/clothing/head/beanie/green=1, /obj/item/clothing/head/beanie/darkblue=1,
/obj/item/clothing/head/beanie/purple=1, /obj/item/clothing/head/beanie/yellow=1, /obj/item/clothing/head/beanie/orange=1, /obj/item/clothing/head/beanie/cyan=1, /obj/item/clothing/head/beanie/christmas=1,
/obj/item/clothing/head/beanie/striped=1, /obj/item/clothing/head/beanie/stripedred=1, /obj/item/clothing/head/beanie/stripedblue=1, /obj/item/clothing/head/beanie/stripedgreen=1,
/obj/item/clothing/suit/jacket/letterman_red=1)
/obj/item/clothing/suit/jacket/letterman_red=1,
/obj/item/clothing/ears/headphones = 10)
contraband = list(/obj/item/clothing/under/syndicate/tacticool=1,/obj/item/clothing/mask/balaclava=1,/obj/item/clothing/head/ushanka=1,/obj/item/clothing/under/soviet=1,/obj/item/weapon/storage/belt/fannypack/black=2,/obj/item/clothing/suit/jacket/letterman_syndie=1,/obj/item/clothing/under/jabroni=1, /obj/item/clothing/suit/vapeshirt=1, /obj/item/clothing/under/geisha=1)
premium = list(/obj/item/clothing/under/suit_jacket/checkered=1,/obj/item/clothing/head/mailman=1,/obj/item/clothing/under/rank/mailman=1,/obj/item/clothing/suit/jacket/leather=1,/obj/item/clothing/suit/jacket/leather/overcoat=1,/obj/item/clothing/under/pants/mustangjeans=1,/obj/item/clothing/neck/necklace/dope=3,/obj/item/clothing/suit/jacket/letterman_nanotrasen=1)
refill_canister = /obj/item/weapon/vending_refill/clothing
-23
View File
@@ -182,29 +182,6 @@
damaged_clothes = 0
cut_overlay(damaged_clothes_icons[index], TRUE)
//Ears: currently only used for headsets and earmuffs
/obj/item/clothing/ears
name = "ears"
w_class = WEIGHT_CLASS_TINY
throwforce = 0
slot_flags = SLOT_EARS
resistance_flags = 0
/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"
strip_delay = 15
equip_delay_other = 25
resistance_flags = FLAMMABLE
/obj/item/clothing/ears/earmuffs/Initialize(mapload)
..()
SET_SECONDARY_FLAG(src, BANG_PROTECT)
SET_SECONDARY_FLAG(src, HEALS_EARS)
//Glasses
/obj/item/clothing/glasses
name = "glasses"
+50
View File
@@ -0,0 +1,50 @@
//Ears: currently only used for headsets and earmuffs
/obj/item/clothing/ears
name = "ears"
w_class = WEIGHT_CLASS_TINY
throwforce = 0
slot_flags = SLOT_EARS
resistance_flags = 0
/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"
strip_delay = 15
equip_delay_other = 25
resistance_flags = FLAMMABLE
/obj/item/clothing/ears/earmuffs/Initialize(mapload)
. = ..()
SET_SECONDARY_FLAG(src, BANG_PROTECT)
SET_SECONDARY_FLAG(src, HEALS_EARS)
/obj/item/clothing/ears/headphones
name = "headphones"
desc = "Unce unce unce unce. Boop!"
icon = 'icons/obj/clothing/accessories.dmi'
icon_state = "headphones"
item_state = "headphones"
slot_flags = SLOT_EARS | SLOT_HEAD | SLOT_NECK //Fluff item, put it whereever you want!
actions_types = list(/datum/action/item_action/toggle_headphones)
var/headphones_on = FALSE
/obj/item/clothing/ears/headphones/Initialize()
. = ..()
update_icon()
/obj/item/clothing/ears/headphones/update_icon()
icon_state = "[initial(icon_state)]_[headphones_on? "on" : "off"]"
item_state = "[initial(item_state)]_[headphones_on? "on" : "off"]"
/obj/item/clothing/ears/headphones/proc/toggle(owner)
headphones_on = !headphones_on
update_icon()
var/mob/living/carbon/human/H = owner
if(istype(H))
H.update_inv_ears()
H.update_inv_neck()
H.update_inv_head()
to_chat(owner, "<span class='notice'>You turn the music [headphones_on? "on. Untz Untz Untz!" : "off."]</span>")
Binary file not shown.

Before

Width:  |  Height:  |  Size: 901 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

+1
View File
@@ -1186,6 +1186,7 @@
#include "code\modules\client\verbs\who.dm"
#include "code\modules\clothing\chameleon.dm"
#include "code\modules\clothing\clothing.dm"
#include "code\modules\clothing\ears\ears.dm"
#include "code\modules\clothing\glasses\engine_goggles.dm"
#include "code\modules\clothing\glasses\glasses.dm"
#include "code\modules\clothing\glasses\hud.dm"