Commits

Stinson Linden  committed 333c6ea

PATH-854: Adding support to display whether linksets are scripted or not in the pathfinding linksets floater.

  • Participants
  • Parent commits f47dca8

Comments (0)

Files changed (4)

File indra/newview/llfloaterpathfindinglinksets.cpp

 		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
 	{
 		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"] = "dist_from_you";
-		columns[4]["value"] = llformat("%1.0f m", dist_vec(pAvatarPosition, pLinksetPtr->getLocation()));
+		columns[4]["column"] = "land_impact";
+		columns[4]["value"] = llformat("%1d", pLinksetPtr->getLandImpact());
+
+		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())
 	{
 	{
 		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;
 }

File indra/newview/llpathfindinglinkset.cpp

 #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"
 	mLandImpact(0U),
 	mIsModifiable(FALSE),
 	mCanBeVolume(FALSE),
+	mIsScripted(FALSE),
+	mHasIsScripted(TRUE),
 	mLinksetUse(kUnknown),
 	mWalkabilityCoefficientA(MIN_WALKABILITY_VALUE),
 	mWalkabilityCoefficientB(MIN_WALKABILITY_VALUE),
 	mLandImpact(0U),
 	mIsModifiable(TRUE),
 	mCanBeVolume(TRUE),
+	mIsScripted(FALSE),
+	mHasIsScripted(FALSE),
 	mLinksetUse(kUnknown),
 	mWalkabilityCoefficientA(MIN_WALKABILITY_VALUE),
 	mWalkabilityCoefficientB(MIN_WALKABILITY_VALUE),
 	mLandImpact(pOther.mLandImpact),
 	mIsModifiable(pOther.mIsModifiable),
 	mCanBeVolume(pOther.mCanBeVolume),
+	mIsScripted(pOther.mIsScripted),
+	mHasIsScripted(pOther.mHasIsScripted),
 	mLinksetUse(pOther.mLinksetUse),
 	mWalkabilityCoefficientA(pOther.mWalkabilityCoefficientA),
 	mWalkabilityCoefficientB(pOther.mWalkabilityCoefficientB),
 	mLandImpact = pOther.mLandImpact;
 	mIsModifiable = pOther.mIsModifiable;
 	mCanBeVolume = pOther.mCanBeVolume;
+	mIsScripted = pOther.mIsScripted;
+	mHasIsScripted = pOther.mHasIsScripted;
 	mLinksetUse = pOther.mLinksetUse;
 	mWalkabilityCoefficientA = pOther.mWalkabilityCoefficientA;
 	mWalkabilityCoefficientB = pOther.mWalkabilityCoefficientB;
 	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)

File indra/newview/llpathfindinglinkset.h

 
 	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;};
 	U32          mLandImpact;
 	BOOL         mIsModifiable;
 	BOOL         mCanBeVolume;
+	BOOL         mIsScripted;
+	BOOL         mHasIsScripted;
 	ELinksetUse  mLinksetUse;
 	S32          mWalkabilityCoefficientA;
 	S32          mWalkabilityCoefficientB;

File indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml

     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"
   <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>
       follows="left|top|right|bottom"
       layout="topleft"
       height="226"
-      width="999">
+      width="1059">
     <text
         height="13"
         word_wrap="false"
         layout="topleft"
         name="apply_filters"
         top_pad="-21"
-        left_pad="31"
+        left_pad="91"
         width="73"/>
     <button
         follows="right|top"
         tab_stop="false"
         multi_select="true"
         name="objects_scroll_list"
-        width="980">
+        width="1040">
       <scroll_list.columns
           label="Name (root prim)"
           name="name"
           name="owner"
           width="141" />
       <scroll_list.columns
+          label="Scripted"
+          name="scripted"
+          width="60" />
+      <scroll_list.columns
           label="Impact"
           name="land_impact"
           width="55" />
         layout="topleft"
         name="messaging_status"
         top_pad="17"
-        width="619">
+        width="679">
       Linksets:
     </text>
     <button
       name="horiz_separator"
       top_pad="0"
       left="18"
-      width="979"/>
+      width="1039"/>
   <panel
       border="false"
       bevel_style="none"
       layout="topleft"
       left="0"
       height="67"
-      width="950">
+      width="1010">
     <text
         height="13"
         word_wrap="false"
         layout="topleft"
         name="teleport_me_to_object"
         top_pad="-21"
-        left_pad="206"
+        left_pad="239"
         width="160"/>
     <button
         follows="right|bottom"
         layout="topleft"
         name="return_objects"
         top_pad="-21"
-        left_pad="220"
+        left_pad="252"
         width="95"/>
     <button
         follows="right|bottom"
       name="horiz_separator"
       top_pad="0"
       left="18"
-      width="979"/>
+      width="1039"/>
   <panel
       border="false"
       bevel_style="none"
       layout="topleft"
       left="0"
       height="75"
-      width="950">
+      width="1010">
     <text
         height="13"
         word_wrap="false"
         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