Commit Graph

127 Commits (df7468ffa27b46f074b0f9c6d6c7be4e09164c88)

Author SHA1 Message Date
Charles Krinke 947242f476 Mantis#2126. Thank you kindly, Ralphos for a patch that addresses:
Types extracted from a LSL_Types.list have to be down-cast initially 
to the exact type of value type object that the Object actually is.
This would make for very cumbersome, ugly code when extracting list 
parameter items in ll functions where a few implicit conversions 
should be applied such as key -> LSLString and LSLInteger -> LSLFloat 
(but not LSLFloat -> LSLInteger). This patch adds a set of GetXXXItem 
member functions to the LLS_Type.list class, where XXX is the name 
of the LSL_Type to be extracted: LSLFLoat, LSLInteger etc. All take 
a single, int parameter that is the item number to be extracted.
2008-09-05 23:26:35 +00:00
Melanie Thielker ef27c8817f Mantis #2112
Thannk you, ralphos, for a patch to clean up list item type handling
and add a missing explicit cast in Shared/
2008-09-03 18:57:06 +00:00
Melanie Thielker f13a48fe1c Fix regex for string->int cast to accept leading spaces and a sign 2008-09-02 06:43:16 +00:00
Melanie Thielker 61978649ec Change some chat output functions so that text is truncated at
1000 chars to avoid the exception thrown by libomv at 1100 chars.
Change string->int conversion so it copes with non-numeric chars
after the number and no longer uses a float to parse the value.
2008-09-02 03:43:18 +00:00
Melanie Thielker a5d2674a43 This is an attempt to fix the handling of constants in LSL.
It wraps constants in new LSLType(x), so that lists with
constant values are processed correctly. Contains changes to
the lsl.parser.cs that are not (yet) reflected in opensim-libs,
since this experimental patch affects XEngine only. Also contains
nuts.
2008-09-01 23:33:12 +00:00
Mike Mazur 225067d8b6 Sync OpenSim/Region/ScriptEngine/{Common,Shared}/LSL_Types.cs. 2008-08-19 05:30:10 +00:00
Mike Mazur a513cba60b Apply Godfrey's patch (originally in r5872) to Shared/LSL_Types.cs as well. 2008-08-19 05:25:07 +00:00
Jeff Ames 6ef9d4da90 Formatting cleanup. 2008-08-18 00:39:10 +00:00
Charles Krinke 9a6bdd9701 Mantis#1963. Thank you kindly, Krtaylor for a patch that solves:
XEngine missing string constructor for LSLInteger and LSLFloat
2008-08-16 02:28:30 +00:00
Mike Mazur 57ec7a26cd -make ZERO_VECTOR and ZERO_ROTATION static readonly properties so they can be
used in scripts
-cast from bool to LSL{Integer,Float,String} so functions such as `integer
isZero(integer x) { return (x == 0); }` work
-progress on issue 1863
2008-07-31 07:11:41 +00:00
Mike Mazur 1c8f490573 More LSL_Types implicit/explicit cast changes. Fix issue 1854. 2008-07-31 00:29:19 +00:00
Mike Mazur f6fa4ada4e When casting strings to int, use double.Parse() as strings may be floats. With
this commit, issue 1822 should be fixed.
2008-07-28 07:46:53 +00:00
Mike Mazur d959c65b91 -implement LSLString -> Quaternion explicit cast
-sync Shared/LSL_Types.cs with Common/LSL_Types.cs
-get the test script in issue 1822 to compile
2008-07-28 02:36:26 +00:00
Mike Mazur 82fa53a486 -copy LSL_Types tests from Common/ to Shared/
-fix some whitespace/formatting
2008-07-28 02:36:18 +00:00
Melanie Thielker 40bb4edf8c Refresh LSLTypes.cs in Shared/ from the one in Common/, which was
more complete.
2008-07-28 01:33:21 +00:00
Mike Mazur 11a3fbf4aa Conversion from double to LSLInteger needs to be explicit. Fix issue 1826. 2008-07-27 07:09:33 +00:00
Mike Mazur 6267db0c4c Implement LSLFloat {+,-,*,/} LSLFloat operations. Fix issues 1532, 1701, 1824 &
1832.
2008-07-27 05:42:47 +00:00
Mike Mazur 19ad7db5e1 Add casts from integer to float. Fix issue 1822. 2008-07-25 07:50:31 +00:00
Mike Mazur e60cf0e67d -add test for newly introduced cast operators (issue 1818)
-fix formatting
-remove CompilerTest test since it seems to fail randomly
2008-07-25 04:47:11 +00:00
Melanie Thielker ac9a221993 Add mingchen's fix for string->float cast to Shared/ 2008-07-25 03:47:55 +00:00
Mike Mazur 117cc09edc Replace implicit casts from LSLFloat to int and uint which were removed in
r5487.

Also put the unit tests back for Bamboo to execute them, let's see how this
goes.
2008-07-24 05:23:38 +00:00
Mike Mazur 8b613e677f Implement cast to LSL_Types.LSLInteger from double. Fix issue 1770. 2008-07-18 07:52:44 +00:00
Charles Krinke 0106f96716 Mantis#1755. Thank you kindly, Matth for a patch that solves:
When using math operators +,-,*,/ in an LSL script with an LSLFloat 
and an integer literal the wrong result is returned. This patch 
adds operators to the LSLFloat type to handle this case.
2008-07-16 14:30:22 +00:00
Charles Krinke c9a7bf7e58 Mantis#1673. Thank you kindly, Matth for a patch that:
LSLInteger + literal integer is not an LSLInteger.
The included patch fixes the issue: LSLInteger + literal 
integer is not an LSLInteger (also fixed for -,*,/)
2008-07-10 00:40:38 +00:00
Charles Krinke 7a255d4404 Comment out StringTest until we use it somewhere. 2008-06-28 17:01:26 +00:00
Jeff Ames a2b1a1787d Minor formatting cleanup. 2008-06-25 14:30:28 +00:00
lbsa71 6b7930104b * Applied patch from Melanie, mantis issue #1581 - "Refactor LSL language, api and compiler out of XEngine"
"First stage in a major Script Engine refactor, that will result in the LSL implementaions ebing reconverged. Not there yet, but one major part is done."
Thank you, Melanie!
2008-06-24 21:09:49 +00:00