diff options
author | MW | 2007-08-22 17:40:26 +0000 |
---|---|---|
committer | MW | 2007-08-22 17:40:26 +0000 |
commit | 001d5a5c923899b036c8135f9031867f8a431d5b (patch) | |
tree | e1fe2653147cfa6283c029ccc28e0564bfd966fe | |
parent | A little bit of cleaning up. (diff) | |
download | opensim-SC-001d5a5c923899b036c8135f9031867f8a431d5b.zip opensim-SC-001d5a5c923899b036c8135f9031867f8a431d5b.tar.gz opensim-SC-001d5a5c923899b036c8135f9031867f8a431d5b.tar.bz2 opensim-SC-001d5a5c923899b036c8135f9031867f8a431d5b.tar.xz |
Made SceneObjectGroup.GetChildPrim() public, for now so that script engine can get ref to the SceneObjectPart/ IScriptHost.
Diffstat (limited to '')
7 files changed, 35 insertions, 20 deletions
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs index 24ab47a..3c41eb5 100644 --- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs +++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs | |||
@@ -89,6 +89,7 @@ namespace OpenSim.Framework.Interfaces | |||
89 | public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID); | 89 | public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID); |
90 | public delegate void UpdateInventoryItemTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID assetID, LLUUID itemID); | 90 | public delegate void UpdateInventoryItemTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID assetID, LLUUID itemID); |
91 | public delegate void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID); | 91 | public delegate void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID); |
92 | public delegate void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID, uint localID); | ||
92 | 93 | ||
93 | public delegate void UDPAssetUploadRequest(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data); | 94 | public delegate void UDPAssetUploadRequest(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data); |
94 | public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data); | 95 | public delegate void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data); |
@@ -150,6 +151,7 @@ namespace OpenSim.Framework.Interfaces | |||
150 | event RequestXfer OnRequestXfer; | 151 | event RequestXfer OnRequestXfer; |
151 | event ConfirmXfer OnConfirmXfer; | 152 | event ConfirmXfer OnConfirmXfer; |
152 | event RezScript OnRezScript; | 153 | event RezScript OnRezScript; |
154 | event UpdateTaskInventory OnUpdateTaskInventory; | ||
153 | 155 | ||
154 | event UUIDNameRequest OnNameFromUUIDRequest; | 156 | event UUIDNameRequest OnNameFromUUIDRequest; |
155 | 157 | ||
diff --git a/OpenSim/Framework/General/NullClientAPI.cs b/OpenSim/Framework/General/NullClientAPI.cs index 74be103..6692fde 100644 --- a/OpenSim/Framework/General/NullClientAPI.cs +++ b/OpenSim/Framework/General/NullClientAPI.cs | |||
@@ -64,6 +64,7 @@ namespace OpenSim.Framework | |||
64 | public event RequestXfer OnRequestXfer; | 64 | public event RequestXfer OnRequestXfer; |
65 | public event ConfirmXfer OnConfirmXfer; | 65 | public event ConfirmXfer OnConfirmXfer; |
66 | public event RezScript OnRezScript; | 66 | public event RezScript OnRezScript; |
67 | public event UpdateTaskInventory OnUpdateTaskInventory; | ||
67 | 68 | ||
68 | public event UUIDNameRequest OnNameFromUUIDRequest; | 69 | public event UUIDNameRequest OnNameFromUUIDRequest; |
69 | 70 | ||
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index 029b948..6570a82 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs | |||
@@ -93,6 +93,7 @@ namespace OpenSim.Region.ClientStack | |||
93 | public event RequestXfer OnRequestXfer; | 93 | public event RequestXfer OnRequestXfer; |
94 | public event ConfirmXfer OnConfirmXfer; | 94 | public event ConfirmXfer OnConfirmXfer; |
95 | public event RezScript OnRezScript; | 95 | public event RezScript OnRezScript; |
96 | public event UpdateTaskInventory OnUpdateTaskInventory; | ||
96 | 97 | ||
97 | public event UUIDNameRequest OnNameFromUUIDRequest; | 98 | public event UUIDNameRequest OnNameFromUUIDRequest; |
98 | 99 | ||
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index c17f453..383c7a9 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | |||
@@ -476,6 +476,16 @@ namespace OpenSim.Region.ClientStack | |||
476 | case PacketType.UpdateTaskInventory: | 476 | case PacketType.UpdateTaskInventory: |
477 | //Console.WriteLine(Pack.ToString()); | 477 | //Console.WriteLine(Pack.ToString()); |
478 | UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack; | 478 | UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack; |
479 | if (OnUpdateTaskInventory != null) | ||
480 | { | ||
481 | if (updatetask.UpdateData.Key == 0) | ||
482 | { | ||
483 | OnUpdateTaskInventory(this, updatetask.InventoryData.ItemID, updatetask.InventoryData.FolderID, updatetask.UpdateData.LocalID); | ||
484 | } | ||
485 | } | ||
486 | break; | ||
487 | case PacketType.MoveTaskInventory: | ||
488 | //Console.WriteLine(Pack.ToString()); | ||
479 | break; | 489 | break; |
480 | case PacketType.RezScript: | 490 | case PacketType.RezScript: |
481 | //Console.WriteLine(Pack.ToString()); | 491 | //Console.WriteLine(Pack.ToString()); |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 99bdda9..c50809f 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -362,7 +362,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
362 | /// </summary> | 362 | /// </summary> |
363 | /// <param name="primID"></param> | 363 | /// <param name="primID"></param> |
364 | /// <returns></returns> | 364 | /// <returns></returns> |
365 | private SceneObjectPart GetChildPrim(LLUUID primID) | 365 | public SceneObjectPart GetChildPart(LLUUID primID) |
366 | { | 366 | { |
367 | SceneObjectPart childPart = null; | 367 | SceneObjectPart childPart = null; |
368 | if (this.m_parts.ContainsKey(primID)) | 368 | if (this.m_parts.ContainsKey(primID)) |
@@ -377,7 +377,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
377 | /// </summary> | 377 | /// </summary> |
378 | /// <param name="localID"></param> | 378 | /// <param name="localID"></param> |
379 | /// <returns></returns> | 379 | /// <returns></returns> |
380 | private SceneObjectPart GetChildPrim(uint localID) | 380 | public SceneObjectPart GetChildPart(uint localID) |
381 | { | 381 | { |
382 | foreach (SceneObjectPart part in this.m_parts.Values) | 382 | foreach (SceneObjectPart part in this.m_parts.Values) |
383 | { | 383 | { |
@@ -543,7 +543,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
543 | /// <param name="name"></param> | 543 | /// <param name="name"></param> |
544 | public void SetPartName(string name, uint localID) | 544 | public void SetPartName(string name, uint localID) |
545 | { | 545 | { |
546 | SceneObjectPart part = this.GetChildPrim(localID); | 546 | SceneObjectPart part = this.GetChildPart(localID); |
547 | if (part != null) | 547 | if (part != null) |
548 | { | 548 | { |
549 | part.Name = name; | 549 | part.Name = name; |
@@ -552,7 +552,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
552 | 552 | ||
553 | public void SetPartDescription(string des, uint localID) | 553 | public void SetPartDescription(string des, uint localID) |
554 | { | 554 | { |
555 | SceneObjectPart part = this.GetChildPrim(localID); | 555 | SceneObjectPart part = this.GetChildPart(localID); |
556 | if (part != null) | 556 | if (part != null) |
557 | { | 557 | { |
558 | part.Description = des; | 558 | part.Description = des; |
@@ -561,7 +561,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
561 | 561 | ||
562 | public void SetPartText(string text, uint localID) | 562 | public void SetPartText(string text, uint localID) |
563 | { | 563 | { |
564 | SceneObjectPart part = this.GetChildPrim(localID); | 564 | SceneObjectPart part = this.GetChildPart(localID); |
565 | if (part != null) | 565 | if (part != null) |
566 | { | 566 | { |
567 | part.Text = text; | 567 | part.Text = text; |
@@ -570,7 +570,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
570 | 570 | ||
571 | public void SetPartText(string text, LLUUID partID) | 571 | public void SetPartText(string text, LLUUID partID) |
572 | { | 572 | { |
573 | SceneObjectPart part = this.GetChildPrim(partID); | 573 | SceneObjectPart part = this.GetChildPart(partID); |
574 | if (part != null) | 574 | if (part != null) |
575 | { | 575 | { |
576 | part.Text = text; | 576 | part.Text = text; |
@@ -579,7 +579,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
579 | 579 | ||
580 | public string GetPartName(uint localID) | 580 | public string GetPartName(uint localID) |
581 | { | 581 | { |
582 | SceneObjectPart part = this.GetChildPrim(localID); | 582 | SceneObjectPart part = this.GetChildPart(localID); |
583 | if (part != null) | 583 | if (part != null) |
584 | { | 584 | { |
585 | return part.Name; | 585 | return part.Name; |
@@ -589,7 +589,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
589 | 589 | ||
590 | public string GetPartDescription(uint localID) | 590 | public string GetPartDescription(uint localID) |
591 | { | 591 | { |
592 | SceneObjectPart part = this.GetChildPrim(localID); | 592 | SceneObjectPart part = this.GetChildPart(localID); |
593 | if (part != null) | 593 | if (part != null) |
594 | { | 594 | { |
595 | return part.Description; | 595 | return part.Description; |
@@ -604,7 +604,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
604 | /// <param name="localID"></param> | 604 | /// <param name="localID"></param> |
605 | public bool GetPartInventoryFileName(IClientAPI remoteClient, uint localID) | 605 | public bool GetPartInventoryFileName(IClientAPI remoteClient, uint localID) |
606 | { | 606 | { |
607 | SceneObjectPart part = this.GetChildPrim(localID); | 607 | SceneObjectPart part = this.GetChildPart(localID); |
608 | if (part != null) | 608 | if (part != null) |
609 | { | 609 | { |
610 | return part.GetInventoryFileName(remoteClient, localID); | 610 | return part.GetInventoryFileName(remoteClient, localID); |
@@ -614,7 +614,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
614 | 614 | ||
615 | public string RequestInventoryFile(uint localID, XferManager xferManager) | 615 | public string RequestInventoryFile(uint localID, XferManager xferManager) |
616 | { | 616 | { |
617 | SceneObjectPart part = this.GetChildPrim(localID); | 617 | SceneObjectPart part = this.GetChildPart(localID); |
618 | if (part != null) | 618 | if (part != null) |
619 | { | 619 | { |
620 | return part.RequestInventoryFile(xferManager); | 620 | return part.RequestInventoryFile(xferManager); |
@@ -624,7 +624,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
624 | 624 | ||
625 | public bool AddInventoryItem(IClientAPI remoteClient, uint localID, InventoryItemBase item) | 625 | public bool AddInventoryItem(IClientAPI remoteClient, uint localID, InventoryItemBase item) |
626 | { | 626 | { |
627 | SceneObjectPart part = this.GetChildPrim(localID); | 627 | SceneObjectPart part = this.GetChildPart(localID); |
628 | if (part != null) | 628 | if (part != null) |
629 | { | 629 | { |
630 | SceneObjectPart.TaskInventoryItem taskItem = new SceneObjectPart.TaskInventoryItem(); | 630 | SceneObjectPart.TaskInventoryItem taskItem = new SceneObjectPart.TaskInventoryItem(); |
@@ -652,7 +652,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
652 | /// <param name="data"></param> | 652 | /// <param name="data"></param> |
653 | public void UpdateExtraParam(uint localID, ushort type, bool inUse, byte[] data) | 653 | public void UpdateExtraParam(uint localID, ushort type, bool inUse, byte[] data) |
654 | { | 654 | { |
655 | SceneObjectPart part = this.GetChildPrim(localID); | 655 | SceneObjectPart part = this.GetChildPart(localID); |
656 | if (part != null) | 656 | if (part != null) |
657 | { | 657 | { |
658 | part.UpdateExtraParam(type, inUse, data); | 658 | part.UpdateExtraParam(type, inUse, data); |
@@ -666,7 +666,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
666 | /// <param name="textureEntry"></param> | 666 | /// <param name="textureEntry"></param> |
667 | public void UpdateTextureEntry(uint localID, byte[] textureEntry) | 667 | public void UpdateTextureEntry(uint localID, byte[] textureEntry) |
668 | { | 668 | { |
669 | SceneObjectPart part = this.GetChildPrim(localID); | 669 | SceneObjectPart part = this.GetChildPart(localID); |
670 | if (part != null) | 670 | if (part != null) |
671 | { | 671 | { |
672 | part.UpdateTextureEntry(textureEntry); | 672 | part.UpdateTextureEntry(textureEntry); |
@@ -681,7 +681,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
681 | /// <param name="shapeBlock"></param> | 681 | /// <param name="shapeBlock"></param> |
682 | public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock, uint localID) | 682 | public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock, uint localID) |
683 | { | 683 | { |
684 | SceneObjectPart part = this.GetChildPrim(localID); | 684 | SceneObjectPart part = this.GetChildPart(localID); |
685 | if (part != null) | 685 | if (part != null) |
686 | { | 686 | { |
687 | part.UpdateShape(shapeBlock); | 687 | part.UpdateShape(shapeBlock); |
@@ -697,7 +697,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
697 | /// <param name="localID"></param> | 697 | /// <param name="localID"></param> |
698 | public void Resize(LLVector3 scale, uint localID) | 698 | public void Resize(LLVector3 scale, uint localID) |
699 | { | 699 | { |
700 | SceneObjectPart part = this.GetChildPrim(localID); | 700 | SceneObjectPart part = this.GetChildPart(localID); |
701 | if (part != null) | 701 | if (part != null) |
702 | { | 702 | { |
703 | part.Resize(scale); | 703 | part.Resize(scale); |
@@ -723,7 +723,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
723 | /// <param name="localID"></param> | 723 | /// <param name="localID"></param> |
724 | public void UpdateSinglePosition(LLVector3 pos, uint localID) | 724 | public void UpdateSinglePosition(LLVector3 pos, uint localID) |
725 | { | 725 | { |
726 | SceneObjectPart part = this.GetChildPrim(localID); | 726 | SceneObjectPart part = this.GetChildPart(localID); |
727 | if (part != null) | 727 | if (part != null) |
728 | { | 728 | { |
729 | if (part.UUID == this.m_rootPart.UUID) | 729 | if (part.UUID == this.m_rootPart.UUID) |
@@ -795,7 +795,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
795 | /// <param name="localID"></param> | 795 | /// <param name="localID"></param> |
796 | public void UpdateSingleRotation(LLQuaternion rot, uint localID) | 796 | public void UpdateSingleRotation(LLQuaternion rot, uint localID) |
797 | { | 797 | { |
798 | SceneObjectPart part = this.GetChildPrim(localID); | 798 | SceneObjectPart part = this.GetChildPart(localID); |
799 | if (part != null) | 799 | if (part != null) |
800 | { | 800 | { |
801 | if (part.UUID == this.m_rootPart.UUID) | 801 | if (part.UUID == this.m_rootPart.UUID) |
@@ -987,7 +987,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
987 | 987 | ||
988 | public LLUUID GetPartsFullID(uint localID) | 988 | public LLUUID GetPartsFullID(uint localID) |
989 | { | 989 | { |
990 | SceneObjectPart part = this.GetChildPrim(localID); | 990 | SceneObjectPart part = this.GetChildPart(localID); |
991 | if (part != null) | 991 | if (part != null) |
992 | { | 992 | { |
993 | return part.UUID; | 993 | return part.UUID; |
@@ -1009,7 +1009,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1009 | } | 1009 | } |
1010 | else | 1010 | else |
1011 | { | 1011 | { |
1012 | SceneObjectPart part = GetChildPrim(localId); | 1012 | SceneObjectPart part = GetChildPart(localId); |
1013 | OnGrabPart(part, offsetPos, remoteClient); | 1013 | OnGrabPart(part, offsetPos, remoteClient); |
1014 | } | 1014 | } |
1015 | } | 1015 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 7684b4f..8a59d88 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -238,7 +238,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
238 | 238 | ||
239 | m_inventoryFileName = "taskinventory" + LLUUID.Random().ToString(); | 239 | m_inventoryFileName = "taskinventory" + LLUUID.Random().ToString(); |
240 | m_folderID = LLUUID.Random(); | 240 | m_folderID = LLUUID.Random(); |
241 | 241 | ||
242 | //temporary code just so the m_flags field doesn't give a compiler warning | 242 | //temporary code just so the m_flags field doesn't give a compiler warning |
243 | if (m_flags == LLObject.ObjectFlags.AllowInventoryDrop) | 243 | if (m_flags == LLObject.ObjectFlags.AllowInventoryDrop) |
244 | { | 244 | { |
diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs index 12d19e6..0e898a2 100644 --- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs | |||
@@ -78,6 +78,7 @@ namespace SimpleApp | |||
78 | public event RequestXfer OnRequestXfer; | 78 | public event RequestXfer OnRequestXfer; |
79 | public event ConfirmXfer OnConfirmXfer; | 79 | public event ConfirmXfer OnConfirmXfer; |
80 | public event RezScript OnRezScript; | 80 | public event RezScript OnRezScript; |
81 | public event UpdateTaskInventory OnUpdateTaskInventory; | ||
81 | 82 | ||
82 | public event UUIDNameRequest OnNameFromUUIDRequest; | 83 | public event UUIDNameRequest OnNameFromUUIDRequest; |
83 | 84 | ||