Skip to content

Negative Language Quirks #5591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from 2 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
11 changes: 11 additions & 0 deletions code/__DEFINES/~monkestation/quirk_costs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
This desolate file is the start of an attempt to rebalance quirk costs to be more consistent.
n.b. decreasing the cost of negative quirks could cause several players to have one or more of their positive quirks automatically removed.
*/

#define QUIRK_COST_UNCOMMON -6

#define QUIRK_COST_LISTENER -3
#define QUIRK_HARDCORE_LISTENER 3

#define QUIRK_COST_OUTSIDER -2
2 changes: 2 additions & 0 deletions code/controllers/subsystem/processing/quirks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
list("Mute", "Soft-Spoken"),
list("Stormtrooper Aim", "Big Hands"),
//list("Bilingual", "Foreigner"), //monkestation edit, commented out
list("Listener", "Uncommon"), // monkestation addition
list("Outsider", "Uncommon"), // monkestation addition
//might be fun to change this in the future. you can be a body purist but be forced to use implants regardless for medical reasons
list("Body Purist", "Hosed"),
list("Body Purist", "Neuralinked"),
Expand Down
2 changes: 2 additions & 0 deletions code/datums/quirks/neutral_quirks/foreigner.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* monkestation removal - replaced with /datum/quirk/language_holder/uncommon
/datum/quirk/foreigner
name = "Foreigner"
desc = "You're not from around here. You don't know Galactic Common!"
Expand All @@ -19,3 +20,4 @@
human_holder.remove_blocked_language(/datum/language/common)
if(ishumanbasic(human_holder))
human_holder.remove_language(/datum/language/uncommon)
*/
6 changes: 6 additions & 0 deletions code/game/say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,13 @@ GLOBAL_LIST_INIT(freqtospan, list(
/// Modifies the message by comparing the languages of the speaker with the languages of the hearer. Called on the hearer.
/atom/movable/proc/translate_language(atom/movable/speaker, datum/language/language, raw_message, list/spans, list/message_mods = list())
if(!language)
// monkestation edit start
/* original
return "makes a strange sound."
*/
var/datum/language/dialect = GLOB.language_datum_instances[/datum/language/common]
return dialect.scramble(raw_message)
// monkestation edit end

if(!has_language(language))
var/datum/language/dialect = GLOB.language_datum_instances[language]
Expand Down
25 changes: 25 additions & 0 deletions code/modules/language/language_holder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,31 @@ Key procs
if(M.current)
update_atom_languages(M.current)

// monkestation edit start
var/mob/living/carbon/carbon_owner = owner
if (istype(carbon_owner))
var/uncommon = carbon_owner.has_quirk(/datum/quirk/language_holder/uncommon)
var/outsider = carbon_owner.has_quirk(/datum/quirk/language_holder/outsider)
var/is_human = istype(carbon_owner.dna.species, /datum/species/human)
var/outsider_human = outsider && is_human
if (uncommon || outsider_human)
remove_language(/datum/language/common, TRUE, TRUE, LANGUAGE_ATOM)
add_blocked_language(/datum/language/common, LANGUAGE_QUIRK)
if (outsider)
for (var/language in understood_languages)
if (language != /datum/language/common)
remove_language(language, TRUE, FALSE, LANGUAGE_ATOM)
for (var/language in spoken_languages)
if (language != /datum/language/common)
remove_language(language, FALSE, TRUE, LANGUAGE_ATOM)
if (uncommon)
grant_language(/datum/language/uncommon, TRUE, TRUE, LANGUAGE_QUIRK)
if (outsider_human)
grant_language(pick(GLOB.roundstart_languages), TRUE, TRUE, LANGUAGE_QUIRK)
if (carbon_owner.has_quirk(/datum/quirk/language_holder/listener))
remove_language(/datum/language/common, FALSE, TRUE, LANGUAGE_ATOM)
// monkestation edit end

// If we have an owner, we'll set a default selected language
if(owner)
get_selected_language()
Expand Down
44 changes: 44 additions & 0 deletions monkestation/code/datums/quirks/negative_quirks/language_quirks.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/datum/quirk/language_holder
abstract_parent_type = /datum/quirk/language_holder
mail_goodies = list(/obj/item/taperecorder) // for translation

/datum/quirk/language_holder/proc/recreate_language_holder(client_source)
var/mob/living/carbon/human/human_holder = quirk_holder
human_holder.language_holder = new human_holder.language_holder.type(human_holder)
human_holder.update_atom_languages()
var/datum/quirk/bilingual/bilingual = human_holder.get_quirk(/datum/quirk/bilingual)
if (bilingual)
bilingual.add_unique(client_source)

/datum/quirk/language_holder/add(client/client_source)
recreate_language_holder(client_source)

/datum/quirk/language_holder/remove(client/client_source)
recreate_language_holder(client_source)

/datum/quirk/language_holder/uncommon
name = "Uncommon"
desc = "You don't understand Galactic Common having learned Galactic Uncommon instead."
icon = FA_ICON_LANGUAGE
value = QUIRK_COST_UNCOMMON
gain_text = span_notice("The words being spoken around you don't make any sense.")
lose_text = span_notice("You've developed fluency in Galactic Common.")
medical_record_text = "Patient does not understand Galactic Common and may require an interpreter."

/datum/quirk/language_holder/outsider
name = "Outsider"
desc = "You don't know your species' language. If you are human you know a random language instead of Galactic Common."
icon = FA_ICON_BAN
value = QUIRK_COST_OUTSIDER
gain_text = span_notice("You can't understand your species' language.")
lose_text = span_notice("You've remembered your species' language.")

/datum/quirk/language_holder/listener
name = "Listener"
desc = "You are unable to speak Galactic Common though you understand it just fine."
icon = FA_ICON_BELL_SLASH
value = QUIRK_COST_LISTENER
hardcore_value = QUIRK_HARDCORE_LISTENER
gain_text = span_notice("You don't know how to speak Galactic Common.")
lose_text = span_notice("You're able to speak Galactic Common.")
medical_record_text = "Patient does not speak Galactic Common and may require an interpreter."
2 changes: 2 additions & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@
#include "code\__DEFINES\~monkestation\physics.dm"
#include "code\__DEFINES\~monkestation\power.dm"
#include "code\__DEFINES\~monkestation\projectiles.dm"
#include "code\__DEFINES\~monkestation\quirk_costs.dm"
#include "code\__DEFINES\~monkestation\robots.dm"
#include "code\__DEFINES\~monkestation\skills.dm"
#include "code\__DEFINES\~monkestation\slimes.dm"
Expand Down Expand Up @@ -6023,6 +6024,7 @@
#include "monkestation\code\datums\quirks\negative_quirks\insanity.dm"
#include "monkestation\code\datums\quirks\negative_quirks\kakologophobia.dm"
#include "monkestation\code\datums\quirks\negative_quirks\kleptomaniac.dm"
#include "monkestation\code\datums\quirks\negative_quirks\language_quirks.dm"
#include "monkestation\code\datums\quirks\negative_quirks\light_drinker.dm"
#include "monkestation\code\datums\quirks\negative_quirks\monophobia.dm"
#include "monkestation\code\datums\quirks\negative_quirks\prosthetic_limb.dm"
Expand Down
Loading