Skip to content

Commit

Permalink
Translate backgrounds and append bg editor with new ones (#1442)
Browse files Browse the repository at this point in the history
Co-authored-by: SuhEugene <[email protected]>
  • Loading branch information
UEDCommander and SuhEugene authored Nov 24, 2023
1 parent 366e1f1 commit 2403c70
Show file tree
Hide file tree
Showing 70 changed files with 2,626 additions and 62 deletions.
28 changes: 28 additions & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
#include "code\__defines\xenoarcheaology.dm"
#include "code\__defines\ZAS.dm"
#include "code\__defines\zmimic.dm"
#include "code\__defines\~mods\expanded_culture_descriptor.dm"
#include "code\__defines\~mods\~master_defines.dm"
#include "code\_global_vars\edible.dm"
#include "code\_global_vars\logging.dm"
Expand Down Expand Up @@ -3324,6 +3325,33 @@
#include "mods\_master_files\code\game\objects\effects\decals\contraband.dm"
#include "mods\_master_files\code\game\objects\structures\crates_lockers\closets\_closet_appearance_definitions.dm"
#include "mods\_master_files\code\modules\client\asset_cache.dm"
#include "mods\_master_files\code\modules\culture_descriptor\_culture.dm"
#include "mods\_master_files\code\modules\culture_descriptor\culture\cultures_adherent.dm"
#include "mods\_master_files\code\modules\culture_descriptor\culture\cultures_diona.dm"
#include "mods\_master_files\code\modules\culture_descriptor\culture\cultures_human.dm"
#include "mods\_master_files\code\modules\culture_descriptor\culture\cultures_ipc.dm"
#include "mods\_master_files\code\modules\culture_descriptor\culture\cultures_serpentid.dm"
#include "mods\_master_files\code\modules\culture_descriptor\culture\cultures_skrell.dm"
#include "mods\_master_files\code\modules\culture_descriptor\culture\cultures_unathi.dm"
#include "mods\_master_files\code\modules\culture_descriptor\culture\cultures_vox.dm"
#include "mods\_master_files\code\modules\culture_descriptor\faction\factions_adherent.dm"
#include "mods\_master_files\code\modules\culture_descriptor\faction\factions_human.dm"
#include "mods\_master_files\code\modules\culture_descriptor\faction\factions_skrell.dm"
#include "mods\_master_files\code\modules\culture_descriptor\faction\factions_unathi.dm"
#include "mods\_master_files\code\modules\culture_descriptor\faction\factions_vox.dm"
#include "mods\_master_files\code\modules\culture_descriptor\location\_location.dm"
#include "mods\_master_files\code\modules\culture_descriptor\location\locations_adherent.dm"
#include "mods\_master_files\code\modules\culture_descriptor\location\locations_diona.dm"
#include "mods\_master_files\code\modules\culture_descriptor\location\locations_human.dm"
#include "mods\_master_files\code\modules\culture_descriptor\location\locations_other.dm"
#include "mods\_master_files\code\modules\culture_descriptor\location\locations_serpentids.dm"
#include "mods\_master_files\code\modules\culture_descriptor\location\locations_skrell.dm"
#include "mods\_master_files\code\modules\culture_descriptor\location\locations_unathi.dm"
#include "mods\_master_files\code\modules\culture_descriptor\location\locations_vox.dm"
#include "mods\_master_files\code\modules\culture_descriptor\religion\religions_human.dm"
#include "mods\_master_files\code\modules\culture_descriptor\religion\religions_skrell.dm"
#include "mods\_master_files\code\modules\culture_descriptor\religion\religions_unathi.dm"
#include "mods\_master_files\code\modules\culture_descriptor\religion\religions_vox.dm"
#include "mods\_master_files\code\modules\events\gravity.dm"
#include "mods\_master_files\code\modules\mob\new_player\new_player.dm"
#include "mods\_master_files\code\modules\power\gravitygenerator.dm"
Expand Down
16 changes: 12 additions & 4 deletions code/__defines/culture.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@
#define TAG_FACTION "faction"
#define TAG_RELIGION "religion"

// [SIERRA-EDIT] - EXPANDED_CULTURE_DESCRIPTOR - Перевод дефайнов
//#define ALL_CULTURAL_TAGS list( \ // SIERRA-EDIT - ORIGINAL
// TAG_CULTURE = "Culture", \ // SIERRA-EDIT - ORIGINAL
// TAG_HOMEWORLD = "Residence", \ // SIERRA-EDIT - ORIGINAL
// TAG_FACTION = "Faction", \ // SIERRA-EDIT - ORIGINAL
// TAG_RELIGION = "Beliefs" \ // SIERRA-EDIT - ORIGINAL
// ) // SIERRA-EDIT - ORIGINAL
#define ALL_CULTURAL_TAGS list( \
TAG_CULTURE = "Culture", \
TAG_HOMEWORLD = "Residence", \
TAG_FACTION = "Faction", \
TAG_RELIGION = "Beliefs" \
TAG_CULTURE = "Культура", \
TAG_HOMEWORLD = "Место жительства", \
TAG_FACTION = "Фракция", \
TAG_RELIGION = "Вера" \
)
// [SIERRA-EDIT]

// Cultural IDs.
#define FACTION_SOL_CENTRAL "Sol Central Government"
Expand Down
47 changes: 47 additions & 0 deletions code/__defines/~mods/expanded_culture_descriptor.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// EXPANDED_CULTURE_DESCRIPTOR - Start
#define HOME_SYSTEM_UNATHI_TERSTEN "Tersten Clans"
#define FACTION_UNATHI_TERSTEN "Tersten Hegemony"
#define CULTURE_UNATHI_TERSTEN "Tersten Unathi"

#define FACTION_ZENG_HU "Zeng-Hu Pharmaceuticals"
#define FACTION_WARD_TAKAHASHI "Ward-Takahashi GMB"
#define FACTION_GRAYSON "Grayson Manufactories Ltd."
#define FACTION_AERTHER "Aether Atmospherics and Recycling"
#define FACTION_MAJOR_BILL "Major Bill's"
#define FACTION_FOCAL_POINT "Focal Point Energistics"
#define FACTION_XION "Xion Industrial"
#define FACTION_VEY_MED "Vey-Med"
#define FACTION_BISHOP "Bishop Cybernetics"
#define FACTION_MORPHEUS "Morpheus Cyberkinetics"
#define FACTION_ZPCI "Zone Protection Control Inc."
#define FACTION_SEPTENERGO "SeptEnergo"

#define CULTURE_HUMAN_LORRIMAN "Lorrimanian"
#define CULTURE_HUMAN_AVANOBLE "Avalon Noble"
#define CULTURE_HUMAN_AVACOMMON "Avalon Commoner"
#define CULTURE_HUMAN_LORDUP "Lordanian, Upper"
#define CULTURE_HUMAN_LORDLOW "Lordanian, Lower"
#define CULTURE_HUMAN_MIRANIAN "Miranian"
#define CULTURE_HUMAN_NYXIAN "Nyxian"

#define HOME_SYSTEM_TERSTEN "Tersten"
#define HOME_SYSTEM_AVALON "Avalon"
#define HOME_SYSTEM_MIRANIA "Mirania"
#define HOME_SYSTEM_NYX_BRINKBURN "Brinkburn"
#define HOME_SYSTEM_NYX_KALDARK "Kaldark"
#define HOME_SYSTEM_NYX_ROANOK "Roanok"
#define HOME_SYSTEM_NYX_YUKLIT "Yuklit"
#define HOME_SYSTEM_NYX_CASSER "Casser"

#define FACTION_SKRELL_MED "Gloa'Morr Corp."
#define FACTION_SKRELL_AIR "Krri'gli Corp."
#define FACTION_SKRELL_FOOD "Qorr'moa Inc."

#define FACTION_POSITRONICS "Positronic Union"

#define HOME_SYSTEM_ROOT "Root"

#define LANGUAGE_HUMAN_LORRIMAN "Lirris"
#define LANGUAGE_HUMAN_AVALON "Alain"
#define LANGUAGE_HUMAN_MIRANIAN "Miranian"
// EXPANDED_CULTURE_DESCRIPTOR - End
26 changes: 19 additions & 7 deletions code/modules/client/preference_setup/background/01_culture.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,12 @@
. = list()
for(var/token in tokens)
var/singleton/cultural_info/culture = SSculture.get_culture(pref.cultural_info[token])
var/title = "<a href='?src=\ref[src];expand_options_[token]=1'>[tokens[token]]</a><b>- </b>[pref.cultural_info[token]]"
var/append_text = "<a href='?src=\ref[src];toggle_verbose_[token]=1'>[hidden[token] ? "Expand" : "Collapse"]</a>"
// [SIERRA-EDIT] - EXPANDED_CULTURE_DESCRIPTOR - Сокращение html-строки для нормальной работы переопределения get_description; перевод буков
// var/title = "<a href='?src=\ref[src];expand_options_[token]=1'>[tokens[token]]</a><b>- </b>[pref.cultural_info[token]]" // SIERRA-EDIT - ORIGINAL
// var/append_text = "<a href='?src=\ref[src];toggle_verbose_[token]=1'>[hidden[token] ? "Expand" : "Collapse"]</a>" // SIERRA-EDIT - ORIGINAL
var/title = "<a href='?src=\ref[src];expand_options_[token]=1'>[tokens[token]]</a><b>- </b>"
var/append_text = "<a href='?src=\ref[src];toggle_verbose_[token]=1'>[hidden[token] ? "Расширить" : "Скрыть"]</a>"
// [SIERRA-EDIT]
. += culture.get_description(title, append_text, verbose = !hidden[token])
if (expanded[token])
var/list/valid_values
Expand All @@ -70,11 +74,19 @@
// html_encode() doesn't properly sanitize + symbols, otherwise we could just use that
// instead, we manually rip out the plus symbol and then replace it on OnTopic
var/sanitized_value = html_encode(replacetext(V, "+", "PLUS"))

if (pref.cultural_info[token] == V)
. += "[SPAN_CLASS("linkOn", "[V]")] "
else
. += "<a href='?src=\ref[src];set_token_entry_[token]=[sanitized_value]'>[V]</a> "

// [SIERRA-EDIT] - EXPANDED_CULTURE_DESCRIPTOR - Изменение схемы получения названия культуры, чтобы поддерживать возможность их перевода без переработки всей сабсистемы культур
// if (pref.cultural_info[token] == V) // SIERRA-EDIT - ORIGINAL
// . += "[SPAN_CLASS("linkOn", "[V]")] " // SIERRA-EDIT - ORIGINAL
// else // SIERRA-EDIT - ORIGINAL
// . += "<a href='?src=\ref[src];set_token_entry_[token]=[sanitized_value]'>[V]</a> " // SIERRA-EDIT - ORIGINAL
var/singleton/cultural_info/VCulture = SSculture.get_culture(V)
if(VCulture)
if (pref.cultural_info[token] == V)
. += "[SPAN_CLASS("linkOn", "[VCulture.get_nickname()]")] "
else
. += "<a href='?src=\ref[src];set_token_entry_[token]=[sanitized_value]'>[VCulture.get_nickname()]</a> "
// [SIERRA-EDIT]
. += "</table>"
. += "<hr>"
. = jointext(.,null)
Expand Down
40 changes: 32 additions & 8 deletions code/modules/client/preference_setup/background/02_language.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,19 @@

/datum/category_item/player_setup_item/background/languages/content()
. = list()
. += "<b>Languages</b><br>"
// [SIERRA-EDIT] - EXPANDED_CULTURE_DESCRIPTOR - Перевод
// . += "<b>Languages</b><br>" // SIERRA-EDIT - ORIGINAL
. += "<b>Языки</b><br>"
// [/SIERRA-EDIT]
var/list/show_langs = get_language_text()
if(LAZYLEN(show_langs))
for(var/lang in show_langs)
. += lang
else
. += "Your current species, faction or home system selection does not allow you to choose additional languages.<br>"
// [SIERRA-EDIT] - EXPANDED_CULTURE_DESCRIPTOR - Перевод
// . += "Your current species, faction or home system selection does not allow you to choose additional languages.<br>" // SIERRA-EDIT - ORIGINAL
. += "Ваша фракция, раса или место проживания не позволяют вам выбрать дополнительные языки.<br>"
// [/SIERRA-EDIT]
. = jointext(.,null)

/datum/category_item/player_setup_item/background/languages/OnTopic(href,list/href_list, mob/user)
Expand All @@ -39,15 +45,24 @@
else if(href_list["add_language"])

if(length(pref.alternate_languages) >= MAX_LANGUAGES)
alert(user, "You have already selected the maximum number of languages!")
// [SIERRA-EDIT] - EXPANDED_CULTURE_DESCRIPTOR - Перевод
// alert(user, "You have already selected the maximum number of languages!") // SIERRA-EDIT - ORIGINAL
alert(user, "Вы уже выбрали максимальное количество языков!")
// [/SIERRA-EDIT]
return

sanitize_alt_languages()
var/list/available_languages = allowed_languages - free_languages
if(!LAZYLEN(available_languages))
alert(user, "There are no additional languages available to select.")
// [SIERRA-EDIT] - EXPANDED_CULTURE_DESCRIPTOR - Перевод
// alert(user, "There are no additional languages available to select.") // SIERRA-EDIT - ORIGINAL
alert(user, "Вы уже выбрали все доступные языки.")
// [/SIERRA-EDIT]
else
var/new_lang = input(user, "Select an additional language", "Character Generation", null) as null|anything in available_languages
// [SIERRA-EDIT] - EXPANDED_CULTURE_DESCRIPTOR - Перевод
// var/new_lang = input(user, "Select an additional language", "Character Generation", null) as null|anything in available_languages // SIERRA-EDIT - ORIGINAL
var/new_lang = input(user, "Выберите дополнительный язык", "Character Generation", null) as null|anything in available_languages
// [/SIERRA-EDIT]
if(new_lang)
pref.alternate_languages |= new_lang
return TOPIC_REFRESH
Expand Down Expand Up @@ -109,9 +124,18 @@
for(var/i = 1 to length(pref.alternate_languages))
var/lang = pref.alternate_languages[i]
if(free_languages[lang])
LAZYADD(., "- [lang] (required).<br>")
// [SIERRA-EDIT] - EXPANDED_CULTURE_DESCRIPTOR - Перевод
// LAZYADD(., "- [lang] (required).<br>") // SIERRA-EDIT - ORIGINAL
LAZYADD(., "- [lang] (обязательный).<br>")
// [/SIERRA-EDIT]
else
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] - EXPANDED_CULTURE_DESCRIPTOR - Перевод
// 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)
LAZYADD(., "- <a href='?src=\ref[src];add_language=1'>add</a> ([remaining_langs] remaining)<br>")
// [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>")
// [/SIERRA-EDIT]
Loading

0 comments on commit 2403c70

Please sign in to comment.