internal TileMatrix(int sizeX, int sizeY, OwnerTypeEnum ownerTypeEnum, ITileFactory tileFactory)
 {
     OwnerType = ownerTypeEnum;
     SizeX     = sizeX;
     SizeY     = sizeY;
     Fill(tileFactory);
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Owner" /> class.
 /// </summary>
 /// <param name="ownerType">The type of owner that owns this entity. \&quot;Account\&quot; refers specifically to a coterie account ID. (required) (default to OwnerTypeEnum.USER).</param>
 /// <param name="ownerId">A global idenfifier for owner. (required).</param>
 public Owner(OwnerTypeEnum ownerType = OwnerTypeEnum.USER, string ownerId = default(string))
 {
     this.OwnerType = ownerType;
     // to ensure "ownerId" is required (not null)
     if (ownerId == null)
     {
         throw new ArgumentNullException("ownerId is a required property for Owner and cannot be null");
     }
     this.OwnerId = ownerId;
 }
예제 #3
0
        public ITile GetTile(Coordinate coordinate, OwnerTypeEnum ownerType)
        {
            switch (ownerType)
            {
            case OwnerTypeEnum.Player:
                return(PlayerTileMatrix.GetTile(coordinate));

            case OwnerTypeEnum.Enemy:
                return(EnemyTileMatrix.GetTile(coordinate));

            default:
                throw new ArgumentOutOfRangeException(nameof(ownerType), ownerType, null);
            }
        }
예제 #4
0
파일: TagHelper.cs 프로젝트: jturp/RivalAI
        public static OwnerTypeEnum TagTargetOwnerEnumCheck(string tag)
        {
            OwnerTypeEnum result   = OwnerTypeEnum.None;
            var           tagSplit = ProcessTag(tag);

            if (tagSplit.Length == 2)
            {
                if (OwnerTypeEnum.TryParse(tagSplit[1], out result) == false)
                {
                    return(OwnerTypeEnum.None);
                }
            }

            return(result);
        }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Namespace" /> class.
 /// </summary>
 /// <param name="name">A URL safe globally unique namespace name (ascii letters and numbers only) (required).</param>
 /// <param name="ownerType">The type of owner of the namespace. (required).</param>
 /// <param name="ownerId">id of the owner (user, or in the future, organization) (required).</param>
 public Namespace(string name = default(string), OwnerTypeEnum ownerType = default(OwnerTypeEnum), string ownerId = default(string))
 {
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new ArgumentNullException("name is a required property for Namespace and cannot be null");
     }
     this.Name      = name;
     this.OwnerType = ownerType;
     // to ensure "ownerId" is required (not null)
     if (ownerId == null)
     {
         throw new ArgumentNullException("ownerId is a required property for Namespace and cannot be null");
     }
     this.OwnerId = ownerId;
 }
예제 #6
0
        public TargetProfile()
        {
            UseCustomTargeting = false;

            Target       = TargetTypeEnum.None;
            BlockTargets = new List <BlockTypeEnum>();

            TimeUntilTargetAcquisition = 1;
            UseTargetRefresh           = false;
            TimeUntilNextRefresh       = 60;
            TimeUntilNextEvaluation    = 1;

            MaxDistance = 12000;

            MatchAllFilters  = new List <TargetFilterEnum>();
            MatchAnyFilters  = new List <TargetFilterEnum>();
            MatchNoneFilters = new List <TargetFilterEnum>();
            GetTargetBy      = TargetSortEnum.ClosestDistance;

            Owners         = OwnerTypeEnum.None;
            Relations      = RelationTypeEnum.None;
            FactionTargets = new List <string>();

            OnlyGetFromEntityOwner      = false;
            GetFromMinorityGridOwners   = false;
            PrioritizeSpecifiedFactions = false;

            IsStatic = CheckEnum.Ignore;

            MinAltitude = -100000;
            MaxAltitude = 100000;

            NonBroadcastVisualRange = 1500;

            MinGravity = 0;
            MaxGravity = 1.1;

            MinSpeed = 0;
            MaxSpeed = 110;

            MinTargetValue = 0;
            MaxTargetValue = 1;

            ProfileSubtypeId      = "";
            BuiltUniqueFilterList = false;
            AllUniqueFilters      = new List <TargetFilterEnum>();
        }
예제 #7
0
        public void TileClicked(Coordinate coordinate, OwnerTypeEnum ownerType)
        {
            ITile tile = null;

            switch (ownerType)
            {
            case OwnerTypeEnum.Player:
                tile = PlayerTileMatrix.GetTile(coordinate);
                break;

            case OwnerTypeEnum.Enemy:
                tile = EnemyTileMatrix.GetTile(coordinate);
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(ownerType), ownerType, null);
            }
            tile.Click();
        }
 public void TileClicked(Coordinate coordinate, OwnerTypeEnum ownerType)
 {
     _battle.TileClicked(coordinate, ownerType);
 }
예제 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Rule" /> class.
 /// </summary>
 /// <param name="name">The name for the Rule. Limit 100 characters. (required).</param>
 /// <param name="actions">actions (required).</param>
 /// <param name="sequence">sequence.</param>
 /// <param name="timeZoneId">The time zone ID for this Rule. This overrides the Location time zone ID, but is overridden by time zone ID provided by each operand individually..</param>
 /// <param name="id">Unique id for the Rule (required).</param>
 /// <param name="status">The status of the Rule (default to StatusEnum.Enabled).</param>
 /// <param name="ownerId">Owner id (required).</param>
 /// <param name="ownerType">The owner of the rule is either a location or user (required) (default to OwnerTypeEnum.Location).</param>
 /// <param name="creator">creator.</param>
 /// <param name="dateCreated">Created date time (required).</param>
 /// <param name="dateUpdated">Last updated date time (required).</param>
 public Rule(string name = default(string), List <Action> actions = default(List <Action>), ActionSequence sequence = default(ActionSequence), string timeZoneId = default(string), string id = default(string), StatusEnum?status = StatusEnum.Enabled, string ownerId = default(string), OwnerTypeEnum ownerType = OwnerTypeEnum.Location, Creator?creator = default(Creator?), string dateCreated = default(string), string dateUpdated = default(string))
 {
     // to ensure "name" is required (not null)
     if (name == null)
     {
         throw new ArgumentNullException("name is a required property for Rule and cannot be null");
     }
     this.Name = name;
     // to ensure "actions" is required (not null)
     if (actions == null)
     {
         throw new ArgumentNullException("actions is a required property for Rule and cannot be null");
     }
     this.Actions = actions;
     // to ensure "id" is required (not null)
     if (id == null)
     {
         throw new ArgumentNullException("id is a required property for Rule and cannot be null");
     }
     this.Id = id;
     // to ensure "ownerId" is required (not null)
     if (ownerId == null)
     {
         throw new ArgumentNullException("ownerId is a required property for Rule and cannot be null");
     }
     this.OwnerId   = ownerId;
     this.OwnerType = ownerType;
     // to ensure "dateCreated" is required (not null)
     if (dateCreated == null)
     {
         throw new ArgumentNullException("dateCreated is a required property for Rule and cannot be null");
     }
     this.DateCreated = dateCreated;
     // to ensure "dateUpdated" is required (not null)
     if (dateUpdated == null)
     {
         throw new ArgumentNullException("dateUpdated is a required property for Rule and cannot be null");
     }
     this.DateUpdated = dateUpdated;
     this.Sequence    = sequence;
     this.TimeZoneId  = timeZoneId;
     this.Status      = status;
     this.Creator     = creator;
 }
 public ITile GetTile(int coordX, int coordY, OwnerTypeEnum ownerType)
 {
     return(_battle.GetTile(new Coordinate(coordX, coordY), ownerType));
 }
예제 #11
0
        public void InitTags(string customData)
        {
            if (string.IsNullOrWhiteSpace(customData) == false)
            {
                var descSplit = customData.Split('\n');

                foreach (var tag in descSplit)
                {
                    //UseCustomTargeting
                    if (tag.Contains("[UseCustomTargeting:") == true)
                    {
                        this.UseCustomTargeting = TagHelper.TagBoolCheck(tag);
                    }

                    //TimeUntilTargetAcquisition
                    if (tag.Contains("[TimeUntilTargetAcquisition:") == true)
                    {
                        this.TimeUntilTargetAcquisition = TagHelper.TagIntCheck(tag, this.TimeUntilTargetAcquisition);
                    }

                    //UseTargetRefresh
                    if (tag.Contains("[UseTargetRefresh:") == true)
                    {
                        this.UseTargetRefresh = TagHelper.TagBoolCheck(tag);
                    }

                    //TimeUntilNextRefresh
                    if (tag.Contains("[TimeUntilNextRefresh:") == true)
                    {
                        this.TimeUntilNextRefresh = TagHelper.TagIntCheck(tag, this.TimeUntilNextRefresh);
                    }

                    //UseTargetLastKnownPosition
                    if (tag.Contains("[UseTargetLastKnownPosition:") == true)
                    {
                        this.UseTargetLastKnownPosition = TagHelper.TagBoolCheck(tag);
                    }

                    //TimeUntilNextEvaluation
                    if (tag.Contains("[TimeUntilNextEvaluation:") == true)
                    {
                        this.TimeUntilNextEvaluation = TagHelper.TagIntCheck(tag, this.TimeUntilNextEvaluation);
                    }

                    //Target
                    if (tag.Contains("[Target:") == true)
                    {
                        this.Target = TagHelper.TagTargetTypeEnumCheck(tag);
                    }

                    //BlockTargets
                    if (tag.Contains("[BlockTargets:") == true)
                    {
                        var tempValue = TagHelper.TagBlockTargetTypesCheck(tag);

                        if (tempValue != BlockTypeEnum.None && this.BlockTargets.Contains(tempValue) == false)
                        {
                            this.BlockTargets.Add(tempValue);
                        }
                    }

                    //GetTargetBy
                    if (tag.Contains("[GetTargetBy:") == true)
                    {
                        this.GetTargetBy = TagHelper.TagTargetSortEnumCheck(tag);
                    }

                    //MaxDistance
                    if (tag.Contains("[MaxDistance:") == true)
                    {
                        this.MaxDistance = TagHelper.TagDoubleCheck(tag, this.MaxDistance);
                    }

                    //MatchAllFilters
                    if (tag.Contains("[MatchAllFilters:") == true)
                    {
                        var tempValue = TagHelper.TagTargetFilterEnumCheck(tag);

                        if (tempValue != TargetFilterEnum.None && !this.MatchAllFilters.Contains(tempValue))
                        {
                            this.MatchAllFilters.Add(tempValue);
                        }
                    }

                    //MatchAnyFilters
                    if (tag.Contains("[MatchAnyFilters:") == true)
                    {
                        var tempValue = TagHelper.TagTargetFilterEnumCheck(tag);

                        if (tempValue != TargetFilterEnum.None && !this.MatchAnyFilters.Contains(tempValue))
                        {
                            this.MatchAnyFilters.Add(tempValue);
                        }
                    }

                    //MatchNoneFilters
                    if (tag.Contains("[MatchNoneFilters:") == true)
                    {
                        var tempValue = TagHelper.TagTargetFilterEnumCheck(tag);

                        if (tempValue != TargetFilterEnum.None && !this.MatchNoneFilters.Contains(tempValue))
                        {
                            this.MatchNoneFilters.Add(tempValue);
                        }
                    }

                    //Owners
                    if (tag.Contains("[Owners:") == true)
                    {
                        var tempValue = TagHelper.TagTargetOwnerEnumCheck(tag);

                        if (!this.Owners.HasFlag(tempValue))
                        {
                            this.Owners |= tempValue;
                        }
                    }

                    //Relations
                    if (tag.Contains("[Relations:") == true)
                    {
                        var tempValue = TagHelper.TagTargetRelationEnumCheck(tag);

                        if (this.Relations.HasFlag(tempValue) == false)
                        {
                            this.Relations |= tempValue;
                        }
                    }

                    //FactionTargets
                    if (tag.Contains("[FactionTargets:") == true)
                    {
                        var tempValue = TagHelper.TagStringCheck(tag);

                        if (!string.IsNullOrWhiteSpace(tempValue) && !this.FactionTargets.Contains(tempValue))
                        {
                            this.FactionTargets.Add(tempValue);
                        }
                    }

                    //OnlyGetFromEntityOwner
                    if (tag.Contains("[OnlyGetFromEntityOwner:") == true)
                    {
                        this.OnlyGetFromEntityOwner = TagHelper.TagBoolCheck(tag);
                    }

                    //GetFromMinorityGridOwners
                    if (tag.Contains("[GetFromMinorityGridOwners:") == true)
                    {
                        this.GetFromMinorityGridOwners = TagHelper.TagBoolCheck(tag);
                    }

                    //PrioritizeSpecifiedFactions
                    if (tag.Contains("[PrioritizeSpecifiedFactions:") == true)
                    {
                        this.PrioritizeSpecifiedFactions = TagHelper.TagBoolCheck(tag);
                    }

                    //IsStatic
                    if (tag.Contains("[IsStatic:") == true)
                    {
                        this.IsStatic = TagHelper.TagCheckEnumCheck(tag);
                    }

                    //MinAltitude
                    if (tag.Contains("[MinAltitude:") == true)
                    {
                        this.MinAltitude = TagHelper.TagDoubleCheck(tag, this.MinAltitude);
                    }

                    //MaxAltitude
                    if (tag.Contains("[MaxAltitude:") == true)
                    {
                        this.MaxAltitude = TagHelper.TagDoubleCheck(tag, this.MaxAltitude);
                    }

                    //NonBroadcastVisualRange
                    if (tag.Contains("[NonBroadcastVisualRange:") == true)
                    {
                        this.NonBroadcastVisualRange = TagHelper.TagDoubleCheck(tag, this.NonBroadcastVisualRange);
                    }

                    //MinGravity
                    if (tag.Contains("[MinGravity:") == true)
                    {
                        this.MinGravity = TagHelper.TagDoubleCheck(tag, this.MinGravity);
                    }

                    //MaxGravity
                    if (tag.Contains("[MaxGravity:") == true)
                    {
                        this.MaxGravity = TagHelper.TagDoubleCheck(tag, this.MaxGravity);
                    }

                    //MinSpeed
                    if (tag.Contains("[MinSpeed:") == true)
                    {
                        this.MinSpeed = TagHelper.TagDoubleCheck(tag, this.MinSpeed);
                    }

                    //MaxSpeed
                    if (tag.Contains("[MaxSpeed:") == true)
                    {
                        this.MaxSpeed = TagHelper.TagDoubleCheck(tag, this.MaxSpeed);
                    }

                    //MinTargetValue
                    if (tag.Contains("[MinTargetValue:") == true)
                    {
                        this.MinTargetValue = TagHelper.TagFloatCheck(tag, this.MinTargetValue);
                    }

                    //MaxTargetValue
                    if (tag.Contains("[MaxTargetValue:") == true)
                    {
                        this.MaxTargetValue = TagHelper.TagFloatCheck(tag, this.MaxTargetValue);
                    }
                }
            }
        }
예제 #12
0
        public void InitTags(string customData)
        {
            if (string.IsNullOrWhiteSpace(customData) == false)
            {
                var descSplit = customData.Split('\n');

                foreach (var tag in descSplit)
                {
                    //UseCustomTargeting
                    if (tag.Contains("[UseCustomTargeting:") == true)
                    {
                        UseCustomTargeting = TagHelper.TagBoolCheck(tag);
                    }

                    //TimeUntilTargetAcquisition
                    if (tag.Contains("[TimeUntilTargetAcquisition:") == true)
                    {
                        TimeUntilTargetAcquisition = TagHelper.TagIntCheck(tag, TimeUntilTargetAcquisition);
                    }

                    //UseTargetRefresh
                    if (tag.Contains("[UseTargetRefresh:") == true)
                    {
                        UseTargetRefresh = TagHelper.TagBoolCheck(tag);
                    }

                    //TimeUntilNextRefresh
                    if (tag.Contains("[TimeUntilNextRefresh:") == true)
                    {
                        TimeUntilNextRefresh = TagHelper.TagIntCheck(tag, TimeUntilNextRefresh);
                    }

                    //UseTargetLastKnownPosition
                    if (tag.Contains("[UseTargetLastKnownPosition:") == true)
                    {
                        UseTargetLastKnownPosition = TagHelper.TagBoolCheck(tag);
                    }

                    //TimeUntilNextEvaluation
                    if (tag.Contains("[TimeUntilNextEvaluation:") == true)
                    {
                        TimeUntilNextEvaluation = TagHelper.TagIntCheck(tag, TimeUntilNextEvaluation);
                    }

                    //Target
                    if (tag.Contains("[Target:") == true)
                    {
                        Target = TagHelper.TagTargetTypeEnumCheck(tag);
                    }

                    //BlockTargets
                    if (tag.Contains("[BlockTargets:") == true)
                    {
                        var tempValue = TagHelper.TagBlockTargetTypesCheck(tag);

                        if (tempValue != BlockTypeEnum.None && BlockTargets.Contains(tempValue) == false)
                        {
                            BlockTargets.Add(tempValue);
                        }
                    }

                    //GetTargetBy
                    if (tag.Contains("[GetTargetBy:") == true)
                    {
                        GetTargetBy = TagHelper.TagTargetSortEnumCheck(tag);
                    }

                    //MaxDistance
                    if (tag.Contains("[MaxDistance:") == true)
                    {
                        MaxDistance = TagHelper.TagDoubleCheck(tag, MaxDistance);
                    }

                    //MatchAllFilters
                    if (tag.Contains("[MatchAllFilters:") == true)
                    {
                        var tempValue = TagHelper.TagTargetFilterEnumCheck(tag);

                        if (tempValue != TargetFilterEnum.None && !MatchAllFilters.Contains(tempValue))
                        {
                            MatchAllFilters.Add(tempValue);
                        }
                    }

                    //MatchAnyFilters
                    if (tag.Contains("[MatchAnyFilters:") == true)
                    {
                        var tempValue = TagHelper.TagTargetFilterEnumCheck(tag);

                        if (tempValue != TargetFilterEnum.None && !MatchAnyFilters.Contains(tempValue))
                        {
                            MatchAnyFilters.Add(tempValue);
                        }
                    }

                    //MatchNoneFilters
                    if (tag.Contains("[MatchNoneFilters:") == true)
                    {
                        var tempValue = TagHelper.TagTargetFilterEnumCheck(tag);

                        if (tempValue != TargetFilterEnum.None && !MatchNoneFilters.Contains(tempValue))
                        {
                            MatchNoneFilters.Add(tempValue);
                        }
                    }

                    //Owners
                    if (tag.Contains("[Owners:") == true)
                    {
                        var tempValue = TagHelper.TagTargetOwnerEnumCheck(tag);

                        if (!Owners.HasFlag(tempValue))
                        {
                            Owners |= tempValue;
                        }
                    }

                    //Relations
                    if (tag.Contains("[Relations:") == true)
                    {
                        var tempValue = TagHelper.TagTargetRelationEnumCheck(tag);

                        if (Relations.HasFlag(tempValue) == false)
                        {
                            Relations |= tempValue;
                        }
                    }

                    //FactionTargets
                    if (tag.Contains("[FactionTargets:") == true)
                    {
                        var tempValue = TagHelper.TagStringCheck(tag);

                        if (!string.IsNullOrWhiteSpace(tempValue) && !FactionTargets.Contains(tempValue))
                        {
                            FactionTargets.Add(tempValue);
                        }
                    }

                    //OnlyGetFromEntityOwner
                    if (tag.Contains("[OnlyGetFromEntityOwner:") == true)
                    {
                        OnlyGetFromEntityOwner = TagHelper.TagBoolCheck(tag);
                    }

                    //GetFromMinorityGridOwners
                    if (tag.Contains("[GetFromMinorityGridOwners:") == true)
                    {
                        GetFromMinorityGridOwners = TagHelper.TagBoolCheck(tag);
                    }

                    //PrioritizeSpecifiedFactions
                    if (tag.Contains("[PrioritizeSpecifiedFactions:") == true)
                    {
                        PrioritizeSpecifiedFactions = TagHelper.TagBoolCheck(tag);
                    }

                    //IsStatic
                    if (tag.Contains("[IsStatic:") == true)
                    {
                        IsStatic = TagHelper.TagCheckEnumCheck(tag);
                    }

                    //MinAltitude
                    if (tag.Contains("[MinAltitude:") == true)
                    {
                        MinAltitude = TagHelper.TagDoubleCheck(tag, MinAltitude);
                    }

                    //MaxAltitude
                    if (tag.Contains("[MaxAltitude:") == true)
                    {
                        MaxAltitude = TagHelper.TagDoubleCheck(tag, MaxAltitude);
                    }

                    //NonBroadcastVisualRange
                    if (tag.Contains("[NonBroadcastVisualRange:") == true)
                    {
                        NonBroadcastVisualRange = TagHelper.TagDoubleCheck(tag, NonBroadcastVisualRange);
                    }

                    //MinGravity
                    if (tag.Contains("[MinGravity:") == true)
                    {
                        MinGravity = TagHelper.TagDoubleCheck(tag, MinGravity);
                    }

                    //MaxGravity
                    if (tag.Contains("[MaxGravity:") == true)
                    {
                        MaxGravity = TagHelper.TagDoubleCheck(tag, MaxGravity);
                    }

                    //MinSpeed
                    if (tag.Contains("[MinSpeed:") == true)
                    {
                        MinSpeed = TagHelper.TagDoubleCheck(tag, MinSpeed);
                    }

                    //MaxSpeed
                    if (tag.Contains("[MaxSpeed:") == true)
                    {
                        MaxSpeed = TagHelper.TagDoubleCheck(tag, MaxSpeed);
                    }

                    //MinTargetValue
                    if (tag.Contains("[MinTargetValue:") == true)
                    {
                        MinTargetValue = TagHelper.TagFloatCheck(tag, MinTargetValue);
                    }

                    //MaxTargetValue
                    if (tag.Contains("[MaxTargetValue:") == true)
                    {
                        MaxTargetValue = TagHelper.TagFloatCheck(tag, MaxTargetValue);
                    }

                    //MinMovementScore
                    if (tag.Contains("[MinMovementScore:") == true)
                    {
                        MinMovementScore = TagHelper.TagFloatCheck(tag, MinMovementScore);
                    }

                    //MaxMovementScore
                    if (tag.Contains("[MaxMovementScore:") == true)
                    {
                        MaxMovementScore = TagHelper.TagFloatCheck(tag, MaxMovementScore);
                    }

                    //PrioritizePlayerControlled
                    if (tag.Contains("[PrioritizePlayerControlled:") == true)
                    {
                        PrioritizePlayerControlled = TagHelper.TagBoolCheck(tag);
                    }

                    //Names
                    if (tag.Contains("[Names:") == true)
                    {
                        var tempValue = TagHelper.TagStringCheck(tag);

                        if (!string.IsNullOrWhiteSpace(tempValue) && !Names.Contains(tempValue))
                        {
                            Names.Add(tempValue);
                        }
                    }

                    //UsePartialNameMatching
                    if (tag.Contains("[UsePartialNameMatching:") == true)
                    {
                        UsePartialNameMatching = TagHelper.TagBoolCheck(tag);
                    }

                    //MaxLineOfSight
                    if (tag.Contains("[MaxLineOfSight:") == true)
                    {
                        MaxLineOfSight = TagHelper.TagDoubleCheck(tag, MaxLineOfSight);
                    }

                    //MaxMovementDetectableDistance
                    if (tag.Contains("[MaxMovementDetectableDistance:") == true)
                    {
                        MaxMovementDetectableDistance = TagHelper.TagDoubleCheck(tag, MaxMovementDetectableDistance);
                    }

                    //BroadcastOnlyAntenna
                    if (tag.Contains("[BroadcastOnlyAntenna:") == true)
                    {
                        BroadcastOnlyAntenna = TagHelper.TagBoolCheck(tag);
                    }

                    //MinUnderWaterDepth
                    if (tag.Contains("[MinUnderWaterDepth:") == true)
                    {
                        MinUnderWaterDepth = TagHelper.TagDoubleCheck(tag, MinUnderWaterDepth);
                    }

                    //MaxUnderWaterDepth
                    if (tag.Contains("[MaxUnderWaterDepth:") == true)
                    {
                        MaxUnderWaterDepth = TagHelper.TagDoubleCheck(tag, MaxUnderWaterDepth);
                    }

                    //PlayerKnownLocationFactionOverride
                    if (tag.Contains("[PlayerKnownLocationFactionOverride:") == true)
                    {
                        PlayerKnownLocationFactionOverride = TagHelper.TagStringCheck(tag);
                    }
                }
            }
        }
예제 #13
0
 public TileClickRequest(int x, int y, OwnerTypeEnum ownerType)
 {
     CoordX    = x;
     CoordY    = y;
     OwnerType = ownerType;
 }
예제 #14
0
        public TargetProfile()
        {
            UseCustomTargeting = false;

            Target       = TargetTypeEnum.None;
            BlockTargets = new List <BlockTypeEnum>();

            TimeUntilTargetAcquisition = 1;
            UseTargetRefresh           = false;
            TimeUntilNextRefresh       = 60;
            TimeUntilNextEvaluation    = 1;

            MaxDistance = 12000;

            MatchAllFilters  = new List <TargetFilterEnum>();
            MatchAnyFilters  = new List <TargetFilterEnum>();
            MatchNoneFilters = new List <TargetFilterEnum>();
            GetTargetBy      = TargetSortEnum.ClosestDistance;

            Owners         = OwnerTypeEnum.None;
            Relations      = RelationTypeEnum.None;
            FactionTargets = new List <string>();

            OnlyGetFromEntityOwner      = false;
            GetFromMinorityGridOwners   = false;
            PrioritizeSpecifiedFactions = false;

            IsStatic = CheckEnum.Ignore;

            MinAltitude = -100000;
            MaxAltitude = 100000;

            NonBroadcastVisualRange = 1500;

            MinGravity = 0;
            MaxGravity = 1.1;

            MinSpeed = 0;
            MaxSpeed = 110;

            MinTargetValue = 0;
            MaxTargetValue = 1;

            MinMovementScore = -1;
            MaxMovementScore = -1;

            MaxLineOfSight = -1;

            MaxMovementDetectableDistance = -1;

            PrioritizePlayerControlled = false;

            BroadcastOnlyAntenna = false;

            Names = new List <string>();
            UsePartialNameMatching = false;

            MinUnderWaterDepth = -1;
            MaxUnderWaterDepth = -1;

            PlayerKnownLocationFactionOverride = "";

            ProfileSubtypeId      = "";
            BuiltUniqueFilterList = false;
            AllUniqueFilters      = new List <TargetFilterEnum>();
        }
예제 #15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RuleAllOf" /> class.
 /// </summary>
 /// <param name="id">Unique id for the Rule (required).</param>
 /// <param name="status">The status of the Rule (default to StatusEnum.Enabled).</param>
 /// <param name="ownerId">Owner id (required).</param>
 /// <param name="ownerType">The owner of the rule is either a location or user (required) (default to OwnerTypeEnum.Location).</param>
 /// <param name="creator">creator.</param>
 /// <param name="dateCreated">Created date time (required).</param>
 /// <param name="dateUpdated">Last updated date time (required).</param>
 public RuleAllOf(string id = default(string), StatusEnum?status = StatusEnum.Enabled, string ownerId = default(string), OwnerTypeEnum ownerType = OwnerTypeEnum.Location, Creator?creator = default(Creator?), string dateCreated = default(string), string dateUpdated = default(string))
 {
     // to ensure "id" is required (not null)
     if (id == null)
     {
         throw new ArgumentNullException("id is a required property for RuleAllOf and cannot be null");
     }
     this.Id = id;
     // to ensure "ownerId" is required (not null)
     if (ownerId == null)
     {
         throw new ArgumentNullException("ownerId is a required property for RuleAllOf and cannot be null");
     }
     this.OwnerId   = ownerId;
     this.OwnerType = ownerType;
     // to ensure "dateCreated" is required (not null)
     if (dateCreated == null)
     {
         throw new ArgumentNullException("dateCreated is a required property for RuleAllOf and cannot be null");
     }
     this.DateCreated = dateCreated;
     // to ensure "dateUpdated" is required (not null)
     if (dateUpdated == null)
     {
         throw new ArgumentNullException("dateUpdated is a required property for RuleAllOf and cannot be null");
     }
     this.DateUpdated = dateUpdated;
     this.Status      = status;
     this.Creator     = creator;
 }
예제 #16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetCharactersCharacterIdCalendarEventIdOk" /> class.
 /// </summary>
 /// <param name="date">date string (required).</param>
 /// <param name="duration">Length in minutes (required).</param>
 /// <param name="eventId">event_id integer (required).</param>
 /// <param name="importance">importance integer (required).</param>
 /// <param name="ownerId">owner_id integer (required).</param>
 /// <param name="ownerName">owner_name string (required).</param>
 /// <param name="ownerType">owner_type string (required).</param>
 /// <param name="response">response string (required).</param>
 /// <param name="text">text string (required).</param>
 /// <param name="title">title string (required).</param>
 public GetCharactersCharacterIdCalendarEventIdOk(DateTime?date = default(DateTime?), int?duration = default(int?), int?eventId = default(int?), int?importance = default(int?), int?ownerId = default(int?), string ownerName = default(string), OwnerTypeEnum ownerType = default(OwnerTypeEnum), string response = default(string), string text = default(string), string title = default(string))
 {
     // to ensure "date" is required (not null)
     if (date == null)
     {
         throw new InvalidDataException("date is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.Date = date;
     }
     // to ensure "duration" is required (not null)
     if (duration == null)
     {
         throw new InvalidDataException("duration is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.Duration = duration;
     }
     // to ensure "eventId" is required (not null)
     if (eventId == null)
     {
         throw new InvalidDataException("eventId is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.EventId = eventId;
     }
     // to ensure "importance" is required (not null)
     if (importance == null)
     {
         throw new InvalidDataException("importance is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.Importance = importance;
     }
     // to ensure "ownerId" is required (not null)
     if (ownerId == null)
     {
         throw new InvalidDataException("ownerId is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.OwnerId = ownerId;
     }
     // to ensure "ownerName" is required (not null)
     if (ownerName == null)
     {
         throw new InvalidDataException("ownerName is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.OwnerName = ownerName;
     }
     // to ensure "ownerType" is required (not null)
     if (ownerType == null)
     {
         throw new InvalidDataException("ownerType is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.OwnerType = ownerType;
     }
     // to ensure "response" is required (not null)
     if (response == null)
     {
         throw new InvalidDataException("response is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.Response = response;
     }
     // to ensure "text" is required (not null)
     if (text == null)
     {
         throw new InvalidDataException("text is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.Text = text;
     }
     // to ensure "title" is required (not null)
     if (title == null)
     {
         throw new InvalidDataException("title is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.Title = title;
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GetCharactersCharacterIdCalendarEventIdOk" /> class.
 /// </summary>
 /// <param name="Date">date string (required).</param>
 /// <param name="Duration">Length in minutes (required).</param>
 /// <param name="EventId">event_id integer (required).</param>
 /// <param name="Importance">importance integer (required).</param>
 /// <param name="OwnerId">owner_id integer (required).</param>
 /// <param name="OwnerName">owner_name string (required).</param>
 /// <param name="OwnerType">owner_type string (required).</param>
 /// <param name="Response">response string (required).</param>
 /// <param name="Text">text string (required).</param>
 /// <param name="Title">title string (required).</param>
 public GetCharactersCharacterIdCalendarEventIdOk(DateTime?Date = default(DateTime?), int?Duration = default(int?), int?EventId = default(int?), int?Importance = default(int?), int?OwnerId = default(int?), string OwnerName = default(string), OwnerTypeEnum OwnerType = default(OwnerTypeEnum), string Response = default(string), string Text = default(string), string Title = default(string))
 {
     // to ensure "Date" is required (not null)
     if (Date == null)
     {
         throw new InvalidDataException("Date is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.Date = Date;
     }
     // to ensure "Duration" is required (not null)
     if (Duration == null)
     {
         throw new InvalidDataException("Duration is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.Duration = Duration;
     }
     // to ensure "EventId" is required (not null)
     if (EventId == null)
     {
         throw new InvalidDataException("EventId is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.EventId = EventId;
     }
     // to ensure "Importance" is required (not null)
     if (Importance == null)
     {
         throw new InvalidDataException("Importance is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.Importance = Importance;
     }
     // to ensure "OwnerId" is required (not null)
     if (OwnerId == null)
     {
         throw new InvalidDataException("OwnerId is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.OwnerId = OwnerId;
     }
     // to ensure "OwnerName" is required (not null)
     if (OwnerName == null)
     {
         throw new InvalidDataException("OwnerName is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.OwnerName = OwnerName;
     }
     // to ensure "OwnerType" is required (not null)
     if (OwnerType == null)
     {
         throw new InvalidDataException("OwnerType is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.OwnerType = OwnerType;
     }
     // to ensure "Response" is required (not null)
     if (Response == null)
     {
         throw new InvalidDataException("Response is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.Response = Response;
     }
     // to ensure "Text" is required (not null)
     if (Text == null)
     {
         throw new InvalidDataException("Text is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.Text = Text;
     }
     // to ensure "Title" is required (not null)
     if (Title == null)
     {
         throw new InvalidDataException("Title is a required property for GetCharactersCharacterIdCalendarEventIdOk and cannot be null");
     }
     else
     {
         this.Title = Title;
     }
 }
 //TODO: Create interface IMatrix
 public TileMatrix Create(int sizeX, int sizeY, OwnerTypeEnum ownerTypeEnum, ITileFactory tileFactory)
 {
     return(new TileMatrix(sizeX, sizeY, ownerTypeEnum, tileFactory));
 }