Enables script access to the per object dynamic attributes through the JsonStore

script functions. Adds JsonAttachObjectStore to associate a store identifier with
an object (scripts can only access the store in their host object, this could be
extended but isn't necessary for now).

Note this opens a method to the DAMap OSDMap. This will be removed later, but
greatly simplifies the code for now.

The JsonStore and these scripts are disabled by default.
This commit is contained in:
Mic Bowman
2013-02-06 17:29:17 -08:00
parent 67d92e4e16
commit e17392acbb
5 changed files with 104 additions and 13 deletions

View File

@@ -169,6 +169,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
m_comms.RegisterScriptInvocations(this);
// m_comms.RegisterScriptInvocation(this, "JsonCreateStore");
// m_comms.RegisterScriptInvocation(this, "JsonAttachObjectStore");
// m_comms.RegisterScriptInvocation(this, "JsonDestroyStore");
// m_comms.RegisterScriptInvocation(this, "JsonTestStore");
@@ -214,6 +215,21 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
#endregion
#region ScriptInvocationInteface
// -----------------------------------------------------------------
/// <summary>
///
/// </summary>
// -----------------------------------------------------------------
[ScriptInvocation]
public UUID JsonAttachObjectStore(UUID hostID, UUID scriptID)
{
UUID uuid = UUID.Zero;
if (! m_store.AttachObjectStore(hostID))
GenerateRuntimeError("Failed to create Json store");
return hostID;
}
// -----------------------------------------------------------------
/// <summary>
///