mirror of
https://github.com/opensim/opensim.git
synced 2026-05-15 03:15:41 +08:00
Add llGetNotecardLineSync
This commit is contained in:
@@ -14985,6 +14985,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return tid.ToString();
|
||||
}
|
||||
|
||||
public LSL_String llGetNotecardLineSync(string name, int line)
|
||||
{
|
||||
if (!UUID.TryParse(name, out UUID assetID))
|
||||
{
|
||||
TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name);
|
||||
|
||||
if (item != null && item.Type == 7)
|
||||
assetID = item.AssetID;
|
||||
else
|
||||
{
|
||||
Error("llGetNotecardLineSync", "Can't find notecard '" + name + "'");
|
||||
|
||||
return ScriptBaseClass.NAK;
|
||||
}
|
||||
}
|
||||
|
||||
if (NotecardCache.IsCached(assetID))
|
||||
{
|
||||
return NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax);
|
||||
}
|
||||
else
|
||||
{
|
||||
return ScriptBaseClass.NAK;
|
||||
}
|
||||
}
|
||||
|
||||
public LSL_Key llGetNotecardLine(string name, int line)
|
||||
{
|
||||
if (!UUID.TryParse(name, out UUID assetID))
|
||||
|
||||
@@ -176,6 +176,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
void llGetNextEmail(string address, string subject);
|
||||
LSL_Key llGetNotecardLine(string name, int line);
|
||||
LSL_Key llGetNumberOfNotecardLines(string name);
|
||||
LSL_String llGetNotecardLineSync(string name, int line);
|
||||
LSL_Integer llGetNumberOfPrims();
|
||||
LSL_Integer llGetNumberOfSides();
|
||||
LSL_String llGetObjectDesc();
|
||||
|
||||
@@ -609,6 +609,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
|
||||
public const string NULL_KEY = "00000000-0000-0000-0000-000000000000";
|
||||
public const string EOF = "\n\n\n";
|
||||
public const string NAK = "\n\u0015\n";
|
||||
public const double PI = 3.14159274f;
|
||||
public const double TWO_PI = 6.28318548f;
|
||||
public const double PI_BY_TWO = 1.57079637f;
|
||||
|
||||
@@ -758,6 +758,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
return m_LSL_Functions.llGetNumberOfNotecardLines(name);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public LSL_String llGetNotecardLineSync(string name, int line)
|
||||
{
|
||||
return m_LSL_Functions.llGetNotecardLineSync(name, line);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public LSL_Integer llGetNumberOfPrims()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user