[Frosting:288] Ability to left-click sit on one's own objects only.
Debug Settings DisableClickSitOtherOwner added. Checkbox added to System Preferences for disabling click-to-sit on objects you don't own. Also redid onCommitCheckBox a bit, best viewed without space changes. There's more to this feature, but it doesn't work yet.
This commit is contained in:
@@ -13096,6 +13096,17 @@ This should be as low as possible, but too low may break functionality</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>DisableClickSitOtherOwner</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Never sit by clicking a prim that isn't owned by you</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>PlayIMSound</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -80,6 +80,9 @@ LLPrefsAscentSys::LLPrefsAscentSys()
|
||||
childSetCommitCallback("AscentCmdLineTP2", onCommitCmdLine, this);
|
||||
childSetCommitCallback("SinguCmdLineAway", onCommitCmdLine, this);
|
||||
|
||||
//Security ----------------------------------------------------------------------------
|
||||
childSetCommitCallback("disable_click_sit_check", onCommitCheckBox, this);
|
||||
|
||||
//Build -------------------------------------------------------------------------------
|
||||
childSetCommitCallback("next_owner_copy", onCommitCheckBox, this);
|
||||
childSetEnabled("next_owner_transfer", gSavedSettings.getBOOL("NextOwnerCopy"));
|
||||
@@ -129,59 +132,57 @@ LLPrefsAscentSys::~LLPrefsAscentSys()
|
||||
//static
|
||||
void LLPrefsAscentSys::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
|
||||
{
|
||||
LLPrefsAscentSys* self = (LLPrefsAscentSys*)user_data;
|
||||
LLPrefsAscentSys* self = static_cast<LLPrefsAscentSys*>(user_data);
|
||||
|
||||
// llinfos << "Change to " << ctrl->getControlName() << " aka " << ctrl->getName() << llendl;
|
||||
|
||||
if (ctrl->getName() == "speed_rez_check")
|
||||
{
|
||||
bool enabled = self->childGetValue("speed_rez_check").asBoolean();
|
||||
self->childSetEnabled("speed_rez_interval", enabled);
|
||||
self->childSetEnabled("speed_rez_seconds", enabled);
|
||||
}
|
||||
else if (ctrl->getName() == "double_click_teleport_check")
|
||||
{
|
||||
bool enabled = self->childGetValue("double_click_teleport_check").asBoolean();
|
||||
self->childSetEnabled("center_after_teleport_check", enabled);
|
||||
self->childSetEnabled("offset_teleport_check", enabled);
|
||||
}
|
||||
else if (ctrl->getName() == "system_folder_check")
|
||||
{
|
||||
bool enabled = self->childGetValue("system_folder_check").asBoolean();
|
||||
self->childSetEnabled("temp_in_system_check", enabled);
|
||||
}
|
||||
else if (ctrl->getName() == "enable_clouds")
|
||||
{
|
||||
bool enabled = self->childGetValue("enable_clouds").asBoolean();
|
||||
self->childSetEnabled("enable_classic_clouds", enabled);
|
||||
}
|
||||
else if (ctrl->getName() == "power_user_check")
|
||||
{
|
||||
bool enabled = self->childGetValue("power_user_check").asBoolean();
|
||||
self->childSetEnabled("power_user_confirm_check", enabled);
|
||||
self->childSetValue("power_user_confirm_check", false);
|
||||
}
|
||||
else if (ctrl->getName() == "power_user_confirm_check")
|
||||
{
|
||||
bool enabled = self->childGetValue("power_user_confirm_check").asBoolean();
|
||||
|
||||
gSavedSettings.setBOOL("AscentPowerfulWizard", enabled);
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
LLVector3d lpos_global = gAgent.getPositionGlobal();
|
||||
gAudiop->triggerSound(LLUUID("58a38e89-44c6-c52b-deb8-9f1ddc527319"), gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI, lpos_global);
|
||||
LLChat chat;
|
||||
chat.mSourceType = CHAT_SOURCE_SYSTEM;
|
||||
chat.mText = LLTrans::getString("PowerUser1") + "\n" + LLTrans::getString("PowerUser2") + "\n" + LLTrans::getString("Unlocked:") + "\n" + LLTrans::getString("PowerUser3") + "\n- " + LLTrans::getString("RightClick") + " > " + LLTrans::getString("PowerUser4") + "\n- " + LLTrans::getString("RightClick") + " > " + LLTrans::getString("PowerUser5");
|
||||
LLFloaterChat::addChat(chat);
|
||||
}
|
||||
}
|
||||
else if (ctrl->getName() == "next_owner_copy")
|
||||
const std::string name = ctrl->getName();
|
||||
bool enabled = ctrl->getValue().asBoolean();
|
||||
if (name == "speed_rez_check")
|
||||
{
|
||||
bool copy = gSavedSettings.getBOOL("NextOwnerCopy");
|
||||
if (!copy) gSavedSettings.setBOOL("NextOwnerTransfer", true);
|
||||
self->childSetEnabled("next_owner_transfer", copy);
|
||||
self->childSetEnabled("speed_rez_interval", enabled);
|
||||
self->childSetEnabled("speed_rez_seconds", enabled);
|
||||
}
|
||||
else if (name == "double_click_teleport_check")
|
||||
{
|
||||
self->childSetEnabled("center_after_teleport_check", enabled);
|
||||
self->childSetEnabled("offset_teleport_check", enabled);
|
||||
}
|
||||
else if (name == "system_folder_check")
|
||||
{
|
||||
self->childSetEnabled("temp_in_system_check", enabled);
|
||||
}
|
||||
else if (name == "enable_clouds")
|
||||
{
|
||||
self->childSetEnabled("enable_classic_clouds", enabled);
|
||||
}
|
||||
else if (name == "power_user_check")
|
||||
{
|
||||
self->childSetEnabled("power_user_confirm_check", enabled);
|
||||
self->childSetValue("power_user_confirm_check", false);
|
||||
}
|
||||
else if (name == "power_user_confirm_check")
|
||||
{
|
||||
gSavedSettings.setBOOL("AscentPowerfulWizard", enabled);
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
LLVector3d lpos_global = gAgent.getPositionGlobal();
|
||||
gAudiop->triggerSound(LLUUID("58a38e89-44c6-c52b-deb8-9f1ddc527319"), gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI, lpos_global);
|
||||
LLChat chat;
|
||||
chat.mSourceType = CHAT_SOURCE_SYSTEM;
|
||||
chat.mText = LLTrans::getString("PowerUser1") + "\n" + LLTrans::getString("PowerUser2") + "\n" + LLTrans::getString("Unlocked:") + "\n" + LLTrans::getString("PowerUser3") + "\n- " + LLTrans::getString("RightClick") + " > " + LLTrans::getString("PowerUser4") + "\n- " + LLTrans::getString("RightClick") + " > " + LLTrans::getString("PowerUser5");
|
||||
LLFloaterChat::addChat(chat);
|
||||
}
|
||||
}
|
||||
else if (name == "disable_click_sit_check")
|
||||
{
|
||||
self->childSetEnabled("disable_click_sit_own_check", !enabled);
|
||||
}
|
||||
else if (name == "next_owner_copy")
|
||||
{
|
||||
if (!enabled) gSavedSettings.setBOOL("NextOwnerTransfer", true);
|
||||
self->childSetEnabled("next_owner_transfer", enabled);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,6 +314,7 @@ void LLPrefsAscentSys::refreshValues()
|
||||
mDetachBridge = gSavedSettings.getBOOL("SGDetachBridge");
|
||||
mRevokePermsOnStandUp = gSavedSettings.getBOOL("RevokePermsOnStandUp");
|
||||
mDisableClickSit = gSavedSettings.getBOOL("DisableClickSit");
|
||||
mDisableClickSitOtherOwner = gSavedSettings.getBOOL("DisableClickSitOtherOwner");
|
||||
mDisplayScriptJumps = gSavedSettings.getBOOL("AscentDisplayTotalScriptJumps");
|
||||
mNumScriptDiff = gSavedSettings.getF32("Ascentnumscriptdiff");
|
||||
|
||||
@@ -463,6 +465,7 @@ void LLPrefsAscentSys::cancel()
|
||||
gSavedSettings.setBOOL("SGDetachBridge", mDetachBridge);
|
||||
gSavedSettings.setBOOL("RevokePermsOnStandUp", mRevokePermsOnStandUp);
|
||||
gSavedSettings.setBOOL("DisableClickSit", mDisableClickSit);
|
||||
gSavedSettings.setBOOL("DisableClickSitOtherOwner", mDisableClickSitOtherOwner);
|
||||
gSavedSettings.setBOOL("AscentDisplayTotalScriptJumps", mDisplayScriptJumps);
|
||||
gSavedSettings.setF32("Ascentnumscriptdiff", mNumScriptDiff);
|
||||
|
||||
|
||||
@@ -104,6 +104,7 @@ protected:
|
||||
BOOL mDetachBridge;
|
||||
BOOL mRevokePermsOnStandUp;
|
||||
BOOL mDisableClickSit;
|
||||
bool mDisableClickSitOtherOwner;
|
||||
BOOL mDisplayScriptJumps;
|
||||
F32 mNumScriptDiff;
|
||||
//Build -------------------------------------------------------------------------------
|
||||
|
||||
@@ -213,9 +213,17 @@ BOOL LLToolPie::handleLeftClickPick()
|
||||
break;
|
||||
case CLICK_ACTION_SIT:
|
||||
{
|
||||
if (!gSavedSettings.getBOOL("DisableClickSit"))
|
||||
if (isAgentAvatarValid() && !gAgentAvatarp->isSitting()) // agent not already sitting
|
||||
{
|
||||
bool disable_click_sit = gSavedSettings.getBOOL("DisableClickSit");
|
||||
if (!disable_click_sit)
|
||||
{
|
||||
if (gSavedSettings.getBOOL("DisableClickSitOtherOwner"))
|
||||
{
|
||||
disable_click_sit = !object->permYouOwner();
|
||||
}
|
||||
}
|
||||
if (disable_click_sit) return true;
|
||||
handle_object_sit_or_stand();
|
||||
// put focus in world when sitting on an object
|
||||
gFocusMgr.setKeyboardFocus(NULL);
|
||||
|
||||
@@ -88,8 +88,9 @@
|
||||
<check_box bottom_delta="-20" control_name="SGDetachBridge" follows="top" initial_value="false" label="Auto detach LSL Bridge" tool_tip="Automatically detach LSL Bridge of Phoenix or Firestorm viewer." name="detach_bridge"/>
|
||||
<check_box bottom_delta="-20" control_name="QuietSnapshotsToDisk" follows="top" initial_value="false" label="Quiet Snapshots to Disk" tool_tip="Doesn't make a camera sound nor alert everyone when you take a snapshot to your computer." name="quiet_snapshots_check"/>
|
||||
<check_box bottom_delta="-20" control_name="RevokePermsOnStandUp" follows="top" initial_value="false" label="On standing up, revoke perms for the object your avatar was sitting on" tool_tip="Objects generally retain Take Control and Trigger Animation permissions until reset or given permission by another user. Enabling this will make sure you revoke these permissions immediately." name="revoke_perms_on_stand_up_check"/>
|
||||
<check_box bottom_delta="-20" control_name="DisableClickSit" follows="top" initial_value="false" label="Disable click-to-sit objects" tool_tip="Some griefer tools rely on forcing or tricking you to click on an object that will make you sit, giving the object automatic permissions to trigger animations amongst other things. This will disable llSitTarget - It does mean that you will need to select 'Sit' on poseballs and furniture." name="disable_click_sit_check"/>
|
||||
<check_box bottom_delta="-20" follows="top" initial_value="false" label="Display Total Script Count changes:" name="totalscriptjumps" control_name="AscentDisplayTotalScriptJumps" tool_tip="Displays script count changes in your region, dependant on the threshold you choose to the right."/>
|
||||
<check_box bottom_delta="-20" control_name="DisableClickSit" follows="top" initial_value="false" label="Disable click-to-sit on objects" tool_tip="Some griefer tools rely on forcing or tricking you to click on an object that will make you sit, giving the object automatic permissions to trigger animations amongst other things. This will disable llSitTarget - It does mean that you will need to select 'Sit' on poseballs and furniture." name="disable_click_sit_check"/>
|
||||
<check_box bottom_delta="0" left_delta="170" control_name="DisableClickSitOtherOwner" follows="top" label="you don't own" tool_tip="Disables click to sit on objects you don't own (If used with the group check, only one is needed)" name="disable_click_sit_own_check"/>
|
||||
<check_box bottom_delta="-20" left="10" follows="top" initial_value="false" label="Display Total Script Count changes:" name="totalscriptjumps" control_name="AscentDisplayTotalScriptJumps" tool_tip="Displays script count changes in your region, dependant on the threshold you choose to the right."/>
|
||||
<spinner bottom_delta="0" decimal_digits="0" follows="top" height="16" increment="1" left_delta="210" max_val="9999" min_val="1" name="ScriptJumpCount" width="50" control_name="Ascentnumscriptdiff" tool_tip="Threshold for the script jump message [Default: 100]"/>
|
||||
</panel>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user