Fixes Voice of God (#24328)

This commit is contained in:
XDTM
2017-02-23 20:20:25 +01:00
committed by AnturK
parent ba965bd030
commit 34aafab401
3 changed files with 14 additions and 10 deletions
+2 -2
View File
@@ -251,8 +251,8 @@ var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
var/mob/living/carbon/C = src
var/obj/item/organ/vocal_cords/V = C.getorganslot("vocal_cords")
if(V && V.can_speak_with())
C.say(V.handle_speech(message), spans = V.spans, sanitize = FALSE)
V.speak_with(message) //words come before actions
V.handle_speech(message) //message
V.speak_with(message) //action
return TRUE
return FALSE
@@ -9,7 +9,8 @@
var/command
var/cooldown_mod = 1
var/power_mod = 1
var/list/spans = list()
var/list/spans = list("colossus","yell")
var/speech_sound = 'sound/magic/clockwork/invoke_general.ogg'
/obj/effect/proc_holder/spell/voice_of_god/can_cast(mob/user = usr)
if(!user.can_speak())
@@ -29,6 +30,8 @@
..()
/obj/effect/proc_holder/spell/voice_of_god/cast(list/targets, mob/user = usr)
user.say(uppertext(command), spans = spans, sanitize = FALSE)
playsound(get_turf(user), speech_sound, 300, 1, 5)
var/cooldown = voice_of_god(command, user, spans, base_multiplier = power_mod)
charge_max = (cooldown * cooldown_mod)
@@ -37,4 +40,5 @@
desc = "Speak with an incredibly funny voice, startling people into obeying you for a brief moment."
power_mod = 0.1
cooldown_mod = 0.5
spans = list("clown")
spans = list("clown")
speech_sound = 'sound/spookoween/scary_horn2.ogg'
+6 -6
View File
@@ -61,8 +61,8 @@ var/static/regex/multispin_words = regex("like a record baby|right round")
/obj/item/organ/vocal_cords/proc/speak_with(message) //do what the organ does
return
/obj/item/organ/vocal_cords/proc/handle_speech(message) //change the message
return message
/obj/item/organ/vocal_cords/proc/handle_speech(message) //actually say the message
owner.say(message, spans = spans, sanitize = FALSE)
//Colossus drop, forces the listeners to obey certain commands
/obj/item/organ/vocal_cords/colossus
@@ -122,10 +122,12 @@ var/static/regex/multispin_words = regex("like a record baby|right round")
return TRUE
/obj/item/organ/vocal_cords/colossus/handle_speech(message)
owner.say(uppertext(message), spans = spans, sanitize = FALSE)
playsound(get_turf(owner), 'sound/magic/clockwork/invoke_general.ogg', 300, 1, 5)
return //voice of god speaks for us
/obj/item/organ/vocal_cords/colossus/speak_with(message)
var/cooldown = voice_of_god(message, owner, spans = null, base_multiplier)
var/cooldown = voice_of_god(message, owner, spans, base_multiplier)
next_command = world.time + (cooldown * cooldown_mod)
//////////////////////////////////////
@@ -145,9 +147,7 @@ var/static/regex/multispin_words = regex("like a record baby|right round")
else if (is_servant_of_ratvar(user))
span_list = list("ratvar")
else
span_list = list("colossus","yell")
user.say(uppertext(message), spans = span_list, sanitize = FALSE)
playsound(get_turf(user), 'sound/magic/clockwork/invoke_general.ogg', 300, 1, 5)
span_list = list()
message = lowertext(message)
var/mob/living/list/listeners = list()