当前位置: 首页>>代码示例>>C#>>正文


C# Scene.AddCommand方法代码示例

本文整理汇总了C#中OpenSim.Region.Framework.Scenes.Scene.AddCommand方法的典型用法代码示例。如果您正苦于以下问题:C# Scene.AddCommand方法的具体用法?C# Scene.AddCommand怎么用?C# Scene.AddCommand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OpenSim.Region.Framework.Scenes.Scene的用法示例。


在下文中一共展示了Scene.AddCommand方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Initialize

        public void Initialize(Scene scene, IConfigSource config)
        {
            m_scene = scene;
            m_scene.RegisterModuleInterface<IRegionModule>(this);

            m_scene.AddCommand(
                this, "tree plant", "tree plant", "Start populating trees", HandleTreeConsoleCommand);

            m_scene.AddCommand(
                this, "tree active", "tree active <boolean>", "Change activity state for trees module", HandleTreeConsoleCommand);

            try
            {
                m_tree_density = config.Configs["Trees"].GetDouble("tree_density", m_tree_density);
                m_active_trees = config.Configs["Trees"].GetBoolean("active_trees", m_active_trees);
            }
            catch (Exception)
            {
            }

            m_trees = new List<UUID>();

            if (m_active_trees)
                activeizeTreeze(true);

            m_log.Debug("[TREES]: Initialized tree module");
        }
开发者ID:digitalmystic,项目名称:halcyon,代码行数:27,代码来源:TreePopulatorModule.cs

示例2: Initialize

        public void Initialize(Scene scene, IConfigSource source)
        {
            m_scene = scene;
            m_scene.RegisterModuleInterface<IDialogModule>(this);
            
            m_scene.AddCommand(
                this, "alert", "alert <first> <last> <message>", "Send an alert to a user", HandleAlertConsoleCommand);

            m_scene.AddCommand(
                this, "alert general", "alert general <message>", "Send an alert to everyone", HandleAlertConsoleCommand);            
        }
开发者ID:MatthewBeardmore,项目名称:halcyon,代码行数:11,代码来源:DialogModule.cs

示例3: Initialise

        public void Initialise(Scene scene, Nini.Config.IConfigSource source)
        {
            m_scene = scene;
            if (source.Configs["realXtend"] != null)
            {
                m_bypassPermissions = !(source.Configs["realXtend"].GetBoolean("UploadPermissionsEnabled", false));
                m_disableFromAll = source.Configs["realXtend"].GetBoolean("DisableUploads", false);
            }

            m_scene.AddCommand(this, "uploadpermissions", "uploadpermissions true|false", "this enables or disables upload permissions", SetUploadPermissionsCommand);
            m_scene.AddCommand(this, "disableupload", "disableupload true|false", "this enables or disables upload", DisableUploadCommand);
        }
开发者ID:jonnenauha,项目名称:ModreX,代码行数:12,代码来源:UploadPermission.cs

示例4: AddRegion

        public void AddRegion(Scene scene)
        {
            if (!m_enabled)
                return;
            m_scene = scene;
            m_scene.RegisterModuleInterface<IDialogModule>(this);
            m_scene.EventManager.OnPermissionError += SendAlertToUser;

            m_scene.AddCommand(
                this, "alert", "alert <first> <last> <message>", "Send an alert to a user", HandleAlertConsoleCommand);

            m_scene.AddCommand(
                this, "alert general", "alert general <message>", "Send an alert to everyone", HandleAlertConsoleCommand);
        }
开发者ID:WordfromtheWise,项目名称:Aurora,代码行数:14,代码来源:AuroraDialogModule.cs

示例5: AddRegion

        public void AddRegion(Scene scene)
        {
            if (!m_enabled)
                return;

            RegionConnector = DataManager.DataManager.RequestPlugin<IRegionConnector>();
            m_scene = scene;

            scene.EventManager.OnNewClient += OnNewClient;
            scene.Permissions.OnTeleport += AllowTeleport;
            scene.EventManager.OnClosingClient += OnClosingClient;

            scene.AddCommand(this, "set regionsetting", "set regionsetting", "Sets a region setting for the given region. Valid params: Maturity - 0(PG),1(Mature),2(Adult); AddEstateBan,RemoveEstateBan,AddEstateManager,RemoveEstateManager - First name, Last name", SetRegionInfoOption);
            scene.AddCommand(this, "ban user", "ban user", "Bans a user from the current estate", BanUser);
        }
开发者ID:NickyPerian,项目名称:Aurora,代码行数:15,代码来源:EstateService.cs

示例6: Initialise

        public void Initialise(Scene scene, IConfigSource source)
        {
            m_scene = scene;
            m_scene.RegisterModuleInterface<IDialogModule>(this);
            
            m_scene.AddCommand(
                this, "alert", "alert <first> <last> <message>",
                "Send an alert to a user",
                HandleAlertConsoleCommand);

            m_scene.AddCommand(
                this, "alert general", "alert [general] <message>",
                "Send an alert to everyone",
                "If keyword 'general' is omitted, then <message> must be surrounded by quotation marks.",
                HandleAlertConsoleCommand);
        }
开发者ID:N3X15,项目名称:VoxelSim,代码行数:16,代码来源:DialogModule.cs

示例7: AddRegion

        public void AddRegion(Scene scene)
        {
            if (!m_enabled)
                return;
            m_scene = scene;
            m_scene.RegisterModuleInterface<IDialogModule>(this);

            m_scene.AddCommand(
                this, "alert", "alert <first> <last> <message>",
                "Send an alert to a user",
                HandleAlertConsoleCommand);

            m_scene.AddCommand(
                this, "alert general", "alert [general] <message>",
                "Send an alert to everyone",
                "If keyword 'general' is omitted, then <message> must be surrounded by quotation marks.",
                HandleAlertConsoleCommand);
        }
开发者ID:shangcheng,项目名称:Aurora,代码行数:18,代码来源:DialogModule.cs

示例8: Initialise

 public void Initialise(Scene scene, Nini.Config.IConfigSource source)
 {
     m_scene = scene;
     if (source.Configs["realXtend"] != null)
     {
         m_maxHeight = source.Configs["realXtend"].GetFloat("FlightCeilingHeight", 0);
     }
     m_scene.AddCommand(this, "flightceiling", "flightceiling <float>", "Set maximum movement height. Zero is disabled", SetFlightCeilingHeight);
 }
开发者ID:jonnenauha,项目名称:ModreX,代码行数:9,代码来源:MovementHeight.cs

示例9: Initialise

        public void Initialise(Scene scene, IConfigSource source)
        {
            m_scene = scene;


            m_scene.AddCommand(this, "monitor report",
                               "monitor report",
                               "Returns a variety of statistics about the current region and/or simulator",
                               DebugMonitors);

            MainServer.Instance.AddHTTPHandler("/monitorstats/" + m_scene.RegionInfo.RegionID + "/", StatsPage);
        }
开发者ID:openmetaversefoundation,项目名称:fortis-opensim,代码行数:12,代码来源:MonitorModule.cs

示例10: AddRegion

 public void AddRegion(Scene scene)
 {
     if(!enabled) return;
     log("Adding region to MGM");
     npc = (NPCModule)scene.RequestModuleInterface<INPCModule>();
     if(npc == null || !npc.Enabled)
     {
         enabled = false;
         log("ERROR: NPC module must be enabled for MGM");
         return;
     }
     scene.AddCommand("mgm",this,"mgm status","status","Print the status of the MGM module", consoleStatus);
     scene.AddCommand("mgm",this,"mgm addUser","addUser","Test adding a user", addUser);
     mgmLink = new MGMLink(new IPEndPoint(mgmAddress, mgmPort), log);
     mgmLink.start();
     registerEvents(scene.EventManager);
     string regMsg = MGMJson.Register(scene.Name, scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY, scene.RegionInfo.RegionSizeX);
     mgmLink.send(regMsg);
     this.scene = scene;
     mgr = new MGMClientManager(scene,log);
 }
开发者ID:bitzend,项目名称:opensim-mgm-plugin,代码行数:21,代码来源:MGMModule.cs

示例11: RegionLoaded

        public void RegionLoaded(Scene scene)
        {
            if (!m_Enabled)
                return;

            if (m_autoOAREnabled)
            {
                m_autoOARTimer = new Timer(m_autoOARTime * (TimeSpan.TicksPerDay / TimeSpan.TicksPerMillisecond));//Time in days
                m_autoOARTimer.Elapsed += SaveOAR;
                m_autoOARTimer.Enabled = true;
            }
            scene.AddCommand(this, "save version", "save version <description>", "Saves the current region as the next incremented version in the version control module.", SaveVersion);
            
        }
开发者ID:shangcheng,项目名称:Aurora,代码行数:14,代码来源:VersionControlModule.cs

示例12: Initialise

        public void Initialise(Scene scene, IConfigSource source)
        {
            IConfig cnfg = source.Configs["Monitoring"];

            if (cnfg != null)
                Enabled = cnfg.GetBoolean("Enabled", true);
            
            if (!Enabled)
                return;

            m_scene = scene;

            m_scene.AddCommand(this, "monitor report",
                               "monitor report",
                               "Returns a variety of statistics about the current region and/or simulator",
                               DebugMonitors);

            MainServer.Instance.AddHTTPHandler("/monitorstats/" + m_scene.RegionInfo.RegionID, StatsPage);
            MainServer.Instance.AddHTTPHandler(
                "/monitorstats/" + Uri.EscapeDataString(m_scene.RegionInfo.RegionName), StatsPage);
        }
开发者ID:4U2NV,项目名称:opensim,代码行数:21,代码来源:MonitorModule.cs

示例13: Initialise

 public void Initialise(Scene scene, IConfigSource source)
 {            
     if (m_scenes.Count == 0)
     {
         scene.RegisterModuleInterface<IInventoryArchiverModule>(this);
         CommsManager = scene.CommsManager;
         OnInventoryArchiveSaved += SaveInvConsoleCommandCompleted;
         
         scene.AddCommand(
             this, "load iar",
             "load iar <first> <last> <inventory path> [<archive path>]",
             "Load user inventory archive.  EXPERIMENTAL, PLEASE DO NOT USE YET", HandleLoadInvConsoleCommand); 
         
         scene.AddCommand(
             this, "save iar",
             "save iar <first> <last> <inventory path> [<archive path>]",
             "Save user inventory archive.  EXPERIMENTAL, PLEASE DO NOT USE YET", HandleSaveInvConsoleCommand);           
     }
                 
     m_scenes[scene.RegionInfo.RegionID] = scene;            
 }
开发者ID:BogusCurry,项目名称:halcyon,代码行数:21,代码来源:InventoryArchiverModule.cs

示例14: AddRegion

        public void AddRegion(Scene scene)
        {
            if (!Enabled)
                return;

            m_scene = scene;

            m_scene.AddCommand("General", this, "monitor report",
                               "monitor report",
                               "Returns a variety of statistics about the current region and/or simulator",
                               DebugMonitors);

            MainServer.Instance.AddHTTPHandler("/monitorstats/" + m_scene.RegionInfo.RegionID, StatsPage);
            MainServer.Instance.AddHTTPHandler(
                "/monitorstats/" + Uri.EscapeDataString(m_scene.RegionInfo.RegionName), StatsPage);

            AddMonitors();
        }
开发者ID:justasabc,项目名称:opensim75grid,代码行数:18,代码来源:MonitorModule.cs

示例15: AddRegion

        public void AddRegion(Scene scene)
        {
            if (!m_Enabled)
                return;

            m_scene = scene;

            scene.RegisterModuleInterface<IPermissionsModule>(this);

            //Register functions with Scene External Checks!
            m_scene.Permissions.OnBypassPermissions += BypassPermissions;
            m_scene.Permissions.OnSetBypassPermissions += SetBypassPermissions;
            m_scene.Permissions.OnPropagatePermissions += PropagatePermissions;
            m_scene.Permissions.OnGenerateClientFlags += GenerateClientFlags;
            m_scene.Permissions.OnAbandonParcel += CanAbandonParcel;
            m_scene.Permissions.OnReclaimParcel += CanReclaimParcel;
            m_scene.Permissions.OnDeedParcel += CanDeedParcel;
            m_scene.Permissions.OnDeedObject += CanDeedObject;
            m_scene.Permissions.OnIsGod += IsGod;
            m_scene.Permissions.OnIsGridGod += IsGridGod;
            m_scene.Permissions.OnIsAdministrator += IsAdministrator;
            m_scene.Permissions.OnDuplicateObject += CanDuplicateObject;
            m_scene.Permissions.OnDeleteObject += CanDeleteObject; 
            m_scene.Permissions.OnEditObject += CanEditObject; 
            m_scene.Permissions.OnEditParcelProperties += CanEditParcelProperties; 
            m_scene.Permissions.OnInstantMessage += CanInstantMessage;
            m_scene.Permissions.OnInventoryTransfer += CanInventoryTransfer; 
            m_scene.Permissions.OnIssueEstateCommand += CanIssueEstateCommand; 
            m_scene.Permissions.OnMoveObject += CanMoveObject; 
            m_scene.Permissions.OnObjectEntry += CanObjectEntry;
            m_scene.Permissions.OnReturnObjects += CanReturnObjects; 
            m_scene.Permissions.OnRezObject += CanRezObject; 
            m_scene.Permissions.OnRunConsoleCommand += CanRunConsoleCommand;
            m_scene.Permissions.OnRunScript += CanRunScript; 
            m_scene.Permissions.OnCompileScript += CanCompileScript;
            m_scene.Permissions.OnSellParcel += CanSellParcel;
            m_scene.Permissions.OnTakeObject += CanTakeObject;
            m_scene.Permissions.OnTakeCopyObject += CanTakeCopyObject;
            m_scene.Permissions.OnTerraformLand += CanTerraformLand;
            m_scene.Permissions.OnLinkObject += CanLinkObject; 
            m_scene.Permissions.OnDelinkObject += CanDelinkObject; 
            m_scene.Permissions.OnBuyLand += CanBuyLand; 
            
            m_scene.Permissions.OnViewNotecard += CanViewNotecard; 
            m_scene.Permissions.OnViewScript += CanViewScript; 
            m_scene.Permissions.OnEditNotecard += CanEditNotecard; 
            m_scene.Permissions.OnEditScript += CanEditScript; 
            
            m_scene.Permissions.OnCreateObjectInventory += CanCreateObjectInventory;
            m_scene.Permissions.OnEditObjectInventory += CanEditObjectInventory;
            m_scene.Permissions.OnCopyObjectInventory += CanCopyObjectInventory; 
            m_scene.Permissions.OnDeleteObjectInventory += CanDeleteObjectInventory; 
            m_scene.Permissions.OnResetScript += CanResetScript;
            
            m_scene.Permissions.OnCreateUserInventory += CanCreateUserInventory; 
            m_scene.Permissions.OnCopyUserInventory += CanCopyUserInventory; 
            m_scene.Permissions.OnEditUserInventory += CanEditUserInventory; 
            m_scene.Permissions.OnDeleteUserInventory += CanDeleteUserInventory; 
            
            m_scene.Permissions.OnTeleport += CanTeleport; 
            
            m_scene.Permissions.OnControlPrimMedia += CanControlPrimMedia;
            m_scene.Permissions.OnInteractWithPrimMedia += CanInteractWithPrimMedia;

            m_scene.AddCommand("Users", this, "bypass permissions",
                    "bypass permissions <true / false>",
                    "Bypass permission checks",
                    HandleBypassPermissions);

            m_scene.AddCommand("Users", this, "force permissions",
                    "force permissions <true / false>",
                    "Force permissions on or off",
                    HandleForcePermissions);

            m_scene.AddCommand("Debug", this, "debug permissions",
                    "debug permissions <true / false>",
                    "Turn on permissions debugging",
                    HandleDebugPermissions);                    
                    
        }
开发者ID:JamesStallings,项目名称:opensimulator,代码行数:80,代码来源:PermissionsModule.cs


注:本文中的OpenSim.Region.Framework.Scenes.Scene.AddCommand方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。