diff options
author | Stijn Buys <ingar@osirion.org> | 2014-12-25 15:58:24 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2014-12-25 15:58:24 +0000 |
commit | 8f393ff70e60172c632efc81694433568df2862b (patch) | |
tree | ac87596d59ccf27dff0896c97e410643d21185bf /src/core/commandbuffer.cc | |
parent | 8f28c82e2fb26b453a2cfe976e48f74d97d6388a (diff) |
Added a core::Level type, added a level attribute to core::Entity and core::Info, updated core::Player to use the new type.
Diffstat (limited to 'src/core/commandbuffer.cc')
-rw-r--r-- | src/core/commandbuffer.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/core/commandbuffer.cc b/src/core/commandbuffer.cc index 11a48b4..4234f0e 100644 --- a/src/core/commandbuffer.cc +++ b/src/core/commandbuffer.cc @@ -61,13 +61,27 @@ void func_list_info(std::string const &args) InfoType *infotype = InfoType::find(typestr); if(!(argstream >> labelstr)) { - // a single argument + // single argument - infotype label if (infotype) { // list all the records of a single type Info::list(infotype); return; } + // single argument - info record id + std::istringstream idstream(typestr); + unsigned int id; + if (idstream >> id) + { + info = Info::find(id); + if (info) { + // list a single record + info->print(); + return; + } + } + + // single argument - info record exact label match info = Info::find(typestr); if (info) { // list a single record @@ -75,6 +89,7 @@ void func_list_info(std::string const &args) return; } + // single argument - info recrod label search info = Info::search(typestr); if (info) { // list a single record |