start of turn restriction editor
[potlatch2.git] / net / systemeD / halcyon / connection / Relation.as
index 5cab4047149e9046a8884735b8b5761e34f77b2d..7b5912113ae7bcff4cd608ddfd0bf4784e170b99 100644 (file)
@@ -68,6 +68,13 @@ package net.systemeD.halcyon.connection {
                        return a;
                }
 
+               public function hasMemberInRole(entity:Entity,role:String):Boolean {
+            for (var index:uint = 0; index < members.length; index++) {
+                               if (members[index].role==role && members[index].entity == entity) { return true; }
+                       }
+                       return false;
+               }
+               
         public function insertMember(index:uint, member:RelationMember, performAction:Function):void {
             performAction(new AddMemberToRelationAction(this, index, member, members));
         }
@@ -105,7 +112,7 @@ package net.systemeD.halcyon.connection {
                        return (deleted || (members.length==0));
                }
 
-        public function getDescription():String {
+        public override function getDescription():String {
             var desc:String = "";
             var relTags:Object = getTagsHash();
             if ( relTags["type"] ) {