Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2014-12-25 15:58:24 +0000
committerStijn Buys <ingar@osirion.org>2014-12-25 15:58:24 +0000
commit8f393ff70e60172c632efc81694433568df2862b (patch)
treeac87596d59ccf27dff0896c97e410643d21185bf /src/core/commandbuffer.cc
parent8f28c82e2fb26b453a2cfe976e48f74d97d6388a (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.cc17
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