From eefe38c4c017aee9595a483b51be6e8ff5fb4d91 Mon Sep 17 00:00:00 2001 From: Emojigit Date: Mon, 17 May 2021 07:49:49 +0800 Subject: [PATCH] bugfix --- mods/HUD/mcl_credits/init.lua | 2 +- .../mcl_credits/locale/mcl_credits.zh_TW.tr | 7 ++--- mods/HUD/mcl_credits/locale/template.txt | 3 ++- mods/HUD/mcl_credits/poem.lua | 27 +++---------------- 4 files changed, 11 insertions(+), 28 deletions(-) diff --git a/mods/HUD/mcl_credits/init.lua b/mods/HUD/mcl_credits/init.lua index 48a11ecc7..5cd9c057e 100644 --- a/mods/HUD/mcl_credits/init.lua +++ b/mods/HUD/mcl_credits/init.lua @@ -10,7 +10,7 @@ mcl_credits.description = "A faithful Open Source clone of Minecraft" -- Sub-lists are sorted by number of commits, but the list should not be rearranged (-> new contributors are just added at the end of the list) mcl_credits.elements = { - {"", 0x000000, mcl_credits.compiled_poem}, -- TODO: replace "Sam" with actual player name + {"", 0x000000, mcl_credits.poems}, -- TODO: replace "Sam" with actual player name {S("Creator of MineClone"), 0x0A9400, { "davedevils", }}, diff --git a/mods/HUD/mcl_credits/locale/mcl_credits.zh_TW.tr b/mods/HUD/mcl_credits/locale/mcl_credits.zh_TW.tr index 64f5cb9d2..7035f3fc0 100644 --- a/mods/HUD/mcl_credits/locale/mcl_credits.zh_TW.tr +++ b/mods/HUD/mcl_credits/locale/mcl_credits.zh_TW.tr @@ -12,7 +12,7 @@ Textures=材質 Translations=翻譯 ## End Poem chat I see the player you mean.=我看到你所指的玩家了 -%s?=%s? +?=? Yes, take care.=是的,我們得小心一點。 As far as I know, Jean the dragon does not appears on this world, right?=以我所知,終界龍吉恩不在這個世界上,對嗎? Right. But that player is still danger.=是。但這個玩家還是十分危險的。 @@ -23,10 +23,11 @@ Oh, what did he dream?=哦,他夢見了甚麼? He dreamed water and lava, animals and mobs, tree and sunlights, caves and villages.=他夢見了水和岩漿,動物和怪物,樹和陽光,洞穴和村莊。 He dreamed creations, and also destructions.=他夢見了創造,也夢見了毀滅。 How about in the reality?=那麼,在真實裏有如何? -He created , , etc.=他建立了等。 +He created @1, @1, etc.=他建立了@1,@1等。 As far as I know, the player cannot read that thought because he has not yet archived the highest level,=據我所知,玩家無法讀懂這種思想,因為他還沒有到達最高級別。 which can be archived by achieve in the dream of real live.=最高級別可以通過完成真實生活中的夢想來達到。 The player still have a lot of archivements did not archived yet.=玩家還有很多成就尚未實現。 Maybe some of them are very negligible, and also some of them are momentous, but all of them are instructive.=也許其中有些微不足道,有些十分重要,但它們都具有啟發性。 -You are the player, %s.=你就是那個玩家,%s。 +You are the player, =你就是那個玩家, +.=。 Wake up, and archive those archivements, whatever the importance is.=醒來吧,達成這些成就,無論其重要性如何。 diff --git a/mods/HUD/mcl_credits/locale/template.txt b/mods/HUD/mcl_credits/locale/template.txt index f57a6e382..3fe482d92 100644 --- a/mods/HUD/mcl_credits/locale/template.txt +++ b/mods/HUD/mcl_credits/locale/template.txt @@ -28,5 +28,6 @@ As far as I know, the player cannot read that thought because he has not yet arc which can be archived by achieve in the dream of real live.= The player still have a lot of archivements did not archived yet.= Maybe some of them are very negligible, and also some of them are momentous, but all of them are instructive.= -You are the player, %s.= +You are the player, = +.= Wake up, and archive those archivements, whatever the importance is.= diff --git a/mods/HUD/mcl_credits/poem.lua b/mods/HUD/mcl_credits/poem.lua index 85aecf61c..06b2c9cd8 100644 --- a/mods/HUD/mcl_credits/poem.lua +++ b/mods/HUD/mcl_credits/poem.lua @@ -1,5 +1,5 @@ -- table.insert(mcl_credits.elements, 1, 15) -local ranchars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+-={}|[]`~' +local ranchars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$^&*()_+-={}|[]`~' local rancharl = {} for c in ranchars:gmatch"." do table.insert(rancharl,c) @@ -15,7 +15,7 @@ local function ranstr(length) end mcl_credits.poems = { S("I see the player you mean."), - S("%s?"), + "%s"..S("?"), S("Yes, take care."), S("As far as I know, Jean the dragon does not appears on this world, right?"), -- TODO: change these lines after ender dragons appears in MineClone2 S("Right. But that player is still danger."), @@ -25,29 +25,10 @@ mcl_credits.poems = { S("Oh, what did he dream?"), S("He dreamed water and lava, animals and mobs, tree and sunlights, caves and villages.").."\n"..S("He dreamed creations, and also destructions."), S("How about in the reality?"), - S("He created , , etc."), + S("He created @1, @2, etc.",ranstr(math.random(5,7)),ranstr(math.random(5,7))), S("As far as I know, the player cannot read that thought because he has not yet archived the highest level,").."\n"..S("which can be archived by achieve in the dream of real live."), S("The player still have a lot of archivements did not archived yet."), S("Maybe some of them are very negligible, and also some of them are momentous, but all of them are instructive."), - S("You are the player, %s."), + S("You are the player, ").."%s"..S("."), S("Wake up, and archive those archivements, whatever the importance is."), } - -mcl_credits.compile_poems = function() - local poem_e = {} - local poem_l = mcl_credits.poems[#mcl_credits.poems] - for k, v in ipairs(mcl_credits.poems) do - local pstr = v - pstr = pstr:gsub("",ranstr(math.random(5,7))) - table.insert(poem_e,pstr) - if v ~= poem_l then - table.insert(poem_e,"") - table.insert(poem_e,"") - end - end - return poem_e -end --- You have to call mcl_credits.compile_poems then replace --- mcl_credits.compiled_poem with the function's return value --- When you did changes to mcl_credits.poems. -mcl_credits.compiled_poem = mcl_credits.compile_poems()