Commit Graph

33 Commits (df7468ffa27b46f074b0f9c6d6c7be4e09164c88)

Author SHA1 Message Date
UbitUmarov 8b1a174430 ****DANGER**** try to make LSL_Types.key to work. bin/ScriptEngines contents must be deleted to recompile scripts. Needs more testing on all uses of key type ****DANGER**** 2016-09-21 14:04:23 +01:00
UbitUmarov 371c9dd2af bad merge? 2015-09-01 14:54:35 +01:00
Melanie Thielker 662b59af83 Convert the lsl list type into a struct. EXPERIMENTAL! This may affect
the llSetPrimitiveParams family of functions adversely. Please test!
2015-08-19 23:14:11 +02:00
Melanie Thielker c53f732163 Change the IScriptApi back to it's original form, removing XEngine
specific additions that should not have been there in the first place.
Sleeping and time measurement are now completely internal to XEngine
2015-08-17 21:46:30 +02:00
Melanie Thielker ee7debcca6 Revert "When scripts are sleeping, don't count that as execution time"
The approach is good but the way it is written breaks the architecture.
Rewrite follows.

This reverts commit a568f06b7f.
2015-08-17 18:11:45 +02:00
Oren Hurvitz a568f06b7f When scripts are sleeping, don't count that as execution time
Sleeping doesn't use the CPU.
2015-08-11 08:44:27 +01:00
Melanie 005c69511d Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
	OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
	OpenSim/Region/Framework/Scenes/Scene.cs
2013-08-07 23:29:42 +01:00
Robert Adams 87ee0c395e Fix problem with modInvoke defined integer constants being build into
scripts as boxed integers rather than proper reference to a new LSLInteger.
This fixes an exception when using a registered integer constant in
a script.
2013-08-02 09:44:01 -07:00
Melanie 70f0587558 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
2013-03-08 01:07:05 +00:00
Mic Bowman 30e06b0742 Convert doubles passed back through the MOD interface into LSL_Floats 2013-03-05 20:32:06 -08:00
Melanie 339d8ef2a6 Merge branch 'avination' into careminster
Conflicts:
	OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
2013-03-06 00:15:54 +00:00
root 82ac1763fb Add support for void return type 2013-03-03 22:50:20 +01:00
Diva Canto 3cc3a8e5bf Removed duplicate 'using' statement. 2013-02-27 21:12:27 -08:00
Justin Clark-Casey (justincc) 562067eb16 Fix bug where viewers would not see the "Module command functions not enabled" error if these were disabled and a viewer attempted to call one.
This was not working because the shouter was wrongly signalled as an agent rather than a prim
2013-02-05 02:09:21 +00:00
Justin Clark-Casey (justincc) 8a22ac3f94 Pass narrower WaitHandle rather than EventWaitHandle as co-op termination wait handle to script APIs.
APIs don't need to reference any methods on EventWaitHandle
2013-01-23 23:38:08 +00:00
Justin Clark-Casey (justincc) 0963ece25b Implement co-operative script termination if termination comes during a script wait event (llSleep(), etc.)
This makes use of EventWaitHandles since various web references indicate that Thread.Interrupt() can also cause runtime instability.
If co-op termination is enabled, then termination sets the wait handle instead of waiting for a timeout before possibly aborting the thread.
This allows the script to cleanly terminate if it's in a llSleep/LL function delay or the next time it enters such a wait without any timeout period.
Co-op termination is not yet testable since checking for termination request within loops that never trigger a wait is not yet implemented.
This commit, unlike 1b5c41c, passes the wait handle as an extra parameter through IScript.Initialize() instead of passing IScriptInstance itself.
2013-01-16 02:07:43 +00:00
Justin Clark-Casey (justincc) fccb03227e Instead of passing separate engine, part and item components to script APIs, pass down IScriptInstance instead.
This is to allow the future co-operative script thread terminate feature to detect and act upon termination requests.
This splits the assembly and state loading out from the ScriptInstance() constructor to a separate Load() method
in order to facilititate continued script logic regression testing.
2013-01-15 21:13:22 +00:00
Justin Clark-Casey (justincc) 1b3b7a61ac minor: Add comment as to why we are pulcking plain old ints out of the LSL_List when converting values from LSL for modInvoke() 2012-10-26 01:50:46 +01:00
SignpostMarv ecdb88679e Removing the apparently superfluous explicit namespace reference so that the if-else-if-else block in ConvertFromLSL can have a consistent appearance 2012-10-26 01:43:54 +01:00
SignpostMarv 01972cc9e8 system ints can end up in LSL lists, which can cause counter-intuitive unknown list element type errors in ConvertFromLSL (via modInvoke) 2012-10-26 01:43:53 +01:00
Justin Clark-Casey (justincc) d9aaf51561 When scripts generate expected exceptions (e.g. due to checked bad parameter) throw ScriptException instead of just a plain old exception.
This is to make it easier to distinguish these exceptions from unexpected OpenSimulator problems internally and in regression tests.
No functional changes.
2012-10-25 02:52:20 +01:00
SignpostMarv 8db5d79f4b passing in the function name to MOD_Api.ConvertFromLSL for more user-friendly error messages 2012-09-10 13:15:32 +01:00
Mic Bowman 641b08aa78 Enables cast from int to float for MOD* functions;
Thanks SignpostMarv!
2012-09-05 09:13:16 -07:00
SignpostMarv fb84ff96a9 implicit operators mean one does not need to instantiate new objects manually 2012-08-18 18:29:59 +01:00
SignpostMarv 5d7751da89 refactoring for Vector3 operator & constructor tweaks 2012-08-18 13:21:55 +01:00
Mic Bowman a4281ca014 Enables support for UUIDs to be returned in lists from
modInvoke commands.

Thanks SignpostMarv!!!
2012-07-20 10:48:51 -07:00
Justin Clark-Casey (justincc) 6406d5a5b9 refactor: Eliminate local id parameter from api initialize.
This is always available from m_host.LocalId
2012-05-08 23:20:27 +01:00
Justin Clark-Casey (justincc) 01b78235db Instead of constantly looking up unchanging self item in script code, pass in self item on initialization. 2012-05-08 23:05:01 +01:00
Melanie 7e0936e4b6 Add a hust UUID to the script invocations 2012-03-26 14:19:55 +01:00
Mic Bowman a14437ad5a Add support for key, vector, rotation and list types for both
arguments and return values to the modInvoke family of functions.

See http://opensimulator.org/wiki/OSSL_Script_Library/ModInvoke
2012-03-24 22:43:42 -07:00
Mic Bowman 402ff75d78 Adds a new script command 'modInvoke' to invoke registered functions
from region modules. The LSL translator is extended to generate the
modInvoke format of commands for directly inlined function calls.

A region module can register a function Test() with the name "Test".
LSL code can call that function as "Test()". The compiler will translate
that invocation into modInvoke("Test", ...)
2012-03-15 13:16:02 -07:00
Melanie ba99081bbe Add IScriptModuleComms interface and region module to handle dispatch of
script messages to region modules and sending back replies.
Hook IScriptModuleComms.OnScriptCommand to see commands and use
DispatchReply to reply to the script. It is recommended to pass the "id"
parameter from the event as the "k" parameter of the reply.
The script will receive the reply as a link message from link -1.
2009-11-10 03:36:43 +00:00
Melanie 7df7e6a0bb Add modSendCommand function (note, this is a new API module, using the API
extension mechanism, it's not a osFunction!
2009-11-10 01:22:14 +00:00