Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2014-12-25 21:53:49 +0000
committerStijn Buys <ingar@osirion.org>2014-12-25 21:53:49 +0000
commit12834c9dc3c119dc3cf45ba141d9a90fb4f95075 (patch)
tree6077d5f17dbd0d49a84c714df562008aad884562 /src/core
parent8f393ff70e60172c632efc81694433568df2862b (diff)
Corrected a number of imperfections in Entity::print(), EntityDynamic::print() and Info::print().
Diffstat (limited to 'src/core')
-rw-r--r--src/core/entity.cc45
-rw-r--r--src/core/info.cc2
2 files changed, 24 insertions, 23 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc
index 41ead7e..f7501f7 100644
--- a/src/core/entity.cc
+++ b/src/core/entity.cc
@@ -296,10 +296,13 @@ void Entity::print() const
// game module type id
con_print << " ^Nmodule type ^B" << moduletype() << std::endl;
- // print entity flags
+ // entity flags
con_print << " ^Nflags ^B";
if (flags() == 0)
{
+ con_print << " ^Bnone";
+ } else
+ {
if (has_flag(NonSolid)) {
con_print << " ^Bnonsolid";
}
@@ -315,11 +318,8 @@ void Entity::print() const
if (has_flag(KeepAlive)) {
con_print << " ^Bkeepalive";
}
- } else
- {
- con_print << " ^Bnone";
}
- con_print << std::endl;
+ con_print << std::endl;
// level
con_print << " ^Nlevel ^B" << level() << std::endl;
@@ -340,25 +340,25 @@ void Entity::print() const
con_print << " ^Nmodel ^B" << model()->name() << std::endl;
} else
{
- con_print << " ^Nshape ^B";
+ con_print << " ^Nshape ";
switch (shape())
{
case Diamond:
- con_print << "diamond";
+ con_print << "^Bdiamond";
break;
case Sphere:
- con_print << "sphere";
+ con_print << "^Bsphere";
break;
case Cube:
- con_print << "cube";
+ con_print << "^Bcube";
break;
case Axis:
- con_print << "axis";
+ con_print << "^Baxis";
break;
}
+ con_print << std::endl;
}
-
// slots
if (slots() && slots()->size()) {
int nbcannons = 0;
@@ -394,7 +394,7 @@ void Entity::print() const
con_print << std::endl;
}
- // invenotry
+ // inventiry
if (inventory()) {
print_inventory();
}
@@ -883,38 +883,39 @@ void EntityDynamic::print() const
Entity::print();
con_print << " ^Nstate ^B";
- switch (state()) {
+ switch (state())
+ {
case Normal:
- con_print << "normal";
+ con_print << "^Bnormal";
break;
case NoPower:
- con_print << "nopower";
+ con_print << "^Bnopower";
break;
case ImpulseInitiate:
- con_print << "impulseinitiate";
+ con_print << "^Bimpulseinitiate";
break;
case Impulse:
- con_print << "impulse";
+ con_print << "^Bimpulse";
break;
case JumpInitiate:
- con_print << "jumpinitiate";
+ con_print << "^Bjumpinitiate";
break;
case Jump:
- con_print << "jump";
+ con_print << "^Bjump";
break;
case Docked:
- con_print << "docked";
+ con_print << "^Bdocked";
break;
case Destroyed:
- con_print << "destroyed";
- break;
+ con_print << "^Bdestroyed";
+ break;
}
con_print << std::endl;
}
diff --git a/src/core/info.cc b/src/core/info.cc
index 3d1b6cc..0f48eab 100644
--- a/src/core/info.cc
+++ b/src/core/info.cc
@@ -253,7 +253,7 @@ void Info::receive_server_update(std::istream &is)
void Info::print() const
{
- con_print << " id: ^B" << std::setw(4) << std::setfill(' ') << id() << " type: ^B" << (type() ? type()->label() : "NULL") << " ^Nlabel: ^B" << label() << " ^Nname: ^B" << name() << " ^Nmodel: ^B" << modelname() << "^N" << std::endl;
+ con_print << " ^Ninfo id ^B" << std::setw(4) << std::setfill(' ') << id() << " ^Ntype ^B" << (type() ? type()->label() : "NULL") << " ^Nlabel ^B" << label() << " ^Nname ^B" << name() << " ^Nmodel ^B" << modelname() << "^N" << std::endl;
if (info_text.size()) {
for (Text::const_iterator it = info_text.begin(); it != info_text.end(); it++) {
con_print << " " << (*it) << std::endl;