contrib/nitrpg: use stats to store player nitcoins
authorAlexandre Terrasa <alexandre@moz-code.org>
Wed, 25 Feb 2015 21:31:43 +0000 (22:31 +0100)
committerAlexandre Terrasa <alexandre@moz-code.org>
Fri, 24 Apr 2015 02:01:43 +0000 (22:01 -0400)
So podium and stats can be displayed by time periods.

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

contrib/nitrpg/src/statistics.nit

index 580023a..e8afccc 100644 (file)
@@ -57,6 +57,9 @@ redef class Player
                stats.save_in(self.key)
        end
 
+       redef fun nitcoins do return stats["nitcoins"]
+       redef fun nitcoins=(nc) do stats["nitcoins"] = nc
+
        redef fun pretty do
                var res = new FlatBuffer
                res.append super