hedgewars/uStats.pas
changeset 7932 ebe1d112e439
parent 7857 2bc61f8841a1
child 7977 4987f6f83cdf
child 8717 6e1ccd678e8a
equal deleted inserted replaced
7929:6e01c5134eb5 7932:ebe1d112e439
    34 procedure TurnReaction;
    34 procedure TurnReaction;
    35 procedure SendStats;
    35 procedure SendStats;
    36 procedure hedgehogFlight(Gear: PGear; time: Longword);
    36 procedure hedgehogFlight(Gear: PGear; time: Longword);
    37 
    37 
    38 implementation
    38 implementation
    39 uses uSound, uLocale, uVariables, uUtils, uIO, uCaptions, uDebug, uMisc;
    39 uses uSound, uLocale, uVariables, uUtils, uIO, uCaptions, uDebug, uMisc, uConsole;
    40 
    40 
    41 var DamageClan  : Longword = 0;
    41 var DamageClan  : Longword = 0;
    42     DamageTotal : Longword = 0;
    42     DamageTotal : Longword = 0;
    43     KillsClan   : LongWord = 0;
    43     KillsClan   : LongWord = 0;
    44     Kills       : LongWord = 0;
    44     Kills       : LongWord = 0;
   183 
   183 
   184 procedure hedgehogFlight(Gear: PGear; time: Longword);
   184 procedure hedgehogFlight(Gear: PGear; time: Longword);
   185 begin
   185 begin
   186 if time > 4000 then
   186 if time > 4000 then
   187     begin
   187     begin
   188 	{$IFNDEF MOBILE}
   188     WriteLnToConsole('FLIGHT');
   189     writeln(stdout, 'FLIGHT');
   189     WriteLnToConsole(Gear^.Hedgehog^.Team^.TeamName);
   190     writeln(stdout, Gear^.Hedgehog^.Team^.TeamName);
   190     WriteLnToConsole(inttostr(time));
   191     writeln(stdout, inttostr(time));
   191     WriteLnToConsole( '');
   192     writeln(stdout, '');
       
   193 	{$ENDIF}
       
   194     end
   192     end
   195 end;
   193 end;
   196 
   194 
   197 procedure SendStats;
   195 procedure SendStats;
   198 var i, t: LongInt;
   196 var i, t: LongInt;
   290     SendStat(siMaxTeamDamage, IntToStr(maxTeamDamage) + ' ' + maxTeamDamageName);
   288     SendStat(siMaxTeamDamage, IntToStr(maxTeamDamage) + ' ' + maxTeamDamageName);
   291 
   289 
   292 if KilledHHs > 0 then
   290 if KilledHHs > 0 then
   293     SendStat(siKilledHHs, IntToStr(KilledHHs));
   291     SendStat(siKilledHHs, IntToStr(KilledHHs));
   294 
   292 
   295 {$IFNDEF MOBILE}
       
   296 // now to console
   293 // now to console
   297 if winnersClan <> nil then 
   294 if winnersClan <> nil then 
   298     begin
   295     begin
   299     writeln(stdout, 'WINNERS');
   296     WriteLnToConsole('WINNERS');
   300     for t:= 0 to winnersClan^.TeamsNumber - 1 do
   297     for t:= 0 to winnersClan^.TeamsNumber - 1 do
   301         writeln(stdout, winnersClan^.Teams[t]^.TeamName);
   298         WriteLnToConsole(winnersClan^.Teams[t]^.TeamName);
   302     end
   299     end
   303 else
   300 else
   304     writeln(stdout, 'DRAW');
   301     WriteLnToConsole('DRAW');
   305 
   302 
   306 writeln(stdout, '');
   303 WriteLnToConsole('');
   307 {$ENDIF}
       
   308 end;
   304 end;
   309 
   305 
   310 procedure initModule;
   306 procedure initModule;
   311 begin
   307 begin
   312     TotalRounds:= -1;
   308     TotalRounds:= -1;