SL-15039 Restored couple settings that are still in use by TPVs

master
Andrey Kleshchev 2023-09-26 22:15:03 +03:00 committed by akleshchev
parent d0d05ddddf
commit 3a1ae84c26
3 changed files with 44 additions and 6 deletions

View File

@ -379,6 +379,17 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>AutoAcceptNewInventory</key>
<map>
<key>Comment</key>
<string>Automatically accept new notecards/textures/landmarks</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AutoLeveling</key>
<map>
<key>Comment</key>
@ -2612,6 +2623,17 @@
<key>Value</key>
<integer>6</integer>
</map>
<key>EffectScriptChatParticles</key>
<map>
<key>Comment</key>
<string>1 = normal behavior, 0 = disable display of swirling lights when scripts communicate</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>EnableGrab</key>
<map>
<key>Comment</key>

View File

@ -189,6 +189,18 @@ void inventory_offer_handler(LLOfferInfo* info)
return;
}
bool bAutoAccept(false);
// Avoid the Accept/Discard dialog if the user so desires. JC
if (gSavedSettings.getBOOL("AutoAcceptNewInventory")
&& (info->mType == LLAssetType::AT_NOTECARD
|| info->mType == LLAssetType::AT_LANDMARK
|| info->mType == LLAssetType::AT_TEXTURE))
{
// For certain types, just accept the items into the inventory,
// and possibly open them on receipt depending upon "ShowNewInventory".
bAutoAccept = true;
}
// Strip any SLURL from the message display. (DEV-2754)
std::string msg = info->mDesc;
int indx = msg.find(" ( http://slurl.com/secondlife/");
@ -254,7 +266,7 @@ void inventory_offer_handler(LLOfferInfo* info)
LLNotification::Params p;
// Object -> Agent Inventory Offer
if (info->mFromObject)
if (info->mFromObject && !bAutoAccept)
{
// Inventory Slurls don't currently work for non agent transfers, so only display the object name.
args["ITEM_SLURL"] = msg;
@ -300,10 +312,13 @@ void inventory_offer_handler(LLOfferInfo* info)
send_do_not_disturb_message(gMessageSystem, info->mFromID);
}
// Inform user that there is a script floater via toast system
payload["give_inventory_notification"] = TRUE;
p.payload = payload;
LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, false);
if (!bAutoAccept) // if we auto accept, do not pester the user
{
// Inform user that there is a script floater via toast system
payload["give_inventory_notification"] = TRUE;
p.payload = payload;
LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, false);
}
}
LLFirstUse::newInventory();

View File

@ -2531,7 +2531,8 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
// Make swirly things only for talking objects. (not script debug messages, though)
if (chat.mSourceType == CHAT_SOURCE_OBJECT
&& chat.mChatType != CHAT_TYPE_DEBUG_MSG )
&& chat.mChatType != CHAT_TYPE_DEBUG_MSG
&& gSavedSettings.getBOOL("EffectScriptChatParticles") )
{
LLPointer<LLViewerPartSourceChat> psc = new LLViewerPartSourceChat(chatter->getPositionAgent());
psc->setSourceObject(chatter);