From a95028547981614e06ea7a6d22b853b85418cea3 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 15 Apr 2009 17:08:51 +0000 Subject: added info registry, list_info added network info transfer added info based buy menu and related game changes --- src/core/gameinterface.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/core/gameinterface.h') diff --git a/src/core/gameinterface.h b/src/core/gameinterface.h index 22b85d5..8dc401b 100644 --- a/src/core/gameinterface.h +++ b/src/core/gameinterface.h @@ -8,6 +8,7 @@ #define __INCLUDED_CORE_GAMEINTERFACE_H__ #include "core/player.h" +#include "core/info.h" namespace core { @@ -38,6 +39,9 @@ public: /// show a list of connected players void list_players(); + /// return the current game time, in seconds + float time() const { return ((float)(timestamp()) / 1000.0f); } + /*----- virtual inspectors --------------------------------------- */ /// returns true if the game server can run a time frime @@ -49,8 +53,8 @@ public: /// return the current game time virtual unsigned long timestamp() const = 0; - /// return the current game time, in seconds - float time() const { return ((float)(timestamp()) / 1000.0f); } + /// returns an info record + virtual Info *info(const std::string &label) = 0; /*----- mutators ------------------------------------------------- */ -- cgit v1.2.3