From da04d1105a56c5f37e539e0502fa422ce0e4e9b3 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 24 Feb 2013 13:25:15 +0100 Subject: [PATCH] FIRE-9326: Bridge shows as worn on an invalid attach point in script info floater again --- indra/newview/fslslbridge.cpp | 7 +------ indra/newview/fslslbridge.h | 3 +++ indra/newview/llfloaterscriptlimits.cpp | 14 +++++++++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/indra/newview/fslslbridge.cpp b/indra/newview/fslslbridge.cpp index 03153679f5..3cce0ee298 100644 --- a/indra/newview/fslslbridge.cpp +++ b/indra/newview/fslslbridge.cpp @@ -47,7 +47,6 @@ #include "llfoldertype.h" #include "llhttpclient.h" #include "llassetuploadresponders.h" -// #include "llnearbychatbar.h" // Dead code #include "llnotificationmanager.h" #include "llviewerobject.h" #include "llappearancemgr.h" @@ -61,17 +60,13 @@ #include -#define LIB_ROCK_NAME "Rock - medium, round" - -//#define ROOT_FIRESTORM_FOLDER "#Firestorm" //moved to llinventoryfunctions to synch with the AO object #define FS_BRIDGE_FOLDER "#LSL Bridge" -#define FS_BRIDGE_NAME "#Firestorm LSL Bridge v" #define FS_BRIDGE_CONTAINER_FOLDER "Landscaping" #define FS_BRIDGE_MAJOR_VERSION 2 #define FS_BRIDGE_MINOR_VERSION 3 #define FS_MAX_MINOR_VERSION 99 -//current script version is 2.0 +//current script version is 2.3 const std::string UPLOAD_SCRIPT_CURRENT = "EBEDD1D2-A320-43f5-88CF-DD47BBCA5DFB.lsltxt"; // diff --git a/indra/newview/fslslbridge.h b/indra/newview/fslslbridge.h index c09d820867..e4b35aaba9 100644 --- a/indra/newview/fslslbridge.h +++ b/indra/newview/fslslbridge.h @@ -40,6 +40,9 @@ //-TT Client LSL Bridge File // +const std::string LIB_ROCK_NAME = "Rock - medium, round"; +const std::string FS_BRIDGE_NAME = "#Firestorm LSL Bridge v"; + class FSLSLBridge : public LLSingleton, public LLHTTPClient::Responder, public LLVOInventoryListener { static const U8 BRIDGE_POINT = 127; diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index 6139a839cf..5e23fcc027 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -51,6 +51,8 @@ #include "llviewerregion.h" #include "llviewerwindow.h" +#include "fslslbridge.h" + ///---------------------------------------------------------------------------- /// LLFloaterScriptLimits ///---------------------------------------------------------------------------- @@ -1189,11 +1191,17 @@ void LLPanelScriptLimitsAttachment::setAttachmentDetails(LLSD content) for(int i = 0; i < number_attachments; i++) { + // Firestorm Bridge hack + bool isValid = true; + std::string humanReadableLocation = ""; if(content["attachments"][i].has("location")) { std::string actualLocation = content["attachments"][i]["location"]; humanReadableLocation = LLTrans::getString(actualLocation.c_str()); + + // Firestorm Bridge hack + isValid = (actualLocation != "Invalid Attachment"); } S32 number_objects = content["attachments"][i]["objects"].size(); @@ -1212,13 +1220,13 @@ void LLPanelScriptLimitsAttachment::setAttachmentDetails(LLSD content) } std::string name = content["attachments"][i]["objects"][j]["name"].asString(); - // Ansariel: Crude hack to make the bridge display the proper attachment spot - // and not "MissingString(Bad attachment point)" - if (humanReadableLocation == "MissingString(Bad attachment point)" && (name.find("Firestorm LSL Bridge") != std::string::npos || name == "Rock - medium, round")) + // Firestorm Bridge hack + if (!isValid && (name.find(FS_BRIDGE_NAME) != std::string::npos || name == LIB_ROCK_NAME)) { humanReadableLocation = LLTrans::getString("Bridge"); name = "Firestorm LSL Bridge"; } + // LLSD element;