File tree Expand file tree Collapse file tree 3 files changed +33
-18
lines changed
Expand file tree Collapse file tree 3 files changed +33
-18
lines changed Original file line number Diff line number Diff line change 2424 <span class =" text-[var(--text-muted)] text-[10px] font-black uppercase tracking-widest" >Build: {{ build .timestamp }} </span >
2525 </div >
2626
27- <div class =" flex items-center bg-[var(--bg-card)] border border-[var(--border-color)] rounded-lg overflow-hidden shadow-sm" >
28- <button onclick =" triggerGravity(event)" class =" px-3 py-1.5 text-[10px] font-mono hover:bg-red-500/10 transition-colors group/hash" >
29- <span class =" text-[var(--text-muted)] group-hover/hash:text-red-500" >Hash:</span >
30- <span class =" text-accent font-bold underline decoration-dotted" >{{ build .hash }} </span >
31- </button >
27+ <div class =" flex items-center bg-[var(--bg-card)] border border-[var(--border-color)] rounded-lg overflow-hidden shadow-sm" >
28+ <button onclick =" triggerSecretUnlock('gravity')" class =" px-3 py-1.5 text-[10px] font-mono hover:bg-red-500/10 transition-colors group/hash" >
29+ <span class =" text-[var(--text-muted)] group-hover/hash:text-red-500" >Hash:</span >
30+ <span class =" text-accent font-bold underline decoration-dotted" >
31+ <code class =" cursor-pointer hover:text-red-500 transition-colors" >{{ build .hash }} </code >
32+ </span >
33+ </button >
3234
33- <a href =" {{ build.repoUrl }}/commit/{{ build.hash }}"
34- target =" _blank"
35- rel =" noopener"
36- class =" px-3 py-1.5 border-l border-[var(--border-color)] bg-[var(--bg-footer)] hover:text-accent transition-colors"
37- title =" View Commit on GitHub" >
38- <span >↗</span >
39- </a >
40- </div >
35+ <a href =" {{ build.repoUrl }}/commit/{{ build.hash }}"
36+ target =" _blank"
37+ rel =" noopener"
38+ class =" px-3 py-1.5 border-l border-[var(--border-color)] bg-[var(--bg-footer)] hover:text-accent transition-colors"
39+ title =" View Commit on GitHub" >
40+ <span >↗</span >
41+ </a >
42+ </div >
4143 </div >
4244
4345 </div >
6567 <span class =" opacity-50" >+1 LVL</span >
6668 </button >
6769
70+ <button onclick =" triggerSecretUnlock('badge_click')" class =" w-full py-2 bg-white/5 hover:bg-purple-500/20 text-purple-400 text-[10px] border border-purple-500/30 rounded-lg transition-all flex justify-between px-3" >
71+ <span >UNLOCK_BADGE_XP</span >
72+ <span class =" opacity-50" >+1 LVL</span >
73+ </button >
74+
6875 <div class =" pt-2" >
6976 <button onclick =" localStorage.clear(); location.reload();" class =" w-full py-3 bg-blue-600/20 hover:bg-blue-600/40 text-blue-400 text-[10px] font-bold border border-blue-500/30 rounded-lg transition-all" >
7077 RESET_PLAYER_DATA
Original file line number Diff line number Diff line change 4141 {% endif %}
4242
4343 <div id =" game-stats" class =" flex items-center gap-3 md:gap-4 px-3 py-1.5 md:px-4 md:py-2 bg-[var(--bg-card)] border border-[var(--border-color)] rounded-2xl shadow-sm" >
44- <div id =" level-badge" class =" w-8 h-8 md:w-10 md:h-10 flex items-center justify-center rounded-xl text-lg md:text-xl bg-black/5 dark:bg-white/5" >🐣</div >
44+ <div id =" level-badge" onclick = " handleLevelClick() " class =" w-8 h-8 md:w-10 md:h-10 flex items-center justify-center rounded-xl text-lg md:text-xl bg-black/5 dark:bg-white/5" >🐣</div >
4545
4646 <div class =" hidden sm:flex flex-col" >
4747 <div class =" flex items-center gap-2" >
Original file line number Diff line number Diff line change @@ -147,25 +147,33 @@ function unlockEgg(eggId) {
147147 updateGameUI ( ) ;
148148 }
149149}
150+
150151/**
151152 * UNIVERSAL EGG UNLOCKER
152- * Grants exactly one level per unique secret type.
153+ * 4 Secrets: matrix, konami, gravity (hash), badge_click
153154 */
154155function triggerSecretUnlock ( effectType ) {
155- // 1. Run the Visuals (These run every time)
156+ // 1. Trigger Visuals
156157 if ( effectType === 'matrix' ) {
157158 initMatrix ( ) ;
158159 } else if ( effectType === 'konami' ) {
159160 activateKonami ( ) ;
160161 } else if ( effectType === 'gravity' ) {
162+ // This is triggered by clicking the Hash or the Dev Button
161163 triggerGravity ( null ) ;
164+ } else if ( effectType === 'badge_click' ) {
165+ playSound ( 'click' ) ;
162166 }
163167
164- // 2. Grant Level (Only runs the VERY first time for each ID)
165- // IDs are static: 'secret_matrix', 'secret_konami', 'secret_gravity'
168+ // 2. Grant Level (Fixed IDs ensure max level 4)
166169 unlockEgg ( `secret_${ effectType } ` ) ;
167170}
168171
172+ // Ensure the actual badge click also uses this logic
173+ function handleLevelClick ( ) {
174+ triggerSecretUnlock ( 'badge_click' ) ;
175+ }
176+
169177function showLevelUpNotification ( newLevelIndex ) {
170178 const levelIndex = Math . min ( newLevelIndex , LEVELS . length - 1 ) ;
171179 const rank = LEVELS [ levelIndex ] ;
You can’t perform that action at this time.
0 commit comments