mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-19 03:49:10 +01:00
sadf (#18576)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user