mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-17 10:57:19 +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()
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
L = GLOB.language_keys[language_prefix]
|
||||
|
||||
//Check if we can speak the language, otherwise return null
|
||||
if(can_speak(L))
|
||||
if(istype(L) && can_speak(L))
|
||||
return L
|
||||
else
|
||||
return null
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# balance
|
||||
# admin
|
||||
# backend
|
||||
# security
|
||||
# refactor
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: FluffyGhost
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- bugfix: "Fixed yet another canspeak runtime."
|
||||
- backend: "Added some SDMM markings, DMDoced the proc, added a guard in case the language is not supplied to the proc."
|
||||
Reference in New Issue
Block a user