add osGetPSTWallclock() returns wall clock in PST or PDT, for those that for some odd reason think need it. OpenSim girds shoudl use UTC (gtm) but whatever
parent
539a3a9273
commit
b104934a25
|
@ -145,6 +145,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
protected IUrlModule m_UrlModule = null;
|
protected IUrlModule m_UrlModule = null;
|
||||||
protected ISoundModule m_SoundModule = null;
|
protected ISoundModule m_SoundModule = null;
|
||||||
internal IConfig m_osslconfig;
|
internal IConfig m_osslconfig;
|
||||||
|
internal TimeZoneInfo PSTTimeZone = null;
|
||||||
|
|
||||||
public void Initialize(
|
public void Initialize(
|
||||||
IScriptEngine scriptEngine, SceneObjectPart host, TaskInventoryItem item)
|
IScriptEngine scriptEngine, SceneObjectPart host, TaskInventoryItem item)
|
||||||
|
@ -201,6 +202,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
PSTTimeZone = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time");
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
PSTTimeZone = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Object InitializeLifetimeService()
|
public override Object InitializeLifetimeService()
|
||||||
|
@ -5441,5 +5451,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return String.Empty;
|
return String.Empty;
|
||||||
return detectedParams.Key.ToString();
|
return detectedParams.Key.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// returns PST or PDT wall clock
|
||||||
|
public LSL_Float osGetPSTWallclock()
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
if(PSTTimeZone == null)
|
||||||
|
return DateTime.Now.TimeOfDay.TotalSeconds;
|
||||||
|
|
||||||
|
DateTime time = TimeZoneInfo.ConvertTime(DateTime.UtcNow, PSTTimeZone);
|
||||||
|
return time.TimeOfDay.TotalSeconds;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -549,5 +549,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
LSL_String osGetInventoryName(LSL_Key itemId);
|
LSL_String osGetInventoryName(LSL_Key itemId);
|
||||||
LSL_String osGetInventoryDesc(LSL_String itemNameOrId);
|
LSL_String osGetInventoryDesc(LSL_String itemNameOrId);
|
||||||
LSL_Key osGetLastChangedEventKey();
|
LSL_Key osGetLastChangedEventKey();
|
||||||
|
LSL_Float osGetPSTWallclock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1381,5 +1381,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
{
|
{
|
||||||
return m_OSSL_Functions.osGetLastChangedEventKey();
|
return m_OSSL_Functions.osGetLastChangedEventKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LSL_Float osGetPSTWallclock()
|
||||||
|
{
|
||||||
|
return m_OSSL_Functions.osGetPSTWallclock();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
20392e48-fad2-094e-bc5b-cda003a1e940
|
e796a21f-5a66-e4ec-833f-c4896b8e87e4
|
||||||
<llsd><map><key>llsd-lsl-syntax-version</key><integer>2</integer>
|
<llsd><map><key>llsd-lsl-syntax-version</key><integer>2</integer>
|
||||||
<key>controls</key>
|
<key>controls</key>
|
||||||
<map>
|
<map>
|
||||||
|
@ -6116,6 +6116,41 @@
|
||||||
<key>arguments</key><array>
|
<key>arguments</key><array>
|
||||||
<map><key>a</key><map><key>type</key><string>float</string></map></map>
|
<map><key>a</key><map><key>type</key><string>float</string></map></map>
|
||||||
<map><key>b</key><map><key>type</key><string>float</string></map></map>
|
<map><key>b</key><map><key>type</key><string>float</string></map></map>
|
||||||
|
<map><key>margin</key><map><key>type</key><string>float</string></map></map>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
<key>osApproxEquals</key>
|
||||||
|
<map>
|
||||||
|
<key>return</key><string>integer</string>
|
||||||
|
<key>arguments</key><array>
|
||||||
|
<map><key>ra</key><map><key>type</key><string>rotation</string></map></map>
|
||||||
|
<map><key>rb</key><map><key>type</key><string>rotation</string></map></map>
|
||||||
|
<map><key>margin</key><map><key>type</key><string>float</string></map></map>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
<key>osApproxEquals</key>
|
||||||
|
<map>
|
||||||
|
<key>return</key><string>integer</string>
|
||||||
|
<key>arguments</key><array>
|
||||||
|
<map><key>ra</key><map><key>type</key><string>rotation</string></map></map>
|
||||||
|
<map><key>rb</key><map><key>type</key><string>rotation</string></map></map>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
<key>osApproxEquals</key>
|
||||||
|
<map>
|
||||||
|
<key>return</key><string>integer</string>
|
||||||
|
<key>arguments</key><array>
|
||||||
|
<map><key>va</key><map><key>type</key><string>vector</string></map></map>
|
||||||
|
<map><key>vb</key><map><key>type</key><string>vector</string></map></map>
|
||||||
|
<map><key>margin</key><map><key>type</key><string>float</string></map></map>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
<key>osApproxEquals</key>
|
||||||
|
<map>
|
||||||
|
<key>return</key><string>integer</string>
|
||||||
|
<key>arguments</key><array>
|
||||||
|
<map><key>va</key><map><key>type</key><string>vector</string></map></map>
|
||||||
|
<map><key>vb</key><map><key>type</key><string>vector</string></map></map>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>osApproxEquals</key>
|
<key>osApproxEquals</key>
|
||||||
|
@ -6124,41 +6159,6 @@
|
||||||
<key>arguments</key><array>
|
<key>arguments</key><array>
|
||||||
<map><key>a</key><map><key>type</key><string>float</string></map></map>
|
<map><key>a</key><map><key>type</key><string>float</string></map></map>
|
||||||
<map><key>b</key><map><key>type</key><string>float</string></map></map>
|
<map><key>b</key><map><key>type</key><string>float</string></map></map>
|
||||||
<map><key>margin</key><map><key>type</key><string>float</string></map></map>
|
|
||||||
</array>
|
|
||||||
</map>
|
|
||||||
<key>osApproxEquals</key>
|
|
||||||
<map>
|
|
||||||
<key>return</key><string>integer</string>
|
|
||||||
<key>arguments</key><array>
|
|
||||||
<map><key>ra</key><map><key>type</key><string>rotation</string></map></map>
|
|
||||||
<map><key>rb</key><map><key>type</key><string>rotation</string></map></map>
|
|
||||||
</array>
|
|
||||||
</map>
|
|
||||||
<key>osApproxEquals</key>
|
|
||||||
<map>
|
|
||||||
<key>return</key><string>integer</string>
|
|
||||||
<key>arguments</key><array>
|
|
||||||
<map><key>va</key><map><key>type</key><string>vector</string></map></map>
|
|
||||||
<map><key>vb</key><map><key>type</key><string>vector</string></map></map>
|
|
||||||
<map><key>margin</key><map><key>type</key><string>float</string></map></map>
|
|
||||||
</array>
|
|
||||||
</map>
|
|
||||||
<key>osApproxEquals</key>
|
|
||||||
<map>
|
|
||||||
<key>return</key><string>integer</string>
|
|
||||||
<key>arguments</key><array>
|
|
||||||
<map><key>ra</key><map><key>type</key><string>rotation</string></map></map>
|
|
||||||
<map><key>rb</key><map><key>type</key><string>rotation</string></map></map>
|
|
||||||
<map><key>margin</key><map><key>type</key><string>float</string></map></map>
|
|
||||||
</array>
|
|
||||||
</map>
|
|
||||||
<key>osApproxEquals</key>
|
|
||||||
<map>
|
|
||||||
<key>return</key><string>integer</string>
|
|
||||||
<key>arguments</key><array>
|
|
||||||
<map><key>va</key><map><key>type</key><string>vector</string></map></map>
|
|
||||||
<map><key>vb</key><map><key>type</key><string>vector</string></map></map>
|
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>osAvatarName2Key</key>
|
<key>osAvatarName2Key</key>
|
||||||
|
@ -6284,6 +6284,8 @@
|
||||||
<key>return</key><string>string</string>
|
<key>return</key><string>string</string>
|
||||||
<key>arguments</key><array>
|
<key>arguments</key><array>
|
||||||
<map><key>drawList</key><map><key>type</key><string>string</string></map></map>
|
<map><key>drawList</key><map><key>type</key><string>string</string></map></map>
|
||||||
|
<map><key>startX</key><map><key>type</key><string>integer</string></map></map>
|
||||||
|
<map><key>startY</key><map><key>type</key><string>integer</string></map></map>
|
||||||
<map><key>endX</key><map><key>type</key><string>integer</string></map></map>
|
<map><key>endX</key><map><key>type</key><string>integer</string></map></map>
|
||||||
<map><key>endY</key><map><key>type</key><string>integer</string></map></map>
|
<map><key>endY</key><map><key>type</key><string>integer</string></map></map>
|
||||||
</array>
|
</array>
|
||||||
|
@ -6293,8 +6295,6 @@
|
||||||
<key>return</key><string>string</string>
|
<key>return</key><string>string</string>
|
||||||
<key>arguments</key><array>
|
<key>arguments</key><array>
|
||||||
<map><key>drawList</key><map><key>type</key><string>string</string></map></map>
|
<map><key>drawList</key><map><key>type</key><string>string</string></map></map>
|
||||||
<map><key>startX</key><map><key>type</key><string>integer</string></map></map>
|
|
||||||
<map><key>startY</key><map><key>type</key><string>integer</string></map></map>
|
|
||||||
<map><key>endX</key><map><key>type</key><string>integer</string></map></map>
|
<map><key>endX</key><map><key>type</key><string>integer</string></map></map>
|
||||||
<map><key>endY</key><map><key>type</key><string>integer</string></map></map>
|
<map><key>endY</key><map><key>type</key><string>integer</string></map></map>
|
||||||
</array>
|
</array>
|
||||||
|
@ -6433,13 +6433,13 @@
|
||||||
<map>
|
<map>
|
||||||
<key>arguments</key><array>
|
<key>arguments</key><array>
|
||||||
<map><key>avatar</key><map><key>type</key><string>string</string></map></map>
|
<map><key>avatar</key><map><key>type</key><string>string</string></map></map>
|
||||||
<map><key>target</key><map><key>type</key><string>string</string></map></map>
|
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>osForceOtherSit</key>
|
<key>osForceOtherSit</key>
|
||||||
<map>
|
<map>
|
||||||
<key>arguments</key><array>
|
<key>arguments</key><array>
|
||||||
<map><key>avatar</key><map><key>type</key><string>string</string></map></map>
|
<map><key>avatar</key><map><key>type</key><string>string</string></map></map>
|
||||||
|
<map><key>target</key><map><key>type</key><string>string</string></map></map>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>osFormatString</key>
|
<key>osFormatString</key>
|
||||||
|
@ -6653,6 +6653,11 @@
|
||||||
<map><key>rules</key><map><key>type</key><string>list</string></map></map>
|
<map><key>rules</key><map><key>type</key><string>list</string></map></map>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
|
<key>osGetPSTWallclock</key>
|
||||||
|
<map>
|
||||||
|
<key>return</key><string>float</string>
|
||||||
|
<key>arguments</key><undef/>
|
||||||
|
</map>
|
||||||
<key>osGetRegionMapTexture</key>
|
<key>osGetRegionMapTexture</key>
|
||||||
<map>
|
<map>
|
||||||
<key>return</key><string>key</string>
|
<key>return</key><string>key</string>
|
||||||
|
@ -6865,6 +6870,7 @@
|
||||||
<map><key>name</key><map><key>type</key><string>string</string></map></map>
|
<map><key>name</key><map><key>type</key><string>string</string></map></map>
|
||||||
<map><key>position</key><map><key>type</key><string>vector</string></map></map>
|
<map><key>position</key><map><key>type</key><string>vector</string></map></map>
|
||||||
<map><key>notecard</key><map><key>type</key><string>string</string></map></map>
|
<map><key>notecard</key><map><key>type</key><string>string</string></map></map>
|
||||||
|
<map><key>options</key><map><key>type</key><string>integer</string></map></map>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>osNpcCreate</key>
|
<key>osNpcCreate</key>
|
||||||
|
@ -6875,7 +6881,6 @@
|
||||||
<map><key>name</key><map><key>type</key><string>string</string></map></map>
|
<map><key>name</key><map><key>type</key><string>string</string></map></map>
|
||||||
<map><key>position</key><map><key>type</key><string>vector</string></map></map>
|
<map><key>position</key><map><key>type</key><string>vector</string></map></map>
|
||||||
<map><key>notecard</key><map><key>type</key><string>string</string></map></map>
|
<map><key>notecard</key><map><key>type</key><string>string</string></map></map>
|
||||||
<map><key>options</key><map><key>type</key><string>integer</string></map></map>
|
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>osNpcGetOwner</key>
|
<key>osNpcGetOwner</key>
|
||||||
|
@ -7100,13 +7105,13 @@
|
||||||
<key>osRegionNotice</key>
|
<key>osRegionNotice</key>
|
||||||
<map>
|
<map>
|
||||||
<key>arguments</key><array>
|
<key>arguments</key><array>
|
||||||
<map><key>agentID</key><map><key>type</key><string>key</string></map></map>
|
|
||||||
<map><key>msg</key><map><key>type</key><string>string</string></map></map>
|
<map><key>msg</key><map><key>type</key><string>string</string></map></map>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>osRegionNotice</key>
|
<key>osRegionNotice</key>
|
||||||
<map>
|
<map>
|
||||||
<key>arguments</key><array>
|
<key>arguments</key><array>
|
||||||
|
<map><key>agentID</key><map><key>type</key><string>key</string></map></map>
|
||||||
<map><key>msg</key><map><key>type</key><string>string</string></map></map>
|
<map><key>msg</key><map><key>type</key><string>string</string></map></map>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
|
@ -7478,6 +7483,8 @@
|
||||||
<key>arguments</key><array>
|
<key>arguments</key><array>
|
||||||
<map><key>src</key><map><key>type</key><string>string</string></map></map>
|
<map><key>src</key><map><key>type</key><string>string</string></map></map>
|
||||||
<map><key>value</key><map><key>type</key><string>string</string></map></map>
|
<map><key>value</key><map><key>type</key><string>string</string></map></map>
|
||||||
|
<map><key>start</key><map><key>type</key><string>integer</string></map></map>
|
||||||
|
<map><key>count</key><map><key>type</key><string>integer</string></map></map>
|
||||||
<map><key>ignorecase</key><map><key>type</key><string>integer</string></map></map>
|
<map><key>ignorecase</key><map><key>type</key><string>integer</string></map></map>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
|
@ -7487,8 +7494,6 @@
|
||||||
<key>arguments</key><array>
|
<key>arguments</key><array>
|
||||||
<map><key>src</key><map><key>type</key><string>string</string></map></map>
|
<map><key>src</key><map><key>type</key><string>string</string></map></map>
|
||||||
<map><key>value</key><map><key>type</key><string>string</string></map></map>
|
<map><key>value</key><map><key>type</key><string>string</string></map></map>
|
||||||
<map><key>start</key><map><key>type</key><string>integer</string></map></map>
|
|
||||||
<map><key>count</key><map><key>type</key><string>integer</string></map></map>
|
|
||||||
<map><key>ignorecase</key><map><key>type</key><string>integer</string></map></map>
|
<map><key>ignorecase</key><map><key>type</key><string>integer</string></map></map>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
|
@ -7551,6 +7556,15 @@
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>osTeleportAgent</key>
|
<key>osTeleportAgent</key>
|
||||||
|
<map>
|
||||||
|
<key>arguments</key><array>
|
||||||
|
<map><key>agent</key><map><key>type</key><string>string</string></map></map>
|
||||||
|
<map><key>regionName</key><map><key>type</key><string>string</string></map></map>
|
||||||
|
<map><key>position</key><map><key>type</key><string>vector</string></map></map>
|
||||||
|
<map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
|
<key>osTeleportAgent</key>
|
||||||
<map>
|
<map>
|
||||||
<key>arguments</key><array>
|
<key>arguments</key><array>
|
||||||
<map><key>agent</key><map><key>type</key><string>string</string></map></map>
|
<map><key>agent</key><map><key>type</key><string>string</string></map></map>
|
||||||
|
@ -7568,15 +7582,6 @@
|
||||||
<map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
|
<map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>osTeleportAgent</key>
|
|
||||||
<map>
|
|
||||||
<key>arguments</key><array>
|
|
||||||
<map><key>agent</key><map><key>type</key><string>string</string></map></map>
|
|
||||||
<map><key>regionName</key><map><key>type</key><string>string</string></map></map>
|
|
||||||
<map><key>position</key><map><key>type</key><string>vector</string></map></map>
|
|
||||||
<map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
|
|
||||||
</array>
|
|
||||||
</map>
|
|
||||||
<key>osTeleportObject</key>
|
<key>osTeleportObject</key>
|
||||||
<map>
|
<map>
|
||||||
<key>return</key><string>integer</string>
|
<key>return</key><string>integer</string>
|
||||||
|
@ -7588,13 +7593,6 @@
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
<key>osTeleportOwner</key>
|
<key>osTeleportOwner</key>
|
||||||
<map>
|
|
||||||
<key>arguments</key><array>
|
|
||||||
<map><key>position</key><map><key>type</key><string>vector</string></map></map>
|
|
||||||
<map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
|
|
||||||
</array>
|
|
||||||
</map>
|
|
||||||
<key>osTeleportOwner</key>
|
|
||||||
<map>
|
<map>
|
||||||
<key>arguments</key><array>
|
<key>arguments</key><array>
|
||||||
<map><key>regionName</key><map><key>type</key><string>string</string></map></map>
|
<map><key>regionName</key><map><key>type</key><string>string</string></map></map>
|
||||||
|
@ -7611,6 +7609,13 @@
|
||||||
<map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
|
<map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
|
||||||
</array>
|
</array>
|
||||||
</map>
|
</map>
|
||||||
|
<key>osTeleportOwner</key>
|
||||||
|
<map>
|
||||||
|
<key>arguments</key><array>
|
||||||
|
<map><key>position</key><map><key>type</key><string>vector</string></map></map>
|
||||||
|
<map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
|
||||||
|
</array>
|
||||||
|
</map>
|
||||||
<key>osTerrainFlush</key>
|
<key>osTerrainFlush</key>
|
||||||
<map>
|
<map>
|
||||||
<key>arguments</key><undef/>
|
<key>arguments</key><undef/>
|
||||||
|
|
Loading…
Reference in New Issue