diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h index e68331b99a7dca04fc3dcd5dec8d7fa572659fa0..135d0ca7b937bd7a17f62537dc39fb02528797f3 100644 --- a/indra/llinventory/llparcel.h +++ b/indra/llinventory/llparcel.h @@ -508,6 +508,9 @@ class LLParcel { return mRegionDenyAnonymousOverride; } BOOL getRegionDenyAgeUnverifiedOverride() const { return mRegionDenyAgeUnverifiedOverride; } + BOOL getRegionAllowAccessOverride() const + { return mRegionAllowAccessoverride; } + BOOL getAllowGroupAVSounds() const { return mAllowGroupAVSounds; } BOOL getAllowAnyAVSounds() const { return mAllowAnyAVSounds; } @@ -576,6 +579,7 @@ class LLParcel void setRegionPushOverride(BOOL override) {mRegionPushOverride = override; } void setRegionDenyAnonymousOverride(BOOL override) { mRegionDenyAnonymousOverride = override; } void setRegionDenyAgeUnverifiedOverride(BOOL override) { mRegionDenyAgeUnverifiedOverride = override; } + void setRegionAllowAccessOverride(BOOL override) { mRegionAllowAccessoverride = override; } // Accessors for parcel sellWithObjects void setPreviousOwnerID(LLUUID prev_owner) { mPreviousOwnerID = prev_owner; } @@ -657,6 +661,7 @@ class LLParcel BOOL mRegionPushOverride; BOOL mRegionDenyAnonymousOverride; BOOL mRegionDenyAgeUnverifiedOverride; + BOOL mRegionAllowAccessoverride; BOOL mAllowGroupAVSounds; BOOL mAllowAnyAVSounds; diff --git a/indra/llmessage/llregionflags.h b/indra/llmessage/llregionflags.h index eb0c4e6d1e0f522ce90803eeac38fabacb9a8a55..d3791ef4d1ff6b47e64ee926b0c7322b9bf480e7 100644 --- a/indra/llmessage/llregionflags.h +++ b/indra/llmessage/llregionflags.h @@ -42,6 +42,9 @@ const U64 REGION_FLAGS_RESET_HOME_ON_TELEPORT = (1 << 3); // Does the sun move? const U64 REGION_FLAGS_SUN_FIXED = (1 << 4); +// Does the estate owner allow private parcels? +const U64 REGION_FLAGS_ALLOW_ACCESS_OVERRIDE = (1 << 5); + // Can't change the terrain heightfield, even on owned parcels, // but can plant trees and grass. const U64 REGION_FLAGS_BLOCK_TERRAFORM = (1 << 6); diff --git a/indra/llmessage/message_prehash.cpp b/indra/llmessage/message_prehash.cpp index 6675e12649bf3a66246f4391ae4548ec9b7e7dfd..1ae8a6ac1541c98f558fb8157e161a36ccb8160a 100644 --- a/indra/llmessage/message_prehash.cpp +++ b/indra/llmessage/message_prehash.cpp @@ -1373,6 +1373,9 @@ char const* const _PREHASH_OwnerMask = LLMessageStringTable::getInstance()->getS char const* const _PREHASH_TransferInventoryAck = LLMessageStringTable::getInstance()->getString("TransferInventoryAck"); char const* const _PREHASH_RegionDenyAgeUnverified = LLMessageStringTable::getInstance()->getString("RegionDenyAgeUnverified"); char const* const _PREHASH_AgeVerificationBlock = LLMessageStringTable::getInstance()->getString("AgeVerificationBlock"); +char const* const _PREHASH_RegionAllowAccessBlock = LLMessageStringTable::getInstance()->getString("RegionAllowAccessBlock"); +char const* const _PREHASH_RegionAllowAccessOverride = LLMessageStringTable::getInstance()->getString("RegionAllowAccessOverride"); + char const* const _PREHASH_UCoord = LLMessageStringTable::getInstance()->getString("UCoord"); char const* const _PREHASH_VCoord = LLMessageStringTable::getInstance()->getString("VCoord"); char const* const _PREHASH_FaceIndex = LLMessageStringTable::getInstance()->getString("FaceIndex"); diff --git a/indra/llmessage/message_prehash.h b/indra/llmessage/message_prehash.h index a510b4498f5482621a22330cde43d2bb8e76a1f3..7910fde305d8c29364a53ec9f6048228c58944a4 100644 --- a/indra/llmessage/message_prehash.h +++ b/indra/llmessage/message_prehash.h @@ -1373,6 +1373,8 @@ extern char const* const _PREHASH_OwnerMask; extern char const* const _PREHASH_TransferInventoryAck; extern char const* const _PREHASH_RegionDenyAgeUnverified; extern char const* const _PREHASH_AgeVerificationBlock; +extern char const* const _PREHASH_RegionAllowAccessBlock; +extern char const* const _PREHASH_RegionAllowAccessOverride; extern char const* const _PREHASH_UCoord; extern char const* const _PREHASH_VCoord; extern char const* const _PREHASH_FaceIndex; diff --git a/indra/newview/llestateinfomodel.cpp b/indra/newview/llestateinfomodel.cpp index 8f2eb4130739680e1bfb75f015e6916427bca79b..e422581129b6de84a5ef308000623bac1093e424 100644 --- a/indra/newview/llestateinfomodel.cpp +++ b/indra/newview/llestateinfomodel.cpp @@ -71,14 +71,16 @@ bool LLEstateInfoModel::getIsExternallyVisible() const { return getFlag(REGION_F bool LLEstateInfoModel::getAllowDirectTeleport() const { return getFlag(REGION_FLAGS_ALLOW_DIRECT_TELEPORT); } bool LLEstateInfoModel::getDenyAnonymous() const { return getFlag(REGION_FLAGS_DENY_ANONYMOUS); } bool LLEstateInfoModel::getDenyAgeUnverified() const { return getFlag(REGION_FLAGS_DENY_AGEUNVERIFIED); } -bool LLEstateInfoModel::getAllowVoiceChat() const { return getFlag(REGION_FLAGS_ALLOW_VOICE); } +bool LLEstateInfoModel::getAllowVoiceChat() const { return getFlag(REGION_FLAGS_ALLOW_VOICE); } +bool LLEstateInfoModel::getAllowAccessOverride() const { return getFlag(REGION_FLAGS_ALLOW_ACCESS_OVERRIDE); } void LLEstateInfoModel::setUseFixedSun(bool val) { setFlag(REGION_FLAGS_SUN_FIXED, val); } void LLEstateInfoModel::setIsExternallyVisible(bool val) { setFlag(REGION_FLAGS_EXTERNALLY_VISIBLE, val); } void LLEstateInfoModel::setAllowDirectTeleport(bool val) { setFlag(REGION_FLAGS_ALLOW_DIRECT_TELEPORT, val); } void LLEstateInfoModel::setDenyAnonymous(bool val) { setFlag(REGION_FLAGS_DENY_ANONYMOUS, val); } void LLEstateInfoModel::setDenyAgeUnverified(bool val) { setFlag(REGION_FLAGS_DENY_AGEUNVERIFIED, val); } -void LLEstateInfoModel::setAllowVoiceChat(bool val) { setFlag(REGION_FLAGS_ALLOW_VOICE, val); } +void LLEstateInfoModel::setAllowVoiceChat(bool val) { setFlag(REGION_FLAGS_ALLOW_VOICE, val); } +void LLEstateInfoModel::setAllowAccessOverride(bool val) { setFlag(REGION_FLAGS_ALLOW_ACCESS_OVERRIDE, val); } void LLEstateInfoModel::update(const strings_t& strings) { @@ -145,6 +147,7 @@ void LLEstateInfoModel::commitEstateInfoCapsCoro(std::string url) body["deny_anonymous"] = getDenyAnonymous(); body["deny_age_unverified"] = getDenyAgeUnverified(); body["allow_voice_chat"] = getAllowVoiceChat(); + body["override_public_access"] = getAllowAccessOverride(); body["invoice"] = LLFloaterRegionInfo::getLastInvoice(); @@ -218,6 +221,7 @@ std::string LLEstateInfoModel::getInfoDump() dump["deny_anonymous" ] = getDenyAnonymous(); dump["deny_age_unverified" ] = getDenyAgeUnverified(); dump["allow_voice_chat" ] = getAllowVoiceChat(); + dump["override_public_access"] = getAllowAccessOverride(); std::stringstream dump_str; dump_str << dump; diff --git a/indra/newview/llestateinfomodel.h b/indra/newview/llestateinfomodel.h index e7a6a2a725c9f1d04407e4aaf52a3ef914132d30..0082b5b1f4682c83401c7857f7c7def8b92e532f 100644 --- a/indra/newview/llestateinfomodel.h +++ b/indra/newview/llestateinfomodel.h @@ -55,6 +55,7 @@ class LLEstateInfoModel : public LLSingleton<LLEstateInfoModel> bool getDenyAnonymous() const; bool getDenyAgeUnverified() const; bool getAllowVoiceChat() const; + bool getAllowAccessOverride() const; const std::string& getName() const { return mName; } const LLUUID& getOwnerID() const { return mOwnerID; } @@ -68,6 +69,7 @@ class LLEstateInfoModel : public LLSingleton<LLEstateInfoModel> void setDenyAnonymous(bool val); void setDenyAgeUnverified(bool val); void setAllowVoiceChat(bool val); + void setAllowAccessOverride(bool val); void setSunHour(F32 sun_hour) { mSunHour = sun_hour; } diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index a340cd1143ebf129ebf77bd282f345e109084d06..43529097064f83d054096a95b5a4ce8d98d7a9a6 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2432,9 +2432,16 @@ void LLPanelLandAccess::refresh() BOOL use_group = parcel->getParcelFlag(PF_USE_ACCESS_GROUP); BOOL public_access = !use_access_list; - getChild<LLUICtrl>("public_access")->setValue(public_access ); - getChild<LLUICtrl>("GroupCheck")->setValue(use_group ); - + if (parcel->getRegionAllowAccessOverride()) + { + getChild<LLUICtrl>("public_access")->setValue(public_access); + getChild<LLUICtrl>("GroupCheck")->setValue(use_group); + } + else + { + getChild<LLUICtrl>("public_access")->setValue(TRUE); + getChild<LLUICtrl>("GroupCheck")->setValue(FALSE); + } std::string group_name; gCacheName->getGroupName(parcel->getGroupID(), group_name); getChild<LLUICtrl>("GroupCheck")->setLabelArg("[GROUP]", group_name ); @@ -2610,9 +2617,14 @@ void LLPanelLandAccess::refresh_ui() LLParcel *parcel = mParcel->getParcel(); if (parcel && !gDisconnected) { - BOOL can_manage_allowed = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_ALLOWED); + BOOL can_manage_allowed = false; BOOL can_manage_banned = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_BANNED); + if (parcel->getRegionAllowAccessOverride()) + { // Estate owner may have disabled allowing the parcel owner from managing access. + can_manage_allowed = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_MANAGE_ALLOWED); + } + getChildView("public_access")->setEnabled(can_manage_allowed); BOOL public_access = getChild<LLUICtrl>("public_access")->getValue().asBoolean(); if (public_access) @@ -2666,7 +2678,8 @@ void LLPanelLandAccess::refresh_ui() std::string group_name; if (gCacheName->getGroupName(parcel->getGroupID(), group_name)) { - getChildView("GroupCheck")->setEnabled(can_manage_allowed); + bool can_allow_groups = !public_access || (public_access && (getChild<LLUICtrl>("limit_payment")->getValue().asBoolean() ^ getChild<LLUICtrl>("limit_age_verified")->getValue().asBoolean())); + getChildView("GroupCheck")->setEnabled(can_manage_allowed && can_allow_groups); } getChildView("AccessList")->setEnabled(can_manage_allowed); S32 allowed_list_count = parcel->mAccessList.size(); diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 75d7d787b1f28d8a1bfa86b5a90fe0c82547dea0..c33dee5fb4cf84e1427c159c5bf538cf15fd0946 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -2235,11 +2235,12 @@ bool LLPanelEstateInfo::estateUpdate(LLMessageSystem* msg) BOOL LLPanelEstateInfo::postBuild() { // set up the callbacks for the generic controls - initCtrl("externally_visible_check"); + initCtrl("externally_visible_radio"); initCtrl("allow_direct_teleport"); initCtrl("limit_payment"); initCtrl("limit_age_verified"); initCtrl("voice_chat_check"); + initCtrl("parcel_access_override"); getChild<LLUICtrl>("allowed_avatar_name_list")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeChildCtrl, this, _1)); LLNameListCtrl *avatar_name_list = getChild<LLNameListCtrl>("allowed_avatar_name_list"); @@ -2287,13 +2288,15 @@ BOOL LLPanelEstateInfo::postBuild() childSetAction("message_estate_btn", boost::bind(&LLPanelEstateInfo::onClickMessageEstate, this)); childSetAction("kick_user_from_estate_btn", boost::bind(&LLPanelEstateInfo::onClickKickUser, this)); + getChild<LLUICtrl>("parcel_access_override")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeAccessOverride, this)); + return LLPanelRegionInfo::postBuild(); } void LLPanelEstateInfo::refresh() { // Disable access restriction controls if they make no sense. - bool public_access = getChild<LLUICtrl>("externally_visible_check")->getValue().asBoolean(); + bool public_access = getChild<LLRadioGroup>("externally_visible_radio")->getSelectedIndex(); getChildView("Only Allow")->setEnabled(public_access); getChildView("limit_payment")->setEnabled(public_access); @@ -2314,11 +2317,12 @@ void LLPanelEstateInfo::refreshFromEstate() getChild<LLUICtrl>("estate_name")->setValue(estate_info.getName()); setOwnerName(LLSLURL("agent", estate_info.getOwnerID(), "inspect").getSLURLString()); - getChild<LLUICtrl>("externally_visible_check")->setValue(estate_info.getIsExternallyVisible()); + getChild<LLRadioGroup>("externally_visible_radio")->setSelectedIndex(estate_info.getIsExternallyVisible() ? 1 : 0); getChild<LLUICtrl>("voice_chat_check")->setValue(estate_info.getAllowVoiceChat()); getChild<LLUICtrl>("allow_direct_teleport")->setValue(estate_info.getAllowDirectTeleport()); getChild<LLUICtrl>("limit_payment")->setValue(estate_info.getDenyAnonymous()); getChild<LLUICtrl>("limit_age_verified")->setValue(estate_info.getDenyAgeUnverified()); + getChild<LLUICtrl>("parcel_access_override")->setValue(estate_info.getAllowAccessOverride()); // Ensure appriopriate state of the management UI updateControls(gAgent.getRegion()); @@ -2356,12 +2360,14 @@ bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, con // update model estate_info.setUseFixedSun(false); // we don't support fixed sun estates anymore - estate_info.setIsExternallyVisible(getChild<LLUICtrl>("externally_visible_check")->getValue().asBoolean()); + estate_info.setIsExternallyVisible(getChild<LLRadioGroup>("externally_visible_radio")->getSelectedIndex()); estate_info.setAllowDirectTeleport(getChild<LLUICtrl>("allow_direct_teleport")->getValue().asBoolean()); estate_info.setDenyAnonymous(getChild<LLUICtrl>("limit_payment")->getValue().asBoolean()); estate_info.setDenyAgeUnverified(getChild<LLUICtrl>("limit_age_verified")->getValue().asBoolean()); estate_info.setAllowVoiceChat(getChild<LLUICtrl>("voice_chat_check")->getValue().asBoolean()); - + estate_info.setAllowAccessOverride(getChild<LLUICtrl>("parcel_access_override")->getValue().asBoolean()); + // JIGGLYPUFF + //estate_info.setAllowAccessOverride(getChild<LLUICtrl>("")->getValue().asBoolean()); // send the update to sim estate_info.sendEstateInfo(); } @@ -2462,6 +2468,14 @@ bool LLPanelEstateInfo::onMessageCommit(const LLSD& notification, const LLSD& re return false; } +void LLPanelEstateInfo::onChangeAccessOverride() +{ + if (!getChild<LLUICtrl>("parcel_access_override")->getValue().asBoolean()) + { + LLNotificationsUtil::add("EstateParcelAccessOverride"); + } +} + LLPanelEstateCovenant::LLPanelEstateCovenant() : mCovenantID(LLUUID::null), diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index dbb0ad05e92323d2809bfffa9eb0c51036c99638..c9d0e516409c517d47fb901feb2289ff1d549cac 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -274,6 +274,7 @@ class LLPanelEstateInfo : public LLPanelRegionInfo void onChangeFixedSun(); void onChangeUseGlobalTime(); + void onChangeAccessOverride(); void onClickEditSky(); void onClickEditSkyHelp(); diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 2a126c9f01adfc50f83d122d430961214bb5e04f..a61181badacf39613fa81fe765b3d496ef461d84 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -1427,122 +1427,128 @@ void LLViewerParcelMgr::processParcelOverlay(LLMessageSystem *msg, void **user) // static void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **user) { - S32 request_result; - S32 sequence_id; - BOOL snap_selection = FALSE; - S32 self_count = 0; - S32 other_count = 0; - S32 public_count = 0; - S32 local_id; - LLUUID owner_id; - BOOL is_group_owned; - U32 auction_id = 0; - S32 claim_price_per_meter = 0; - S32 rent_price_per_meter = 0; - S32 claim_date = 0; - LLVector3 aabb_min; - LLVector3 aabb_max; - S32 area = 0; - S32 sw_max_prims = 0; - S32 sw_total_prims = 0; - //LLUUID buyer_id; - U8 status = 0; - S32 max_prims = 0; - S32 total_prims = 0; - S32 owner_prims = 0; - S32 group_prims = 0; - S32 other_prims = 0; - S32 selected_prims = 0; - F32 parcel_prim_bonus = 1.f; - BOOL region_push_override = false; - BOOL region_deny_anonymous_override = false; - BOOL region_deny_identified_override = false; // Deprecated - BOOL region_deny_transacted_override = false; // Deprecated - BOOL region_deny_age_unverified_override = false; + S32 request_result; + S32 sequence_id; + BOOL snap_selection = FALSE; + S32 self_count = 0; + S32 other_count = 0; + S32 public_count = 0; + S32 local_id; + LLUUID owner_id; + BOOL is_group_owned; + U32 auction_id = 0; + S32 claim_price_per_meter = 0; + S32 rent_price_per_meter = 0; + S32 claim_date = 0; + LLVector3 aabb_min; + LLVector3 aabb_max; + S32 area = 0; + S32 sw_max_prims = 0; + S32 sw_total_prims = 0; + //LLUUID buyer_id; + U8 status = 0; + S32 max_prims = 0; + S32 total_prims = 0; + S32 owner_prims = 0; + S32 group_prims = 0; + S32 other_prims = 0; + S32 selected_prims = 0; + F32 parcel_prim_bonus = 1.f; + BOOL region_push_override = false; + BOOL region_deny_anonymous_override = false; + BOOL region_deny_identified_override = false; // Deprecated + BOOL region_deny_transacted_override = false; // Deprecated + BOOL region_deny_age_unverified_override = false; + BOOL region_allow_access_override = true; BOOL agent_parcel_update = false; // updating previous(existing) agent parcel - S32 other_clean_time = 0; + S32 other_clean_time = 0; - LLViewerParcelMgr& parcel_mgr = LLViewerParcelMgr::instance(); + LLViewerParcelMgr& parcel_mgr = LLViewerParcelMgr::instance(); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_RequestResult, request_result ); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_SequenceID, sequence_id ); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_RequestResult, request_result); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_SequenceID, sequence_id); - if (request_result == PARCEL_RESULT_NO_DATA) - { - // no valid parcel data - LL_INFOS() << "no valid parcel data" << LL_ENDL; - return; - } - - // Decide where the data will go. - LLParcel* parcel = NULL; - if (sequence_id == SELECTED_PARCEL_SEQ_ID) - { - // ...selected parcels report this sequence id - parcel_mgr.mRequestResult = PARCEL_RESULT_SUCCESS; - parcel = parcel_mgr.mCurrentParcel; - } - else if (sequence_id == HOVERED_PARCEL_SEQ_ID) - { - parcel_mgr.mHoverRequestResult = PARCEL_RESULT_SUCCESS; - parcel = parcel_mgr.mHoverParcel; - } - else if (sequence_id == COLLISION_NOT_IN_GROUP_PARCEL_SEQ_ID || - sequence_id == COLLISION_NOT_ON_LIST_PARCEL_SEQ_ID || - sequence_id == COLLISION_BANNED_PARCEL_SEQ_ID) - { - parcel_mgr.mHoverRequestResult = PARCEL_RESULT_SUCCESS; - parcel = parcel_mgr.mCollisionParcel; - } - else if (sequence_id == 0 || sequence_id > parcel_mgr.mAgentParcelSequenceID) - { - // new agent parcel - parcel_mgr.mAgentParcelSequenceID = sequence_id; - parcel = parcel_mgr.mAgentParcel; - } - else - { - LL_INFOS() << "out of order agent parcel sequence id " << sequence_id - << " last good " << parcel_mgr.mAgentParcelSequenceID - << LL_ENDL; - return; - } - - msg->getBOOL("ParcelData", "SnapSelection", snap_selection); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_SelfCount, self_count); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_OtherCount, other_count); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_PublicCount, public_count); - msg->getS32Fast( _PREHASH_ParcelData, _PREHASH_LocalID, local_id ); - msg->getUUIDFast(_PREHASH_ParcelData, _PREHASH_OwnerID, owner_id); - msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_IsGroupOwned, is_group_owned); - msg->getU32Fast(_PREHASH_ParcelData, _PREHASH_AuctionID, auction_id); - msg->getS32Fast( _PREHASH_ParcelData, _PREHASH_ClaimDate, claim_date); - msg->getS32Fast( _PREHASH_ParcelData, _PREHASH_ClaimPrice, claim_price_per_meter); - msg->getS32Fast( _PREHASH_ParcelData, _PREHASH_RentPrice, rent_price_per_meter); - msg->getVector3Fast(_PREHASH_ParcelData, _PREHASH_AABBMin, aabb_min); - msg->getVector3Fast(_PREHASH_ParcelData, _PREHASH_AABBMax, aabb_max); - msg->getS32Fast( _PREHASH_ParcelData, _PREHASH_Area, area ); - //msg->getUUIDFast( _PREHASH_ParcelData, _PREHASH_BuyerID, buyer_id); - msg->getU8("ParcelData", "Status", status); - msg->getS32("ParcelData", "SimWideMaxPrims", sw_max_prims ); - msg->getS32("ParcelData", "SimWideTotalPrims", sw_total_prims ); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_MaxPrims, max_prims ); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_TotalPrims, total_prims ); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_OwnerPrims, owner_prims ); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_GroupPrims, group_prims ); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_OtherPrims, other_prims ); - msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_SelectedPrims, selected_prims ); - msg->getF32Fast(_PREHASH_ParcelData, _PREHASH_ParcelPrimBonus, parcel_prim_bonus ); - msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_RegionPushOverride, region_push_override ); - msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_RegionDenyAnonymous, region_deny_anonymous_override ); - msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_RegionDenyIdentified, region_deny_identified_override ); // Deprecated - msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_RegionDenyTransacted, region_deny_transacted_override ); // Deprecated - if (msg->getNumberOfBlocksFast(_PREHASH_AgeVerificationBlock)) - { - // this block was added later and may not be on older sims, so we have to test its existence first - msg->getBOOLFast(_PREHASH_AgeVerificationBlock, _PREHASH_RegionDenyAgeUnverified, region_deny_age_unverified_override ); - } + if (request_result == PARCEL_RESULT_NO_DATA) + { + // no valid parcel data + LL_INFOS() << "no valid parcel data" << LL_ENDL; + return; + } + + // Decide where the data will go. + LLParcel* parcel = NULL; + if (sequence_id == SELECTED_PARCEL_SEQ_ID) + { + // ...selected parcels report this sequence id + parcel_mgr.mRequestResult = PARCEL_RESULT_SUCCESS; + parcel = parcel_mgr.mCurrentParcel; + } + else if (sequence_id == HOVERED_PARCEL_SEQ_ID) + { + parcel_mgr.mHoverRequestResult = PARCEL_RESULT_SUCCESS; + parcel = parcel_mgr.mHoverParcel; + } + else if (sequence_id == COLLISION_NOT_IN_GROUP_PARCEL_SEQ_ID || + sequence_id == COLLISION_NOT_ON_LIST_PARCEL_SEQ_ID || + sequence_id == COLLISION_BANNED_PARCEL_SEQ_ID) + { + parcel_mgr.mHoverRequestResult = PARCEL_RESULT_SUCCESS; + parcel = parcel_mgr.mCollisionParcel; + } + else if (sequence_id == 0 || sequence_id > parcel_mgr.mAgentParcelSequenceID) + { + // new agent parcel + parcel_mgr.mAgentParcelSequenceID = sequence_id; + parcel = parcel_mgr.mAgentParcel; + } + else + { + LL_INFOS() << "out of order agent parcel sequence id " << sequence_id + << " last good " << parcel_mgr.mAgentParcelSequenceID + << LL_ENDL; + return; + } + + msg->getBOOL("ParcelData", "SnapSelection", snap_selection); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_SelfCount, self_count); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_OtherCount, other_count); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_PublicCount, public_count); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_LocalID, local_id); + msg->getUUIDFast(_PREHASH_ParcelData, _PREHASH_OwnerID, owner_id); + msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_IsGroupOwned, is_group_owned); + msg->getU32Fast(_PREHASH_ParcelData, _PREHASH_AuctionID, auction_id); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_ClaimDate, claim_date); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_ClaimPrice, claim_price_per_meter); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_RentPrice, rent_price_per_meter); + msg->getVector3Fast(_PREHASH_ParcelData, _PREHASH_AABBMin, aabb_min); + msg->getVector3Fast(_PREHASH_ParcelData, _PREHASH_AABBMax, aabb_max); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_Area, area); + //msg->getUUIDFast( _PREHASH_ParcelData, _PREHASH_BuyerID, buyer_id); + msg->getU8("ParcelData", "Status", status); + msg->getS32("ParcelData", "SimWideMaxPrims", sw_max_prims); + msg->getS32("ParcelData", "SimWideTotalPrims", sw_total_prims); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_MaxPrims, max_prims); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_TotalPrims, total_prims); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_OwnerPrims, owner_prims); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_GroupPrims, group_prims); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_OtherPrims, other_prims); + msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_SelectedPrims, selected_prims); + msg->getF32Fast(_PREHASH_ParcelData, _PREHASH_ParcelPrimBonus, parcel_prim_bonus); + msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_RegionPushOverride, region_push_override); + msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_RegionDenyAnonymous, region_deny_anonymous_override); + msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_RegionDenyIdentified, region_deny_identified_override); // Deprecated + msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_RegionDenyTransacted, region_deny_transacted_override); // Deprecated + if (msg->getNumberOfBlocksFast(_PREHASH_AgeVerificationBlock)) + { + // this block was added later and may not be on older sims, so we have to test its existence first + msg->getBOOLFast(_PREHASH_AgeVerificationBlock, _PREHASH_RegionDenyAgeUnverified, region_deny_age_unverified_override); + } + + if (msg->getNumberOfBlocks(_PREHASH_RegionAllowAccessBlock)) + { + msg->getBOOLFast(_PREHASH_RegionAllowAccessBlock, _PREHASH_RegionAllowAccessOverride, region_allow_access_override); + } msg->getS32("ParcelData", "OtherCleanTime", other_clean_time ); @@ -1585,6 +1591,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use parcel->setRegionPushOverride(region_push_override); parcel->setRegionDenyAnonymousOverride(region_deny_anonymous_override); parcel->setRegionDenyAgeUnverifiedOverride(region_deny_age_unverified_override); + parcel->setRegionAllowAccessOverride(region_allow_access_override); parcel->unpackMessage(msg); if (parcel == parcel_mgr.mAgentParcel) diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index a137770e2668a03c2ed8481ed7521605add094ce..535af317d991f072f4f72567655aa0fa09c2fd54 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1896,49 +1896,37 @@ Only large parcels can be listed in search. layout="topleft" left="8" name="public_access" - label="Allow Public Access (Unchecking this will create ban lines)" + label="Anyone can visit (Unchecking this will create ban lines)" top_pad="10" width="278" /> - <text - type="string" - length="1" - follows="top|left" - height="16" - layout="topleft" - left_delta="20" - name="Only Allow" - top="30" - width="325"> - Allow access only to Residents who: - </text> <check_box follows="top|left" height="16" - label="Have payment Information on File [ESTATE_PAYMENT_LIMIT]" + label="Must be 18+ [ESTATE_AGE_LIMIT]" layout="topleft" - left_delta="0" - name="limit_payment" - tool_tip="Residents must have payment information on file to access this parcel. See the [SUPPORT_SITE] for more information." + left_delta="20" + name="limit_age_verified" + tool_tip="Residents must be age 18 or older to access this parcel. See the [SUPPORT_SITE] for more information." top_pad="4" width="278" /> <check_box follows="top|left" height="16" - label="Are age 18 or older [ESTATE_AGE_LIMIT]" + label="Must have payment info on file [ESTATE_PAYMENT_LIMIT]" layout="topleft" left_delta="0" - name="limit_age_verified" - tool_tip="Residents must be age 18 or older to access this parcel. See the [SUPPORT_SITE] for more information." + name="limit_payment" + tool_tip="Residents must have payment information on file to access this parcel. See the [SUPPORT_SITE] for more information." top_pad="4" width="278" /> <check_box height="16" - label="Allow Group Access: [GROUP]" + label="Allow group [GROUP] with no restrictions" layout="topleft" left="8" name="GroupCheck" tool_tip="Set group in the General tab." - top="89" + top="73" width="278" /> <check_box enabled="false" @@ -1996,6 +1984,18 @@ Only large parcels can be listed in search. name="HoursSpin" top_pad="5" width="200" /> + <text + type="string" + length="1" + follows="top|left" + height="16" + layout="topleft" + left="8" + name="OwnerLimited" + top_pad="5" + width="400"> + (The estate owner may have limited these choices) + </text> <panel name="Allowed_layout_panel" follows="top|left" @@ -2014,7 +2014,7 @@ Only large parcels can be listed in search. name="AllowedText" top="0" width="230"> - Allowed Residents ([COUNT], max [MAX]) + Always allowed ([COUNT], max [MAX]) </text> <name_list column_padding="0" @@ -2063,7 +2063,7 @@ Only large parcels can be listed in search. name="BanCheck" top="0" width="200"> - Banned Residents ([COUNT], max [MAX]) + Always banned ([COUNT], max [MAX]) </text> <name_list column_padding="0" diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 50fb8722de010d8c06420332e2cb66203dd37795..60162bee234ef9dfcae6ebd0a5c5de9e44732962 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5085,6 +5085,17 @@ Are you sure you want to change the Estate Covenant? yestext="OK"/> </notification> + <notification + icon="alertmodal.tga" + name="EstateParcelAccessOverride" + type="alertmodal"> +Unchecking this option may remove restrictions that parcel owners have added to prevent griefing, maintain privacy, or protect underage residents from adult material. Please discuss with your parcel owners as needed. + <tag>confirm</tag> + <usetemplate + name="okbutton" + yestext="OK"/> + </notification> + <notification icon="alertmodal.tga" name="RegionEntryAccessBlocked" diff --git a/indra/newview/skins/default/xui/en/panel_region_estate.xml b/indra/newview/skins/default/xui/en/panel_region_estate.xml index 76a82212ae95e1c5fd131a1ba5979f93f4aa1ec0..a0c1dd0be6872f1d82c41ef68324727e08500cad 100644 --- a/indra/newview/skins/default/xui/en/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/en/panel_region_estate.xml @@ -82,36 +82,72 @@ <view_border bevel_style="none" follows="top|left" - height="95" + height="105" layout="topleft" left="10" top_pad="5" - width="470" /> - + width="505" /> + <radio_group + height="32" + layout="topleft" + name="externally_visible_radio" + top_delta="5" + left="20" + width="200"> + <radio_item + height="16" + label="Allow only residents and groups listed below" + layout="topleft" + name="estate_restricted_access" /> + <radio_item + height="16" + label="Anyone can visit" + layout="topleft" + name="estate_public_access" /> + </radio_group> <check_box - height="20" - label="Allow Public Access" + follows="top|left" + height="18" + label="Must be 18+" + layout="topleft" + left_delta="20" + name="limit_age_verified" + tool_tip="Residents must be age 18 or older to access this estate. See the [SUPPORT_SITE] for more information." + top_delta="40" + width="278" /> + <check_box + follows="top|left" + height="18" + label="Must have payment info on file" + layout="topleft" + left_delta="0" + name="limit_payment" + tool_tip="Residents must have payment information on file to access this estate. See the [SUPPORT_SITE] for more information." + top_pad="2" + width="278" /> + <check_box + height="18" + label="Parcel owners can be more restrictive" layout="topleft" left="20" - name="externally_visible_check" - top_delta="5" - width="200" /> - + name="parcel_access_override" + top_pad="2" + width="240" /> <check_box - height="20" + height="18" label="Allow Voice Chat" layout="topleft" - left="280" + left="290" name="voice_chat_check" - top_delta="0" + top_delta="-78" width="200" /> <check_box - height="20" + height="18" label="Allow Direct Teleport" layout="topleft" left_delta="0" name="allow_direct_teleport" - top_pad="4" + top_pad="2" width="80" /> <button enabled="false" @@ -120,43 +156,10 @@ label="Apply" layout="topleft" name="apply_btn" - top_pad="15" + top_pad="30" left_delta="0" width="97" /> - - <text - type="string" - length="1" - follows="top|left" - height="16" - layout="topleft" - left="20" - name="Only Allow" - top_delta="-30" - width="278"> - Allow access only to Residents who: - </text> - <check_box - follows="top|left" - height="16" - label="Have payment information on file" - layout="topleft" - left_delta="0" - name="limit_payment" - tool_tip="Residents must have payment information on file to access this estate. See the [SUPPORT_SITE] for more information." - top_pad="2" - width="278" /> - <check_box - follows="top|left" - height="16" - label="Are age 18 or older" - layout="topleft" - left_delta="0" - name="limit_age_verified" - tool_tip="Residents must be age 18 or older to access this estate. See the [SUPPORT_SITE] for more information." - top_pad="2" - width="278" /> - + <text type="string" length="1" @@ -165,7 +168,7 @@ height="20" layout="topleft" name="estate_manager_label" - top_pad="30" + top_pad="25" left="10" width="200"> Estate Managers: @@ -180,7 +183,7 @@ name="allow_resident_label" top_delta="0" width="200"> - Allowed Residents: + Always allowed: </text> <!-- Estate Managers box --> @@ -191,7 +194,7 @@ layout="topleft" left="10" top_pad="-5" - width="200" /> + width="235" /> <name_list follows="left|top" height="71" @@ -200,9 +203,9 @@ multi_select="true" name="estate_manager_name_list" top_delta="0" - width="200" /> + width="235" /> - <!-- Allowed Residents box --> + <!-- Always allowed box --> <view_border bevel_style="none" follows="top|left" @@ -210,7 +213,7 @@ layout="topleft" left="280" top_delta="0" - width="200" /> + width="235" /> <name_list follows="left|top" height="71" @@ -219,7 +222,7 @@ multi_select="true" name="allowed_avatar_name_list" top_delta="0" - width="200" /> + width="235" /> <!-- Estate Managers buttons --> <button @@ -230,7 +233,7 @@ left="10" name="add_estate_manager_btn" top_pad="6" - width="97" /> + width="114" /> <button follows="left|top" height="23" @@ -238,9 +241,9 @@ layout="topleft" name="remove_estate_manager_btn" left_pad="6" - width="97" /> + width="114" /> - <!-- Allowed Residents buttons --> + <!-- Always allowed buttons --> <button follows="left|top" height="23" @@ -249,7 +252,7 @@ layout="topleft" name="add_allowed_avatar_btn" top_delta="0" - width="97" /> + width="114" /> <button follows="left|top" height="23" @@ -258,7 +261,7 @@ name="remove_allowed_avatar_btn" left_pad="6" top_delta="0" - width="97" /> + width="114" /> <text type="string" @@ -270,7 +273,7 @@ name="allow_group_label" top_pad="10" width="200"> - Allowed Groups: + Groups always allowed: </text> <text type="string" @@ -282,10 +285,10 @@ name="ban_resident_label" top_delta="0" width="200"> - Banned Residents: + Always banned: </text> - <!-- Allowed Groups box --> + <!-- Groups always allowed box --> <view_border bevel_style="none" follows="top|left" @@ -293,7 +296,7 @@ layout="topleft" left="10" top_pad="-5" - width="200" /> + width="235" /> <name_list follows="left|top" height="71" @@ -302,9 +305,9 @@ multi_select="true" name="allowed_group_name_list" top_delta="0" - width="200" /> + width="235" /> - <!-- Banned Residents box --> + <!-- Always banned box --> <view_border bevel_style="none" follows="top|left" @@ -312,7 +315,7 @@ layout="topleft" left="280" top_delta="0" - width="200" /> + width="235" /> <name_list follows="left|top" height="71" @@ -321,9 +324,9 @@ multi_select="true" name="banned_avatar_name_list" top_delta="0" - width="200" /> + width="235" /> - <!-- Allowed Groups buttons --> + <!-- Groups always allowed buttons --> <button follows="left|top" height="23" @@ -332,7 +335,7 @@ left="10" name="add_allowed_group_btn" top_pad="6" - width="97" /> + width="114" /> <button follows="left|top" height="23" @@ -341,9 +344,9 @@ name="remove_allowed_group_btn" left_pad="6" top_delta="0" - width="97" /> + width="114" /> - <!-- Banned Residents buttons --> + <!-- Always banned buttons --> <button follows="left|top" height="23" @@ -352,7 +355,7 @@ left="280" name="add_banned_avatar_btn" top_delta="0" - width="97" /> + width="114" /> <button follows="left|top" height="23" @@ -361,7 +364,7 @@ name="remove_banned_avatar_btn" top_delta="0" left_pad="6" - width="97" /> + width="114" /> <button follows="left|top" @@ -371,7 +374,7 @@ left="10" name="message_estate_btn" top_pad="20" - width="220" /> + width="235" /> <button follows="left|top" height="23" @@ -380,6 +383,6 @@ left="280" name="kick_user_from_estate_btn" top_delta="0" - width="220" /> + width="235" /> </panel> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index d6c06b0ecc3b9bd40b936d8b21fe428861f52fae..3dc41f65baa35dc1883a1de46f1feb3b95523dd8 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2644,12 +2644,12 @@ If you continue to receive this message, please contact Second Life support for <string name="RegionInfoAllEstatesYouManage"> all estates that you manage for [OWNER] </string> - <string name="RegionInfoAllowedResidents">Allowed Residents: ([ALLOWEDAGENTS], max [MAXACCESS])</string> - <string name="RegionInfoAllowedGroups">Allowed Groups: ([ALLOWEDGROUPS], max [MAXACCESS])</string> + <string name="RegionInfoAllowedResidents">Always allowed: ([ALLOWEDAGENTS], max [MAXACCESS])</string> + <string name="RegionInfoAllowedGroups">Groups always allowed: ([ALLOWEDGROUPS], max [MAXACCESS])</string> <string name="RegionInfoEstateManagers">Estate Managers: ([ESTATEMANAGERS], max [MAXMANAGERS])</string> - <string name="RegionInfoBannedResidents">Banned Residents: ([BANNEDAGENTS], max [MAXBANNED])</string> - <string name="RegionInfoListTypeAllowedAgents">Allowed Residents</string> - <string name="RegionInfoListTypeBannedAgents">Banned Residents</string> + <string name="RegionInfoBannedResidents">Always banned: ([BANNEDAGENTS], max [MAXBANNED])</string> + <string name="RegionInfoListTypeAllowedAgents">Always allowed</string> + <string name="RegionInfoListTypeBannedAgents">Always banned</string> <!-- script limits floater --> <string name="ScriptLimitsParcelScriptMemory">Parcel Script Memory</string> diff --git a/scripts/messages/message_template.msg b/scripts/messages/message_template.msg index fbbc385e5baf99f3769466e3d3b225866d46b990..c56eaae6fe97cfdf2a949ed7e188f375b4b38224 100755 --- a/scripts/messages/message_template.msg +++ b/scripts/messages/message_template.msg @@ -4499,6 +4499,10 @@ version 2.0 AgeVerificationBlock Single { RegionDenyAgeUnverified BOOL } } + { + RegionAllowAccessBlock Single + { RegionAllowAccessOverride BOOL } + } } // ParcelPropertiesUpdate diff --git a/scripts/messages/message_template.msg.sha1 b/scripts/messages/message_template.msg.sha1 index 2c6489906c6db692017be9c5aa9bcde99ad9770c..5bc06ec0427d7d60a485189f8404a7d154fb0bae 100755 --- a/scripts/messages/message_template.msg.sha1 +++ b/scripts/messages/message_template.msg.sha1 @@ -1 +1 @@ -845459c1bb7fe8174fb493528fe2a214015f996d \ No newline at end of file +337f351910b0c8821cb3d447bc6578516a043c80 \ No newline at end of file