Support GridName sim feature, show grid name in status bar when hypergridded over to another grid.

V3s will want to add this display to the NavBar, most likely.
Adds const Type& ref() function to SignaledType to get a const reference from it where needed.
This commit is contained in:
Inusaito Sayori
2014-11-10 15:58:58 -05:00
parent 23f070128a
commit 60d9301646
3 changed files with 13 additions and 0 deletions

View File

@@ -84,6 +84,11 @@ void LFSimFeatureHandler::setSupportedFeatures()
has_feature_or_default(mDestinationGuideURL, extras, "destination-guide-url");
mMapServerURL = extras.has("map-server-url") ? extras["map-server-url"].asString() : "";
has_feature_or_default(mSearchURL, extras, "search-server-url");
if (extras.has("GridName"))
{
const std::string& grid_name(extras["GridName"]);
mGridName = gHippoGridManager->getConnectedGrid()->getGridName() != grid_name ? grid_name : "";
}
}
has_feature_or_default(mSayRange, extras, "say-range");
has_feature_or_default(mShoutRange, extras, "shout-range");
@@ -97,6 +102,7 @@ void LFSimFeatureHandler::setSupportedFeatures()
mDestinationGuideURL.reset();
mMapServerURL = "";
mSearchURL.reset();
mGridName.reset();
}
mSayRange.reset();
mShoutRange.reset();