From f1d6e358614d40f72047fe59ee255ea4f475bc9e Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 9 Nov 2013 20:07:34 +0000 Subject: Bugfixes in the entity print() functions. --- src/core/entity.cc | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/core/entity.cc b/src/core/entity.cc index ff780a5..5c1fe5c 100644 --- a/src/core/entity.cc +++ b/src/core/entity.cc @@ -266,7 +266,7 @@ void Entity::print() const print_header(); // type - con_print << " ^Ntype ^B"; + con_print << " ^Ntype ^B"; switch (type()) { case Default: con_print << "entity"; @@ -291,7 +291,7 @@ void Entity::print() const con_print << " ^Nmodule type ^B" << moduletype() << std::endl; // print entity flags - con_print << " ^Nflags ^B"; + con_print << " ^Nflags ^B"; if (has_flag(NonSolid)) { con_print << " nonsolid"; } @@ -309,17 +309,17 @@ void Entity::print() const } con_print << std::endl; if (inventory()) { - con_print << " ^Ninventory ^Byes" << std::endl; + con_print << " ^Ninventory ^Byes" << std::endl; } if (faction()) { - con_print << " ^Nfaction ^B" << faction()->label(); + con_print << " ^Nfaction ^B" << faction()->label() << std::endl; } } void Entity::print_header() const { con_print << " entity id ^B" << id() << " ^Nlabel ^B" << label() << " ^Nname ^B" << name(); - if (!zone()) { + if (zone()) { con_print << " ^Nzone ^B" << zone()->label(); } con_print << std::endl; @@ -798,11 +798,15 @@ void EntityDynamic::print() const { Entity::print(); - con_print << " ^Nstate ^B"; + con_print << " ^Nstate ^B"; switch (state()) { case Normal: con_print << "normal"; break; + + case NoPower: + con_print << "nopower"; + break; case ImpulseInitiate: con_print << "impulseinitiate"; @@ -820,17 +824,17 @@ void EntityDynamic::print() const con_print << "jump"; break; - case Destroyed: - con_print << "destroyed"; + case Docked: + con_print << "docked"; break; - case NoPower: - con_print << "nopower"; + case Destroyed: + con_print << "destroyed"; break; } con_print << std::endl; - } + void EntityDynamic::set_state(int state) { if (this->state() != state) { -- cgit v1.2.3