lock levels packs if first is not unlocked
authorhgn <hgodden00@gmail.com>
Sun, 12 Dec 2021 22:24:09 +0000 (22:24 +0000)
committerhgn <hgodden00@gmail.com>
Sun, 12 Dec 2021 22:24:09 +0000 (22:24 +0000)
fishladder.c
fishladder_resources.h
maps/cmp_and.map [new file with mode: 0644]
maps/cmp_b08.map [new file with mode: 0644]

index deea9791ea0762bab88c7d97461ab6504eeea0ce..412182cd21619e4821865ac1733290d1b3f5be71 100644 (file)
@@ -2500,14 +2500,16 @@ void vg_ui(void)
                        
                        for( int i = 0; i < 3; i ++ )
                        {
-                               if( i == pack_selection )
+                               int pack_is_unlocked = pack_infos[i].levels[0].unlocked;
+                       
+                               if( i == pack_selection || !pack_is_unlocked )
                                        gui_override_colours( &flcol_list_locked );
-
-                               if( gui_button( 2000 + i ) == k_button_click )
+                               
+                               if( gui_button( 2000 + i ) == k_button_click && pack_is_unlocked )
                                        pack_selection = i;
                                
                                ui_global_ctx.cursor[1] += 2;
-                               gui_text( pack_infos[i].name, 4, 0 );
+                               gui_text( pack_is_unlocked? pack_infos[i].name: "", 4, 0 );
                                gui_end_right();
                                
                                gui_reset_colours();
index 5851b5e3bb282485c95e9464cde07804c8932536..77601be0ac5678e2e3d47df489ce350a786f257a 100644 (file)
@@ -781,9 +781,9 @@ static struct cmp_level cmp_levels_basic[] =
        },
        {
                .serial_id = 10,
-               .title = "ENCRYPTED 1",
+               .title = "SHIFT",
                .map_name = "cmp_b08",
-               .description = "Some configurations may not be valid",
+               .description = "",
 
                ._unlock = 17
        },
@@ -826,6 +826,7 @@ static struct cmp_level cmp_levels_basic[] =
                ._linked = 19,
                ._unlock = 20
        },
+       // r2 GM
        {
                .serial_id = 19,
                .title = "AND GATE",
diff --git a/maps/cmp_and.map b/maps/cmp_and.map
new file mode 100644 (file)
index 0000000..cd48389
--- /dev/null
@@ -0,0 +1,10 @@
+#############;
+######-######;::c
+##         ##;
+##         ##;
+##         ##;
+##         ##;
+##         ##;
+##         ##;
+###+##+##+###;a::a,:a:a,c:c:c
+#############;
diff --git a/maps/cmp_b08.map b/maps/cmp_b08.map
new file mode 100644 (file)
index 0000000..b08e0bd
--- /dev/null
@@ -0,0 +1,13 @@
+###############;
+#####-#########;cdab:acaa:bcbc
+##           ##;
+##           ##;
+##           ##;
+##           ##;
+##           ##;
+##           ##;
+##           ##;
+##           ##;
+##           ##;
+#########+#####;abcd:aaac:bcbc
+###############;