diff options
Diffstat (limited to 'src/game/base/jumppoint.cc')
| -rw-r--r-- | src/game/base/jumppoint.cc | 29 | 
1 files changed, 27 insertions, 2 deletions
| diff --git a/src/game/base/jumppoint.cc b/src/game/base/jumppoint.cc index 82ed489..8af39b0 100644 --- a/src/game/base/jumppoint.cc +++ b/src/game/base/jumppoint.cc @@ -71,9 +71,22 @@ void JumpPoint::validate()  	}  	jumppoint_target = static_cast<JumpPoint *>(targetentity); +	 +	// overwrite name and info, remove the "system" part from the name +	std::string name("Jumppoint " + 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); +	 +	if (!info()) { +		set_info(new core::Info(core::Entity::infotype(), label().c_str())); +	} +	info()->clear_text(); +	info()->add_text("Jumppoint to the " + target()->zone()->name()); + -	con_debug << "  jumppoint to " << targetzone->label() << std::endl; -	//con_debug << "  Jumppoint " << zone->label() << ":" << label() << " with target " << targetlabel() << std::endl; +	con_debug << "  " << label() << " jumppoint to " << target()->zone()->label() << ":" << target()->label() << std::endl;  }  /* ---- class JumpGate --------------------------------------------- */ @@ -97,6 +110,18 @@ 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); +	 +	info()->clear_text(); +	info()->add_text("Jumpgate to the " + target()->zone()->name()); +  	if (target()) {  		set_flag(core::Entity::Dockable);  	} else { | 
