diff options
author | Mic Bowman | 2013-02-06 17:29:17 -0800 |
---|---|---|
committer | Mic Bowman | 2013-02-06 17:29:17 -0800 |
commit | e17392acbb46e1e48e169069a822f8b814762214 (patch) | |
tree | c14427ae1cd4c294addbe220e8916d4b9e068e3d /OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs | |
parent | BulletSim: remove an exception which occurs if a physics mesh (diff) | |
download | opensim-SC-e17392acbb46e1e48e169069a822f8b814762214.zip opensim-SC-e17392acbb46e1e48e169069a822f8b814762214.tar.gz opensim-SC-e17392acbb46e1e48e169069a822f8b814762214.tar.bz2 opensim-SC-e17392acbb46e1e48e169069a822f8b814762214.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs index ec880a7..48b4a9f 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs | |||
@@ -169,6 +169,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore | |||
169 | m_comms.RegisterScriptInvocations(this); | 169 | m_comms.RegisterScriptInvocations(this); |
170 | 170 | ||
171 | // m_comms.RegisterScriptInvocation(this, "JsonCreateStore"); | 171 | // m_comms.RegisterScriptInvocation(this, "JsonCreateStore"); |
172 | // m_comms.RegisterScriptInvocation(this, "JsonAttachObjectStore"); | ||
172 | // m_comms.RegisterScriptInvocation(this, "JsonDestroyStore"); | 173 | // m_comms.RegisterScriptInvocation(this, "JsonDestroyStore"); |
173 | // m_comms.RegisterScriptInvocation(this, "JsonTestStore"); | 174 | // m_comms.RegisterScriptInvocation(this, "JsonTestStore"); |
174 | 175 | ||
@@ -220,6 +221,21 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore | |||
220 | /// </summary> | 221 | /// </summary> |
221 | // ----------------------------------------------------------------- | 222 | // ----------------------------------------------------------------- |
222 | [ScriptInvocation] | 223 | [ScriptInvocation] |
224 | public UUID JsonAttachObjectStore(UUID hostID, UUID scriptID) | ||
225 | { | ||
226 | UUID uuid = UUID.Zero; | ||
227 | if (! m_store.AttachObjectStore(hostID)) | ||
228 | GenerateRuntimeError("Failed to create Json store"); | ||
229 | |||
230 | return hostID; | ||
231 | } | ||
232 | |||
233 | // ----------------------------------------------------------------- | ||
234 | /// <summary> | ||
235 | /// | ||
236 | /// </summary> | ||
237 | // ----------------------------------------------------------------- | ||
238 | [ScriptInvocation] | ||
223 | public UUID JsonCreateStore(UUID hostID, UUID scriptID, string value) | 239 | public UUID JsonCreateStore(UUID hostID, UUID scriptID, string value) |
224 | { | 240 | { |
225 | UUID uuid = UUID.Zero; | 241 | UUID uuid = UUID.Zero; |