aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/EstateSettings.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-01-02 10:06:43 +0000
committerTeravus Ovares2008-01-02 10:06:43 +0000
commit3a83be1721155d606d564dfd4c3bd36560a95c4a (patch)
tree89522b7d998345fe49bcbfe3f501cb9033935105 /OpenSim/Framework/EstateSettings.cs
parent* Trying to address TextureSender issues (diff)
downloadopensim-SC-3a83be1721155d606d564dfd4c3bd36560a95c4a.zip
opensim-SC-3a83be1721155d606d564dfd4c3bd36560a95c4a.tar.gz
opensim-SC-3a83be1721155d606d564dfd4c3bd36560a95c4a.tar.bz2
opensim-SC-3a83be1721155d606d564dfd4c3bd36560a95c4a.tar.xz
* Did a bit of estate work. Added some fields to EstateSettings.xml for estate managers.
* You can put UUIDs in those fields to give other users some ability to help manage a sim you own. * Also started decoding the EstateOwnerMessage packet convolutions.
Diffstat (limited to 'OpenSim/Framework/EstateSettings.cs')
-rw-r--r--OpenSim/Framework/EstateSettings.cs252
1 files changed, 252 insertions, 0 deletions
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs
index 6dd6e00..1078c10 100644
--- a/OpenSim/Framework/EstateSettings.cs
+++ b/OpenSim/Framework/EstateSettings.cs
@@ -487,6 +487,204 @@ namespace OpenSim.Framework
487 } 487 }
488 } 488 }
489 489
490 private LLUUID m_estateManager0;
491 private LLUUID m_estateManager1;
492 private LLUUID m_estateManager2;
493 private LLUUID m_estateManager3;
494 private LLUUID m_estateManager4;
495 private LLUUID m_estateManager5;
496 private LLUUID m_estateManager6;
497 private LLUUID m_estateManager7;
498 private LLUUID m_estateManager8;
499 private LLUUID m_estateManager9;
500
501 public LLUUID[] estateManagers
502 {
503 get {
504 // returns a condensed array of LLUUIDs
505 return GetEstateManagers();
506
507 }
508 set
509 {
510 // Sets a Condensed array of LLUUIDS
511 int i = 0;
512 for (i = 0; i < value.Length; i++)
513 {
514 switch (i)
515 {
516 case 0:
517 m_estateManager0 = value[i];
518 break;
519 case 1:
520 m_estateManager1 = value[i];
521 break;
522 case 2:
523 m_estateManager2 = value[i];
524 break;
525 case 3:
526 m_estateManager3 = value[i];
527 break;
528 case 4:
529 m_estateManager4 = value[i];
530 break;
531 case 5:
532 m_estateManager5 = value[i];
533 break;
534 case 6:
535 m_estateManager6 = value[i];
536 break;
537 case 7:
538 m_estateManager7 = value[i];
539 break;
540 case 8:
541 m_estateManager8 = value[i];
542 break;
543 case 9:
544 m_estateManager9 = value[i];
545 break;
546 }
547
548 }
549 // Clear the rest of them.. as they're no longer valid
550 for (int j = i; j < 10; j++)
551 {
552 switch (i)
553 {
554 case 0:
555 m_estateManager0 = LLUUID.Zero;
556 break;
557 case 1:
558 m_estateManager1 = LLUUID.Zero;
559 break;
560 case 2:
561 m_estateManager2 = LLUUID.Zero;
562 break;
563 case 3:
564 m_estateManager3 = LLUUID.Zero;
565 break;
566 case 4:
567 m_estateManager4 = LLUUID.Zero;
568 break;
569 case 5:
570 m_estateManager5 = LLUUID.Zero;
571 break;
572 case 6:
573 m_estateManager6 = LLUUID.Zero;
574 break;
575 case 7:
576 m_estateManager7 = LLUUID.Zero;
577 break;
578 case 8:
579 m_estateManager8 = LLUUID.Zero;
580 break;
581 case 9:
582 m_estateManager9 = LLUUID.Zero;
583 break;
584 }
585 }
586 for (i = 0; i < 10; i++)
587 {
588 // Writes out the Estate managers to the XML file.
589 configMember.forceSetConfigurationOption("estate_manager_" + i, (GetEstateManagerAtPos(i)).ToString());
590
591 }
592 }
593 }
594
595
596
597 #region EstateManager Get Methods to sort out skipped spots in the XML (suser error)
598
599 private LLUUID GetEstateManagerAtPos(int pos)
600 {
601 // This is a helper for writing them out to the xml file
602 switch (pos)
603 {
604 case 0:
605 return m_estateManager0;
606
607 case 1:
608 return m_estateManager1;
609
610 case 2:
611 return m_estateManager2;
612
613 case 3:
614 return m_estateManager3;
615
616 case 4:
617 return m_estateManager4;
618
619 case 5:
620 return m_estateManager5;
621
622 case 6:
623 return m_estateManager6;
624
625 case 7:
626 return m_estateManager7;
627
628 case 8:
629 return m_estateManager8;
630
631 case 9:
632 return m_estateManager9;
633
634 default:
635 return LLUUID.Zero;
636
637 }
638 }
639 private LLUUID[] GetEstateManagers()
640 {
641 int numEstateManagers = GetNumberOfEstateManagers();
642 LLUUID[] rEstateManagers = new LLUUID[numEstateManagers];
643
644 int pos = 0;
645
646 for (int i = 0; i < numEstateManagers; i++)
647 {
648 pos = GetNextEstateManager(pos);
649
650 rEstateManagers[i] = GetEstateManagerAtPos(pos);
651
652 }
653 return rEstateManagers;
654 }
655
656 private int GetNextEstateManager(int startpos)
657 {
658 // This is a utility function that skips over estate managers set to LLUUID.Zero
659 int i = startpos;
660 for (i=startpos;i<10;i++)
661 {
662 if (GetEstateManagerAtPos(i) != LLUUID.Zero) return i;
663 }
664 return i;
665
666 }
667 private int GetNumberOfEstateManagers()
668 {
669 // This function returns the number of estate managers set
670 // Regardless of whether there is a skipped spot
671 int numEstateManagers = 0;
672 if (m_estateManager0 != LLUUID.Zero) numEstateManagers++;
673 if (m_estateManager1 != LLUUID.Zero) numEstateManagers++;
674 if (m_estateManager2 != LLUUID.Zero) numEstateManagers++;
675 if (m_estateManager3 != LLUUID.Zero) numEstateManagers++;
676 if (m_estateManager4 != LLUUID.Zero) numEstateManagers++;
677 if (m_estateManager5 != LLUUID.Zero) numEstateManagers++;
678 if (m_estateManager6 != LLUUID.Zero) numEstateManagers++;
679 if (m_estateManager7 != LLUUID.Zero) numEstateManagers++;
680 if (m_estateManager8 != LLUUID.Zero) numEstateManagers++;
681 if (m_estateManager9 != LLUUID.Zero) numEstateManagers++;
682
683 return numEstateManagers;
684 }
685
686 #endregion
687
490 private ConfigurationMember configMember; 688 private ConfigurationMember configMember;
491 689
492 public EstateSettings() 690 public EstateSettings()
@@ -582,6 +780,28 @@ namespace OpenSim.Framework
582 "20.0", true); 780 "20.0", true);
583 configMember.addConfigurationOption("terrain_image_id", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, 781 configMember.addConfigurationOption("terrain_image_id", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
584 "", "00000000-0000-0000-0000-000000000000", true); 782 "", "00000000-0000-0000-0000-000000000000", true);
783
784 configMember.addConfigurationOption("estate_manager_0", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
785 "", "00000000-0000-0000-0000-000000000000", true);
786 configMember.addConfigurationOption("estate_manager_1", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
787 "", "00000000-0000-0000-0000-000000000000", true);
788 configMember.addConfigurationOption("estate_manager_2", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
789 "", "00000000-0000-0000-0000-000000000000", true);
790 configMember.addConfigurationOption("estate_manager_3", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
791 "", "00000000-0000-0000-0000-000000000000", true);
792 configMember.addConfigurationOption("estate_manager_4", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
793 "", "00000000-0000-0000-0000-000000000000", true);
794 configMember.addConfigurationOption("estate_manager_5", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
795 "", "00000000-0000-0000-0000-000000000000", true);
796 configMember.addConfigurationOption("estate_manager_6", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
797 "", "00000000-0000-0000-0000-000000000000", true);
798 configMember.addConfigurationOption("estate_manager_7", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
799 "", "00000000-0000-0000-0000-000000000000", true);
800 configMember.addConfigurationOption("estate_manager_8", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
801 "", "00000000-0000-0000-0000-000000000000", true);
802 configMember.addConfigurationOption("estate_manager_9", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID,
803 "", "00000000-0000-0000-0000-000000000000", true);
804
585 } 805 }
586 806
587 public bool handleIncomingConfiguration(string configuration_key, object configuration_result) 807 public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
@@ -703,6 +923,38 @@ namespace OpenSim.Framework
703 case "terrain_image_id": 923 case "terrain_image_id":
704 m_terrainImageID = (LLUUID) configuration_result; 924 m_terrainImageID = (LLUUID) configuration_result;
705 break; 925 break;
926
927 case "estate_manager_0":
928 m_estateManager0 = (LLUUID)configuration_result;
929 break;
930 case "estate_manager_1":
931 m_estateManager1 = (LLUUID)configuration_result;
932 break;
933 case "estate_manager_2":
934 m_estateManager2 = (LLUUID)configuration_result;
935 break;
936 case "estate_manager_3":
937 m_estateManager3 = (LLUUID)configuration_result;
938 break;
939 case "estate_manager_4":
940 m_estateManager4 = (LLUUID)configuration_result;
941 break;
942 case "estate_manager_5":
943 m_estateManager5 = (LLUUID)configuration_result;
944 break;
945 case "estate_manager_6":
946 m_estateManager6 = (LLUUID)configuration_result;
947 break;
948 case "estate_manager_7":
949 m_estateManager7 = (LLUUID)configuration_result;
950 break;
951 case "estate_manager_8":
952 m_estateManager8 = (LLUUID)configuration_result;
953 break;
954 case "estate_manager_9":
955 m_estateManager9 = (LLUUID)configuration_result;
956 break;
957
706 } 958 }
707 959
708 return true; 960 return true;