From 7c5a90c5e9c430ffc2067d59a28bfbbda5d95ed7 Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Wed, 15 Jul 2015 17:35:15 -0500 Subject: [PATCH 1/4] Fixes sounds cutting out --- code/modules/clothing/head/helmet.dm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 6bfa9615112..8cbfa5de052 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -66,9 +66,6 @@ icon_state = "[initial(icon_state)]up" usr << "[alt_toggle_message] \the [src]" usr.update_inv_head(0) - while(up) - playsound(src.loc, "[activation_sound]", 100, 0, 4) - sleep(15) /obj/item/clothing/head/helmet/justice name = "helmet of justice" @@ -80,6 +77,12 @@ can_toggle = 1 toggle_cooldown = 20 activation_sound = 'sound/items/WEEOO1.ogg' + +/obj/item/clothing/head/helmet/justice/attack_self() + ..() + while(up) + playsound(src.loc, "[activation_sound]", 100, 0, 4) + sleep(15) /obj/item/clothing/head/helmet/justice/escape name = "alarm helmet" From 1994070b3b8f48b3e81773c10d431321a20e3e60 Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Wed, 15 Jul 2015 17:59:50 -0500 Subject: [PATCH 2/4] Changes --- code/modules/clothing/head/helmet.dm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 8cbfa5de052..0b0fe3c94c4 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -66,6 +66,10 @@ icon_state = "[initial(icon_state)]up" usr << "[alt_toggle_message] \the [src]" usr.update_inv_head(0) + while(up) + if(active_sound) + playsound(src.loc, "[active_sound]", 100, 0, 4) + sleep(15) /obj/item/clothing/head/helmet/justice name = "helmet of justice" @@ -76,14 +80,8 @@ action_button_name = "Toggle Justice Lights" can_toggle = 1 toggle_cooldown = 20 - activation_sound = 'sound/items/WEEOO1.ogg' + active_sound = 'sound/items/WEEOO1.ogg' -/obj/item/clothing/head/helmet/justice/attack_self() - ..() - while(up) - playsound(src.loc, "[activation_sound]", 100, 0, 4) - sleep(15) - /obj/item/clothing/head/helmet/justice/escape name = "alarm helmet" desc = "WEEEEOOO. WEEEEEOOO. STOP THAT MONKEY. WEEEOOOO." From d193fe7baca9baa600b2ecdcfd138f091e4fdc60 Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Wed, 15 Jul 2015 18:02:15 -0500 Subject: [PATCH 3/4] Changes var name --- code/modules/clothing/clothing.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 186b2f0fca0..23a316a20d4 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -11,7 +11,7 @@ var/alt_desc = null var/toggle_message = null var/alt_toggle_message = null - var/activation_sound = null + var/active_sound = null var/toggle_cooldown = null var/cooldown = 0 var/obj/item/device/flashlight/F = null From d372bae224b3ce456c575b20b8484fe4ea04d418 Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Wed, 15 Jul 2015 18:03:12 -0500 Subject: [PATCH 4/4] I did it backwards help --- code/modules/clothing/head/helmet.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index 0b0fe3c94c4..375eb4e7f50 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -66,8 +66,8 @@ icon_state = "[initial(icon_state)]up" usr << "[alt_toggle_message] \the [src]" usr.update_inv_head(0) - while(up) - if(active_sound) + if(active_sound) + while(up) playsound(src.loc, "[active_sound]", 100, 0, 4) sleep(15)