本文整理汇总了C#中OpenSim.Region.Framework.Scenes.Scene.SetObjectCapacity方法的典型用法代码示例。如果您正苦于以下问题:C# Scene.SetObjectCapacity方法的具体用法?C# Scene.SetObjectCapacity怎么用?C# Scene.SetObjectCapacity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenSim.Region.Framework.Scenes.Scene
的用法示例。
在下文中一共展示了Scene.SetObjectCapacity方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddRegion
public void AddRegion(Scene scene)
{
// Send ObjectCapacity to Scene.. Which sends it to the SimStatsReporter.
scene.SetObjectCapacity(ObjectCapacity);
if (m_enabled)
{
scene.RegisterModuleInterface<IMoneyModule>(this);
IHttpServer httpServer = MainServer.Instance;
lock (m_scenel)
{
if (m_scenel.Count == 0)
{
// XMLRPCHandler = scene;
// To use the following you need to add:
// -helperuri <ADDRESS TO HERE OR grid MONEY SERVER>
// to the command line parameters you use to start up your client
// This commonly looks like -helperuri http://127.0.0.1:9000/
// Local Server.. enables functionality only.
httpServer.AddXmlRPCHandler("getCurrencyQuote", quote_func);
httpServer.AddXmlRPCHandler("buyCurrency", buy_func);
httpServer.AddXmlRPCHandler("preflightBuyLandPrep", preflightBuyLandPrep_func);
httpServer.AddXmlRPCHandler("buyLandPrep", landBuy_func);
}
if (m_scenel.ContainsKey(scene.RegionInfo.RegionHandle))
{
m_scenel[scene.RegionInfo.RegionHandle] = scene;
}
else
{
m_scenel.Add(scene.RegionInfo.RegionHandle, scene);
}
}
scene.EventManager.OnNewClient += OnNewClient;
scene.EventManager.OnMoneyTransfer += MoneyTransferAction;
scene.EventManager.OnClientClosed += ClientClosed;
scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
scene.EventManager.OnMakeChildAgent += MakeChildAgent;
scene.EventManager.OnClientClosed += ClientLoggedOut;
scene.EventManager.OnValidateLandBuy += ValidateLandBuy;
scene.EventManager.OnLandBuy += processLandBuy;
}
}
示例2: ReadConfigAndPopulate
/// <summary>
/// Parse Configuration
/// </summary>
/// <param name="scene"></param>
/// <param name="startupConfig"></param>
/// <param name="config"></param>
private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string config)
{
if (config == "Startup" && startupConfig != null)
{
gridmode = startupConfig.GetBoolean("gridmode", false);
m_enabled = (startupConfig.GetString("economymodule", "OpenCurrency") == "OpenCurrency");
}
if (config == "Economy" && startupConfig != null)
{
ObjectCapacity = startupConfig.GetInt("ObjectCapacity", 45000);
PriceEnergyUnit = startupConfig.GetInt("PriceEnergyUnit", 100);
PriceObjectClaim = startupConfig.GetInt("PriceObjectClaim", 10);
PricePublicObjectDecay = startupConfig.GetInt("PricePublicObjectDecay", 4);
PricePublicObjectDelete = startupConfig.GetInt("PricePublicObjectDelete", 4);
PriceParcelClaim = startupConfig.GetInt("PriceParcelClaim", 1);
PriceParcelClaimFactor = startupConfig.GetFloat("PriceParcelClaimFactor", 1f);
PriceUpload = startupConfig.GetInt("PriceUpload", 0);
PriceRentLight = startupConfig.GetInt("PriceRentLight", 5);
TeleportMinPrice = startupConfig.GetInt("TeleportMinPrice", 2);
TeleportPriceExponent = startupConfig.GetFloat("TeleportPriceExponent", 2f);
EnergyEfficiency = startupConfig.GetFloat("EnergyEfficiency", 1);
PriceObjectRent = startupConfig.GetFloat("PriceObjectRent", 1);
PriceObjectScaleFactor = startupConfig.GetFloat("PriceObjectScaleFactor", 10);
PriceParcelRent = startupConfig.GetInt("PriceParcelRent", 1);
PriceGroupCreate = startupConfig.GetInt("PriceGroupCreate", -1);
string EconomyBaseAccount = startupConfig.GetString("EconomyBaseAccount", UUID.Zero.ToString());
// UserLevelPaysFees = startupConfig.GetInt("UserLevelPaysFees", -1);
m_stipend = startupConfig.GetInt("UserStipend", 1000);
m_minFundsBeforeRefresh = startupConfig.GetInt("IssueStipendWhenClientIsBelowAmount", 10);
m_keepMoneyAcrossLogins = startupConfig.GetBoolean("KeepMoneyAcrossLogins", true);
m_MoneyAddress = startupConfig.GetString("CurrencyServer", String.Empty);
}
// Send ObjectCapacity to Scene.. Which sends it to the SimStatsReporter.
scene.SetObjectCapacity(ObjectCapacity);
}