Skip to content

Commit

Permalink
Languages (#2940)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lexanx authored Dec 3, 2024
1 parent 153edf3 commit 90d8007
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 5 deletions.
2 changes: 1 addition & 1 deletion code/__defines/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
#define FLASH_PROTECTION_MODERATE 2
#define FLASH_PROTECTION_MAJOR 3

#define ANIMAL_SPAWN_DELAY round(config.respawn_delay / 6)
#define ANIMAL_SPAWN_DELAY round(config.respawn_delay / 2) //SIERRA-EDIT ORIG was /6
#define DRONE_SPAWN_DELAY round(config.respawn_delay / 3)

// Incapacitation flags, used by the mob/proc/incapacitated() proc
Expand Down
15 changes: 12 additions & 3 deletions code/modules/client/preference_setup/background/02_language.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@

else if(href_list["add_language"])

if(length(pref.alternate_languages) >= MAX_LANGUAGES)
// if(length(pref.alternate_languages) >= MAX_LANGUAGES) // SIERRA-EDIT - ORIGINAL
if(length(pref.alternate_languages) >= total_languages())
// [SIERRA-EDIT] - EXPANDED_CULTURE_DESCRIPTOR - Перевод
// alert(user, "You have already selected the maximum number of languages!") // SIERRA-EDIT - ORIGINAL
alert(user, "Вы уже выбрали максимальное количество языков!")
Expand Down Expand Up @@ -115,8 +116,12 @@
pref.alternate_languages.Insert(1, lang)

pref.alternate_languages = uniquelist(pref.alternate_languages)
/*
if(length(pref.alternate_languages) > MAX_LANGUAGES)
pref.alternate_languages.Cut(MAX_LANGUAGES + 1)
pref.alternate_languages.Cut(MAX_LANGUAGES + 1) // SIERRA-EDIT - ORIGINAL
*/
if(length(pref.alternate_languages) > total_languages())
pref.alternate_languages.Cut(total_languages() + 1)

/datum/category_item/player_setup_item/background/languages/proc/get_language_text()
sanitize_alt_languages()
Expand All @@ -133,8 +138,12 @@
// LAZYADD(., "- [lang] <a href='?src=\ref[src];remove_language=[i]'>Remove.</a> <span style='color:#ff0000;font-style:italic;'>[all_languages[lang].warning]</span><br>") // SIERRA-EDIT - ORIGINAL
LAZYADD(., "- [lang] <a href='?src=\ref[src];remove_language=[i]'>Убрать.</a> <span style='color:#ff0000;font-style:italic;'>[all_languages[lang].warning]</span><br>")
// [/SIERRA-EDIT]
/*
if(length(pref.alternate_languages) < MAX_LANGUAGES)
var/remaining_langs = MAX_LANGUAGES - length(pref.alternate_languages)
var/remaining_langs = MAX_LANGUAGES - length(pref.alternate_languages) // SIERRA-EDIT - ORIGINAL
*/
if(length(pref.alternate_languages) < total_languages())
var/remaining_langs = total_languages() - length(pref.alternate_languages)
// [SIERRA-EDIT] - EXPANDED_CULTURE_DESCRIPTOR - Перевод
// LAZYADD(., "- <a href='?src=\ref[src];add_language=1'>add</a> ([remaining_langs] remaining)<br>") // SIERRA-EDIT - ORIGINAL
LAZYADD(., "- <a href='?src=\ref[src];add_language=1'>Добавить</a> ([remaining_langs] осталось)<br>")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/nano/modules/human_appearance.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@

if (href_list["language"] && (flags & APPEARANCE_LANG))
if (href_list["language_mode"] == "add")
if ((~flags & APPEARANCE_LANG_ANY_NUMBER) && length(owner.languages) >= MAX_LANGUAGES)
if ((~flags & APPEARANCE_LANG_ANY_NUMBER) && length(owner.languages) >= (MAX_LANGUAGES + owner.species.additional_languages)) // SIERRA-EDIT added( + owner.species.additional_languages))
return
if ((~flags & APPEARANCE_LANG_ANY_ORIGIN) && !(href_list["language"] in langs))
return
Expand Down
17 changes: 17 additions & 0 deletions mods/adherent_discharge/code/adherent.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/datum/species/adherent
additional_languages = 1

/obj/item/organ/internal/cell/adherent
var/ready_to_charge

Expand All @@ -19,3 +22,17 @@

adherent_core.ready_to_charge = FALSE
to_chat(src, SPAN_WARNING("You have relieved the tension of your tentacles."))

/singleton/cultural_info/culture/adherent
secondary_langs = list(
LANGUAGE_HUMAN_EURO,
LANGUAGE_HUMAN_CHINESE,
LANGUAGE_HUMAN_ARABIC,
LANGUAGE_HUMAN_INDIAN,
LANGUAGE_HUMAN_IBERIAN,
LANGUAGE_HUMAN_RUSSIAN,
LANGUAGE_SPACER,
LANGUAGE_VOX,
LANGUAGE_CULT,
LANGUAGE_PRIMITIVE
)
15 changes: 15 additions & 0 deletions mods/diona/code/station.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@

/datum/category_item/player_setup_item/background/languages/proc/total_languages()
return MAX_LANGUAGES + pref.additional_languages

/datum/preferences
var/additional_languages

/datum/preferences/copy_to(mob/living/carbon/human/character, is_preview_copy = FALSE)
. = ..()
additional_languages = character.species.additional_languages

/datum/species
var/additional_languages = 0

/datum/species/diona
slowdown = 2
thirst_factor = 0.06
additional_languages = 2
1 change: 1 addition & 0 deletions mods/ipc_mods/code/machine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#define SHOW_LAWS_POSIBRAN "Show laws posibran"
/datum/species/machine
passive_temp_gain = 0 // This should cause IPCs to stabilize at ~80 C in a 20 C environment.(5 is default without organ)
additional_languages = 1

/obj/machinery/organ_printer/robot/New()
LAZYINITLIST(products)
Expand Down

0 comments on commit 90d8007

Please sign in to comment.