aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/Terrain
diff options
context:
space:
mode:
authormingchen2008-07-25 02:30:07 +0000
committermingchen2008-07-25 02:30:07 +0000
commitf2742fb6043c6b7332afd026d77a29b25369934c (patch)
tree895f906ba9db30b27117e6f0d7af40e063204e8e /OpenSim/Region/Environment/Modules/World/Terrain
parentllApplyImpulse now accepts any non-zero integer as not FALSE (diff)
downloadopensim-SC-f2742fb6043c6b7332afd026d77a29b25369934c.zip
opensim-SC-f2742fb6043c6b7332afd026d77a29b25369934c.tar.gz
opensim-SC-f2742fb6043c6b7332afd026d77a29b25369934c.tar.bz2
opensim-SC-f2742fb6043c6b7332afd026d77a29b25369934c.tar.xz
*Added CommandIntentions that is used to describe a console commands hazard. HAZARDOUS if it modifies the simulator, NON_HAZARDOUS if it does a command that doesn't modify the simulator but does a background command such as a forced backup, and STATISTICAL if it returns debug or more information.
*This is useful for implementing a protection system from unwanted script execution or for application modules needing to know what a command does.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Terrain')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs24
1 files changed, 12 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs
index 9892794..8fbc62e 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs
@@ -804,19 +804,19 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
804 supportedFileExtensions += " " + loader.Key + " (" + loader.Value + ")"; 804 supportedFileExtensions += " " + loader.Key + " (" + loader.Value + ")";
805 805
806 Command loadFromFileCommand = 806 Command loadFromFileCommand =
807 new Command("load", InterfaceLoadFile, "Loads a terrain from a specified file."); 807 new Command("load", CommandIntentions.COMMAND_HAZARDOUS, InterfaceLoadFile, "Loads a terrain from a specified file.");
808 loadFromFileCommand.AddArgument("filename", 808 loadFromFileCommand.AddArgument("filename",
809 "The file you wish to load from, the file extension determines the loader to be used. Supported extensions include: " + 809 "The file you wish to load from, the file extension determines the loader to be used. Supported extensions include: " +
810 supportedFileExtensions, "String"); 810 supportedFileExtensions, "String");
811 811
812 Command saveToFileCommand = 812 Command saveToFileCommand =
813 new Command("save", InterfaceSaveFile, "Saves the current heightmap to a specified file."); 813 new Command("save", CommandIntentions.COMMAND_NON_HAZARDOUS, InterfaceSaveFile, "Saves the current heightmap to a specified file.");
814 saveToFileCommand.AddArgument("filename", 814 saveToFileCommand.AddArgument("filename",
815 "The destination filename for your heightmap, the file extension determines the format to save in. Supported extensions include: " + 815 "The destination filename for your heightmap, the file extension determines the format to save in. Supported extensions include: " +
816 supportedFileExtensions, "String"); 816 supportedFileExtensions, "String");
817 817
818 Command loadFromTileCommand = 818 Command loadFromTileCommand =
819 new Command("load-tile", InterfaceLoadTileFile, "Loads a terrain from a section of a larger file."); 819 new Command("load-tile", CommandIntentions.COMMAND_HAZARDOUS, InterfaceLoadTileFile, "Loads a terrain from a section of a larger file.");
820 loadFromTileCommand.AddArgument("filename", 820 loadFromTileCommand.AddArgument("filename",
821 "The file you wish to load from, the file extension determines the loader to be used. Supported extensions include: " + 821 "The file you wish to load from, the file extension determines the loader to be used. Supported extensions include: " +
822 supportedFileExtensions, "String"); 822 supportedFileExtensions, "String");
@@ -829,40 +829,40 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
829 829
830 // Terrain adjustments 830 // Terrain adjustments
831 Command fillRegionCommand = 831 Command fillRegionCommand =
832 new Command("fill", InterfaceFillTerrain, "Fills the current heightmap with a specified value."); 832 new Command("fill", CommandIntentions.COMMAND_HAZARDOUS, InterfaceFillTerrain, "Fills the current heightmap with a specified value.");
833 fillRegionCommand.AddArgument("value", "The numeric value of the height you wish to set your region to.", 833 fillRegionCommand.AddArgument("value", "The numeric value of the height you wish to set your region to.",
834 "Double"); 834 "Double");
835 835
836 Command elevateCommand = 836 Command elevateCommand =
837 new Command("elevate", InterfaceElevateTerrain, "Raises the current heightmap by the specified amount."); 837 new Command("elevate", CommandIntentions.COMMAND_HAZARDOUS, InterfaceElevateTerrain, "Raises the current heightmap by the specified amount.");
838 elevateCommand.AddArgument("amount", "The amount of height to add to the terrain in meters.", "Double"); 838 elevateCommand.AddArgument("amount", "The amount of height to add to the terrain in meters.", "Double");
839 839
840 Command lowerCommand = 840 Command lowerCommand =
841 new Command("lower", InterfaceLowerTerrain, "Lowers the current heightmap by the specified amount."); 841 new Command("lower", CommandIntentions.COMMAND_HAZARDOUS, InterfaceLowerTerrain, "Lowers the current heightmap by the specified amount.");
842 lowerCommand.AddArgument("amount", "The amount of height to remove from the terrain in meters.", "Double"); 842 lowerCommand.AddArgument("amount", "The amount of height to remove from the terrain in meters.", "Double");
843 843
844 Command multiplyCommand = 844 Command multiplyCommand =
845 new Command("multiply", InterfaceMultiplyTerrain, "Multiplies the heightmap by the value specified."); 845 new Command("multiply", CommandIntentions.COMMAND_HAZARDOUS, InterfaceMultiplyTerrain, "Multiplies the heightmap by the value specified.");
846 multiplyCommand.AddArgument("value", "The value to multiply the heightmap by.", "Double"); 846 multiplyCommand.AddArgument("value", "The value to multiply the heightmap by.", "Double");
847 847
848 Command bakeRegionCommand = 848 Command bakeRegionCommand =
849 new Command("bake", InterfaceBakeTerrain, "Saves the current terrain into the regions revert map."); 849 new Command("bake", CommandIntentions.COMMAND_HAZARDOUS, InterfaceBakeTerrain, "Saves the current terrain into the regions revert map.");
850 Command revertRegionCommand = 850 Command revertRegionCommand =
851 new Command("revert", InterfaceRevertTerrain, "Loads the revert map terrain into the regions heightmap."); 851 new Command("revert", CommandIntentions.COMMAND_HAZARDOUS, InterfaceRevertTerrain, "Loads the revert map terrain into the regions heightmap.");
852 852
853 // Debug 853 // Debug
854 Command showDebugStatsCommand = 854 Command showDebugStatsCommand =
855 new Command("stats", InterfaceShowDebugStats, 855 new Command("stats", CommandIntentions.COMMAND_STATISTICAL, InterfaceShowDebugStats,
856 "Shows some information about the regions heightmap for debugging purposes."); 856 "Shows some information about the regions heightmap for debugging purposes.");
857 857
858 Command experimentalBrushesCommand = 858 Command experimentalBrushesCommand =
859 new Command("newbrushes", InterfaceEnableExperimentalBrushes, 859 new Command("newbrushes", CommandIntentions.COMMAND_HAZARDOUS, InterfaceEnableExperimentalBrushes,
860 "Enables experimental brushes which replace the standard terrain brushes. WARNING: This is a debug setting and may be removed at any time."); 860 "Enables experimental brushes which replace the standard terrain brushes. WARNING: This is a debug setting and may be removed at any time.");
861 experimentalBrushesCommand.AddArgument("Enabled?", "true / false - Enable new brushes", "Boolean"); 861 experimentalBrushesCommand.AddArgument("Enabled?", "true / false - Enable new brushes", "Boolean");
862 862
863 //Plugins 863 //Plugins
864 Command pluginRunCommand = 864 Command pluginRunCommand =
865 new Command("effect", InterfaceRunPluginEffect, "Runs a specified plugin effect"); 865 new Command("effect", CommandIntentions.COMMAND_HAZARDOUS, InterfaceRunPluginEffect, "Runs a specified plugin effect");
866 pluginRunCommand.AddArgument("name", "The plugin effect you wish to run, or 'list' to see all plugins", "String"); 866 pluginRunCommand.AddArgument("name", "The plugin effect you wish to run, or 'list' to see all plugins", "String");
867 867
868 m_commander.RegisterCommand("load", loadFromFileCommand); 868 m_commander.RegisterCommand("load", loadFromFileCommand);