# HG changeset patch # User cairo # Date 1386648797 18000 # Node ID d6f8b9cb729e5188c9d2cd45c12108f145dac12f # Parent 30a9e740ec09ca8de7a7f0686fb1d6d59b6bdb6e set holiday hats for nohat hogs diff -r 30a9e740ec09 -r d6f8b9cb729e hedgewars/uStore.pas --- a/hedgewars/uStore.pas Tue Dec 10 02:30:53 2013 +0200 +++ b/hedgewars/uStore.pas Mon Dec 09 23:13:17 2013 -0500 @@ -153,11 +153,13 @@ drY: LongInt; texsurf, flagsurf, iconsurf: PSDL_Surface; foundBot: boolean; + year, month, md : word; begin if cOnlyStats then exit; r.x:= 0; r.y:= 0; drY:= - 4; +DecodeDate(Date, year, month, md); for t:= 0 to Pred(TeamsCount) do with TeamsArray[t]^ do begin @@ -236,6 +238,16 @@ if Gear <> nil then begin NameTagTex:= RenderStringTexLim(Name, Clan^.Color, fnt16, cTeamHealthWidth); + if Hat = 'NoHat' then + begin + if ((month = 4) and (md = 20)) then + Hat := 'eastertop'; // Easter + if ((month = 12) and (md = 25)) then + Hat := 'Santa'; // Christmas + if ((month = 10) and (md = 31)) then + Hat := 'fr_pumpkin'; // Halloween/Hedgewars' birthday + end; + if Hat <> 'NoHat' then begin if (Length(Hat) > 39) and (Copy(Hat,1,8) = 'Reserved') and (Copy(Hat,9,32) = PlayerHash) then