From 24c93d9df66ad9d9be48c612903d144582dabce9 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Sat, 23 Nov 2019 01:46:59 +0100 Subject: [PATCH 1/2] [S] bikehorn fix 2: sound() datum doesn't accept double quotes, my bad. --- code/game/objects/items/clown_items.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/clown_items.dm b/code/game/objects/items/clown_items.dm index adc20039ee..e119473f1c 100644 --- a/code/game/objects/items/clown_items.dm +++ b/code/game/objects/items/clown_items.dm @@ -116,7 +116,7 @@ /obj/item/bikehorn/ComponentInitialize() . = ..() - AddComponent(/datum/component/squeak, list("[honksound]" = 1), 50) //Because list() is using named argument syntax here, we need to wrap the honksound between double quotes to pass it down correctly. + AddComponent(/datum/component/squeak, list(honksound), 50) /obj/item/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user) SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, moodlet, /datum/mood_event/honk) From 82d97ff4a7c3e35e0f584f63bfc78f8e147bd977 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Sat, 23 Nov 2019 01:51:31 +0100 Subject: [PATCH 2/2] This way is better --- code/game/objects/items/clown_items.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/clown_items.dm b/code/game/objects/items/clown_items.dm index e119473f1c..19fa68b93e 100644 --- a/code/game/objects/items/clown_items.dm +++ b/code/game/objects/items/clown_items.dm @@ -112,11 +112,11 @@ throw_range = 7 attack_verb = list("HONKED") var/moodlet = "honk" //used to define which kind of moodlet is added to the honked target - var/honksound = 'sound/items/bikehorn.ogg' + var/list/honksounds = list('sound/items/bikehorn.ogg' = 1) /obj/item/bikehorn/ComponentInitialize() . = ..() - AddComponent(/datum/component/squeak, list(honksound), 50) + AddComponent(/datum/component/squeak, honksounds, 50) /obj/item/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user) SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, moodlet, /datum/mood_event/honk) @@ -132,7 +132,7 @@ name = "air horn" desc = "Damn son, where'd you find this?" icon_state = "air_horn" - honksound = 'sound/items/airhorn2.ogg' + honksounds = list('sound/items/airhorn2.ogg' = 1) //golden bikehorn /obj/item/bikehorn/golden