- New training (not finished yet)
authorunc0rr
Sun, 21 Oct 2007 15:39:21 +0000
changeset 622 cedd47d956ec
parent 621 8bdbc240f50f
child 623 ca1c1bd15915
- New training (not finished yet) - Make parameter for number of mines on map
QTfrontend/game.cpp
hedgewars/uConsole.pas
hedgewars/uGears.pas
hedgewars/uMisc.pas
share/hedgewars/Data/Trainings/001_Shotgun.txt
share/hedgewars/Data/Trainings/002_Bazooka.txt
--- a/QTfrontend/game.cpp	Sat Oct 20 17:27:06 2007 +0000
+++ b/QTfrontend/game.cpp	Sun Oct 21 15:39:21 2007 +0000
@@ -132,7 +132,7 @@
 	HWProto::addStringListToBuffer(teamscfg,
 			team1.TeamGameConfig(100));
 
-	QFile file(datadir->absolutePath() + "/Trainings/001_Shotgun.txt");
+	QFile file(datadir->absolutePath() + "/Trainings/002_Bazooka.txt");
 	if(!file.open(QFile::ReadOnly))
 	{
 		emit ErrorMessage(tr("Error reading training config file"));
--- a/hedgewars/uConsole.pas	Sat Oct 20 17:27:06 2007 +0000
+++ b/hedgewars/uConsole.pas	Sun Oct 21 15:39:21 2007 +0000
@@ -289,6 +289,7 @@
 RegisterVariable('seed'    , vtCommand, @chSetSeed      , false);
 RegisterVariable('delay'   , vtLongInt, @cInactDelay    , false);
 RegisterVariable('casefreq', vtLongInt, @cCaseFactor    , false);
+RegisterVariable('landadds', vtLongInt, @cLandAdditions , false);
 RegisterVariable('c_height', vtLongInt, @cConsoleHeight , false);
 RegisterVariable('gmflags' , vtLongInt, @GameFlags      , false);
 RegisterVariable('turntime', vtLongInt, @cHedgehogTurnTime, false);
--- a/hedgewars/uGears.pas	Sat Oct 20 17:27:06 2007 +0000
+++ b/hedgewars/uGears.pas	Sun Oct 21 15:39:21 2007 +0000
@@ -639,7 +639,7 @@
 begin
 AddGear(0, 0, gtATStartGame, 0, _0, _0, 2000);
 if (GameFlags and gfForts) = 0 then
-   for i:= 0 to 3 do
+   for i:= 0 to Pred(cLandAdditions) do
        FindPlace(AddGear(0, 0, gtMine, 0, _0, _0, 0), false, 0, 2048);
 end;
 
--- a/hedgewars/uMisc.pas	Sat Oct 20 17:27:06 2007 +0000
+++ b/hedgewars/uMisc.pas	Sun Oct 21 15:39:21 2007 +0000
@@ -62,6 +62,7 @@
 
     cShowFPS      : boolean = true;
     cCaseFactor   : Longword = 6;  {0..9}
+    cLandAdditions: Longword = 4;
     cFullScreen   : boolean = true;
     cLocaleFName  : shortstring = 'en.txt';
     cSeed         : shortstring = '';
--- a/share/hedgewars/Data/Trainings/001_Shotgun.txt	Sat Oct 20 17:27:06 2007 +0000
+++ b/share/hedgewars/Data/Trainings/001_Shotgun.txt	Sun Oct 21 15:39:21 2007 +0000
@@ -2,6 +2,7 @@
 $gmflags 268435458
 $turntime 60000
 $casefreq 0
+$landadds 0
 $delay 0
 map mushrooms
 theme avematan
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Trainings/002_Bazooka.txt	Sun Oct 21 15:39:21 2007 +0000
@@ -0,0 +1,15 @@
+seed 0
+$gmflags 268435462
+$turntime 60000
+$casefreq 0
+$landadds 0
+$delay 0
+map Volcano
+theme avematan
+ammstore 00900000000000000000
+hhcoords 1710 765
+addtrig s2147483649 1 1 33 1150 650 1
+addtrig s1 1 1 33 1770 650 2
+addtrig s2 1 1 33 635 215 7
+addtrig C7 1 1
+addtrig F2147483649 2 1