summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-03-23 14:22:35 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-03-23 14:22:35 -0700
commitb76f036bf6af7ae3e1b8ffb2edeee21911256820 (patch)
treece66c7dcfd39ae3f40c8ef97b011ca4c49125c99 /indra
parent8208e4708f91a0bb661a8a420bee48957ea17c6e (diff)
PATH-199: Alert the user if he/she attempts to terraform while in Frozen mode.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lltoolbrush.cpp19
-rw-r--r--indra/newview/lltoolbrush.h3
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml8
3 files changed, 30 insertions, 0 deletions
diff --git a/indra/newview/lltoolbrush.cpp b/indra/newview/lltoolbrush.cpp
index aba43a9715..51cc697d7a 100644
--- a/indra/newview/lltoolbrush.cpp
+++ b/indra/newview/lltoolbrush.cpp
@@ -52,6 +52,7 @@
#include "llworld.h"
#include "llappviewer.h"
#include "llparcel.h"
+#include "llpathfindingmanager.h"
#include "llglheaders.h"
@@ -244,6 +245,12 @@ void LLToolBrushLand::modifyLandInSelectionGlobal()
alertNoTerraform(regionp);
return;
}
+
+ if (!LLPathfindingManager::getInstance()->isAllowAlterPermanent())
+ {
+ alertNoTerraformWhileFrozen();
+ return;
+ }
}
for(region_list_t::iterator iter = mLastAffectedRegions.begin();
@@ -382,6 +389,12 @@ BOOL LLToolBrushLand::handleMouseDown(S32 x, S32 y, MASK mask)
return TRUE;
}
+ if (!LLPathfindingManager::getInstance()->isAllowAlterPermanent())
+ {
+ alertNoTerraformWhileFrozen();
+ return TRUE;
+ }
+
LLVector3 pos_region = region_position.getPositionRegion();
U32 grids = regionp->getLand().mGridsPerEdge;
S32 i = llclamp( (S32)pos_region.mV[VX], 0, (S32)grids );
@@ -671,6 +684,12 @@ void LLToolBrushLand::alertNoTerraform(LLViewerRegion* regionp)
}
+// static
+void LLToolBrushLand::alertNoTerraformWhileFrozen()
+{
+ LLNotificationsUtil::add("RegionNoTerraformingWhileFrozen");
+}
+
///============================================================================
/// Local function definitions
///============================================================================
diff --git a/indra/newview/lltoolbrush.h b/indra/newview/lltoolbrush.h
index 1c7f198900..416cdf429c 100644
--- a/indra/newview/lltoolbrush.h
+++ b/indra/newview/lltoolbrush.h
@@ -86,6 +86,9 @@ protected:
// Modal dialog that you can't terraform the region
void alertNoTerraform(LLViewerRegion* regionp);
+ // Modal dialog that you can't terraform in frozen mode
+ void alertNoTerraformWhileFrozen();
+
protected:
F32 mStartingZ;
S32 mMouseX;
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 5d6cefbcfb..f6c29cc191 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -1278,6 +1278,14 @@ The region [REGION] does not allow terraforming.
<notification
icon="alertmodal.tga"
+ name="RegionNoTerraformingWhileFrozen"
+ type="alertmodal">
+ You cannot terraform land while in Frozen mode. Please switch to Unfrozen mode from the menu option Build->Pathfinding->Basic Setup.
+ <tag>fail</tag>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
name="CannotCopyWarning"
type="alertmodal">
You do not have permission to copy the following items: