This commit is contained in:
Fluffy
2024-02-29 18:38:23 +01:00
committed by GitHub
parent b4737a6524
commit 04d70d32fc
3 changed files with 58 additions and 2 deletions
+15 -1
View File
@@ -261,8 +261,22 @@
default_language = null
return ..()
// Can we speak this language, as opposed to just understanding it?
/**
* Check if the language can be spoken by the mob,
* not the same thing as understood (you can understand a language without speaking it)
*
* * speaking - The `/datum/language` to check against, if the mob can speak it
*
* Returns `TRUE` if the mob speaks the language, `FALSE` otherwise
*/
/mob/proc/can_speak(datum/language/speaking)
SHOULD_NOT_SLEEP(TRUE)
SHOULD_BE_PURE(TRUE)
if(!istype(speaking))
stack_trace("No language supplied to check if it can be spoken!")
return FALSE
return (speaking.check_speech_restrict(src) && (universal_speak || (speaking && speaking.flags & INNATE) || (speaking in src.languages)))
/mob/proc/get_language_prefix()