2024-06-11 02:38:24 +00:00
import { _ as e , c as s , o as i , a9 as t } from "./chunks/framework.D8PMdl4T.js" ; const k = JSON . parse ( '{"title":"Milestones","description":"","frontmatter":{},"headers":[],"relativePath":"public/lit/docs/milestones.md","filePath":"public/lit/docs/milestones.md","lastUpdated":1607827402000}' ) , a = { name : "public/lit/docs/milestones.md" } , n = t ( ` <h1 id="milestones" tabindex="-1">Milestones <a class="header-anchor" href="#milestones" aria-label="Permalink to "Milestones""> </a></h1><p>Milestones are awarded to the player when they meet a certain goal, and give some benefit. Milestones should be formatted like this:</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">milestones</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
2024-06-02 01:57:02 +00:00
< span class = "line" > < span style = "--shiki-light:#005CC5;--shiki-dark:#79B8FF;" > 0 < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > : { < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > requirementDescription : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 3 2 F 6 2 ; - - s h i k i - d a r k : # 9 E C B F F ; " > & q u o t ; 1 2 3 w a f f l e s & q u o t ; < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > , < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > effectDescription : < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 3 2 F 6 2 ; - - s h i k i - d a r k : # 9 E C B F F ; " > & q u o t ; b l a h & q u o t ; < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > , < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#6F42C1;--shiki-dark:#B392F0;" > done < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > ( ) { < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # D 7 3 A 4 9 ; - - s h i k i - d a r k : # F 9 7 5 8 3 ; " > r e t u r n < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > p l a y e r . w . p o i n t s . < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 6 F 4 2 C 1 ; - - s h i k i - d a r k : # B 3 9 2 F 0 ; " > g t e < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > ( < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 0 0 5 C C 5 ; - - s h i k i - d a r k : # 7 9 B 8 F F ; " > 1 2 3 < / s p a n > < s p a n s t y l e = " - - s h i k i - l i g h t : # 2 4 2 9 2 E ; - - s h i k i - d a r k : # E 1 E 4 E 8 ; " > ) } < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > } < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > etc < / s p a n > < / s p a n >
< span class = "line" > < span style = "--shiki-light:#24292E;--shiki-dark:#E1E4E8;" > } < / s p a n > < / s p a n > < / c o d e > < / p r e > < / d i v > < p > Y o u c a n u s e < c o d e > h a s M i l e s t o n e ( l a y e r , i d ) < / c o d e > t o d e t e r m i n e i f t h e p l a y e r h a s a g i v e n m i l e s t o n e < / p > < p > M i l e s t o n e f e a t u r e s : < / p > < u l > < l i > < p > r e q u i r e m e n t D e s c r i p t i o n : A s t r i n g d e s c r i b i n g t h e r e q u i r e m e n t f o r u n l o c k i n g t h i s m i l e s t o n e . S u g g e s t i o n : U s e a & q u o t ; t o t a l & q u o t ; . I t c a n a l s o b e a f u n c t i o n t h a t r e t u r n s u p d a t i n g t e x t . C a n u s e b a s i c H T M L . < / p > < / l i > < l i > < p > e f f e c t D e s c r i p t i o n : A s t r i n g d e s c r i b i n g t h e r e w a r d f o r h a v i n g t h e m i l e s t o n e . < e m > Y o u w i l l h a v e t o i m p l e m e n t t h e r e w a r d e l s e w h e r e . < / e m > I t c a n a l s o b e a f u n c t i o n t h a t r e t u r n s u p d a t i n g t e x t . C a n u s e b a s i c H T M L . < / p > < / l i > < l i > < p > d o n e ( ) : A f u n c t i o n r e t u r n i n g a b o o l e a n t o d e t e r m i n e i f t h e m i l e s t o n e s h o u l d b e a w a r d e d . < / p > < / l i > < l i > < p > t o g g l e s : < s t r o n g > o p t i o n a l < / s t r o n g > . C r e a t e s t o g g l e b u t t o n s t h a t a p p e a r o n t h e m i l e s t o n e w h e n i t i s u n l o c k e d . T h e t o g g l e s c a n t o g g l e a g i v e n b o o l e a n v a l u e i n a l a y e r . I t i s d e f i n e d a s a n a r r a y o f p a i r e d i t e m s , o n e p a i r p e r t o g g l e . T h e f i r s t i s t h e i n t e r n a l n a m e o f t h e l a y e r t h e v a l u e b e i n g t o g g l e d i s s t o r e d i n , a n d t h e s e c o n d i s t h e i n t e r n a l n a m e o f t h e v a r i a b l e t o t o g g l e . ( e . g . [ [ & q u o t ; b & q u o t ; , & q u o t ; a u t o & q u o t ; ] , [ & q u o t ; g & q u o t ; , & q u o t ; a u t o & q u o t ; ] ) < / p > < p > < s t r o n g > T i p : < / s t r o n g > T o g g l e s a r e n o t d e - s e t i f t h e m i l e s t o n e b e c o m e s l o c k e d ! I n t h i s c a s e , y o u s h o u l d a l s o c h e c k i f t h e p l a y e r h a s t h e m i l e s t o n e . < / p > < / l i > < l i > < p > s t y l e : < s t r o n g > o p t i o n a l < / s t r o n g > . A p p l i e s C S S t o t h i s m i l e s t o n e , i n t h e f o r m o f a n o b j e c t w h e r e t h e k e y s a r e C S S a t t r i b u t e s , a n d t h e v a l u e s a r e t h e v a l u e s f o r t h o s e a t t r i b u t e s ( b o t h a s s t r i n g s ) . < / p > < / l i > < l i > < p > u n l o c k e d ( ) : < s t r o n g > o p t i o n a l < / s t r o n g > . A f u n c t i o n r e t u r n i n g a b o o l e a n t o d e t e r m i n e i f t h e m i l e s t o n e s h o u l d b e s h o w n . I f a b s e n t , i t i s a l w a y s s h o w n . < / p > < / l i > < l i > < p > l a y e r : < s t r o n g > a s s i g n e d a u t o m a g i c a l l y < / s t r o n g > . I t & # 3 9 ; s t h e s a m e v a l u e a s t h e n a m e o f t h i s l a y e r , s o y o u c a n d o < c o d e > p l a y e r [ t h i s . l a y e r ] . p o i n t s < / c o d e > o r s i m i l a r . < / p > < / l i > < l i > < p > i d : < s t r o n g > a s s i g n e d a u t o m a g i c a l l y < / s t r o n g > . I t & # 3 9 ; s t h e & q u o t ; k e y & q u o t ; w h i c h t h e m i l e s t o n e w a s s t o r e d u n d e r , f o r c o n v e n i e n t a c c e s s . T h e m i l e s t o n e i n t h e e x a m p l e & # 3 9 ; s i d i s 0 . < / p > < / l i > < / u l > < p > D i s a a b l e m i l e s t o n e p o p u p s b y a d d i n g < c o d e > m i l e s t o n e P o p u p s : f a l s e < / c o d e > t o t h e l a y e r . < / p > ` , 7 ) , l = [ n ] ; f u n c t i o n o ( h , p , r , d , c , g ) { r e t u r n i ( ) , s ( " d i v " , n u l l , l ) } c o n s t m = e ( a , [ [ " r e n d e r " , o ] ] ) ; e x p o r t { k a s _ _ p a g e D a t a , m a s d e f a u l t } ;