Skip to content

Commit

Permalink
把快捷键打开词典做成成就
Browse files Browse the repository at this point in the history
添加获得成就的弹出文本
添加”收集“的消息图标
  • Loading branch information
MrZ626 committed Jun 23, 2024
1 parent 6c22d7e commit 4b58116
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 18 deletions.
1 change: 0 additions & 1 deletion assets/dict_base.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
local baseDict={
{'intro: aboutDict'},
{'intro: aboutDict_hidden',hidden=true},
{'intro: setting_out',hidden=true},
{'guide: noobGuide'},
{'guide: keybinding'},
Expand Down
2 changes: 1 addition & 1 deletion assets/game/mode/brik/exterior/sprint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ return {
gameStart=function(P)
local set={S=0,Z=0,O=0}
if set[P.nextQueue[1].name] and set[P.nextQueue[2].name] then
PROGRESS.setSecret('exterior_sprint_tolerant')
PROGRESS.setSecret('exterior_sprint_SZOpen')
end
return true
end,
Expand Down
5 changes: 0 additions & 5 deletions assets/language/dict_en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ return [[
@ title About This
Help you learn everything around here.
# aboutDict_hidden
@ title About This?
Help you learn everything around here.
Wow, you opened dictionary with shortcut key!
# setting_out
@ title Setting
The setting page.
Expand Down
5 changes: 0 additions & 5 deletions assets/language/dict_zh.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ return [[
@ title 关于本词典
帮助你了解这里的一切。
# aboutDict_hidden
@ title 关于本词典?
帮助你了解这里的一切。
哇,你用快捷键打开了词典!
# setting_out
@ title 设置
设置菜单
Expand Down
9 changes: 8 additions & 1 deletion assets/language/lang_en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,15 @@ local L={
},

-- Achievement
---@enum (key) Techmino.Text.Achievement
achievementMessage={
-- TODO
dict_shortcut="Hotkey Expert",
exterior_excavate_notDig="What are you doing?",
exterior_hidden_superBrain="COOL",
exterior_sprint_SZOpen="Really want to start with SZO?",
exterior_tspin_12TSS="What's this?",
interior_console="What's this?",
musicroom_recollection="Recollection is not a song",
},

-- Level
Expand Down
8 changes: 7 additions & 1 deletion assets/language/lang_zh.lua
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,13 @@ local L={

-- Achievement
achievementMessage={
-- TODO
dict_shortcut="快捷键高手",
exterior_excavate_notDig="你在干什么?",
exterior_hidden_superBrain="COOL",
exterior_sprint_SZOpen="真的要用SZO开局吗",
exterior_tspin_12TSS="这是什么?",
interior_console="这是什么?",
musicroom_recollection="Recollection不是一首曲子",
},

-- Level
Expand Down
4 changes: 2 additions & 2 deletions assets/progress.lua
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ function PROGRESS.setBgmUnlocked(name,state)
if newState>(prgs.bgmUnlocked[name] or 0) then
prgs.bgmUnlocked[name]=newState
if prgs.main>=3 then
MSG.new('check',Text.bgm_collected:repD(SONGBOOK[name].title))
MSG.new('collect',Text.bgm_collected:repD(SONGBOOK[name].title))
end
PROGRESS.save()
end
Expand Down Expand Up @@ -500,7 +500,7 @@ function PROGRESS.setExteriorScore(mode,key,value,sign)
return false
end

---@param id string
---@param id Techmino.Text.Achievement
---@return boolean success
function PROGRESS.setSecret(id)
if not prgs.secretFound[id] then
Expand Down
3 changes: 2 additions & 1 deletion assets/scene/main_out.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ end

local function sysAction(action)
if action=='help' then
callDict('aboutDict_hidden')
callDict('aboutDict')
PROGRESS.setSecret('dict_shortcut')
elseif action=='setting' then
SCN.go('setting_out','fadeHeader')
elseif action=='back' then
Expand Down
1 change: 1 addition & 0 deletions assets/scene/setting_out.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function scene.keyDown(key,isRep)
SCN.swapTo('setting_out','none',isShiftPressed() and (page-2)%4+1 or page%4+1)
elseif act=='help' then
callDict('setting_out')
PROGRESS.setSecret('dict_shortcut')
end
return true
end
Expand Down
13 changes: 12 additions & 1 deletion main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,16 @@ WIDGET.setDefaultOption{
sound_clear='inputbox_clear',
},
}
MSG.addCategory('collect',
{COLOR.HEX'90FFC7'},
{COLOR.HEX'262626'},
GC.load{40,40,
{'setCL',COLOR.HEX'262626'},
{'setLW',3},
{'fRect',17,6,6,28},
{'fRect',6,17,28,6},
}
)
MSG.addCategory('achievement',
{COLOR.HEX'FFF0C2'},
{COLOR.HEX'262626'},
Expand All @@ -259,7 +269,8 @@ MSG.addCategory('achievement',
{'fRect',6,17,28,6},
}
)

MSG.new('collect',"123")
MSG.new('achievement',"123")
IMG.init{
actionIcons={
texture='assets/image/action_icon.png',
Expand Down

0 comments on commit 4b58116

Please sign in to comment.