mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
Fixes flaky language holder failure (#76477)
## About The Pull Request  ## 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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user