diff options
author | Sean Dague | 2008-07-23 15:50:32 +0000 |
---|---|---|
committer | Sean Dague | 2008-07-23 15:50:32 +0000 |
commit | 090159defc731fca252b2b3520364712760f0f4e (patch) | |
tree | 78fe9dde5a9902d67aa6d1690cf575d778d154f2 /OpenSim/Region/ScriptEngine/Common | |
parent | Send Animation data for other avatars to new users joining the region (tested... (diff) | |
download | opensim-SC_OLD-090159defc731fca252b2b3520364712760f0f4e.zip opensim-SC_OLD-090159defc731fca252b2b3520364712760f0f4e.tar.gz opensim-SC_OLD-090159defc731fca252b2b3520364712760f0f4e.tar.bz2 opensim-SC_OLD-090159defc731fca252b2b3520364712760f0f4e.tar.xz |
refactored LandData to use properties, and cleaned up the naming on
the properties a bit to be more consistant with other objects (having things
like .Name .Description, etc).
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index da1e511..b8a214a 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -4334,9 +4334,9 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4334 | ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y); | 4334 | ILandObject parcel = World.LandChannel.GetLandObject(av.AbsolutePosition.X, av.AbsolutePosition.Y); |
4335 | if (parcel != null) | 4335 | if (parcel != null) |
4336 | { | 4336 | { |
4337 | if (m_host.ObjectOwner == parcel.landData.ownerID || | 4337 | if (m_host.ObjectOwner == parcel.landData.OwnerID || |
4338 | (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.groupID | 4338 | (m_host.OwnerID == m_host.GroupID && m_host.GroupID == parcel.landData.GroupID |
4339 | && parcel.landData.isGroupOwned) || World.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID)) | 4339 | && parcel.landData.IsGroupOwned) || World.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID)) |
4340 | { | 4340 | { |
4341 | av.StandUp(); | 4341 | av.StandUp(); |
4342 | } | 4342 | } |
@@ -4702,7 +4702,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4702 | m_host.AddScriptLPS(1); | 4702 | m_host.AddScriptLPS(1); |
4703 | LLUUID key; | 4703 | LLUUID key; |
4704 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; | 4704 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; |
4705 | if (land.ownerID == m_host.OwnerID) | 4705 | if (land.OwnerID == m_host.OwnerID) |
4706 | { | 4706 | { |
4707 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); | 4707 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); |
4708 | if (LLUUID.TryParse(avatar, out key)) | 4708 | if (LLUUID.TryParse(avatar, out key)) |
@@ -4710,7 +4710,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4710 | entry.AgentID = key; | 4710 | entry.AgentID = key; |
4711 | entry.Flags = ParcelManager.AccessList.Access; | 4711 | entry.Flags = ParcelManager.AccessList.Access; |
4712 | entry.Time = DateTime.Now.AddHours(hours); | 4712 | entry.Time = DateTime.Now.AddHours(hours); |
4713 | land.parcelAccessList.Add(entry); | 4713 | land.ParcelAccessList.Add(entry); |
4714 | } | 4714 | } |
4715 | } | 4715 | } |
4716 | } | 4716 | } |
@@ -6852,7 +6852,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6852 | m_host.AddScriptLPS(1); | 6852 | m_host.AddScriptLPS(1); |
6853 | LLUUID key; | 6853 | LLUUID key; |
6854 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; | 6854 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; |
6855 | if (land.ownerID == m_host.OwnerID) | 6855 | if (land.OwnerID == m_host.OwnerID) |
6856 | { | 6856 | { |
6857 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); | 6857 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); |
6858 | if (LLUUID.TryParse(avatar, out key)) | 6858 | if (LLUUID.TryParse(avatar, out key)) |
@@ -6860,7 +6860,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6860 | entry.AgentID = key; | 6860 | entry.AgentID = key; |
6861 | entry.Flags = ParcelManager.AccessList.Ban; | 6861 | entry.Flags = ParcelManager.AccessList.Ban; |
6862 | entry.Time = DateTime.Now.AddHours(hours); | 6862 | entry.Time = DateTime.Now.AddHours(hours); |
6863 | land.parcelAccessList.Add(entry); | 6863 | land.ParcelAccessList.Add(entry); |
6864 | } | 6864 | } |
6865 | } | 6865 | } |
6866 | } | 6866 | } |
@@ -6870,15 +6870,15 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6870 | m_host.AddScriptLPS(1); | 6870 | m_host.AddScriptLPS(1); |
6871 | LLUUID key; | 6871 | LLUUID key; |
6872 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; | 6872 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; |
6873 | if (land.ownerID == m_host.OwnerID) | 6873 | if (land.OwnerID == m_host.OwnerID) |
6874 | { | 6874 | { |
6875 | if (LLUUID.TryParse(avatar, out key)) | 6875 | if (LLUUID.TryParse(avatar, out key)) |
6876 | { | 6876 | { |
6877 | foreach (ParcelManager.ParcelAccessEntry entry in land.parcelAccessList) | 6877 | foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) |
6878 | { | 6878 | { |
6879 | if (entry.AgentID == key && entry.Flags == ParcelManager.AccessList.Access) | 6879 | if (entry.AgentID == key && entry.Flags == ParcelManager.AccessList.Access) |
6880 | { | 6880 | { |
6881 | land.parcelAccessList.Remove(entry); | 6881 | land.ParcelAccessList.Remove(entry); |
6882 | break; | 6882 | break; |
6883 | } | 6883 | } |
6884 | } | 6884 | } |
@@ -6891,15 +6891,15 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6891 | m_host.AddScriptLPS(1); | 6891 | m_host.AddScriptLPS(1); |
6892 | LLUUID key; | 6892 | LLUUID key; |
6893 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; | 6893 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; |
6894 | if (land.ownerID == m_host.OwnerID) | 6894 | if (land.OwnerID == m_host.OwnerID) |
6895 | { | 6895 | { |
6896 | if (LLUUID.TryParse(avatar, out key)) | 6896 | if (LLUUID.TryParse(avatar, out key)) |
6897 | { | 6897 | { |
6898 | foreach (ParcelManager.ParcelAccessEntry entry in land.parcelAccessList) | 6898 | foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) |
6899 | { | 6899 | { |
6900 | if (entry.AgentID == key && entry.Flags == ParcelManager.AccessList.Ban) | 6900 | if (entry.AgentID == key && entry.Flags == ParcelManager.AccessList.Ban) |
6901 | { | 6901 | { |
6902 | land.parcelAccessList.Remove(entry); | 6902 | land.ParcelAccessList.Remove(entry); |
6903 | break; | 6903 | break; |
6904 | } | 6904 | } |
6905 | } | 6905 | } |
@@ -6961,7 +6961,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
6961 | public LSL_Types.LSLInteger llGetParcelFlags(LSL_Types.Vector3 pos) | 6961 | public LSL_Types.LSLInteger llGetParcelFlags(LSL_Types.Vector3 pos) |
6962 | { | 6962 | { |
6963 | m_host.AddScriptLPS(1); | 6963 | m_host.AddScriptLPS(1); |
6964 | return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.landFlags; | 6964 | return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.Flags; |
6965 | } | 6965 | } |
6966 | 6966 | ||
6967 | public LSL_Types.LSLInteger llGetRegionFlags() | 6967 | public LSL_Types.LSLInteger llGetRegionFlags() |
@@ -7038,13 +7038,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7038 | { | 7038 | { |
7039 | m_host.AddScriptLPS(1); | 7039 | m_host.AddScriptLPS(1); |
7040 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; | 7040 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; |
7041 | if (land.ownerID == m_host.OwnerID) | 7041 | if (land.OwnerID == m_host.OwnerID) |
7042 | { | 7042 | { |
7043 | foreach (ParcelManager.ParcelAccessEntry entry in land.parcelAccessList) | 7043 | foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) |
7044 | { | 7044 | { |
7045 | if (entry.Flags == ParcelManager.AccessList.Ban) | 7045 | if (entry.Flags == ParcelManager.AccessList.Ban) |
7046 | { | 7046 | { |
7047 | land.parcelAccessList.Remove(entry); | 7047 | land.ParcelAccessList.Remove(entry); |
7048 | } | 7048 | } |
7049 | } | 7049 | } |
7050 | } | 7050 | } |
@@ -7054,13 +7054,13 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7054 | { | 7054 | { |
7055 | m_host.AddScriptLPS(1); | 7055 | m_host.AddScriptLPS(1); |
7056 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; | 7056 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; |
7057 | if (land.ownerID == m_host.OwnerID) | 7057 | if (land.OwnerID == m_host.OwnerID) |
7058 | { | 7058 | { |
7059 | foreach (ParcelManager.ParcelAccessEntry entry in land.parcelAccessList) | 7059 | foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) |
7060 | { | 7060 | { |
7061 | if (entry.Flags == ParcelManager.AccessList.Access) | 7061 | if (entry.Flags == ParcelManager.AccessList.Access) |
7062 | { | 7062 | { |
7063 | land.parcelAccessList.Remove(entry); | 7063 | land.ParcelAccessList.Remove(entry); |
7064 | } | 7064 | } |
7065 | } | 7065 | } |
7066 | } | 7066 | } |
@@ -7083,7 +7083,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7083 | { | 7083 | { |
7084 | if (category == 0) | 7084 | if (category == 0) |
7085 | { | 7085 | { |
7086 | return land.simwidePrims; | 7086 | return land.SimwidePrims; |
7087 | } | 7087 | } |
7088 | 7088 | ||
7089 | else | 7089 | else |
@@ -7102,22 +7102,22 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7102 | 7102 | ||
7103 | else if (category == 1)//Owner Prims | 7103 | else if (category == 1)//Owner Prims |
7104 | { | 7104 | { |
7105 | return land.ownerPrims; | 7105 | return land.OwnerPrims; |
7106 | } | 7106 | } |
7107 | 7107 | ||
7108 | else if (category == 2)//Group Prims | 7108 | else if (category == 2)//Group Prims |
7109 | { | 7109 | { |
7110 | return land.groupPrims; | 7110 | return land.GroupPrims; |
7111 | } | 7111 | } |
7112 | 7112 | ||
7113 | else if (category == 3)//Other Prims | 7113 | else if (category == 3)//Other Prims |
7114 | { | 7114 | { |
7115 | return land.otherPrims; | 7115 | return land.OtherPrims; |
7116 | } | 7116 | } |
7117 | 7117 | ||
7118 | else if (category == 4)//Selected | 7118 | else if (category == 4)//Selected |
7119 | { | 7119 | { |
7120 | return land.selectedPrims; | 7120 | return land.SelectedPrims; |
7121 | } | 7121 | } |
7122 | 7122 | ||
7123 | else if (category == 5)//Temp | 7123 | else if (category == 5)//Temp |
@@ -7175,14 +7175,14 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7175 | 7175 | ||
7176 | if (sim_wide == 1) | 7176 | if (sim_wide == 1) |
7177 | { | 7177 | { |
7178 | decimal v = land.simwideArea * (decimal)(0.22) * (decimal)bonusfactor; | 7178 | decimal v = land.SimwideArea * (decimal)(0.22) * (decimal)bonusfactor; |
7179 | 7179 | ||
7180 | return (int)v; | 7180 | return (int)v; |
7181 | } | 7181 | } |
7182 | 7182 | ||
7183 | else | 7183 | else |
7184 | { | 7184 | { |
7185 | decimal v = land.area * (decimal)(0.22) * (decimal)bonusfactor; | 7185 | decimal v = land.Area * (decimal)(0.22) * (decimal)bonusfactor; |
7186 | 7186 | ||
7187 | return (int)v; | 7187 | return (int)v; |
7188 | } | 7188 | } |
@@ -7203,19 +7203,19 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
7203 | switch (o.ToString()) | 7203 | switch (o.ToString()) |
7204 | { | 7204 | { |
7205 | case "0": | 7205 | case "0": |
7206 | ret = ret + new LSL_Types.list(land.landName); | 7206 | ret = ret + new LSL_Types.list(land.Name); |
7207 | break; | 7207 | break; |
7208 | case "1": | 7208 | case "1": |
7209 | ret = ret + new LSL_Types.list(land.landDesc); | 7209 | ret = ret + new LSL_Types.list(land.Description); |
7210 | break; | 7210 | break; |
7211 | case "2": | 7211 | case "2": |
7212 | ret = ret + new LSL_Types.list(land.ownerID.ToString()); | 7212 | ret = ret + new LSL_Types.list(land.OwnerID.ToString()); |
7213 | break; | 7213 | break; |
7214 | case "3": | 7214 | case "3": |
7215 | ret = ret + new LSL_Types.list(land.groupID.ToString()); | 7215 | ret = ret + new LSL_Types.list(land.GroupID.ToString()); |
7216 | break; | 7216 | break; |
7217 | case "4": | 7217 | case "4": |
7218 | ret = ret + new LSL_Types.list(land.area); | 7218 | ret = ret + new LSL_Types.list(land.Area); |
7219 | break; | 7219 | break; |
7220 | default: | 7220 | default: |
7221 | ret = ret + new LSL_Types.list(0); | 7221 | ret = ret + new LSL_Types.list(0); |