Ejemplo n.º 1
0
        public void CheckDefinitionRelatedConditionsOrThrow(IZone zone, Position spawnPosition, long owner)
        {
            //the egg WILL build this pbsNode after activation
            var pbsNodeEntityDefault = TargetPBSNodeDefault;

            if (pbsNodeEntityDefault == EntityDefault.None)
            {
                Logger.Error("pbsNodeDefinition was not found:" + pbsNodeEntityDefault + " in egg:" + Definition + " " + ED.Name);
                throw new PerpetuumException(ErrorCodes.ConsistencyError);
            }


            if (pbsNodeEntityDefault.CategoryFlags.IsCategory(CategoryFlags.cf_pbs_docking_base))
            {
                //check deploying of bases
                PBSHelper.ValidatePBSDockingBasePlacement(zone, spawnPosition, owner, pbsNodeEntityDefault).ThrowIfError();
                return;
            }

            //kiveve amiket lehet kivulre pakolni
            if (!PBSHelper.IsPlaceableOutsideOfBase(pbsNodeEntityDefault.CategoryFlags))
            {
                //checks for corporation's docking base in range
                PBSHelper.ValidatePBSNodePlacing(zone, spawnPosition, owner, pbsNodeEntityDefault).ThrowIfError();
            }

            //itt meg lehet mast is megnezni egyelore nem kellett
        }