diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-08-14 16:39:43 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-08-14 16:39:43 -0700 |
commit | 0517f5f487550f0616bc2ca062f94c3ccf63374e (patch) | |
tree | 376b58644ce4856c8cc273d24351c9d06393569d | |
parent | fddaf38f892aa608f9db9c034f6c583d638b6fcf (diff) |
PATH-854: Adding support to display whether linksets are scripted or not in the pathfinding linksets floater.
-rw-r--r-- | indra/newview/llfloaterpathfindinglinksets.cpp | 46 | ||||
-rw-r--r-- | indra/newview/llpathfindinglinkset.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llpathfindinglinkset.h | 5 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml | 34 |
4 files changed, 70 insertions, 31 deletions
diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp index 4d3b7fca91..651be274d9 100644 --- a/indra/newview/llfloaterpathfindinglinksets.cpp +++ b/indra/newview/llfloaterpathfindinglinksets.cpp @@ -399,11 +399,14 @@ LLSD LLFloaterPathfindingLinksets::buildLinksetScrollListItemData(const LLPathfi columns[2]["column"] = "owner"; columns[2]["value"] = getString("linkset_terrain_owner"); - columns[3]["column"] = "land_impact"; - columns[3]["value"] = getString("linkset_terrain_land_impact"); + columns[3]["column"] = "scripted"; + columns[3]["value"] = getString("linkset_terrain_scripted"); - columns[4]["column"] = "dist_from_you"; - columns[4]["value"] = getString("linkset_terrain_dist_from_you"); + columns[4]["column"] = "land_impact"; + columns[4]["value"] = getString("linkset_terrain_land_impact"); + + columns[5]["column"] = "dist_from_you"; + columns[5]["value"] = getString("linkset_terrain_dist_from_you"); } else { @@ -416,14 +419,21 @@ LLSD LLFloaterPathfindingLinksets::buildLinksetScrollListItemData(const LLPathfi columns[2]["column"] = "owner"; columns[2]["value"] = getOwnerName(pLinksetPtr); - columns[3]["column"] = "land_impact"; - columns[3]["value"] = llformat("%1d", pLinksetPtr->getLandImpact()); + columns[3]["column"] = "scripted"; + columns[3]["value"] = (pLinksetPtr->hasIsScripted() + ? (pLinksetPtr->isScripted() + ? getString("linkset_is_scripted") + : getString("linkset_is_not_scripted")) + : getString("linkset_is_unknown_scripted")); + + columns[4]["column"] = "land_impact"; + columns[4]["value"] = llformat("%1d", pLinksetPtr->getLandImpact()); - columns[4]["column"] = "dist_from_you"; - columns[4]["value"] = llformat("%1.0f m", dist_vec(pAvatarPosition, pLinksetPtr->getLocation())); + columns[5]["column"] = "dist_from_you"; + columns[5]["value"] = llformat("%1.0f m", dist_vec(pAvatarPosition, pLinksetPtr->getLocation())); } - columns[5]["column"] = "linkset_use"; + columns[6]["column"] = "linkset_use"; std::string linksetUse = getLinksetUseString(pLinksetPtr->getLinksetUse()); if (pLinksetPtr->isTerrain()) { @@ -441,19 +451,19 @@ LLSD LLFloaterPathfindingLinksets::buildLinksetScrollListItemData(const LLPathfi { linksetUse += (" " + getString("linkset_is_restricted_non_volume_state")); } - columns[5]["value"] = linksetUse; + columns[6]["value"] = linksetUse; - columns[6]["column"] = "a_percent"; - columns[6]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientA()); + columns[7]["column"] = "a_percent"; + columns[7]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientA()); - columns[7]["column"] = "b_percent"; - columns[7]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientB()); + columns[8]["column"] = "b_percent"; + columns[8]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientB()); - columns[8]["column"] = "c_percent"; - columns[8]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientC()); + columns[9]["column"] = "c_percent"; + columns[9]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientC()); - columns[9]["column"] = "d_percent"; - columns[9]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientD()); + columns[10]["column"] = "d_percent"; + columns[10]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientD()); return columns; } diff --git a/indra/newview/llpathfindinglinkset.cpp b/indra/newview/llpathfindinglinkset.cpp index fe4daabd89..779db5512e 100644 --- a/indra/newview/llpathfindinglinkset.cpp +++ b/indra/newview/llpathfindinglinkset.cpp @@ -39,6 +39,7 @@ #define LINKSET_MODIFIABLE_FIELD "modifiable" #define LINKSET_CATEGORY_FIELD "navmesh_category" #define LINKSET_CAN_BE_VOLUME "can_be_volume" +#define LINKSET_IS_SCRIPTED_FIELD "is_scripted" #define LINKSET_PHANTOM_FIELD "phantom" #define LINKSET_WALKABILITY_A_FIELD "A" #define LINKSET_WALKABILITY_B_FIELD "B" @@ -62,6 +63,8 @@ LLPathfindingLinkset::LLPathfindingLinkset(const LLSD& pTerrainData) mLandImpact(0U), mIsModifiable(FALSE), mCanBeVolume(FALSE), + mIsScripted(FALSE), + mHasIsScripted(TRUE), mLinksetUse(kUnknown), mWalkabilityCoefficientA(MIN_WALKABILITY_VALUE), mWalkabilityCoefficientB(MIN_WALKABILITY_VALUE), @@ -77,6 +80,8 @@ LLPathfindingLinkset::LLPathfindingLinkset(const std::string &pUUID, const LLSD& mLandImpact(0U), mIsModifiable(TRUE), mCanBeVolume(TRUE), + mIsScripted(FALSE), + mHasIsScripted(FALSE), mLinksetUse(kUnknown), mWalkabilityCoefficientA(MIN_WALKABILITY_VALUE), mWalkabilityCoefficientB(MIN_WALKABILITY_VALUE), @@ -93,6 +98,8 @@ LLPathfindingLinkset::LLPathfindingLinkset(const LLPathfindingLinkset& pOther) mLandImpact(pOther.mLandImpact), mIsModifiable(pOther.mIsModifiable), mCanBeVolume(pOther.mCanBeVolume), + mIsScripted(pOther.mIsScripted), + mHasIsScripted(pOther.mHasIsScripted), mLinksetUse(pOther.mLinksetUse), mWalkabilityCoefficientA(pOther.mWalkabilityCoefficientA), mWalkabilityCoefficientB(pOther.mWalkabilityCoefficientB), @@ -113,6 +120,8 @@ LLPathfindingLinkset& LLPathfindingLinkset::operator =(const LLPathfindingLinkse mLandImpact = pOther.mLandImpact; mIsModifiable = pOther.mIsModifiable; mCanBeVolume = pOther.mCanBeVolume; + mIsScripted = pOther.mIsScripted; + mHasIsScripted = pOther.mHasIsScripted; mLinksetUse = pOther.mLinksetUse; mWalkabilityCoefficientA = pOther.mWalkabilityCoefficientA; mWalkabilityCoefficientB = pOther.mWalkabilityCoefficientB; @@ -193,6 +202,13 @@ void LLPathfindingLinkset::parseLinksetData(const LLSD &pLinksetData) llassert(pLinksetData.has(LINKSET_MODIFIABLE_FIELD)); llassert(pLinksetData.get(LINKSET_MODIFIABLE_FIELD).isBoolean()); mIsModifiable = pLinksetData.get(LINKSET_MODIFIABLE_FIELD).asBoolean(); + + mHasIsScripted = pLinksetData.has(LINKSET_IS_SCRIPTED_FIELD); + if (mHasIsScripted) + { + llassert(pLinksetData.get(LINKSET_IS_SCRIPTED_FIELD).isBoolean()); + mIsScripted = pLinksetData.get(LINKSET_IS_SCRIPTED_FIELD).asBoolean(); + } } void LLPathfindingLinkset::parsePathfindingData(const LLSD &pLinksetData) diff --git a/indra/newview/llpathfindinglinkset.h b/indra/newview/llpathfindinglinkset.h index 73b4d6bad4..98675fccc4 100644 --- a/indra/newview/llpathfindinglinkset.h +++ b/indra/newview/llpathfindinglinkset.h @@ -63,6 +63,9 @@ public: inline ELinksetUse getLinksetUse() const {return mLinksetUse;}; + inline BOOL isScripted() const {return mIsScripted;}; + inline BOOL hasIsScripted() const {return mHasIsScripted;}; + inline S32 getWalkabilityCoefficientA() const {return mWalkabilityCoefficientA;}; inline S32 getWalkabilityCoefficientB() const {return mWalkabilityCoefficientB;}; inline S32 getWalkabilityCoefficientC() const {return mWalkabilityCoefficientC;}; @@ -98,6 +101,8 @@ private: U32 mLandImpact; BOOL mIsModifiable; BOOL mCanBeVolume; + BOOL mIsScripted; + BOOL mHasIsScripted; ELinksetUse mLinksetUse; S32 mWalkabilityCoefficientA; S32 mWalkabilityCoefficientB; diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml index eaed92ac55..9bc5c7d5a4 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml @@ -4,9 +4,9 @@ can_resize="true" can_tear_off="false" height="395" - width="1015" + width="1075" min_height="395" - min_width="1015" + min_width="1075" layout="topleft" name="floater_pathfinding_linksets" help_topic="floater_pathfinding_linksets" @@ -25,11 +25,15 @@ <floater.string name="linkset_terrain_name">[Terrain]</floater.string> <floater.string name="linkset_terrain_description">--</floater.string> <floater.string name="linkset_terrain_owner">--</floater.string> + <floater.string name="linkset_terrain_scripted">--</floater.string> <floater.string name="linkset_terrain_land_impact">--</floater.string> <floater.string name="linkset_terrain_dist_from_you">--</floater.string> <floater.string name="linkset_owner_loading">[Loading]</floater.string> <floater.string name="linkset_owner_unknown">[Unknown]</floater.string> <floater.string name="linkset_owner_group">[group]</floater.string> + <floater.string name="linkset_is_scripted">Yes</floater.string> + <floater.string name="linkset_is_not_scripted">No</floater.string> + <floater.string name="linkset_is_unknown_scripted">Unknown</floater.string> <floater.string name="linkset_use_walkable">Walkable</floater.string> <floater.string name="linkset_use_static_obstacle">Static obstacle</floater.string> <floater.string name="linkset_use_dynamic_obstacle">Movable obstacle</floater.string> @@ -47,7 +51,7 @@ follows="left|top|right|bottom" layout="topleft" height="226" - width="999"> + width="1059"> <text height="13" word_wrap="false" @@ -155,7 +159,7 @@ layout="topleft" name="apply_filters" top_pad="-21" - left_pad="31" + left_pad="91" width="73"/> <button follows="right|top" @@ -177,7 +181,7 @@ tab_stop="false" multi_select="true" name="objects_scroll_list" - width="980"> + width="1040"> <scroll_list.columns label="Name (root prim)" name="name" @@ -191,6 +195,10 @@ name="owner" width="141" /> <scroll_list.columns + label="Scripted" + name="scripted" + width="60" /> + <scroll_list.columns label="Impact" name="land_impact" width="55" /> @@ -230,7 +238,7 @@ layout="topleft" name="messaging_status" top_pad="17" - width="619"> + width="679"> Linksets: </text> <button @@ -269,7 +277,7 @@ name="horiz_separator" top_pad="0" left="18" - width="979"/> + width="1039"/> <panel border="false" bevel_style="none" @@ -277,7 +285,7 @@ layout="topleft" left="0" height="67" - width="950"> + width="1010"> <text height="13" word_wrap="false" @@ -327,7 +335,7 @@ layout="topleft" name="teleport_me_to_object" top_pad="-21" - left_pad="206" + left_pad="239" width="160"/> <button follows="right|bottom" @@ -336,7 +344,7 @@ layout="topleft" name="return_objects" top_pad="-21" - left_pad="220" + left_pad="252" width="95"/> <button follows="right|bottom" @@ -356,7 +364,7 @@ name="horiz_separator" top_pad="0" left="18" - width="979"/> + width="1039"/> <panel border="false" bevel_style="none" @@ -364,7 +372,7 @@ layout="topleft" left="0" height="75" - width="950"> + width="1010"> <text height="13" word_wrap="false" @@ -376,7 +384,7 @@ layout="topleft" left="18" top_pad="8" - width="912"> + width="972"> Edit attributes of selected linksets and press the button to apply changes </text> <combo_box |