From dd743035f5652ec52c4076e5f66e1feb81099e87 Mon Sep 17 00:00:00 2001 From: Imple Lee <80144331+ImpleLee@users.noreply.github.com> Date: Sat, 21 Oct 2023 00:42:04 +0800 Subject: [PATCH] add a warning when field is too high temporarily fixes #686 --- parts/language/lang_en.lua | 1 + parts/language/lang_es.lua | 1 + parts/language/lang_fr.lua | 1 + parts/language/lang_id.lua | 1 + parts/language/lang_ja.lua | 1 + parts/language/lang_pt.lua | 1 + parts/language/lang_symbol.lua | 1 + parts/language/lang_vi.lua | 1 + parts/language/lang_zh.lua | 1 + parts/language/lang_zh_code.lua | 1 + parts/language/lang_zh_trad.lua | 1 + parts/scenes/customGame.lua | 5 +++++ 12 files changed, 16 insertions(+) diff --git a/parts/language/lang_en.lua b/parts/language/lang_en.lua index d7a9cea6..efaa75e2 100644 --- a/parts/language/lang_en.lua +++ b/parts/language/lang_en.lua @@ -70,6 +70,7 @@ return { cc_fixed="CC is incompatible with fixed sequences.", cc_swap="CC is incompatible when the hold mode is set to Swap.", cc_solid="CC is incompatible with filled line in the field.", + cc_field_too_high="CC is incompatible with fields higher than 40.", ai_prebag="AI is incompatible with custom sequences that contain non-tetrominoes.", ai_mission="AI is incompatible with custom missions.", switchSpawnSFX="Please turn on the block spawn SFX!", diff --git a/parts/language/lang_es.lua b/parts/language/lang_es.lua index 4f07e2b1..9a4623e3 100644 --- a/parts/language/lang_es.lua +++ b/parts/language/lang_es.lua @@ -69,6 +69,7 @@ return { cc_fixed="CC no es compatible con piezas prefijadas", cc_swap="CC no es compatible con Swap Hold", -- cc_solid="CC is incompatible with filled line in the field.", + -- cc_field_too_high="CC is incompatible with fields higher than 40.", ai_prebag="La IA no es compatible con piezas que no sean Tetrominos.", ai_mission="La IA no es compatible con misiones personalizadas.", switchSpawnSFX="Habilita los sonidos de aparición de las piezas ;)", diff --git a/parts/language/lang_fr.lua b/parts/language/lang_fr.lua index f0e00b11..2507b5a8 100644 --- a/parts/language/lang_fr.lua +++ b/parts/language/lang_fr.lua @@ -70,6 +70,7 @@ return { cc_fixed="CC est incompatible avec les séquences fixes", cc_swap="CC est incompatible avec le mode de maintien du swap", -- cc_solid="CC is incompatible with filled line in the field.", + -- cc_field_too_high="CC is incompatible with fields higher than 40.", -- ai_prebag="The AI is incompatible with custom sequences which have nontetromino.",'IA est incompatible avec les séquences personnalisées.", ai_mission="L'IA est incompatible avec les missions personnalisées.", switchSpawnSFX="Activez les effets sonores d'apparition des pièces pour jouer.", diff --git a/parts/language/lang_id.lua b/parts/language/lang_id.lua index 19c317d2..957661ce 100644 --- a/parts/language/lang_id.lua +++ b/parts/language/lang_id.lua @@ -71,6 +71,7 @@ return { cc_fixed="CC tidak cocok dengan urutan tetap.", cc_swap="CC tidak cocok dengan mode simpan tukar.", -- cc_solid="CC is incompatible with filled line in the field.", + -- cc_field_too_high="CC is incompatible with fields higher than 40.", ai_prebag="AI tidak cocok dengan urutan terubah yang memiliki non-tetromino.", ai_mission="AI tidak cocok dengan misi terubah.", switchSpawnSFX="Nyalakan efek suara munculan blok!", diff --git a/parts/language/lang_ja.lua b/parts/language/lang_ja.lua index 120e0860..20b4f7d6 100644 --- a/parts/language/lang_ja.lua +++ b/parts/language/lang_ja.lua @@ -71,6 +71,7 @@ return { cc_fixed="CCはミノ順の指定に非対応です!", cc_swap="CCはホールドモード、Swapに非対応です!", -- cc_solid="CC is incompatible with filled line in the field.", + -- cc_field_too_high="CC is incompatible with fields higher than 40.", ai_prebag="AIは通常のテトロミノ以外やミノ順指定に非対応です!", ai_mission="AIはカスタムミッションに非対応です!", switchSpawnSFX="ブロック出現時の効果音をONにしてください!", diff --git a/parts/language/lang_pt.lua b/parts/language/lang_pt.lua index 83e5c9e2..07ac05c0 100644 --- a/parts/language/lang_pt.lua +++ b/parts/language/lang_pt.lua @@ -60,6 +60,7 @@ return { -- cc_fixed="CC is incompatible with fixed sequences", -- cc_swap="CC is incompatible with swap holdmode", -- cc_solid="CC is incompatible with filled line in the field.", + -- cc_field_too_high="CC is incompatible with fields higher than 40.", -- ai_prebag="The AI is incompatible with custom sequences which have nontetromino.", inteligência é incompatível com sequências fixas.", ai_mission="A inteligência é incompatível com missões costumizadas.", switchSpawnSFX="Switch on spawn SFX to play", diff --git a/parts/language/lang_symbol.lua b/parts/language/lang_symbol.lua index 6d333bf1..eedd7ad6 100644 --- a/parts/language/lang_symbol.lua +++ b/parts/language/lang_symbol.lua @@ -60,6 +60,7 @@ return { cc_fixed="CC X!!!", cc_swap="CC X!!!", cc_solid="CC X!!!", + cc_field_too_high="CC X!!!", ai_prebag="X!!!", ai_mission="X!!!", needRestart="!!*#R#*!!", diff --git a/parts/language/lang_vi.lua b/parts/language/lang_vi.lua index df8b39c5..8d7ee9a8 100644 --- a/parts/language/lang_vi.lua +++ b/parts/language/lang_vi.lua @@ -75,6 +75,7 @@ return { cc_fixed="CC không tương thích với trình xáo gạch cố định", cc_swap="CC không tương thích với chế độ Hold là Chuyển", -- cc_solid="CC is incompatible with filled line in the field.", + -- cc_field_too_high="CC is incompatible with fields higher than 40.", ai_prebag="AI không tương thích với trình xáo gạch chứa gạch không phải là tetromino.", ai_mission="AI không tương thích với nhiệm vụ tuỳ chọn.", switchSpawnSFX="Vui lòng bật Spawn SFX để chơi!", diff --git a/parts/language/lang_zh.lua b/parts/language/lang_zh.lua index 46493eba..5939f190 100644 --- a/parts/language/lang_zh.lua +++ b/parts/language/lang_zh.lua @@ -70,6 +70,7 @@ return { cc_fixed="不能同时开启CC和固定序列", cc_swap="不能同时开启CC和swap的暂存模式", cc_solid="开启CC时不能存在预先填满的行", + cc_field_too_high="开启CC时最高出块高度不能超过40", ai_prebag="不能同时开启AI和含有非四连块的自定义序列", ai_mission="不能同时开启AI和自定义任务", switchSpawnSFX="请开启方块生成音效", diff --git a/parts/language/lang_zh_code.lua b/parts/language/lang_zh_code.lua index 7f086849..a32609fa 100644 --- a/parts/language/lang_zh_code.lua +++ b/parts/language/lang_zh_code.lua @@ -69,6 +69,7 @@ return { cc_fixed=" if (AI==CC and Sequence==Fixed) then Error(); end", cc_swap=" if (AI==CC and Hold.Mode==Swap) then Error(); end", cc_solid=" if (AI==CC and filledLine in Field) then Error(); end", + cc_field_too_high=" if (AI==CC and Field.Height>=40) then Error(); end", ai_prebag=" if (AI==true and Ctm.Seq~=Tetromino) then Error(); end", ai_mission=" if (AI==true and Ctm.Mission~=true) then Error(); end", switchSpawnSFX="SpawnSFX=false", diff --git a/parts/language/lang_zh_trad.lua b/parts/language/lang_zh_trad.lua index 2d722dfd..1cc33a5e 100644 --- a/parts/language/lang_zh_trad.lua +++ b/parts/language/lang_zh_trad.lua @@ -70,6 +70,7 @@ return { cc_fixed="不能同時開啟CC和固定序列", cc_swap="不能同時開啟CC和swap的暫存模式", cc_solid="開啟CC時不能存在預先填滿的行", + cc_field_too_high="開啓CC時最高出塊高度不能超過40", ai_prebag="不能同時開啟AI和含有非四連方塊的自定義序列", ai_mission="不能同時開啟AI和自定義任務", switchSpawnSFX="請開啟方塊生成音效", diff --git a/parts/scenes/customGame.lua b/parts/scenes/customGame.lua index 8b0caa40..9f8df645 100644 --- a/parts/scenes/customGame.lua +++ b/parts/scenes/customGame.lua @@ -129,6 +129,11 @@ local function _play(mode) MES.new('error',text.cc_solid) return end + if CUSTOMGAME_LOCAL.customenv.fieldH>=35 then + MES.new('warn',text.cc_field_too_high) + -- warning instead of error because we think it's not a big deal + -- the bot just dies very quickly + end end if #CUSTOMGAME_LOCAL.bag>0 then for _=1,#CUSTOMGAME_LOCAL.bag do