Esempio n. 1
0
        public static void UpdateSectorUrl(SectorObj curSector, string newUrl)
        {
            string      fullURL = "sector";
            RestRequest request = new RestRequest(fullURL, Method.PUT);

            request.AddParameter("updateurl", true);
            request.AddParameter("url", newUrl);
            request.AddParameter("sectorid", curSector.Id);


            apiClient.ExecuteAsync(request, null);
        }
Esempio n. 2
0
        public SectorObj(SectorObj master)
        {
            lowTemp     = master.lowTemp;
            highTemp    = master.highTemp;
            surfaceType = master.surfaceType;
            ownerId     = master.ownerId;
            claimed     = master.claimed;

            foreach (StructureObj curStruct in master.structures)
            {
                StructureObj newStruct = new StructureObj(curStruct);
                newStruct.sector = this;
                structures.Add(newStruct);
            }
        }
Esempio n. 3
0
        public static void FetchSector(long sectorId, SectorObj_callback callback)
        {
            string      fullURL = "sector";
            RestRequest request = new RestRequest(fullURL, Method.GET);

            request.AddParameter("sectorid", sectorId);


            apiClient.ExecuteAsync(request, (response) =>
            {
                if (response.StatusCode == HttpStatusCode.OK && response.Content != "null")
                {
                    SectorObj newObj = response.Content.FromJson <SectorObj>();
                    callback(newObj);
                }
                else if (response.StatusCode != 0)
                {
                    callback(null);
                }
            });
        }
Esempio n. 4
0
 public SectorPaintObj(SectorObj theSource)
 {
     this.Id          = theSource.Id;
     this.surfaceType = theSource.surfaceType;
 }