mirror of
https://github.com/opensim/opensim.git
synced 2026-05-15 19:35:41 +08:00
move currency-base-uri simulator feature to global settings, based on [Economy] economy setting on opensim.ini. make sampleMoney honour it
This commit is contained in:
@@ -84,6 +84,8 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
static private UUID m_scriptSyntaxID = UUID.Zero;
|
||||
static private byte[] m_scriptSyntaxXML = null;
|
||||
|
||||
static private string m_economyURL = null;
|
||||
|
||||
#region ISharedRegionModule Members
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
@@ -115,6 +117,8 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
m_doScriptSyntax = config.GetBoolean("ScriptSyntax", m_doScriptSyntax);
|
||||
}
|
||||
|
||||
m_economyURL = Util.GetConfigVarFromSections<string>(source, "economy", new string[] { "Economy", "GridInfo" });
|
||||
|
||||
ReadScriptSyntax();
|
||||
AddDefaultFeatures();
|
||||
}
|
||||
@@ -197,17 +201,18 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
extrasMap["AnimationSet"] = true;
|
||||
|
||||
// TODO: Take these out of here into their respective modules, like map-server-url
|
||||
if (m_SearchURL != string.Empty)
|
||||
if (!string.IsNullOrWhiteSpace(m_SearchURL))
|
||||
extrasMap["search-server-url"] = m_SearchURL;
|
||||
if (!string.IsNullOrEmpty(m_DestinationGuideURL))
|
||||
extrasMap["destination-guide-url"] = m_DestinationGuideURL;
|
||||
if (m_ExportSupported)
|
||||
extrasMap["ExportSupported"] = true;
|
||||
if (m_GridURL != string.Empty)
|
||||
if (!string.IsNullOrWhiteSpace(m_GridURL))
|
||||
extrasMap["GridURL"] = m_GridURL;
|
||||
if (m_GridName != string.Empty)
|
||||
if (!string.IsNullOrWhiteSpace(m_GridName))
|
||||
extrasMap["GridName"] = m_GridName;
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(m_economyURL))
|
||||
extrasMap["currency-base-uri"] = Util.AppendEndSlash(m_economyURL);
|
||||
if (extrasMap.Count > 0)
|
||||
m_features["OpenSimExtras"] = extrasMap;
|
||||
}
|
||||
@@ -263,6 +268,19 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||
return m_features.TryGetValue(name, out value);
|
||||
}
|
||||
|
||||
public bool TryGetOpenSimExtraFeature(string name, out OSD value)
|
||||
{
|
||||
value = null;
|
||||
lock (m_features)
|
||||
{
|
||||
if (!m_features.TryGetValue("OpenSimExtras", out OSD extra))
|
||||
return false;
|
||||
if(!(extra is OSDMap))
|
||||
return false;
|
||||
return (extra as OSDMap).TryGetValue(name, out value);
|
||||
}
|
||||
}
|
||||
|
||||
public OSDMap GetFeatures()
|
||||
{
|
||||
lock (m_features)
|
||||
|
||||
Reference in New Issue
Block a user