* Updates LSL2CS converter

* All objects are not touchable by default now
* When a script listens for one of the touch events in the state, an object becomes touchable.
* All LSL scripts report which events they consume now
** This uses semi-complicated Regex to discover the events, stick them in a dictionary, and then write a method call into each script state's state_entry() event.
** Tedd may figure out a better way to do this in the future.  For now, this works for LSL.
This commit is contained in:
Teravus Ovares
2008-04-20 04:19:44 +00:00
parent 7d18a93c2e
commit 3358d70c5b
8 changed files with 358 additions and 4 deletions

View File

@@ -83,6 +83,7 @@ namespace OpenSim.Region.Environment.Scenes
SCALE = 0x40
}
[Serializable]
public partial class SceneObjectPart : IScriptHost, ISerializable
{
@@ -729,8 +730,7 @@ namespace OpenSim.Region.Environment.Scenes
m_folderID = LLUUID.Random();
Flags = 0;
Flags |= LLObject.ObjectFlags.Touch |
LLObject.ObjectFlags.AllowInventoryDrop |
Flags |= LLObject.ObjectFlags.AllowInventoryDrop |
LLObject.ObjectFlags.CreateSelected;
@@ -774,7 +774,7 @@ namespace OpenSim.Region.Environment.Scenes
// Since we don't store script state, this is only a 'temporary' objectflag now
// If the object is scripted, the script will get loaded and this will be set again
ObjectFlags &= ~(uint)LLObject.ObjectFlags.Scripted;
ObjectFlags &= ~(uint)(LLObject.ObjectFlags.Scripted | LLObject.ObjectFlags.Touch);
TrimPermissions();
// ApplyPhysics();
@@ -2312,6 +2312,14 @@ namespace OpenSim.Region.Environment.Scenes
SetText( text );
}
public void setScriptEvents(LLUUID scriptID, int events)
{
if (m_parentGroup != null)
{
m_parentGroup.SetScriptEvents(scriptID, events);
}
}
protected SceneObjectPart(SerializationInfo info, StreamingContext context)
{
//System.Console.WriteLine("SceneObjectPart Deserialize BGN");