mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-04 14:33:30 +00:00
Merge branch 'dev-freeze' of github.com:Baystation12/Baystation12 into more-say-code-fixes
Conflicts: code/modules/mob/hear_say.dm code/modules/mob/living/simple_animal/simple_animal.dm
This commit is contained in:
@@ -4,10 +4,19 @@
|
||||
if(!client)
|
||||
return
|
||||
|
||||
if(sleeping)
|
||||
hear_sleep(message)
|
||||
return
|
||||
|
||||
var/style = "body"
|
||||
if(language)
|
||||
if(!say_understands(speaker,language))
|
||||
if(!say_understands(speaker,language))
|
||||
if(istype(speaker,/mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/S = speaker
|
||||
message = pick(S.speak)
|
||||
else
|
||||
message = stars(message)
|
||||
|
||||
if(language)
|
||||
verb = language.speech_verb
|
||||
style = language.colour
|
||||
|
||||
@@ -37,14 +46,26 @@
|
||||
|
||||
|
||||
/mob/proc/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/mob/speaker = null, var/hard_to_hear = 0, var/vname ="")
|
||||
|
||||
if(!client)
|
||||
return
|
||||
|
||||
if(sleeping)
|
||||
hear_sleep(message)
|
||||
return
|
||||
|
||||
var/track = null
|
||||
|
||||
var/style = "body"
|
||||
if(language)
|
||||
if(!say_understands(speaker,language))
|
||||
|
||||
if(!say_understands(speaker,language))
|
||||
if(istype(speaker,/mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/S = speaker
|
||||
message = pick(S.speak)
|
||||
else
|
||||
message = stars(message)
|
||||
|
||||
if(language)
|
||||
verb = language.speech_verb
|
||||
style = language.colour
|
||||
|
||||
@@ -96,3 +117,21 @@
|
||||
src << "[part_a][track][part_b][verb], <span class=\"[style]\">\"[message]\"</span></span></span>"
|
||||
else
|
||||
src << "[part_a][speaker_name][part_b][verb], <span class=\"[style]\">\"[message]\"</span></span></span>"
|
||||
|
||||
/mob/proc/hear_sleep(var/message)
|
||||
var/heard = ""
|
||||
if(prob(15))
|
||||
var/list/punctuation = list(",", "!", ".", ";", "?")
|
||||
var/list/messages = text2list(message, " ")
|
||||
var/R = rand(1, messages.len)
|
||||
var/heardword = messages[R]
|
||||
if(copytext(heardword,1, 1) in punctuation)
|
||||
heardword = copytext(heardword,2)
|
||||
if(copytext(heardword,-1) in punctuation)
|
||||
heardword = copytext(heardword,1,lentext(heardword))
|
||||
heard = "<span class = 'game_say'>...You hear something about...[heardword]</span>"
|
||||
|
||||
else
|
||||
heard = "<span class = 'game_say'>...<i>You almost hear someone talking</i>...</span>"
|
||||
|
||||
src << heard
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
..(message, speaking, verb, alt_name, italics, message_range, used_radios)
|
||||
|
||||
/mob/living/carbon/human/say_understands(var/other,var/datum/language/speaking = null)
|
||||
/mob/living/carbon/human/say_understands(var/mob/other,var/datum/language/speaking = null)
|
||||
|
||||
if(has_brain_worms()) //Brain worms translate everything. Even mice and alien speak.
|
||||
return 1
|
||||
@@ -138,6 +138,11 @@
|
||||
return 1
|
||||
if (istype(other, /mob/living/carbon/slime))
|
||||
return 1
|
||||
if (istype(other, /mob/living/simple_animal))
|
||||
if(other.universal_speak || src.universal_speak || src.universal_understand)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/GetVoice()
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
a_intent = "harm"
|
||||
stop_automated_movement = 1
|
||||
status_flags = CANPUSH
|
||||
universal_speak = 1
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
min_oxy = 0
|
||||
max_oxy = 0
|
||||
@@ -320,4 +321,4 @@
|
||||
if (cultist == usr) //just to be sure.
|
||||
return
|
||||
cultist.loc = usr.loc
|
||||
usr.visible_message("/red [cultist] appears in a flash of red light as [usr] glows with power")*/
|
||||
usr.visible_message("/red [cultist] appears in a flash of red light as [usr] glows with power")*/
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
speak_emote = list("clicks")
|
||||
emote_hear = list("clicks")
|
||||
emote_see = list("clacks")
|
||||
universal_speak = 1
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat
|
||||
@@ -56,4 +57,4 @@
|
||||
src.say(msg)
|
||||
else
|
||||
var/msg = pick(comments)
|
||||
src.say(msg)
|
||||
src.say(msg)
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
response_disarm = "gently moves aside the"
|
||||
response_harm = "swats the"
|
||||
stop_automated_movement = 1
|
||||
universal_speak = 1
|
||||
|
||||
var/parrot_state = PARROT_WANDER //Hunt for a perch when created
|
||||
var/parrot_sleep_max = 25 //The time the parrot sits while perched before looking around. Mosly a way to avoid the parrot's AI in life() being run every single tick.
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
icon_dead = "shade_dead"
|
||||
maxHealth = 50
|
||||
health = 50
|
||||
universal_speak = 1
|
||||
speak_emote = list("hisses")
|
||||
emote_hear = list("wails","screeches")
|
||||
response_help = "puts their hand through"
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
maxHealth = 30
|
||||
health = 30
|
||||
|
||||
universal_speak =1
|
||||
|
||||
stop_automated_movement = 1
|
||||
animate_movement = SYNC_STEPS
|
||||
|
||||
@@ -196,4 +198,4 @@
|
||||
for(var/atom/movable/stomachContent in contents) //or poop it out
|
||||
loc.contents += stomachContent
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
@@ -413,3 +413,10 @@
|
||||
proc/close_spawn_windows()
|
||||
src << browse(null, "window=latechoices") //closes late choices window
|
||||
src << browse(null, "window=playersetup") //closes the player setup window
|
||||
|
||||
|
||||
/mob/new_player/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/alt_name = "",var/italics = 0, var/mob/speaker = null)
|
||||
return
|
||||
|
||||
/mob/new_player/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/mob/speaker = null, var/hard_to_hear = 0)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user