mirror of
https://github.com/opensim/opensim.git
synced 2026-07-20 06:35:39 +08:00
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:
@@ -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>
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user