Constants.cs 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /*
  2. * Copyright (c) Contributors, http://opensimulator.org/
  3. * See CONTRIBUTORS.TXT for a full list of copyright holders.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are met:
  7. * * Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. * * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * * Neither the name of the OpenSimulator Project nor the
  13. * names of its contributors may be used to endorse or promote products
  14. * derived from this software without specific prior written permission.
  15. *
  16. * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
  17. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  18. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
  20. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  21. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  22. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  23. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. using System;
  28. using OpenMetaverse;
  29. namespace OpenSim.Framework
  30. {
  31. public class Constants
  32. {
  33. public const int MaxAgentAttachments = 38;
  34. public const int MaxAgentGroups = 60;
  35. public const int MaxEstateAccessIds = 500;
  36. public const int MaxEstateManagers = 20;
  37. // 'RegionSize' is the legacy region size.
  38. // DO NOT USE THIS FOR ANY NEW CODE. Use Scene.RegionInfo.RegionSize[XYZ] as a region might not
  39. // be the legacy region size.
  40. public const uint RegionSize = 256;
  41. public const uint RegionHeight = 4096;
  42. public const uint MaximumRegionSize = 4096;
  43. // Since terrain is stored in 16x16 heights, regions must be a multiple of this number and that is the minimum
  44. // but for placement on a grid min must be 256m
  45. public const int MinRegionSize = 256;
  46. public const int TerrainPatchSize = 16;
  47. public const int LandUnit = 4; // parcels only have sizes multiple of this
  48. public const float MinSimulationHeight = -100f;
  49. public const float MaxSimulationHeight = 50000f;
  50. public const float MinTerrainHeightmap = -100f;
  51. public const float MaxTerrainHeightmap = 4000f;
  52. public const float MinWaterHeight = 0;
  53. public const float MaxWaterHeight = 8000f;
  54. public const int MaxTextureResolution = 2048;
  55. public static readonly string DefaultTexture = "89556747-24cb-43ed-920b-47caed15465f"; //plywood
  56. public static readonly UUID DefaultTextureID = new UUID(DefaultTexture);
  57. public static readonly string DefaultScript = "2074003b-8d5f-40e5-8b20-581c1c50aedb"; // must be on default assets and cache
  58. public static readonly UUID DefaultScriptID = new UUID(DefaultScript);
  59. public static readonly string DefaultScriptText = "default\n{\n state_entry()\n {\n llSay(0, \"Script running\");\n }\n}";
  60. public static readonly byte[] DefaultScriptData = osUTF8.GetASCIIBytes(DefaultScriptText);
  61. public static readonly string EmptyNotecard = "4b6a777d-7bcd-4fc4-b06f-929b21e32925";
  62. public static readonly UUID EmptyNotecardID = new UUID(EmptyNotecard);
  63. public static readonly byte[] EmptyNotecardData = osUTF8.GetASCIIBytes("Linden text version 2\n{\nLLEmbeddedItems version 1\n{\ncount 0\n}\nText length 0\n}\n\0");
  64. public static readonly string DefaultMaterial = "968cbad0-4dad-d64e-71b5-72bf13ad051a";
  65. public static readonly UUID DefaultMaterialID = new UUID(DefaultMaterial);
  66. public static readonly string m_MrOpenSimIDString = "11111111-1111-0000-0000-000100bba000";
  67. public static readonly UUID m_MrOpenSimID = new UUID(m_MrOpenSimIDString);
  68. public static readonly DateTime m_MrOpenSimBorn = new DateTime(2007, 1, 1, 0, 0, 0, DateTimeKind.Utc);
  69. public static readonly string servicesAgentIDString = "6571e388-6218-4574-87db-f9379718315e";
  70. public static readonly UUID servicesGodAgentID = new UUID(servicesAgentIDString);
  71. public enum EstateAccessCodex : uint
  72. {
  73. AllowedAccess = 1,
  74. AllowedGroups = 2,
  75. EstateBans = 4,
  76. EstateManagers = 8
  77. }
  78. public enum EstateAccessLimits : int
  79. {
  80. AllowedAccess = MaxEstateAccessIds,
  81. AllowedGroups = 63,
  82. EstateBans = 500,
  83. EstateManagers = MaxEstateManagers
  84. }
  85. [Flags]public enum TeleportFlags : uint
  86. {
  87. /// <summary>No flags set, or teleport failed</summary>
  88. Default = 0,
  89. /// <summary>Set when newbie leaves help island for first time</summary>
  90. SetHomeToTarget = 1 << 0,
  91. /// <summary></summary>
  92. SetLastToTarget = 1 << 1,
  93. /// <summary>Via Lure</summary>
  94. ViaLure = 1 << 2,
  95. /// <summary>Via Landmark</summary>
  96. ViaLandmark = 1 << 3,
  97. /// <summary>Via Location</summary>
  98. ViaLocation = 1 << 4,
  99. /// <summary>Via Home</summary>
  100. ViaHome = 1 << 5,
  101. /// <summary>Via Telehub</summary>
  102. ViaTelehub = 1 << 6,
  103. /// <summary>Via Login</summary>
  104. ViaLogin = 1 << 7,
  105. /// <summary>Linden Summoned</summary>
  106. ViaGodlikeLure = 1 << 8,
  107. /// <summary>Linden Forced me</summary>
  108. Godlike = 1 << 9,
  109. /// <summary></summary>
  110. NineOneOne = 1 << 10,
  111. /// <summary>Agent Teleported Home via Script</summary>
  112. DisableCancel = 1 << 11,
  113. /// <summary></summary>
  114. ViaRegionID = 1 << 12,
  115. /// <summary></summary>
  116. IsFlying = 1 << 13,
  117. /// <summary></summary>
  118. ResetHome = 1 << 14,
  119. /// <summary>forced to new location for example when avatar is banned or ejected</summary>
  120. ForceRedirect = 1 << 15,
  121. /// <summary>Teleport Finished via a Lure</summary>
  122. FinishedViaLure = 1 << 26,
  123. /// <summary>Finished, Sim Changed</summary>
  124. FinishedViaNewSim = 1 << 28,
  125. /// <summary>Finished, Same Sim</summary>
  126. FinishedViaSameSim = 1 << 29,
  127. /// <summary>Agent coming into the grid from another grid</summary>
  128. ViaHGLogin = 1 << 30,
  129. notViaHGLogin = 0xbffffff
  130. }
  131. }
  132. }