added dummy for tardis and ugly icons for tardis and structure
authorHenek
Sat, 29 Jan 2011 21:16:09 +0100
changeset 4883 7cddc9201a1d
parent 4882 b4c84db92d8f
child 4884 b2006a9f0fbc
added dummy for tardis and ugly icons for tardis and structure also added ability to add goals for lua, but forgot it so might not work
QTfrontend/hwconsts.cpp.in
hedgewars/uAIAmmoTests.pas
hedgewars/uGears.pas
hedgewars/uGearsRender.pas
hedgewars/uScript.pas
hedgewars/uTypes.pas
hedgewars/uVariables.pas
hedgewars/uWorld.pas
share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png
share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png
share/hedgewars/Data/Locale/en.txt
--- a/QTfrontend/hwconsts.cpp.in	Sat Jan 29 14:54:08 2011 -0500
+++ b/QTfrontend/hwconsts.cpp.in	Sat Jan 29 21:16:09 2011 +0100
@@ -37,10 +37,10 @@
 int cMaxTeams = 6;
 
 QString * cDefaultAmmoStore = new QString(
-        "9391929422199121032235111001201000000211110101011129"
-        "0405040541600655546554464776576666666155510101115411"
-        "0000000000000205500000040007004000000000200000000600"
-        "1311110312111111123114111111111111111211111101111121"
+        "93919294221991210322351110012010000002111101010111299"
+        "04050405416006555465544647765766666661555101011154111"
+        "00000000000002055000000400070040000000002000000006000"
+        "13111103121111111231141111111111111112111111011111211"
         );
 int cAmmoNumber = cDefaultAmmoStore->size() / 4;
 
@@ -49,40 +49,40 @@
         << qMakePair(QString("Default"), *cDefaultAmmoStore)
         << qMakePair(QString("Crazy"),     QString(
         // TODO: Remove Piano's unlimited uses!
-        "999999999999999999299999999999999929999999990999999"
-        "111111011111111111111111111111111111111111110111111"
-        "000000000000000000000000000000000000000000000000000"
-        "131111031211111112311411111111111111121111010111111"
+        "99999999999999999929999999999999992999999999099999922"
+        "11111101111111111111111111111111111111111111011111111"
+        "00000000000000000000000000000000000000000000000000000"
+        "13111103121111111231141111111111111112111101011111111"
         ))
         << qMakePair(QString("Pro Mode"),  QString(
-        "909000900000000000000900000000000000000000000000000"
-        "000000000000000000000000000000000000000000000000000"
-        "000000000000020550000004000700400000000020000000000"
-        "111111111111111111111111111111111111111110010111111"
+        "90900090000000000000090000000000000000000000000000000"
+        "00000000000000000000000000000000000000000000000000000"
+        "00000000000002055000000400070040000000002000000000000"
+        "11111111111111111111111111111111111111111001011111111"
         ))
         << qMakePair(QString("Shoppa"),    QString(
-        "000000990000000000000000000000000000000000000000000"
-        "444441004424440221011212122242200000000200040001001"
-        "000000000000000000000000000000000000000000000000000"
-        "111111111111111111111111111111111111111110110111111"
+        "00000099000000000000000000000000000000000000000000000"
+        "44444100442444022101121212224220000000020004000100111"
+        "00000000000000000000000000000000000000000000000000000"
+        "11111111111111111111111111111111111111111011011111111"
         ))
         << qMakePair(QString("Clean Slate"),QString(
-        "101000900001000001100000000000000000000000000000100"
-        "040504054160065554655446477657666666615551010111541"
-        "000000000000000000000000000000000000000000000000000"
-        "131111031211111112311411111111111111121111110111111"
+        "10100090000100000110000000000000000000000000000010000"
+        "04050405416006555465544647765766666661555101011154111"
+        "00000000000000000000000000000000000000000000000000000"
+        "13111103121111111231141111111111111112111111011111111"
         ))
         << qMakePair(QString("Minefield"), QString(
-        "000000990009000000030000000000000000000000000000000"
-        "000000000000000000000000000000000000000000000000000"
-        "000000000000020550000004000700400000000020000000060"
-        "111111111111111111111111111111111111111111110111111"
+        "00000099000900000003000000000000000000000000000000000"
+        "00000000000000000000000000000000000000000000000000000"
+        "00000000000002055000000400070040000000002000000006000"
+        "11111111111111111111111111111111111111111111011111111"
         ))
         << qMakePair(QString("Thinking with Portals"), QString(
-        "900000900200000000210000000000000011000009000000000"
-        "040504054160065554655446477657666666615551010111541"
-        "000000000000020550000004000700400000000020000000060"
-        "131111031211111112311411111111111111121111110111111"
+        "90000090020000000021000000000000001100000900000000000"
+        "04050405416006555465544647765766666661555101011154111"
+        "00000000000002055000000400070040000000002000000006000"
+        "13111103121111111231141111111111111112111111011111111"
         ));
 
 QColor *colors[] = {
--- a/hedgewars/uAIAmmoTests.pas	Sat Jan 29 14:54:08 2011 -0500
+++ b/hedgewars/uAIAmmoTests.pas	Sat Jan 29 21:16:09 2011 +0100
@@ -105,6 +105,7 @@
             (proc: nil;              flags: 0), // amResurrector
             (proc: nil;              flags: 0), // amDrillStrike
             (proc: @TestSnowball;    flags: 0), // amSnowball
+            (proc: nil;              flags: 0), // amTardis
             (proc: nil;              flags: 0) // amStructure
             );
 
--- a/hedgewars/uGears.pas	Sat Jan 29 14:54:08 2011 -0500
+++ b/hedgewars/uGears.pas	Sat Jan 29 21:16:09 2011 +0100
@@ -520,7 +520,6 @@
                 gear^.nImpactSounds:= 1;
                 gear^.Radius:= 13;
                 gear^.Elasticity:= _0_3;
-                gear^.Timer:= 5000;
                 gear^.Health:= 50;
                 end;
     end;
--- a/hedgewars/uGearsRender.pas	Sat Jan 29 14:54:08 2011 -0500
+++ b/hedgewars/uGearsRender.pas	Sat Jan 29 21:16:09 2011 +0100
@@ -944,7 +944,6 @@
                     DrawRotatedF(sprTeleport, hwRound(HHGear^.X) + 1 + WorldDx, hwRound(HHGear^.Y) - 3 + WorldDy, 11 - Gear^.Pos, hwSign(HHGear^.dX), 0);
                     end;
         gtSwitcher: DrawSprite(sprSwitch, x - 16, y - 56, (GameTicks shr 6) mod 12);
-       gtStructure,
           gtTarget: begin
                     Tint($FF, $FF, $FF, round($FF * Gear^.Timer / 1000));
                     DrawSprite(sprTarget, x - 16, y - 16, 0);
@@ -1025,6 +1024,7 @@
                       //DrawRotatedF(sprFlake, x-SpritesData[sprFlake].Width div 2, y-SpritesData[sprFlake].Height div 2, Gear^.Timer, 1, Gear^.DirAngle);
                       DrawRotatedF(sprFlake, x, y, Gear^.Timer, 1, Gear^.DirAngle)
                   end;
+       gtStructure: DrawSprite(sprTarget, x - 16, y - 16, 0);
 
          end;
       if Gear^.RenderTimer and (Gear^.Tex <> nil) then DrawCentered(x + 8, y + 8, Gear^.Tex);
--- a/hedgewars/uScript.pas	Sat Jan 29 14:54:08 2011 -0500
+++ b/hedgewars/uScript.pas	Sat Jan 29 21:16:09 2011 +0100
@@ -1307,6 +1307,8 @@
 ScriptSetString('Map', '');
 ScriptSetString('Theme', '');
 
+ScriptSetString('Goals', '');
+
 ScriptCall('onGameInit');
 
 // pop game variables
@@ -1330,6 +1332,7 @@
     ParseCommand('map ' + ScriptGetString('Map'), true);
 if ScriptGetString('Theme') <> '' then
     ParseCommand('theme ' + ScriptGetString('Theme'), true);
+LuaGoals:= ScriptGetString('Goals');
 
 if ScriptExists('onAmmoStoreInit') then
     begin
--- a/hedgewars/uTypes.pas	Sat Jan 29 14:54:08 2011 -0500
+++ b/hedgewars/uTypes.pas	Sat Jan 29 21:16:09 2011 +0100
@@ -116,7 +116,7 @@
             amRCPlane, amLowGravity, amExtraDamage, amInvulnerable, amExtraTime, // 35
             amLaserSight, amVampiric, amSniperRifle, amJetpack, amMolotov, amBirdy, amPortalGun, // 42
             amPiano, amGasBomb, amSineGun, amFlamethrower, amSMine, amHammer, // 48
-            amResurrector, amDrillStrike, amSnowball, amStructure);
+            amResurrector, amDrillStrike, amSnowball, amTardis, amStructure);
 
     TCrateType = (HealthCrate, AmmoCrate, UtilityCrate);
 
@@ -351,7 +351,7 @@
             sidLowGravity, sidExtraDamage, sidInvulnerable, sidExtraTime,
             sidLaserSight, sidVampiric, sidSniperRifle, sidJetpack,
             sidMolotov, sidBirdy, sidPortalGun, sidPiano, sidGasBomb, sidSineGun, sidFlamethrower,
-            sidSMine, sidHammer, sidResurrector, sidDrillStrike, sidSnowball, sidNothing, sidStructure);
+            sidSMine, sidHammer, sidResurrector, sidDrillStrike, sidSnowball, sidNothing, sidTardis, sidStructure);
 
     TMsgStrId = (sidStartFight, sidDraw, sidWinner, sidVolume, sidPaused,
             sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync,
--- a/hedgewars/uVariables.pas	Sat Jan 29 14:54:08 2011 -0500
+++ b/hedgewars/uVariables.pas	Sat Jan 29 21:16:09 2011 +0100
@@ -148,6 +148,8 @@
 
     hiTicks: Word;
 
+    LuaGoals        : shortstring;
+
 const
     cHHFileName = 'Hedgehog';
     cCHFileName = 'Crosshair';
@@ -2002,6 +2004,34 @@
             ejectX: 0; 
             ejectY: 0),
 
+// Tardis (just a copy of teleport til nemo arives)
+            (NameId: sidTardis;
+            NameTex: nil;
+            Probability: 200;
+            NumberInCase: 1;
+            Ammo: (Propz: ammoprop_ForwMsgs or
+                          ammoprop_NoCrosshair or
+                          ammoprop_NeedTarget or
+                          ammoprop_AttackingPut or
+                          ammoprop_Utility or
+                          ammoprop_DontHold;
+                Count: 2;
+                NumPerTurn: 0;
+                Timer: 0;
+                Pos: 0;
+                AmmoType: amTardis;
+                AttackVoice: sndNone);
+            Slot: 7;
+            TimeAfterTurn: 0;
+            minAngle: 0;
+            maxAngle: 0;
+            isDamaging: false;
+            SkipTurns: 0;
+            PosCount: 2;
+            PosSprite: sprAmTeleport;
+            ejectX: 0;
+            ejectY: 0),
+
 // Structure
             (NameId: sidStructure;
             NameTex: nil;
@@ -2324,6 +2354,8 @@
     vobSDCount:= 30 * cScreenSpace div LAND_WIDTH;
     vobSDVelocity:= 0;
     vobSDFallSpeed:= 0;
+
+    LuaGoals:= '';
 end;
 
 procedure freeModule;
--- a/hedgewars/uWorld.pas	Sat Jan 29 14:54:08 2011 -0500
+++ b/hedgewars/uWorld.pas	Sat Jan 29 21:16:09 2011 +0100
@@ -122,6 +122,9 @@
 // if special game flags/settings are changed, add them to the game mode notice window and then show it
 g:= ''; // no text/things to note yet
 
+// add custom goals from lua script if there are any
+if LuaGoals <> '' then g:= LuaGoals + '|';
+
 // check different game flags (goals/game modes first for now)
 g:= AddGoal(g, gfKing, gidKing); // king?
 
Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos.png has changed
Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png has changed
--- a/share/hedgewars/Data/Locale/en.txt	Sat Jan 29 14:54:08 2011 -0500
+++ b/share/hedgewars/Data/Locale/en.txt	Sat Jan 29 21:16:09 2011 +0100
@@ -53,7 +53,8 @@
 00:50=Drill Strike
 00:51=Mudball
 00:52=No weapon selected
-00:53=Structure
+00:53=TARDIS
+00:54=Structure
 
 01:00=Let's fight!
 01:01=Round draw
@@ -436,6 +437,10 @@
 03:48=It's Hammer time!
 03:49=Does what you guess
 03:50=Moles fan
+03:51=Found on the ground
+03:52=UNUSED
+03:53=Type 40
+03:54=Build something
 
 ; Weapon Descriptions (use | as line breaks)
 04:00=Attack your enemies using a simple grenade.|It will explode once its timer reaches zero.|1-5: Set grenade's timer|Attack: Hold to throw with more power