Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/_globalvars/lists/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ GLOBAL_LIST_INIT(language_types_by_name, init_language_types_by_name())
continue

lang_list[lang_type] = new lang_type()
randomize_crusoes_local(lang_list) // DOPPLER EDIT ADDITION - Randomize Crusoe's Locals' Pidgins
return lang_list

/proc/init_all_languages()
Expand Down
48 changes: 48 additions & 0 deletions code/_globalvars/~doppler_globalvars/lists/languages.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

/// List if all language typepaths learnable, i.e. those with keys, sorted by default_priority.
/// Used by the language menu to determine display priority.
GLOBAL_LIST_INIT(all_languages_by_priority, init_all_languages_by_priority())

/proc/init_all_languages_by_priority()
var/list/lang_list = list()
for(var/datum/language/lang_type as anything in typesof(/datum/language))
if(!initial(lang_type.key))
continue
lang_list += lang_type
sortTim(lang_list, cmp = GLOBAL_PROC_REF(cmp_language_priority_dsc))
return lang_list

/// Sorts languages based on their default_priority, in descending order.
/proc/cmp_language_priority_dsc(datum/language/lang_a, datum/language/lang_b)
return lang_b.default_priority - lang_a.default_priority


/// Randomizes Crusoe's Locals' Pidgins.
/// We can't run this when making the language, as other language prototypes haven't finished.
/// But our global var handling is before base TG's, so we can't override it easily either.
/// Thus, we non-modularly run this proc in base TG's language prototype init.
/proc/randomize_crusoes_local(list/language_prototypes)
var/datum/language/the_localspeak = language_prototypes[/datum/language/crusoeslocal]
the_localspeak.syllables = list()
var/total_mutual_understanding = counterlist_sum(the_localspeak.mutual_understanding)

for(var/datum/language/mutual_lang_type as anything in the_localspeak.mutual_understanding)
var/datum/language/mutual_lang = language_prototypes[mutual_lang_type]
var/list/syllables_to_steal = mutual_lang.syllables.Copy()
var/percent_this_language = round((the_localspeak.mutual_understanding[mutual_lang_type] / total_mutual_understanding) * 100, 1)
var/amount_to_steal = min(percent_this_language, length(syllables_to_steal))
for(var/i = 0, i < amount_to_steal, i++)
var/stolen_syllable = pick(syllables_to_steal)
the_localspeak.syllables.Add(stolen_syllable)
syllables_to_steal.Remove(stolen_syllable)

var/datum/language/space_chance_lang = language_prototypes[pick_weight(the_localspeak.mutual_understanding)]
the_localspeak.space_chance = space_chance_lang.space_chance

var/datum/language/sentence_chance_lang = language_prototypes[pick_weight(the_localspeak.mutual_understanding)]
the_localspeak.sentence_chance = sentence_chance_lang.sentence_chance
the_localspeak.between_word_sentence_chance = sentence_chance_lang.between_word_sentence_chance

var/datum/language/syllable_chance_lang = language_prototypes[pick_weight(the_localspeak.mutual_understanding)]
the_localspeak.additional_syllable_low = syllable_chance_lang.additional_syllable_low
the_localspeak.additional_syllable_high = syllable_chance_lang.additional_syllable_high
4 changes: 2 additions & 2 deletions code/game/machinery/dna_infuser/organ_sets/fish_organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
if(HAS_TRAIT(owner, TRAIT_IS_WET) && istype(owner.get_organ_slot(ORGAN_SLOT_EXTERNAL_TAIL), /obj/item/organ/tail/fish))
add_speed_buff()
owner.mind?.adjust_experience(/datum/skill/fishing, SKILL_EXP_JOURNEYMAN, silent = TRUE)
owner.grant_language(/datum/language/carptongue, ALL, type)
// owner.grant_language(/datum/language/carptongue, ALL, type) // DOPPLER EDIT REMOVAL - carptongue rework, non-carp don't speak it inherently

/datum/status_effect/organ_set_bonus/fish/disable_bonus(obj/item/organ/removed_organ)
. = ..()
Expand All @@ -78,7 +78,7 @@
if(HAS_TRAIT(owner, TRAIT_IS_WET) && istype(owner.get_organ_slot(ORGAN_SLOT_EXTERNAL_TAIL), /obj/item/organ/tail/fish))
remove_speed_buff()
owner.mind?.adjust_experience(/datum/skill/fishing, -SKILL_EXP_JOURNEYMAN, silent = TRUE)
owner.remove_language(/datum/language/carptongue, ALL, type)
// owner.remove_language(/datum/language/carptongue, ALL, type) // DOPPLER EDIT REMOVAL - carptongue rework, non-carp don't speak it inherently

/datum/status_effect/organ_set_bonus/fish/set_organs(new_value, obj/item/organ/organ)
. = ..()
Expand Down
11 changes: 11 additions & 0 deletions modular_doppler/carp_infusion/code/carp_organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@
/obj/item/organ/brain/carp
cooldown_time = 60 MINUTES // to allow for scenes w/o moodlet grief

/obj/item/organ/brain/carp/on_mob_insert(mob/living/carbon/receiver)
. = ..()
receiver.grant_language(/datum/language/carptongue, ALL, source = type)
to_chat(receiver, span_boldnotice("You gain a new understanding of [/datum/language/carptongue::name]."))

/obj/item/organ/brain/carp/on_mob_remove(mob/living/carbon/owner)
. = ..()
if(QDELING(owner))
return
owner.remove_language(/datum/language/carptongue, ALL, source = type)

// only try to bite people if we're not wearing a mask
/obj/item/organ/brain/carp/get_attacking_limb(mob/living/carbon/human/target)
. = ..()
Expand Down
27 changes: 14 additions & 13 deletions modular_doppler/languages/code/language menu/_language.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,17 @@
/datum/language/nekomimetic
secret = TRUE //...and so it vanished, a whisper in the darkness.

/datum/language/shadowtongue
name = "Shadowtongue"
desc = "TONGUE OF A REALITY PLANE OFFSET FIVE INCHES ABOVE YOURS; the language of Resonance and Magycks, spoken by sorcerers and reality-benders. The language their olden books are oft written in."

/datum/language/moffic
desc = "Spoken colloquially by the Mothfolk of Va Lumla, the early iteration of Mothic emerged when Fueljacks relied on their receptors for simple, one-worded pheromones to communicate, and navigate the often fatal maintenance tunnels sprawled throughout the fleet. \
The moths developed gesticulation through antennas and wings to convey deeper intent, with mandibles providing emotional context through clicks and trills. \
After contact with the Celestial Accord, human speakers managed to achieve a similar effect from clicking their tongue to roof, and steer the tone with the width of their mouth while using their hands in place of antennas. \
It is informally spoken, deploying many slangs and shorthands from Common. Has phonetic resemblance to Italian."

/datum/language/uncommon
name = "Xerxian"
desc = "A modernization of the Arabic dialects found on Earth, loosely based on the original MSA (Modern Standardized Arabic). Simplified syntax and a reduced reliance on case-endings and diacritical marks make it easier to learn and read."
/datum/language/buzzwords
secret = TRUE

/datum/language/monkey
secret = TRUE

/datum/language/slime
secret = TRUE

/datum/language/spinwarder
secret = TRUE

/datum/language/terrum
secret = TRUE
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
var/list/selected_languages = list()
var/list/unselected_languages = list()

for (var/language_name in GLOB.all_languages)
for (var/language_name in GLOB.all_languages_by_priority)
var/datum/language/language = GLOB.language_datum_instances[language_name]

if(language.secret && !(language.type in species.language_prefs_whitelist)) // For ghostrole species who are able to speak a secret language, e.g. ashwalkers, display it.
Expand Down
27 changes: 27 additions & 0 deletions modular_doppler/languages/code/language menu/language_holder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,30 @@ GLOBAL_DATUM_INIT(language_holder_adjustor, /datum/language_holder_adjustor, new
/datum/language/sylvan = list(LANGUAGE_ATOM),
/datum/language/nambuni = list(LANGUAGE_ATOM),
)

// SPECIES OVERRIDES

/datum/language_holder/golem
understood_languages = list(
/datum/language/common = list(LANGUAGE_ATOM),
)
spoken_languages = list(
/datum/language/common = list(LANGUAGE_ATOM),
)

// Sorry, whimsical inexplicable skeleton language.
/datum/language_holder/skeleton
understood_languages = list(
/datum/language/common = list(LANGUAGE_ATOM),
)
spoken_languages = list(
/datum/language/common = list(LANGUAGE_ATOM),
)

/datum/language_holder/jelly
understood_languages = list(
/datum/language/common = list(LANGUAGE_ATOM),
)
spoken_languages = list(
/datum/language/common = list(LANGUAGE_ATOM),
)
Loading