Merge pull request #3736 from Fox-McCloud/miming-refactor

Miming Refactor
This commit is contained in:
TheDZD
2016-02-29 22:42:26 -05:00
16 changed files with 107 additions and 66 deletions
@@ -21,6 +21,10 @@
if (I.implanted)
I.trigger(act, src)
var/miming = 0
if(mind)
miming = mind.miming
//Emote Cooldown System (it's so simple!)
// proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
var/on_CD = 0
@@ -72,7 +72,6 @@
var/datum/martial_art/martial_art = null
var/miming = null //Toggle for the mime's abilities.
var/special_voice = "" // For changing our voice. Used by a symptom.
var/said_last_words=0
@@ -90,6 +90,11 @@
return GetSpecialVoice()
return real_name
/mob/living/carbon/human/IsVocal()
if(mind)
return !mind.miming
return 1
/mob/living/carbon/human/proc/SetSpecialVoice(var/new_voice)
if(new_voice)
special_voice = new_voice
+5
View File
@@ -71,6 +71,8 @@ proc/get_radio_key_from_channel(var/channel)
var/list/returns[3]
var/speech_problem_flag = 0
if((HULK in mutations) && health >= 25 && length(message))
message = "[uppertext(message)]!!!"
verb = pick("yells","roars","hollers")
@@ -91,6 +93,9 @@ proc/get_radio_key_from_channel(var/channel)
else if(COMIC in mutations)
message = "<span class='sans'>[message]</span>"
if(!IsVocal())
message = ""
speech_problem_flag = 1
returns[1] = message
returns[2] = verb
+2 -4
View File
@@ -1,5 +1,3 @@
/mob/living/silicon/ai/proc/IsVocal()
var/announcing_vox = 0 // Stores the time of the last announcement
var/const/VOX_CHANNEL = 200
var/const/VOX_DELAY = 100
@@ -30,7 +28,7 @@ var/const/VOX_PATH = "sound/vox_fem/"
/mob/living/silicon/ai/proc/ai_announcement()
if(check_unable(AI_CHECK_WIRELESS | AI_CHECK_RADIO))
return
if(announcing_vox > world.time)
src << "<span class='warning'>Please wait [round((announcing_vox - world.time) / 10)] seconds.</span>"
return
@@ -38,7 +36,7 @@ var/const/VOX_PATH = "sound/vox_fem/"
var/message = input(src, "WARNING: Misuse of this verb can result in you being job banned. More help is available in 'Announcement Help'", "Announcement", last_announcement) as text|null
last_announcement = message
if(check_unable(AI_CHECK_WIRELESS | AI_CHECK_RADIO))
return
+4 -1
View File
@@ -1448,4 +1448,7 @@ mob/proc/yank_out_object()
//Can this mob leave its location without breaking things terrifically?
/mob/proc/can_safely_leave_loc()
return 1 // Yes, you can
return 1 // Yes, you can
/mob/proc/IsVocal()
return 1