Skip to content

Commit bf4a23f

Browse files
committed
misc improvements
1 parent f2418b3 commit bf4a23f

File tree

7 files changed

+43
-61
lines changed

7 files changed

+43
-61
lines changed

code/__DEFINES/~monkestation/quirk_costs.dm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@
88
#define QUIRK_COST_LISTENER -3
99
#define QUIRK_HARDCORE_LISTENER 3
1010

11-
#define QUIRK_COST_OUTSIDER -2
11+
#define QUIRK_COST_OUTSIDER -QUIRK_COST_BILINGUAL // Effectively allows players to choose their character's alt language
12+
13+
#define QUIRK_COST_BILINGUAL 2

code/datums/quirks/neutral_quirks/foreigner.dm

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
/* monkestation removal - replaced with /datum/quirk/language_holder/uncommon
21
/datum/quirk/foreigner
32
name = "Foreigner"
4-
desc = "You're not from around here. You don't know Galactic Common!"
3+
// monkestation edit original: desc = "You're not from around here. You don't know Galactic Common!"
4+
desc = "You don't understand Galactic Common. If you are human you have learned Galactic Uncommon instead."
55
icon = FA_ICON_LANGUAGE
6-
value = -2 //Monkestation change 0->-2
6+
value = QUIRK_COST_UNCOMMON //Monkestation change 0->QUIRK_COST_UNCOMMON
77
gain_text = span_notice("The words being spoken around you don't make any sense.")
88
lose_text = span_notice("You've developed fluency in Galactic Common.")
9-
medical_record_text = "Patient does not speak Galactic Common and may require an interpreter."
9+
// monkestation edit original: medical_record_text = "Patient does not speak Galactic Common and may require an interpreter."
10+
medical_record_text = "Patient does not understand Galactic Common and may require an interpreter."
1011
mail_goodies = list(/obj/item/taperecorder) // for translation
1112

13+
// monkestation edit start
14+
/* original
1215
/datum/quirk/foreigner/add(client/client_source)
1316
var/mob/living/carbon/human/human_holder = quirk_holder
1417
human_holder.add_blocked_language(/datum/language/common)
@@ -21,3 +24,10 @@
2124
if(ishumanbasic(human_holder))
2225
human_holder.remove_language(/datum/language/uncommon)
2326
*/
27+
/datum/quirk/foreigner/add_unique(client/client_source)
28+
. = ..()
29+
var/mob/living/carbon/human/human_holder = quirk_holder
30+
quirk_holder.remove_language(/datum/language/common, TRUE, TRUE, LANGUAGE_ALL)
31+
if(ishumanbasic(human_holder))
32+
human_holder.grant_language(/datum/language/uncommon, understood = TRUE, spoken = TRUE, source = LANGUAGE_QUIRK)
33+
// monkestation edit end

code/datums/quirks/positive_quirks/bilingual.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "Bilingual"
33
desc = "Over the years you've picked up an extra language!"
44
icon = FA_ICON_GLOBE
5-
value = 4
5+
value = QUIRK_COST_BILINGUAL // monkestation edit 4 -> QUIRK_COST_BILINGUAL
66
gain_text = span_notice("Some of the words of the people around you certainly aren't common. Good thing you studied for this.")
77
lose_text = span_notice("You seem to have forgotten your second language.")
88
medical_record_text = "Patient speaks multiple languages."

code/modules/language/language_holder.dm

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -62,31 +62,6 @@ Key procs
6262
if(M.current)
6363
update_atom_languages(M.current)
6464

65-
// monkestation edit start
66-
var/mob/living/carbon/carbon_owner = owner
67-
if (istype(carbon_owner))
68-
var/uncommon = carbon_owner.has_quirk(/datum/quirk/language_holder/uncommon)
69-
var/outsider = carbon_owner.has_quirk(/datum/quirk/language_holder/outsider)
70-
var/is_human = istype(carbon_owner.dna.species, /datum/species/human)
71-
var/outsider_human = outsider && is_human
72-
if (uncommon || outsider_human)
73-
remove_language(/datum/language/common, TRUE, TRUE, LANGUAGE_ATOM)
74-
add_blocked_language(/datum/language/common, LANGUAGE_QUIRK)
75-
if (outsider)
76-
for (var/language in understood_languages)
77-
if (language != /datum/language/common)
78-
remove_language(language, TRUE, FALSE, LANGUAGE_ATOM)
79-
for (var/language in spoken_languages)
80-
if (language != /datum/language/common)
81-
remove_language(language, FALSE, TRUE, LANGUAGE_ATOM)
82-
if (uncommon)
83-
grant_language(/datum/language/uncommon, TRUE, TRUE, LANGUAGE_QUIRK)
84-
if (outsider_human)
85-
grant_language(pick(GLOB.roundstart_languages), TRUE, TRUE, LANGUAGE_QUIRK)
86-
if (carbon_owner.has_quirk(/datum/quirk/language_holder/listener))
87-
remove_language(/datum/language/common, FALSE, TRUE, LANGUAGE_ATOM)
88-
// monkestation edit end
89-
9065
// If we have an owner, we'll set a default selected language
9166
if(owner)
9267
get_selected_language()
Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,25 @@
1-
/datum/quirk/language_holder
2-
abstract_parent_type = /datum/quirk/language_holder
3-
mail_goodies = list(/obj/item/taperecorder) // for translation
4-
5-
/datum/quirk/language_holder/proc/recreate_language_holder(client_source)
6-
var/mob/living/carbon/human/human_holder = quirk_holder
7-
human_holder.language_holder = new human_holder.language_holder.type(human_holder)
8-
human_holder.update_atom_languages()
9-
var/datum/quirk/bilingual/bilingual = human_holder.get_quirk(/datum/quirk/bilingual)
10-
if (bilingual)
11-
bilingual.add_unique(client_source)
12-
13-
/datum/quirk/language_holder/add(client/client_source)
14-
recreate_language_holder(client_source)
15-
16-
/datum/quirk/language_holder/remove(client/client_source)
17-
recreate_language_holder(client_source)
18-
19-
/datum/quirk/language_holder/uncommon
20-
name = "Uncommon"
21-
desc = "You don't understand Galactic Common having learned Galactic Uncommon instead."
22-
icon = FA_ICON_LANGUAGE
23-
value = QUIRK_COST_UNCOMMON
24-
gain_text = span_notice("The words being spoken around you don't make any sense.")
25-
lose_text = span_notice("You've developed fluency in Galactic Common.")
26-
medical_record_text = "Patient does not understand Galactic Common and may require an interpreter."
27-
28-
/datum/quirk/language_holder/outsider
1+
/datum/quirk/outsider
292
name = "Outsider"
303
desc = "You don't know your species' language. If you are human you know a random language instead of Galactic Common."
314
icon = FA_ICON_BAN
325
value = QUIRK_COST_OUTSIDER
336
gain_text = span_notice("You can't understand your species' language.")
347
lose_text = span_notice("You've remembered your species' language.")
358

36-
/datum/quirk/language_holder/listener
9+
/datum/quirk/outsider/add_unique(client/client_source)
10+
var/is_human = ishumanbasic(quirk_holder)
11+
if (is_human)
12+
quirk_holder.remove_language(/datum/language/common, TRUE, TRUE, LANGUAGE_ALL)
13+
for (var/language in quirk_holder.language_holder.understood_languages)
14+
if (language != /datum/language/common)
15+
quirk_holder.remove_language(language, TRUE, FALSE, LANGUAGE_ALL)
16+
for (var/language in quirk_holder.language_holder.spoken_languages)
17+
if (language != /datum/language/common)
18+
quirk_holder.remove_language(language, FALSE, TRUE, LANGUAGE_ALL)
19+
if (is_human)
20+
quirk_holder.grant_language(pick(GLOB.roundstart_languages), TRUE, TRUE, LANGUAGE_QUIRK)
21+
22+
/datum/quirk/listener
3723
name = "Listener"
3824
desc = "You are unable to speak Galactic Common though you understand it just fine."
3925
icon = FA_ICON_BELL_SLASH
@@ -42,3 +28,12 @@
4228
gain_text = span_notice("You don't know how to speak Galactic Common.")
4329
lose_text = span_notice("You're able to speak Galactic Common.")
4430
medical_record_text = "Patient does not speak Galactic Common and may require an interpreter."
31+
32+
/datum/quirk/listener/add_unique(client/client_source)
33+
quirk_holder.remove_language(/datum/language/common, FALSE, TRUE, LANGUAGE_ATOM)
34+
var/mob/living/carbon/carbon_holder = quirk_holder
35+
if (istype(carbon_holder))
36+
for (var/item in carbon_holder.get_all_gear())
37+
if (istype(item, /obj/item/clothing/mask/translator))
38+
carbon_holder.dropItemToGround(item, force = TRUE, silent = TRUE, invdrop = FALSE)
39+
qdel(item)

tgstation.dme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6138,7 +6138,7 @@
61386138
#include "monkestation\code\game\objects\items\stickers.dm"
61396139
#include "monkestation\code\game\objects\items\superglue.dm"
61406140
#include "monkestation\code\game\objects\items\tactical_shields.dm"
6141-
#include "monkestation\code\game\objects\items\translation_hat.dm"
6141+
#include "monkestation\code\game\objects\items\translator.dm"
61426142
#include "monkestation\code\game\objects\items\trash.dm"
61436143
#include "monkestation\code\game\objects\items\turf_demolisher.dm"
61446144
#include "monkestation\code\game\objects\items\venom_knife.dm"

0 commit comments

Comments
 (0)