Skip to content
Closed
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
6 changes: 6 additions & 0 deletions runtime/ui/i18n/de.inc
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,12 @@ T("Sets your wallet to an exact number of rupees (0 to 999999). Turn off Infinit
T("Set hearts", "Herzen festlegen")
T("Sets your heart containers to an exact number (3 to 30).", "Setzt deine Herzcontainer auf eine genaue Anzahl (3 bis 30).")
T("Cheats", "Cheats")
T("Link", "")
T("Combat", "Kampf")
T("Rupees and pickups", "Rubine und Beute")
T("World", "Welt")
T("Travel", "Reisen")
T("Add items", "Gegenstände hinzufügen")
T("Weather", "Wetter")
T("Holds the weather you pick, or keeps out rain or thunderstorms. Cutscenes keep theirs.", "Hält das gewählte Wetter oder hält Regen oder Gewitter fern. Zwischensequenzen behalten ihr eigenes.")
T("Free sprint out of combat", "Freier Sprint außerhalb von Kämpfen")
Expand Down
6 changes: 6 additions & 0 deletions runtime/ui/i18n/es.inc
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,12 @@ T("Sets your wallet to an exact number of rupees (0 to 999999). Turn off Infinit
T("Set hearts", "Fijar corazones")
T("Sets your heart containers to an exact number (3 to 30).", "Establece tus contenedores de corazón en un número exacto (3 a 30).")
T("Cheats", "Trucos")
T("Link", "")
T("Combat", "Combate")
T("Rupees and pickups", "Rupias y objetos recogidos")
T("World", "Mundo")
T("Travel", "Viaje")
T("Add items", "Añadir objetos")
T("Weather", "Clima")
T("Holds the weather you pick, or keeps out rain or thunderstorms. Cutscenes keep theirs.", "Mantiene el clima que elijas, o evita la lluvia o las tormentas. Las cinemáticas mantienen el suyo.")
T("Free sprint out of combat", "Correr gratis fuera de combate")
Expand Down
6 changes: 6 additions & 0 deletions runtime/ui/i18n/fr.inc
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,12 @@ T("Sets your wallet to an exact number of rupees (0 to 999999). Turn off Infinit
T("Set hearts", "Définir les cœurs")
T("Sets your heart containers to an exact number (3 to 30).", "Définit vos réceptacles de cœur sur un nombre exact (3 à 30).")
T("Cheats", "Triches")
T("Link", "")
T("Combat", "Combat")
T("Rupees and pickups", "Rubis et ramassage")
T("World", "Monde")
T("Travel", "Voyage")
T("Add items", "Ajouter des objets")
T("Weather", "Météo")
T("Holds the weather you pick, or keeps out rain or thunderstorms. Cutscenes keep theirs.", "Garde la météo choisie, ou écarte la pluie ou les orages. Les cinématiques gardent la leur.")
T("Free sprint out of combat", "Sprint gratuit hors combat")
Expand Down
6 changes: 6 additions & 0 deletions runtime/ui/i18n/he.inc
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,12 @@ T("Sets your wallet to an exact number of rupees (0 to 999999). Turn off Infinit
T("Set hearts", "קביעת לבבות")
T("Sets your heart containers to an exact number (3 to 30).", "קובע את מספר מיכלי הלב למספר מדויק (3 עד 30).")
T("Cheats", "צ'יטים")
T("Link", "לינק")
T("Combat", "קרב")
T("Rupees and pickups", "רופיז ואיסוף")
T("World", "עולם")
T("Travel", "מסע")
T("Add items", "הוספת פריטים")
T("Weather", "מזג אוויר")
T("Holds the weather you pick, or keeps out rain or thunderstorms. Cutscenes keep theirs.", "שומר על מזג האוויר שבחרת, או מונע גשם או סופות רעמים. סצנות קולנועיות שומרות על שלהן.")
T("Free sprint out of combat", "ריצה חופשית מחוץ לקרב")
Expand Down
6 changes: 6 additions & 0 deletions runtime/ui/i18n/it.inc
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,12 @@ T("Sets your wallet to an exact number of rupees (0 to 999999). Turn off Infinit
T("Set hearts", "Imposta cuori")
T("Sets your heart containers to an exact number (3 to 30).", "Imposta i tuoi portacuori su un numero esatto (da 3 a 30).")
T("Cheats", "Trucchi")
T("Link", "")
T("Combat", "Combattimento")
T("Rupees and pickups", "Rupie e raccolta")
T("World", "Mondo")
T("Travel", "Viaggio")
T("Add items", "Aggiungi oggetti")
T("Weather", "Meteo")
T("Holds the weather you pick, or keeps out rain or thunderstorms. Cutscenes keep theirs.", "Mantiene il meteo scelto, o tiene lontani pioggia o temporali. Le scene d'intermezzo mantengono il loro.")
T("Free sprint out of combat", "Scatto libero fuori dal combattimento")
Expand Down
6 changes: 6 additions & 0 deletions runtime/ui/i18n/ja.inc
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,12 @@ T("Sets your wallet to an exact number of rupees (0 to 999999). Turn off Infinit
T("Set hearts", "ハートを設定")
T("Sets your heart containers to an exact number (3 to 30).", "ハートの器を正確な数(3~30)に設定します。")
T("Cheats", "チート")
T("Link", "リンク")
T("Combat", "戦闘")
T("Rupees and pickups", "ルピーと拾得物")
T("World", "ワールド")
T("Travel", "移動")
T("Add items", "アイテムを追加")
T("Weather", "天気")
T("Holds the weather you pick, or keeps out rain or thunderstorms. Cutscenes keep theirs.", "選んだ天気を保つか、雨や雷雨を起こさないようにします。ムービーは元の天気のままです。")
T("Free sprint out of combat", "戦闘外ダッシュでがんばり消費なし")
Expand Down
6 changes: 6 additions & 0 deletions runtime/ui/i18n/ko.inc
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,12 @@ T("Sets your wallet to an exact number of rupees (0 to 999999). Turn off Infinit
T("Set hearts", "하트 설정")
T("Sets your heart containers to an exact number (3 to 30).", "하트의 그릇을 정확한 수(3~30)로 설정합니다.")
T("Cheats", "치트")
T("Link", "링크")
T("Combat", "전투")
T("Rupees and pickups", "루피와 아이템 줍기")
T("World", "세계")
T("Travel", "이동")
T("Add items", "아이템 추가")
T("Weather", "날씨")
T("Holds the weather you pick, or keeps out rain or thunderstorms. Cutscenes keep theirs.", "선택한 날씨를 유지하거나 비나 뇌우를 막습니다. 컷신은 원래 날씨를 유지합니다.")
T("Free sprint out of combat", "전투 외 달리기 기력 소모 없음")
Expand Down
6 changes: 6 additions & 0 deletions runtime/ui/i18n/nl.inc
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,12 @@ T("Sets your wallet to an exact number of rupees (0 to 999999). Turn off Infinit
T("Set hearts", "Harten instellen")
T("Sets your heart containers to an exact number (3 to 30).", "Stelt je hartcontainers in op een exact aantal (3 tot 30).")
T("Cheats", "Cheats")
T("Link", "")
T("Combat", "Gevecht")
T("Rupees and pickups", "Roepies en oprapen")
T("World", "Wereld")
T("Travel", "Reizen")
T("Add items", "Voorwerpen toevoegen")
T("Weather", "Weer")
T("Holds the weather you pick, or keeps out rain or thunderstorms. Cutscenes keep theirs.", "Houdt het gekozen weer vast, of houdt regen of onweer buiten. Tussenfilmpjes houden hun eigen weer.")
T("Free sprint out of combat", "Gratis sprinten buiten gevechten")
Expand Down
6 changes: 6 additions & 0 deletions runtime/ui/i18n/pt.inc
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,12 @@ T("Sets your wallet to an exact number of rupees (0 to 999999). Turn off Infinit
T("Set hearts", "Definir corações")
T("Sets your heart containers to an exact number (3 to 30).", "Define seus recipientes de coração para um número exato (3 a 30).")
T("Cheats", "Trapaças")
T("Link", "")
T("Combat", "Combate")
T("Rupees and pickups", "Rupias e itens coletados")
T("World", "Mundo")
T("Travel", "Viagem")
T("Add items", "Adicionar itens")
T("Weather", "Clima")
T("Holds the weather you pick, or keeps out rain or thunderstorms. Cutscenes keep theirs.", "Mantém o clima escolhido, ou evita chuva ou tempestades. As cenas mantêm o seu.")
T("Free sprint out of combat", "Correr de graça fora de combate")
Expand Down
6 changes: 6 additions & 0 deletions runtime/ui/i18n/ru.inc
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,12 @@ T("Sets your wallet to an exact number of rupees (0 to 999999). Turn off Infinit
T("Set hearts", "Задать сердца")
T("Sets your heart containers to an exact number (3 to 30).", "Устанавливает количество контейнеров сердца на точное число (от 3 до 30).")
T("Cheats", "Читы")
T("Link", "Линк")
T("Combat", "Бой")
T("Rupees and pickups", "Рупии и подбор предметов")
T("World", "Мир")
T("Travel", "Путешествия")
T("Add items", "Добавить предметы")
T("Weather", "Погода")
T("Holds the weather you pick, or keeps out rain or thunderstorms. Cutscenes keep theirs.", "Удерживает выбранную погоду или не допускает дождя или гроз. В роликах погода своя.")
T("Free sprint out of combat", "Бесплатный бег вне боя")
Expand Down
6 changes: 6 additions & 0 deletions runtime/ui/i18n/th.inc
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,12 @@ T("Sets your wallet to an exact number of rupees (0 to 999999). Turn off Infinit
T("Set hearts", "กำหนดจำนวนหัวใจ")
T("Sets your heart containers to an exact number (3 to 30).", "กำหนดภาชนะหัวใจของคุณเป็นจำนวนที่แน่นอน (3 ถึง 30)")
T("Cheats", "สูตรโกง")
T("Link", "ลิงก์")
T("Combat", "การต่อสู้")
T("Rupees and pickups", "รูปีและการเก็บไอเทม")
T("World", "โลก")
T("Travel", "การเดินทาง")
T("Add items", "เพิ่มไอเทม")
T("Weather", "สภาพอากาศ")
T("Holds the weather you pick, or keeps out rain or thunderstorms. Cutscenes keep theirs.", "คงสภาพอากาศที่คุณเลือก หรือกันฝนหรือพายุฝนฟ้าคะนองออกไป คัตซีนยังคงสภาพอากาศของตัวเอง")
T("Free sprint out of combat", "วิ่งเร็วฟรีนอกการต่อสู้")
Expand Down
6 changes: 6 additions & 0 deletions runtime/ui/i18n/zh-Hans.inc
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,12 @@ T("Sets your wallet to an exact number of rupees (0 to 999999). Turn off Infinit
T("Set hearts", "设置心之容器")
T("Sets your heart containers to an exact number (3 to 30).", "将你的心之容器设置为精确数量(3到30)。")
T("Cheats", "作弊")
T("Link", "林克")
T("Combat", "战斗")
T("Rupees and pickups", "卢比与拾取")
T("World", "世界")
T("Travel", "出行")
T("Add items", "添加物品")
T("Weather", "天气")
T("Holds the weather you pick, or keeps out rain or thunderstorms. Cutscenes keep theirs.", "保持你选择的天气,或避免下雨或雷雨。过场动画保持原有天气。")
T("Free sprint out of combat", "非战斗时冲刺不耗精力")
Expand Down
6 changes: 6 additions & 0 deletions runtime/ui/i18n/zh-Hant.inc
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,12 @@ T("Sets your wallet to an exact number of rupees (0 to 999999). Turn off Infinit
T("Set hearts", "設定心之容器")
T("Sets your heart containers to an exact number (3 to 30).", "將你的心之容器設定為精確數量(3到30)。")
T("Cheats", "作弊")
T("Link", "林克")
T("Combat", "戰鬥")
T("Rupees and pickups", "盧比與拾取")
T("World", "世界")
T("Travel", "出行")
T("Add items", "新增物品")
T("Weather", "天氣")
T("Holds the weather you pick, or keeps out rain or thunderstorms. Cutscenes keep theirs.", "保持你選擇的天氣,或避免下雨或雷雨。過場動畫保持原有天氣。")
T("Free sprint out of combat", "非戰鬥時衝刺不耗精力")
Expand Down
104 changes: 59 additions & 45 deletions runtime/ui/menu.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1389,31 +1389,50 @@ static void tab_audio(void) {
extern "C" float test_warp_hour(bool *held);
#include "../blood_moon.h"

// Damage taken / Damage dealt (Accessibility's rows: game_options.mm k_damage, settings.h DAMAGE_CHOICES)
static void cheats_damage(bool dealt) {
static const int damage[] = DAMAGE_CHOICES;
static const char *const damage_names[] = {"25%", "50%", "75%", "100%", "150%", "200%", "300%", "400%"};
enum { ND = sizeof damage / sizeof damage[0] };
static_assert(sizeof damage_names / sizeof damage_names[0] == ND, "a name for each damage choice");
int &setting = dealt ? g_settings.damage_dealt : g_settings.damage_taken;
int d = 3;
for (int i = 0; i < ND; i++) if (setting == damage[i]) d = i;
if (opt_choice(dealt ? "Damage dealt" : "Damage taken", &d, damage_names, ND, 3,
dealt ? "How much damage enemies take. 100% is the game's own."
: "How much damage Link takes. 100% is the game's own.", false))
setting = damage[d];
}

// The cheat rows, in sections by what they change (tab_cheats adds the Add items section after them)
static void cheats_options(void) {
opt_toggle("Infinite rupees", &g_settings.infinite_rupees, false,
"Keeps your wallet at 9999 rupees, topped up every few seconds.");
opt_section("Link");
opt_toggle("God mode", &g_settings.god_mode, false,
"Link takes no damage.");
{
static char rupee_buf[16];
if (g_settings.infinite_rupees) opt_disable_next();
if (opt_text("Set rupees", rupee_buf, sizeof rupee_buf, "",
"Sets your wallet to an exact number of rupees (0 to 999999). Turn off Infinite rupees first.")) {
static char heart_buf[16];
if (opt_text("Set hearts", heart_buf, sizeof heart_buf, "",
"Sets your heart containers to an exact number (3 to 30).")) {
char *end;
long n = strtol(rupee_buf, &end, 10);
if (rupee_buf[0] && end != rupee_buf && !*end && n >= 0 && n <= 999999 && rupees_set((int32_t)n)) {
long n = strtol(heart_buf, &end, 10);
if (heart_buf[0] && end != heart_buf && !*end && n >= 3 && n <= 30 && hearts_set((int32_t)n)) {
std::string s = std::to_string(n);
memcpy(rupee_buf, s.c_str(), s.size() + 1);
memcpy(heart_buf, s.c_str(), s.size() + 1);
} else
rupee_buf[0] = 0;
heart_buf[0] = 0;
}
}
opt_toggle("God mode", &g_settings.god_mode, false,
"Link takes no damage.");
cheats_damage(false);
opt_toggle("Infinite stamina", &g_settings.infinite_stamina, false,
"The stamina wheel never runs out.");
opt_toggle("Free sprint out of combat", &g_settings.free_sprint, false,
"Sprinting takes no stamina while no enemy is fighting you. Once the battle music starts, sprinting "
"costs stamina again.");

opt_section("Combat");
opt_toggle("One-hit kill", &g_settings.one_hit_kill, false, "Enemies go down in one hit.");
opt_toggle("Infinite arrows", &g_settings.infinite_arrows, false,
"Shooting a bow uses up no arrows. You still need one to shoot.");
{ // (Accessibility's rows: game_options.mm k_wear and DAMAGE_CHOICES)
cheats_damage(true);
{ // (Accessibility's row: game_options.mm k_wear)
static const int wear[] = {0, 50, 100, 150, 200, 250, 300};
static const char *const wear_names[] = {"Fairy", "Peter Pan", "Hylian", "Hero", "Master", "Legend",
"Dude, are you ok?"};
Expand All @@ -1423,33 +1442,35 @@ static void cheats_options(void) {
if (opt_choice("Weapon wear", &w, wear_names, NW, 2,
"How fast weapons, bows and shields wear out. Fairy: never. Hylian: the game's own.", false))
g_settings.weapon_wear = wear[w], g_settings.no_weapon_wear = wear[w] == 0;
static const int damage[] = DAMAGE_CHOICES;
static const char *const damage_names[] = {"25%", "50%", "75%", "100%", "150%", "200%", "300%", "400%"};
enum { ND = sizeof damage / sizeof damage[0] };
static_assert(sizeof damage_names / sizeof damage_names[0] == ND, "a name for each damage choice");
for (int dealt = 0; dealt < 2; dealt++) {
int &setting = dealt ? g_settings.damage_dealt : g_settings.damage_taken;
int d = 3;
for (int i = 0; i < ND; i++) if (setting == damage[i]) d = i;
if (opt_choice(dealt ? "Damage dealt" : "Damage taken", &d, damage_names, ND, 3,
dealt ? "How much damage enemies take. 100% is the game's own."
: "How much damage Link takes. 100% is the game's own.", false))
setting = damage[d];
}
}
opt_toggle("Infinite arrows", &g_settings.infinite_arrows, false,
"Shooting a bow uses up no arrows. You still need one to shoot.");

opt_section("Rupees and pickups");
opt_toggle("Infinite rupees", &g_settings.infinite_rupees, false,
"Keeps your wallet at 9999 rupees, topped up every few seconds.");
{
static char heart_buf[16];
if (opt_text("Set hearts", heart_buf, sizeof heart_buf, "",
"Sets your heart containers to an exact number (3 to 30).")) {
static char rupee_buf[16];
if (g_settings.infinite_rupees) opt_disable_next();
if (opt_text("Set rupees", rupee_buf, sizeof rupee_buf, "",
"Sets your wallet to an exact number of rupees (0 to 999999). Turn off Infinite rupees first.")) {
char *end;
long n = strtol(heart_buf, &end, 10);
if (heart_buf[0] && end != heart_buf && !*end && n >= 3 && n <= 30 && hearts_set((int32_t)n)) {
long n = strtol(rupee_buf, &end, 10);
if (rupee_buf[0] && end != rupee_buf && !*end && n >= 0 && n <= 999999 && rupees_set((int32_t)n)) {
std::string s = std::to_string(n);
memcpy(heart_buf, s.c_str(), s.size() + 1);
memcpy(rupee_buf, s.c_str(), s.size() + 1);
} else
heart_buf[0] = 0;
rupee_buf[0] = 0;
}
}
static const char *const mults[] = {"Off", "2x", "4x", "8x"};
static const int mult_vals[] = {1, 2, 4, 8};
int mult_idx = g_settings.item_multiplier == 8 ? 3 : g_settings.item_multiplier == 4 ? 2 : g_settings.item_multiplier == 2 ? 1 : 0;
opt_dropdown("Item pickup multiplier", &mult_idx, mults, 4, 0,
"Multiplies stackable items you pick up (materials, monster parts, arrows).");
g_settings.item_multiplier = mult_vals[mult_idx];

opt_section("World");
static const char *const weather[WEATHER_COUNT] = {"Automatic", "No rain", "No thunderstorms", "Clear", "Cloudy",
"Rain", "Heavy rain", "Snow", "Heavy snow", "Thunderstorm",
"Thunder rain", "Rain in sunshine"}; // (settings.h weather)
Expand Down Expand Up @@ -1479,15 +1500,8 @@ static void cheats_options(void) {
if (told) hint(tr(told == 1 ? "The blood moon starts once you close this menu."
: "A blood moon can only start in the open world."));
}
static const char *const mults[] = {"Off", "2x", "4x", "8x"};
static const int mult_vals[] = {1, 2, 4, 8};
int mult_idx = g_settings.item_multiplier == 8 ? 3 : g_settings.item_multiplier == 4 ? 2 : g_settings.item_multiplier == 2 ? 1 : 0;
opt_dropdown("Item pickup multiplier", &mult_idx, mults, 4, 0,
"Multiplies stackable items you pick up (materials, monster parts, arrows).");
g_settings.item_multiplier = mult_vals[mult_idx];
opt_toggle("Free sprint out of combat", &g_settings.free_sprint, false,
"Sprinting takes no stamina while no enemy is fighting you. Once the battle music starts, sprinting "
"costs stamina again.");

opt_section("Travel");
opt_toggle("Sure-footed horse", &g_settings.sure_footed, false,
"A running horse no longer stops dead and rears when it runs into something."
" It no longer stops at cliff edges either.");
Expand Down Expand Up @@ -1679,8 +1693,8 @@ static void tab_cheats(void) {
static char notice[160];
static unsigned waiting; // the request the notice waits to tell the result of
opt_begin("##cheats", ImGui::GetFontSize() / 34);
opt_section(tr("Cheats"));
cheats_options();
opt_section("Add items");
hint(tr("These are cheats: they put items in your pouch. The list comes from your game files; nothing of the game is shipped."));
if (!items_available()) {
hint(tr("Items are added in game only."));
Expand Down