]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add level 3
authorMario <mario@smbclan.net>
Sun, 15 Nov 2015 18:08:09 +0000 (04:08 +1000)
committerMario <mario@smbclan.net>
Sun, 15 Nov 2015 18:08:09 +0000 (04:08 +1000)
gfx/hud/default/minigames/bd/brick4.jpg [new file with mode: 0644]
minigames/bulldozer/storage_level2.txt
minigames/bulldozer/storage_level3.txt [new file with mode: 0644]
qcsrc/common/minigames/minigame/bd.qc

diff --git a/gfx/hud/default/minigames/bd/brick4.jpg b/gfx/hud/default/minigames/bd/brick4.jpg
new file mode 100644 (file)
index 0000000..2b6c14f
Binary files /dev/null and b/gfx/hud/default/minigames/bd/brick4.jpg differ
index 8bf9d44cc406247baf8acec5d8b57f5200b0de81..dd15380a22b6ea631506376a9766854e27cba904 100644 (file)
@@ -1,5 +1,5 @@
 // bulldozer storage "level2" last updated 16-11-2015 03:34:13
-nextlevel = "level2"
+nextlevel = "level3"
 "a20" 4 "0 0 0" ; 
 "b20" 4 "0 0 0" ; 
 "c20" 4 "0 0 0" ; 
diff --git a/minigames/bulldozer/storage_level3.txt b/minigames/bulldozer/storage_level3.txt
new file mode 100644 (file)
index 0000000..d3f975b
--- /dev/null
@@ -0,0 +1,279 @@
+// bulldozer storage "level3" last updated 16-11-2015 04:06:54
+nextlevel = "level3"
+"a20" 4 "0 0 0" ; 
+"a19" 4 "0 0 0" ; 
+"f14" 2 "0 0 0" ; 
+"a18" 4 "0 0 0" ; 
+"a17" 4 "0 0 0" ; 
+"a16" 4 "0 0 0" ; 
+"a15" 4 "0 0 0" ; 
+"f14" 3 "0 0 0" ; 
+"b7" 4 "0 0 0" ; 
+"b5" 4 "0 0 0" ; 
+"b3" 4 "0 0 0" ; 
+"s7" 4 "0 0 0" ; 
+"s5" 4 "0 0 0" ; 
+"s3" 4 "0 0 0" ; 
+"b19" 4 "0 0 0" ; 
+"s19" 4 "0 0 0" ; 
+"a14" 4 "0 0 0" ; 
+"a13" 4 "0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k19" 4 "0 0 0" ; 
+"j19" 4 "0 0 0" ; 
+"i19" 4 "0 0 0" ; 
+"h19" 4 "0 0 0" ; 
+"g19" 4 "0 0 0" ; 
+"f19" 4 "0 0 0" ; 
+"e19" 4 "0 0 0" ; 
+"d19" 4 "0 0 0" ; 
+"r19" 4 "0 0 0" ; 
+"f15" 5 "0 0 0" ; 
+"f13" 5 "0 0 0" ; 
+"f12" 5 "0 0 0" ; 
+"g12" 5 "0 0 0" ; 
+"g9" 5 "0 0 0" ; 
+"g10" 5 "0 0 0" ; 
+"g11" 5 "0 0 0" ; 
+"h9" 5 "0 0 0" ; 
+"i9" 5 "0 0 0" ; 
+"k9" 5 "0 0 0" ; 
+"l9" 5 "0 0 0" ; 
+"l13" 5 "0 0 0" ; 
+"l12" 5 "0 0 0" ; 
+"l10" 5 "0 0 0" ; 
+"l11" 5 "0 0 0" ; 
+"l15" 5 "0 0 0" ; 
+"l14" 5 "0 0 0" ; 
+"l16" 5 "0 0 0" ; 
+"g15" 5 "0 0 0" ; 
+"h15" 5 "0 0 0" ; 
+"i15" 5 "0 0 0" ; 
+"j15" 5 "0 0 0" ; 
+"k15" 5 "0 0 0" ; 
+"p9" 5 "0 0 0" ; 
+"p10" 5 "0 0 0" ; 
+"q10" 5 "0 0 0" ; 
+"q8" 2 "0 0 0" ; 
+"r8" 2 "0 0 0" ; 
+"r9" 2 "0 0 0" ; 
+"j9" 3 "0 0 0" ; 
+"i13" 2 "0 0 0" ; 
+"k13" 1 "0 0 0" ; 
+"n13" 3 "0 0 0" ; 
+"n14" 3 "0 0 0" ; 
+"n12" 3 "0 0 0" ; 
index 3d36b492c8bc89a380918e6ac95eff38fd8bc723..4ece34e8f2fafe4ba221a92d74f819ba149cbc08 100644 (file)
@@ -34,7 +34,8 @@ const int BD_TILE_BOULDER = 3;
 const int BD_TILE_BRICK1 = 4;
 const int BD_TILE_BRICK2 = 5;
 const int BD_TILE_BRICK3 = 6;
-const int BD_TILE_LAST = 6;
+const int BD_TILE_BRICK4 = 7;
+const int BD_TILE_LAST = 7;
 
 string autocvar_sv_minigames_bulldozer_startlevel = "level1";
 
@@ -92,7 +93,8 @@ bool bd_canfill(int ttype)
        {
                case BD_TILE_BRICK1:
                case BD_TILE_BRICK2:
-               case BD_TILE_BRICK3: return true;
+               case BD_TILE_BRICK3:
+               case BD_TILE_BRICK4: return true;
        }
 
        return false;
@@ -121,7 +123,8 @@ bool bd_move_dozer(entity minigame, entity dozer)
                case BD_TILE_DOZER: // wtf, but let's do this incase
                case BD_TILE_BRICK1:
                case BD_TILE_BRICK2:
-               case BD_TILE_BRICK3: return false;
+               case BD_TILE_BRICK3:
+               case BD_TILE_BRICK4: return false;
                case BD_TILE_BOULDER:
                {
                        string testpos;
@@ -200,13 +203,14 @@ void bd_editor_place(entity minigame, entity player, string pos, int thetile)
        {
                if ( bd_valid_tile(pos) )
                {
-                       bool exists = ( bd_find_piece(minigame, pos, false) || bd_find_piece(minigame, pos, true) );
+                       entity found_piece = bd_find_piece(minigame, pos, false);
+                       entity targ = bd_find_piece(minigame, pos, true);
 
                        entity dozer = bd_find_dozer(minigame);
                        if(dozer && thetile == BD_TILE_DOZER && pos != dozer.netname)
                                return; // nice try
 
-                       if(exists)
+                       if(found_piece || (targ && thetile != BD_TILE_BOULDER))
                        {
                                entity piece = bd_find_piece(minigame, pos, false);
                                if(!piece) piece = bd_find_piece(minigame, pos, true);
@@ -405,6 +409,21 @@ bool bd_save_level(entity minigame)
 {
        if(minigame.bd_levelname && minigame.bd_levelname != "")
        {
+               int target_count = 0, boulder_count = 0;
+               entity piece = world;
+               while((piece = findentity(piece,owner,minigame)))
+               if(piece.classname == "minigame_board_piece")
+                       if(piece.bd_tiletype == BD_TILE_BOULDER)
+                               ++boulder_count;
+                       else if(piece.bd_tiletype == BD_TILE_TARGET)
+                               ++target_count;
+
+               if(boulder_count != target_count)
+               {
+                       LOG_INFO("Not enough targets or boulders, fix your level!\n");
+                       return false;
+               }
+
                // saves all objects to the database file
                string file_name;
                float file_get;
@@ -599,6 +618,7 @@ string bd_get_tile_pic(int tileid)
                case BD_TILE_BRICK1: return "bd/brick1";
                case BD_TILE_BRICK2: return "bd/brick2";
                case BD_TILE_BRICK3: return "bd/brick3";
+               case BD_TILE_BRICK4: return "bd/brick4";
                case BD_TILE_TARGET: return "bd/target";
                case BD_TILE_DOZER: return "bd/dozer";
        }
@@ -626,13 +646,7 @@ void bd_hud_board(vector pos, vector mySize)
                        tile_pos = minigame_tile_pos(e.netname,BD_NUM_CNT,BD_LET_CNT);
                        tile_pos = minigame_hud_denormalize(tile_pos,pos,mySize);
 
-                       string thepiece = "bd/brick1";
-                       switch(e.bd_tiletype)
-                       {
-                               case BD_TILE_BOULDER: thepiece = "bd/boulder"; break;
-                               case BD_TILE_BRICK2: thepiece = "bd/brick2"; break;
-                               case BD_TILE_BRICK3: thepiece = "bd/brick3"; break;
-                       }
+                       string thepiece = bd_get_tile_pic(e.bd_tiletype);
 
                        minigame_drawpic_centered( tile_pos,  
                                        minigame_texture(thepiece),
@@ -703,8 +717,9 @@ void bd_hud_board(vector pos, vector mySize)
        if(active_minigame.minigame_flags & BD_TURN_EDIT)
        if(bd_valid_tile(bd_curr_pos))
        {
-               bool exists = (bd_find_piece(active_minigame, bd_curr_pos, false) || bd_find_piece(active_minigame, bd_curr_pos, true));
-               string thepiece = ((exists) ? "bd/delete" : bd_get_tile_pic(bd_curr_tile));
+               entity piece = bd_find_piece(active_minigame, bd_curr_pos, false);
+               entity targ = bd_find_piece(active_minigame, bd_curr_pos, true);
+               string thepiece = ((piece || (targ && bd_curr_tile != BD_TILE_BOULDER)) ? "bd/delete" : bd_get_tile_pic(bd_curr_tile));
 
                tile_pos = minigame_tile_pos(bd_curr_pos,BD_LET_CNT,BD_NUM_CNT);
                tile_pos = minigame_hud_denormalize(tile_pos,pos,mySize);