2023-04-20 22:23:08 +00:00
import { _ as e , c as s , o as t , d as n } from "./app.c95a51e0.js" ; const m = JSON . parse ( '{"title":"Milestones","description":"","frontmatter":{},"headers":[],"relativePath":"public/gamedevtree/docs/milestones.md","lastUpdated":null}' ) , a = { name : "public/gamedevtree/docs/milestones.md" } , o = n ( ` <h1 id="milestones" tabindex="-1">Milestones <a class="header-anchor" href="#milestones" aria-hidden="true">#</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"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki"><code><span class="line"><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">milestones</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
2022-10-05 00:48:27 +00:00
< span class = "line" > < span style = "color:#F07178;" > < / s p a n > < s p a n s t y l e = " c o l o r : # F 7 8 C 6 C ; " > 0 < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > : < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > { < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#F07178;" > requirementDesc < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > : < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & q u o t ; < / s p a n > < s p a n s t y l e = " c o l o r : # C 3 E 8 8 D ; " > 1 2 3 w a f f l e s < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & q u o t ; < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > , < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#F07178;" > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > } < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#F07178;" > < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > e t c < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#F07178;" > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > } < / s p a n > < / s p a n >
< span class = "line" > < / s p a n > < / c o d e > < / p r e > < / d i v > < p > Y o u c a n u s e h a s M i l e s t o n e ( l a y e r , i d ) 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 : 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 : 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 : < e m > o p t i o n a l < / e m > , 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 r e > < c o d e > * * T i p : * * 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 .
2022-11-12 03:03:09 +00:00
< / c o d e > < / p r e > < / 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 p l a y e r [ t h i s . l a y e r ] . p o i n t s 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 > ` , 6 ) , l = [ o ] ; f u n c t i o n i ( r , p , c , h , d , u ) { r e t u r n t ( ) , s ( " d i v " , n u l l , l ) } c o n s t y = e ( a , [ [ " r e n d e r " , i ] ] ) ; e x p o r t { m a s _ _ p a g e D a t a , y a s d e f a u l t } ;