FIRE-9326: Bridge shows as worn on an invalid attach point in script info floater again
parent
98b8e785c3
commit
da04d1105a
|
|
@ -47,7 +47,6 @@
|
|||
#include "llfoldertype.h"
|
||||
#include "llhttpclient.h"
|
||||
#include "llassetuploadresponders.h"
|
||||
// #include "llnearbychatbar.h" // <FS:Zi> Dead code
|
||||
#include "llnotificationmanager.h"
|
||||
#include "llviewerobject.h"
|
||||
#include "llappearancemgr.h"
|
||||
|
|
@ -61,17 +60,13 @@
|
|||
#include <streambuf>
|
||||
|
||||
|
||||
#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";
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -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<FSLSLBridge>, public LLHTTPClient::Responder, public LLVOInventoryListener
|
||||
{
|
||||
static const U8 BRIDGE_POINT = 127;
|
||||
|
|
|
|||
|
|
@ -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++)
|
||||
{
|
||||
// <FS:Ansariel> 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());
|
||||
|
||||
// <FS:Ansariel> 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"))
|
||||
// <FS:Ansariel> 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";
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
LLSD element;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue