Add lsClearWindlightScene() to the lightshare module to remove WL settings
from a region and allow normal day cycles to be reestablishedviewer-2-initial-appearance
parent
4ab9d37a8e
commit
6c3b7617b0
|
@ -705,6 +705,9 @@ VALUES
|
||||||
//Return default LL windlight settings
|
//Return default LL windlight settings
|
||||||
return new RegionLightShareData();
|
return new RegionLightShareData();
|
||||||
}
|
}
|
||||||
|
public void RemoveRegionWindlightSettings(UUID regionID)
|
||||||
|
{
|
||||||
|
}
|
||||||
public void StoreRegionWindlightSettings(RegionLightShareData wl)
|
public void StoreRegionWindlightSettings(RegionLightShareData wl)
|
||||||
{
|
{
|
||||||
//This connector doesn't support the windlight module yet
|
//This connector doesn't support the windlight module yet
|
||||||
|
|
|
@ -965,6 +965,21 @@ namespace OpenSim.Data.MySQL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RemoveRegionWindlightSettings(UUID regionID)
|
||||||
|
{
|
||||||
|
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||||
|
{
|
||||||
|
dbcon.Open();
|
||||||
|
|
||||||
|
using (MySqlCommand cmd = dbcon.CreateCommand())
|
||||||
|
{
|
||||||
|
cmd.CommandText = "delete from `regionwindlight` where `region_id`=?regionID";
|
||||||
|
cmd.Parameters.AddWithValue("?regionID", regionID.ToString());
|
||||||
|
ExecuteNonQuery(cmd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void StoreRegionSettings(RegionSettings rs)
|
public void StoreRegionSettings(RegionSettings rs)
|
||||||
{
|
{
|
||||||
lock (m_dbLock)
|
lock (m_dbLock)
|
||||||
|
|
|
@ -56,6 +56,9 @@ namespace OpenSim.Data.Null
|
||||||
//Return default LL windlight settings
|
//Return default LL windlight settings
|
||||||
return new RegionLightShareData();
|
return new RegionLightShareData();
|
||||||
}
|
}
|
||||||
|
public void RemoveRegionWindlightSettings(UUID regionID)
|
||||||
|
{
|
||||||
|
}
|
||||||
public void StoreRegionWindlightSettings(RegionLightShareData wl)
|
public void StoreRegionWindlightSettings(RegionLightShareData wl)
|
||||||
{
|
{
|
||||||
//This connector doesn't support the windlight module yet
|
//This connector doesn't support the windlight module yet
|
||||||
|
|
|
@ -323,6 +323,9 @@ namespace OpenSim.Data.SQLite
|
||||||
//Return default LL windlight settings
|
//Return default LL windlight settings
|
||||||
return new RegionLightShareData();
|
return new RegionLightShareData();
|
||||||
}
|
}
|
||||||
|
public void RemoveRegionWindlightSettings(UUID regionID)
|
||||||
|
{
|
||||||
|
}
|
||||||
public void StoreRegionWindlightSettings(RegionLightShareData wl)
|
public void StoreRegionWindlightSettings(RegionLightShareData wl)
|
||||||
{
|
{
|
||||||
//This connector doesn't support the windlight module yet
|
//This connector doesn't support the windlight module yet
|
||||||
|
|
|
@ -286,6 +286,9 @@ namespace OpenSim.Data.SQLiteLegacy
|
||||||
//Return default LL windlight settings
|
//Return default LL windlight settings
|
||||||
return new RegionLightShareData();
|
return new RegionLightShareData();
|
||||||
}
|
}
|
||||||
|
public void RemoveRegionWindlightSettings(UUID regionID)
|
||||||
|
{
|
||||||
|
}
|
||||||
public void StoreRegionWindlightSettings(RegionLightShareData wl)
|
public void StoreRegionWindlightSettings(RegionLightShareData wl)
|
||||||
{
|
{
|
||||||
//This connector doesn't support the windlight module yet
|
//This connector doesn't support the windlight module yet
|
||||||
|
|
|
@ -94,5 +94,6 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
RegionSettings LoadRegionSettings(UUID regionUUID);
|
RegionSettings LoadRegionSettings(UUID regionUUID);
|
||||||
RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID);
|
RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID);
|
||||||
void StoreRegionWindlightSettings(RegionLightShareData wl);
|
void StoreRegionWindlightSettings(RegionLightShareData wl);
|
||||||
|
void RemoveRegionWindlightSettings(UUID regionID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,6 +105,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
RegionSettings LoadRegionSettings(UUID regionUUID);
|
RegionSettings LoadRegionSettings(UUID regionUUID);
|
||||||
RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID);
|
RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID);
|
||||||
void StoreRegionWindlightSettings(RegionLightShareData wl);
|
void StoreRegionWindlightSettings(RegionLightShareData wl);
|
||||||
|
void RemoveRegionWindlightSettings(UUID regionID);
|
||||||
|
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
}
|
}
|
||||||
|
|
|
@ -466,6 +466,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
public void lsClearWindlightScene()
|
||||||
|
{
|
||||||
|
if (!m_LSFunctionsEnabled)
|
||||||
|
{
|
||||||
|
LSShoutError("LightShare functions are not enabled.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!World.RegionInfo.EstateSettings.IsEstateManager(m_host.OwnerID) && World.GetScenePresence(m_host.OwnerID).GodLevel < 200)
|
||||||
|
{
|
||||||
|
LSShoutError("lsSetWindlightScene can only be used by estate managers or owners.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_host.ParentGroup.Scene.RegionInfo.WindlightSettings.valid = false;
|
||||||
|
if (m_host.ParentGroup.Scene.SimulationDataService != null)
|
||||||
|
m_host.ParentGroup.Scene.SimulationDataService.RemoveRegionWindlightSettings(m_host.ParentGroup.Scene.RegionInfo.RegionID);
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set the current Windlight scene to a target avatar
|
/// Set the current Windlight scene to a target avatar
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -44,5 +44,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
LSL_List lsGetWindlightScene(LSL_List rules);
|
LSL_List lsGetWindlightScene(LSL_List rules);
|
||||||
int lsSetWindlightScene(LSL_List rules);
|
int lsSetWindlightScene(LSL_List rules);
|
||||||
int lsSetWindlightSceneTargeted(LSL_List rules, key target);
|
int lsSetWindlightSceneTargeted(LSL_List rules, key target);
|
||||||
|
void lsClearWindlightScene();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,5 +72,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
{
|
{
|
||||||
return m_LS_Functions.lsSetWindlightSceneTargeted(rules, target);
|
return m_LS_Functions.lsSetWindlightSceneTargeted(rules, target);
|
||||||
}
|
}
|
||||||
|
public void lsClearWindlightScene()
|
||||||
|
{
|
||||||
|
m_LS_Functions.lsClearWindlightScene();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,5 +144,9 @@ namespace OpenSim.Services.Connectors
|
||||||
{
|
{
|
||||||
m_database.StoreRegionWindlightSettings(wl);
|
m_database.StoreRegionWindlightSettings(wl);
|
||||||
}
|
}
|
||||||
|
public void RemoveRegionWindlightSettings(UUID regionID)
|
||||||
|
{
|
||||||
|
m_database.RemoveRegionWindlightSettings(regionID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,6 +104,10 @@ namespace OpenSim.Data.Null
|
||||||
return m_store.LoadRegionWindlightSettings(regionUUID);
|
return m_store.LoadRegionWindlightSettings(regionUUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RemoveRegionWindlightSettings(UUID regionID)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public void StoreRegionWindlightSettings(RegionLightShareData wl)
|
public void StoreRegionWindlightSettings(RegionLightShareData wl)
|
||||||
{
|
{
|
||||||
m_store.StoreRegionWindlightSettings(wl);
|
m_store.StoreRegionWindlightSettings(wl);
|
||||||
|
@ -146,6 +150,10 @@ namespace OpenSim.Data.Null
|
||||||
return new RegionLightShareData();
|
return new RegionLightShareData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RemoveRegionWindlightSettings(UUID regionID)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public void StoreRegionWindlightSettings(RegionLightShareData wl)
|
public void StoreRegionWindlightSettings(RegionLightShareData wl)
|
||||||
{
|
{
|
||||||
//This connector doesn't support the windlight module yet
|
//This connector doesn't support the windlight module yet
|
||||||
|
@ -274,4 +282,4 @@ namespace OpenSim.Data.Null
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue