1
0

Constants.cs 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. namespace OpenSim.Framework
  29. {
  30. public class Constants
  31. {
  32. // 'RegionSize' is the legacy region size.
  33. // DO NOT USE THIS FOR ANY NEW CODE. Use Scene.RegionInfo.RegionSize[XYZ] as a region might not
  34. // be the legacy region size.
  35. public const uint RegionSize = 256;
  36. public const uint RegionHeight = 4096;
  37. // This could be a parameters but, really, a region of greater than this is pretty unmanageable
  38. public const uint MaximumRegionSize = 8192;
  39. // Since terrain is stored in 16x16 heights, regions must be a multiple of this number and that is the minimum
  40. public const int MinRegionSize = 16;
  41. public const int TerrainPatchSize = 16;
  42. public const string DefaultTexture = "89556747-24cb-43ed-920b-47caed15465f";
  43. public enum EstateAccessCodex : uint
  44. {
  45. AllowedAccess = 1,
  46. AllowedGroups = 2,
  47. EstateBans = 4,
  48. EstateManagers = 8
  49. }
  50. public enum EstateAccessLimits : int
  51. {
  52. AllowedAccess = 500,
  53. AllowedGroups = 63,
  54. EstateBans = 500,
  55. EstateManagers = 10
  56. }
  57. [Flags]public enum TeleportFlags : uint
  58. {
  59. /// <summary>No flags set, or teleport failed</summary>
  60. Default = 0,
  61. /// <summary>Set when newbie leaves help island for first time</summary>
  62. SetHomeToTarget = 1 << 0,
  63. /// <summary></summary>
  64. SetLastToTarget = 1 << 1,
  65. /// <summary>Via Lure</summary>
  66. ViaLure = 1 << 2,
  67. /// <summary>Via Landmark</summary>
  68. ViaLandmark = 1 << 3,
  69. /// <summary>Via Location</summary>
  70. ViaLocation = 1 << 4,
  71. /// <summary>Via Home</summary>
  72. ViaHome = 1 << 5,
  73. /// <summary>Via Telehub</summary>
  74. ViaTelehub = 1 << 6,
  75. /// <summary>Via Login</summary>
  76. ViaLogin = 1 << 7,
  77. /// <summary>Linden Summoned</summary>
  78. ViaGodlikeLure = 1 << 8,
  79. /// <summary>Linden Forced me</summary>
  80. Godlike = 1 << 9,
  81. /// <summary></summary>
  82. NineOneOne = 1 << 10,
  83. /// <summary>Agent Teleported Home via Script</summary>
  84. DisableCancel = 1 << 11,
  85. /// <summary></summary>
  86. ViaRegionID = 1 << 12,
  87. /// <summary></summary>
  88. IsFlying = 1 << 13,
  89. /// <summary></summary>
  90. ResetHome = 1 << 14,
  91. /// <summary>forced to new location for example when avatar is banned or ejected</summary>
  92. ForceRedirect = 1 << 15,
  93. /// <summary>Teleport Finished via a Lure</summary>
  94. FinishedViaLure = 1 << 26,
  95. /// <summary>Finished, Sim Changed</summary>
  96. FinishedViaNewSim = 1 << 28,
  97. /// <summary>Finished, Same Sim</summary>
  98. FinishedViaSameSim = 1 << 29,
  99. /// <summary>Agent coming into the grid from another grid</summary>
  100. ViaHGLogin = 1 << 30
  101. }
  102. }
  103. }