diff options
author | Diva Canto | 2011-06-03 11:48:24 -0700 |
---|---|---|
committer | Diva Canto | 2011-06-03 11:48:24 -0700 |
commit | cf86ba5559c7158af5c84415f78d5524b4191292 (patch) | |
tree | f39167f321d0c0678a6ffc0dc319f22f8c4c26e9 /OpenSim/Region/CoreModules | |
parent | HG Landmarks bug fix: pull landmark asset data from user's asset server when ... (diff) | |
download | opensim-SC-cf86ba5559c7158af5c84415f78d5524b4191292.zip opensim-SC-cf86ba5559c7158af5c84415f78d5524b4191292.tar.gz opensim-SC-cf86ba5559c7158af5c84415f78d5524b4191292.tar.bz2 opensim-SC-cf86ba5559c7158af5c84415f78d5524b4191292.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 7964b4f..49d484b 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | |||
@@ -122,8 +122,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
122 | 122 | ||
123 | #region Overrides of Basic Inventory Access methods | 123 | #region Overrides of Basic Inventory Access methods |
124 | 124 | ||
125 | protected override string GenerateLandmark(ScenePresence presence, out string suffix) | 125 | protected override string GenerateLandmark(ScenePresence presence, out string prefix, out string suffix) |
126 | { | 126 | { |
127 | UserAccount account = m_Scene.UserAccountService.GetUserAccount(m_Scene.RegionInfo.ScopeID, presence.UUID); | ||
128 | if (account == null) | ||
129 | prefix = "HG "; | ||
130 | else | ||
131 | prefix = string.Empty; | ||
127 | suffix = " @ " + m_ThisGatekeeper; | 132 | suffix = " @ " + m_ThisGatekeeper; |
128 | Vector3 pos = presence.AbsolutePosition; | 133 | Vector3 pos = presence.AbsolutePosition; |
129 | return String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\ngatekeeper {5}\n", | 134 | return String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\ngatekeeper {5}\n", |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index d441aa4..2930303 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -196,9 +196,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
196 | 196 | ||
197 | if (invType == (sbyte)InventoryType.Landmark && presence != null) | 197 | if (invType == (sbyte)InventoryType.Landmark && presence != null) |
198 | { | 198 | { |
199 | string suffix = string.Empty; | 199 | string suffix = string.Empty, prefix = string.Empty; |
200 | string strdata = GenerateLandmark(presence, out suffix); | 200 | string strdata = GenerateLandmark(presence, out prefix, out suffix); |
201 | data = Encoding.ASCII.GetBytes(strdata); | 201 | data = Encoding.ASCII.GetBytes(strdata); |
202 | name = prefix + name; | ||
202 | description += suffix; | 203 | description += suffix; |
203 | } | 204 | } |
204 | 205 | ||
@@ -226,8 +227,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
226 | } | 227 | } |
227 | } | 228 | } |
228 | 229 | ||
229 | protected virtual string GenerateLandmark(ScenePresence presence, out string suffix) | 230 | protected virtual string GenerateLandmark(ScenePresence presence, out string prefix, out string suffix) |
230 | { | 231 | { |
232 | prefix = string.Empty; | ||
231 | suffix = string.Empty; | 233 | suffix = string.Empty; |
232 | Vector3 pos = presence.AbsolutePosition; | 234 | Vector3 pos = presence.AbsolutePosition; |
233 | return String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n", | 235 | return String.Format("Landmark version 2\nregion_id {0}\nlocal_pos {1} {2} {3}\nregion_handle {4}\n", |