Added prefix HG to the name of the landmark item in inventory, as a soft reminder that the landmark belongs to a place in another grid. People can change the name, but that's their decision.

bulletsim
Diva Canto 2011-06-03 11:48:24 -07:00
parent 623706d988
commit cf86ba5559
2 changed files with 11 additions and 4 deletions

View File

@ -122,8 +122,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
#region Overrides of Basic Inventory Access methods
protected override string GenerateLandmark(ScenePresence presence, out string suffix)
protected override string GenerateLandmark(ScenePresence presence, out string prefix, out string suffix)
{
UserAccount account = m_Scene.UserAccountService.GetUserAccount(m_Scene.RegionInfo.ScopeID, presence.UUID);
if (account == null)
prefix = "HG ";
else
prefix = string.Empty;
suffix = " @ " + m_ThisGatekeeper;
Vector3 pos = presence.AbsolutePosition;
return String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\ngatekeeper {5}\n",

View File

@ -196,9 +196,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
if (invType == (sbyte)InventoryType.Landmark && presence != null)
{
string suffix = string.Empty;
string strdata = GenerateLandmark(presence, out suffix);
string suffix = string.Empty, prefix = string.Empty;
string strdata = GenerateLandmark(presence, out prefix, out suffix);
data = Encoding.ASCII.GetBytes(strdata);
name = prefix + name;
description += suffix;
}
@ -226,8 +227,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
}
}
protected virtual string GenerateLandmark(ScenePresence presence, out string suffix)
protected virtual string GenerateLandmark(ScenePresence presence, out string prefix, out string suffix)
{
prefix = string.Empty;
suffix = string.Empty;
Vector3 pos = presence.AbsolutePosition;
return String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n",