mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
Merge pull request #4030 from VOREStation/upstream-merge-5402
[MIRROR] Language and Larynx Additions
This commit is contained in:
42
code/modules/organs/internal/voicebox.dm
Normal file
42
code/modules/organs/internal/voicebox.dm
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Voicebox/Vocal Synthesizers
|
||||
* TL;DR: Assists with speaking languages that a species doesn't normally have,
|
||||
* such as EAL. Not standard or organic, because at the moment it's undesireable to completely mute characters.
|
||||
*/
|
||||
|
||||
/obj/item/organ/internal/voicebox
|
||||
name = "larynx"
|
||||
icon_state = "larynx"
|
||||
parent_organ = BP_TORSO // We don't have a neck area
|
||||
organ_tag = O_VOICE
|
||||
will_assist_languages = list(LANGUAGE_GALCOM)
|
||||
|
||||
/obj/item/organ/internal/voicebox/New()
|
||||
..()
|
||||
amend_assist_langs()
|
||||
|
||||
/obj/item/organ/internal/voicebox/proc/amend_assist_langs() // Adds the list of language datums assisted by the voicebox to the list used in speaking
|
||||
for(var/L in will_assist_languages)
|
||||
assists_languages |= all_languages[L]
|
||||
|
||||
/obj/item/organ/internal/voicebox/proc/add_assistable_langs(var/language) // Adds a new language (by string/define) to the list of things the voicebox can assist
|
||||
will_assist_languages |= language
|
||||
amend_assist_langs() // Can't think of a better place to put this, makes the voicebox actually start to assist with the added language
|
||||
|
||||
/////////////////////////////////
|
||||
// Voicebox Subtypes
|
||||
/////////////////////////////////
|
||||
|
||||
/obj/item/organ/internal/voicebox/assist // In the off chance we get a species that doesn't speak GalCom by default
|
||||
|
||||
/obj/item/organ/internal/voicebox/assist/New()
|
||||
..()
|
||||
mechassist()
|
||||
|
||||
/obj/item/organ/internal/voicebox/robot
|
||||
name = "vocal synthesizer"
|
||||
will_assist_languages = list(LANGUAGE_GALCOM, LANGUAGE_EAL) // Synthetics spawn with this by default
|
||||
|
||||
/obj/item/organ/internal/voicebox/robot/New()
|
||||
..()
|
||||
robotize()
|
||||
@@ -31,6 +31,10 @@ var/list/organ_cache = list()
|
||||
var/rejecting // Is this organ already being rejected?
|
||||
var/preserved = 0 // If this is 1, prevents organ decay.
|
||||
|
||||
// Language vars. Putting them here in case we decide to do something crazy with sign-or-other-nonverbal languages.
|
||||
var/list/will_assist_languages = list()
|
||||
var/list/datum/language/assists_languages = list()
|
||||
|
||||
/obj/item/organ/Destroy()
|
||||
|
||||
if(owner) owner = null
|
||||
|
||||
@@ -23,10 +23,11 @@
|
||||
organ_rel_size = 70
|
||||
base_miss_chance = 10
|
||||
|
||||
/obj/item/organ/external/chest/robotize(var/company, var/skip_prosthetics = 0, var/keep_organs = 0)
|
||||
/obj/item/organ/external/chest/robotize()
|
||||
if(..() && robotic != ORGAN_NANOFORM) //VOREStation Edit
|
||||
// Give them a new cell.
|
||||
owner.internal_organs_by_name["cell"] = new /obj/item/organ/internal/cell(owner,1)
|
||||
// Give them fancy new organs.
|
||||
owner.internal_organs_by_name[O_CELL] = new /obj/item/organ/internal/cell(owner,1)
|
||||
owner.internal_organs_by_name[O_VOICE] = new /obj/item/organ/internal/voicebox/robot(owner, 1)
|
||||
|
||||
/obj/item/organ/external/chest/handle_germ_effects()
|
||||
. = ..() //Should return an infection level
|
||||
|
||||
Reference in New Issue
Block a user