Added Build preferences, like Emerald's. Exposed UI for giving an item with autoresponse

Pulled LLDropTarget into its own files and brought in the callback version so we can use either, whereever we need them, without rewriting them.
This makes code for drag and drop items into boxes easier.

--------Auto-Response--------
Added item box to Adv. Chat, finally you can send autoresponse with item!
Taught to LLViewerMessage to understand this.

------------Build------------
Added in comment labels for more sections of system preferences.
Everything new in the System->Build tab will reset on cancel, except the item, I see no reason to reset an item.
Added in BuildPrefs, and settings like them.
Taught LLToolPlacer how to give creations material type, and size, and ask importtracker to do the rest.
LLViewerObjectList now pings importtracker whenever it notices newly created objects that are ours entirely, so we can exact our will upon them.
Cleaned up most of importtracker code so we can use only the parts we need, and do it well.
Added ObjectPhysicsProperties to message.xml
This commit is contained in:
Lirusaito
2012-07-08 11:20:56 -04:00
parent 6b11776fcf
commit 8ec8acf610
19 changed files with 648 additions and 169 deletions

View File

@@ -72,6 +72,7 @@
#include "llparcel.h" // always rez
#include "llviewerparcelmgr.h" // always rez
// </edit>
#include "importtracker.h"
// [RLVa:KB]
#include "rlvhandler.h"
@@ -222,8 +223,19 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
// Set params for new object based on its PCode.
LLQuaternion rotation;
LLVector3 scale = DEFAULT_OBJECT_SCALE;
LLVector3 scale = LLVector3(
gSavedSettings.getF32("BuildPrefs_Xsize"),
gSavedSettings.getF32("BuildPrefs_Ysize"),
gSavedSettings.getF32("BuildPrefs_Zsize"));
U8 material = LL_MCODE_WOOD;
if(gSavedSettings.getString("BuildPrefs_Material")== "Stone") material = LL_MCODE_STONE;
else if(gSavedSettings.getString("BuildPrefs_Material")== "Metal") material = LL_MCODE_METAL;
//if(gSavedSettings.getString("BuildPrefs_Material")== "Wood") material = LL_MCODE_WOOD; redundant
else if(gSavedSettings.getString("BuildPrefs_Material")== "Flesh") material = LL_MCODE_FLESH;
else if(gSavedSettings.getString("BuildPrefs_Material")== "Rubber") material = LL_MCODE_RUBBER;
else if(gSavedSettings.getString("BuildPrefs_Material")== "Plastic") material = LL_MCODE_PLASTIC;
BOOL create_selected = FALSE;
LLVolumeParams volume_params;
@@ -465,7 +477,8 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics )
// Pack in name value pairs
gMessageSystem->sendReliable(regionp->getHost());
//Actually call expectRez so that importtracker can do its thing
gImportTracker.expectRez();
// Spawns a message, so must be after above send
if (create_selected)
{