Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/base/jumppoint.cc31
1 files changed, 19 insertions, 12 deletions
diff --git a/src/game/base/jumppoint.cc b/src/game/base/jumppoint.cc
index 1f2c0a9..80c99ef 100644
--- a/src/game/base/jumppoint.cc
+++ b/src/game/base/jumppoint.cc
@@ -125,23 +125,30 @@ JumpGate::~JumpGate()
void JumpGate::validate()
{
JumpPoint::validate();
-
- // overwrite name and info
- // overwrite name and info, remove the "system" part from the name
- std::string name("Jumpgate " + zone()->name() + " -> " + target()->zone()->name());
- for (size_t pos = name.find(" system"); pos != std::string::npos; pos = name.find(" system")) {
- name.erase(pos, 7);
- }
- set_name(name);
-
- core::Info *entity_info = core::Info::find(info());
- entity_info->clear_text();
- entity_info->add_text("Jumpgate to the " + target()->zone()->name());
if (target()) {
set_flag(core::Entity::Dockable);
+
+ // overwrite name and info
+ // overwrite name and info, remove the "system" part from the name
+ std::string name("Jumpgate " + zone()->name() + " -> " + target()->zone()->name());
+ for (size_t pos = name.find(" system"); pos != std::string::npos; pos = name.find(" system")) {
+ name.erase(pos, 7);
+ }
+ set_name(name);
+
+ core::Info *entity_info = core::Info::find(info());
+ entity_info->clear_text();
+
+ // FIXME if 'system' was erased from the name, 'the' should not appear in the info text
+ // e.g. Jumpgate to Kor Telos
+ entity_info->add_text("Jumpgate to the " + target()->zone()->name());
+
} else {
unset_flag(core::Entity::Dockable);
+
+ std::string name("Inactive Jumpgate");
+ set_name(name);
}
}