Fixes flaky language holder failure (#76477)

## About The Pull Request


![image](https://github.com/tgstation/tgstation/assets/51863163/d4f2fd51-6884-4623-b208-f670b6cdb75d)

## Why It's Good For The Game

Flaky failure

## Changelog

🆑 Melbert
fix: Fixes a runtime from people with aphasia trauma getting deleted
/🆑
This commit is contained in:
MrMelbert
2023-07-02 01:28:20 +01:00
committed by GitHub
parent fc62a46cf1
commit d3fbaea8bd
2 changed files with 8 additions and 2 deletions
+4 -2
View File
@@ -33,8 +33,10 @@
..()
/datum/brain_trauma/severe/aphasia/on_lose()
owner.remove_blocked_language(subtypesof(/datum/language/), LANGUAGE_APHASIA)
owner.remove_language(/datum/language/aphasia, TRUE, TRUE, LANGUAGE_APHASIA)
if(!QDELING(owner))
owner.remove_blocked_language(subtypesof(/datum/language/), LANGUAGE_APHASIA)
owner.remove_language(/datum/language/aphasia, TRUE, TRUE, LANGUAGE_APHASIA)
..()
/datum/brain_trauma/severe/blindness
+4
View File
@@ -1447,6 +1447,10 @@
/// Gets or creates the relevant language holder. For mindless atoms, gets the local one. For atom with mind, gets the mind one.
/atom/movable/proc/get_language_holder(get_minds = TRUE)
if(QDELING(src))
CRASH("get_language_holder() called on a QDELing atom, \
this will try to re-instantiate the language holder that's about to be deleted, which is bad.")
if(!language_holder)
language_holder = new initial_language_holder(src)
return language_holder