mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
space pods damage your ears
TURN YOUR FUCKING RAP MUSIC VOLUME DOWN
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
/datum/element/eardamaging
|
||||
element_flags = ELEMENT_DETACH
|
||||
var/list/user_by_item = list()
|
||||
|
||||
/datum/element/eardamaging/New()
|
||||
START_PROCESSING(SSdcs, src)
|
||||
|
||||
/datum/element/eardamaging/Attach(datum/target)
|
||||
. = ..()
|
||||
if(!isitem(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
|
||||
RegisterSignal(target, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED), .proc/equippedChanged)
|
||||
|
||||
/datum/element/eardamaging/Detach(datum/target)
|
||||
. = ..()
|
||||
UnregisterSignal(target, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED))
|
||||
user_by_item -= target
|
||||
|
||||
/datum/element/eardamaging/proc/equippedChanged(datum/source, mob/living/carbon/user, slot)
|
||||
if(slot == ITEM_SLOT_EARS && istype(user))
|
||||
user_by_item[source] = user
|
||||
else
|
||||
user_by_item -= source
|
||||
|
||||
/datum/element/eardamaging/process()
|
||||
for(var/i in user_by_item)
|
||||
var/mob/living/carbon/user = user_by_item[i]
|
||||
if(HAS_TRAIT(user, TRAIT_DEAF))
|
||||
continue
|
||||
var/obj/item/organ/ears/ears = user.getorganslot(ORGAN_SLOT_EARS)
|
||||
if(!ears)
|
||||
continue
|
||||
ears.deaf = max(ears.deaf + 0.5)
|
||||
ears.damage = max(ears.damage + 0.25, 0.25)
|
||||
CHECK_TICK
|
||||
@@ -7,6 +7,20 @@
|
||||
slot_flags = ITEM_SLOT_EARS
|
||||
resistance_flags = NONE
|
||||
|
||||
/obj/item/clothing/ears/spacepods
|
||||
name = "nanotrasen space pods"
|
||||
desc = "Flex your money, AND ignore what everone else says, all at once!"
|
||||
icon = 'icons/obj/clothing/accessories.dmi'
|
||||
icon_state = "spacepods"
|
||||
item_state = "spacepods"
|
||||
strip_delay = 100 //air pods don't fall out
|
||||
custom_premium_price = 1800
|
||||
|
||||
/obj/item/clothing/ears/spacepods/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/eardamaging)
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))
|
||||
|
||||
/obj/item/clothing/ears/earmuffs
|
||||
name = "earmuffs"
|
||||
desc = "Protects your hearing from loud noises, and quiet ones as well."
|
||||
@@ -22,15 +36,6 @@
|
||||
AddElement(/datum/element/earhealing)
|
||||
AddComponent(/datum/component/wearertargeting/earprotection, list(ITEM_SLOT_EARS))
|
||||
|
||||
/obj/item/clothing/ears/earmuffs/spacepods
|
||||
name = "nanotrasen space pods"
|
||||
desc = "Flex your money, AND ignore what everone else says, all at once!"
|
||||
icon = 'icons/obj/clothing/accessories.dmi'
|
||||
icon_state = "spacepods"
|
||||
item_state = "spacepods"
|
||||
strip_delay = 100 //air pods don't fall out
|
||||
custom_premium_price = 1800
|
||||
|
||||
/obj/item/clothing/ears/headphones
|
||||
name = "headphones"
|
||||
desc = "Unce unce unce unce. Boop!"
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
/obj/item/clothing/under/pants/mustangjeans = 1,
|
||||
/obj/item/clothing/neck/necklace/dope = 3,
|
||||
/obj/item/clothing/suit/jacket/letterman_nanotrasen = 1,
|
||||
/obj/item/clothing/ears/earmuffs/spacepods = 1)
|
||||
/obj/item/clothing/ears/spacepods = 1)
|
||||
refill_canister = /obj/item/vending_refill/clothing
|
||||
default_price = 60
|
||||
extra_price = 120
|
||||
|
||||
Reference in New Issue
Block a user