コード例 #1
0
 /// <summary>
 /// Get entities from adoxio_areas
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='top'>
 /// </param>
 /// <param name='skip'>
 /// </param>
 /// <param name='search'>
 /// </param>
 /// <param name='filter'>
 /// </param>
 /// <param name='count'>
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <MicrosoftDynamicsCRMadoxioAreaCollection> GetAsync(this IAreas operations, int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(top, skip, search, filter, count, orderby, select, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #2
0
 /// <summary>
 /// Get entity from adoxio_areas by key
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='adoxioAreaid'>
 /// key: adoxio_areaid of adoxio_area
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <MicrosoftDynamicsCRMadoxioArea> GetByKeyAsync(this IAreas operations, string adoxioAreaid, IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetByKeyWithHttpMessagesAsync(adoxioAreaid, select, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #3
0
 /// <summary>
 /// Add new entity to adoxio_areas
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// New entity
 /// </param>
 /// <param name='prefer'>
 /// Required in order for the service to return a JSON representation of the
 /// object.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <MicrosoftDynamicsCRMadoxioArea> CreateAsync(this IAreas operations, MicrosoftDynamicsCRMadoxioArea body, string prefer = "return=representation", CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(body, prefer, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #4
0
 public override void OnCreated(IAreas areas)
 {
     base.OnCreated(areas);
     if (ARUT.AdjustAreas == true)
     {
         ARUT.WriteLog("OnCreate MaxAreas: Spaces: " + ARUT.MaxAreas);
         areas.maxAreaCount = ARUT.MaxAreas;
     }
 }
コード例 #5
0
        public override void OnCreated(IAreas areas)
        {
            base.OnCreated(areas);

            // save the reference to the IAreas object for future use
            myAreas = areas;

            // set the maximum number of areas that can be played
            areas.maxAreaCount = MaxAreas;
        }
コード例 #6
0
        // Thread: Main
        public override void OnRefreshMilestones()
        {
            if (Singleton <SimulationManager> .instance.m_metaData.m_updateMode == SimulationManager.UpdateMode.NewGame)
            {
                // only do once
                if (!unlockedAreas)
                {
                    IAreas AreasManager = Managers.areas;

                    // calculate original cash
                    long originalCash = EconomyManager.instance.InternalCashAmount;

                    // causes rendering issue in new areas
                    Singleton <UnlockManager> .instance.UnlockAllProgressionMilestones();

                    // unlock all tiles
                    int rows = (int)Math.Sqrt(AreasManager.maxAreaCount);

                    for (int x = 0; x < rows; x++)
                    {
                        for (int y = 0; y < rows; y++)
                        {
                            int column = x;
                            int row    = y;

                            if (rows.Equals(3))
                            {
                                column = x + 1;
                                row    = y + 1;
                            }

                            if (!AreasManager.IsAreaUnlocked(column, row) && AreasManager.CanUnlockArea(column, row))
                            {
                                AreasManager.UnlockArea(column, row, false);
                            }
                        }
                    }

                    // copy milestone info so we can reset it to default
                    MilestoneInfo[] MilestoneInfos = new MilestoneInfo[UnlockManager.instance.m_allMilestones.Count];
                    UnlockManager.instance.m_allMilestones.Values.CopyTo(MilestoneInfos, 0);

                    UnlockManager.ResetMilestones(MilestoneInfos, false);

                    // calculated added cash
                    long finalCash      = EconomyManager.instance.InternalCashAmount;
                    int  cashDifference = Convert.ToInt32(originalCash - finalCash);

                    // remove cash difference
                    EconomyManager.instance.AddResource(EconomyManager.Resource.LoanAmount, cashDifference, ItemClass.Service.None, ItemClass.SubService.None, ItemClass.Level.None);
                }
            }

            unlockedAreas = true;
        }
コード例 #7
0
ファイル: Areas.cs プロジェクト: snowy3206/CSL-PurchaseIt
 public override void OnCreated(IAreas areas)
 {
     try
     {
         if (ModConfig.Instance.Purchasable)
         {
             areas.maxAreaCount = 25;
         }
     }
     catch (Exception e)
     {
         Debug.Log("[Purchase It!] Areas:OnCreated -> Exception: " + e.Message);
     }
 }
コード例 #8
0
 //Thread: Main
 public void OnCreated(IAreas areas)
 {
     ChirpLog.Debug("IAreas Created");
 }
コード例 #9
0
 /// <summary>
 /// Get entity from adoxio_areas by key
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='adoxioAreaid'>
 /// key: adoxio_areaid of adoxio_area
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 public static MicrosoftDynamicsCRMadoxioArea GetByKey(this IAreas operations, string adoxioAreaid, IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>))
 {
     return(operations.GetByKeyAsync(adoxioAreaid, select, expand).GetAwaiter().GetResult());
 }
コード例 #10
0
 /// <summary>
 /// Add new entity to adoxio_areas
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// New entity
 /// </param>
 /// <param name='prefer'>
 /// Required in order for the service to return a JSON representation of the
 /// object.
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse <MicrosoftDynamicsCRMadoxioArea> CreateWithHttpMessages(this IAreas operations, MicrosoftDynamicsCRMadoxioArea body, string prefer = "return=representation", Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.CreateWithHttpMessagesAsync(body, prefer, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
コード例 #11
0
 /// <summary>
 /// Get entities from bcgov_areas
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='top'>
 /// </param>
 /// <param name='skip'>
 /// </param>
 /// <param name='search'>
 /// </param>
 /// <param name='filter'>
 /// </param>
 /// <param name='count'>
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 public static AreasGetResponseModel Get(this IAreas operations, int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>))
 {
     return(operations.GetAsync(top, skip, search, filter, count, orderby, select, expand).GetAwaiter().GetResult());
 }
コード例 #12
0
 /// <summary>
 /// Delete entity from adoxio_areas
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='adoxioAreaid'>
 /// key: adoxio_areaid of adoxio_area
 /// </param>
 /// <param name='ifMatch'>
 /// ETag
 /// </param>
 public static void Delete(this IAreas operations, string adoxioAreaid, string ifMatch = default(string))
 {
     operations.DeleteAsync(adoxioAreaid, ifMatch).GetAwaiter().GetResult();
 }
コード例 #13
0
 /// <summary>
 /// Update entity in adoxio_areas
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='adoxioAreaid'>
 /// key: adoxio_areaid of adoxio_area
 /// </param>
 /// <param name='body'>
 /// New property values
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task UpdateAsync(this IAreas operations, string adoxioAreaid, MicrosoftDynamicsCRMadoxioArea body, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.UpdateWithHttpMessagesAsync(adoxioAreaid, body, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
コード例 #14
0
 public void OnCreated(IAreas areas)
 {
     areas.maxAreaCount = 25;
 }
コード例 #15
0
 public override void OnCreated(IAreas areas)
 {
     base.OnCreated(areas);
     areas.maxAreaCount = 25;
 }
コード例 #16
0
 public override void OnCreated(IAreas areas)
 {
 }
コード例 #17
0
 public void OnCreated(IAreas areas)
 {
     areas.maxAreaCount = 25;
 }
コード例 #18
0
 public override void OnCreated(IAreas areas)
 {
     areasObj         = areas;
     oldAreasMaxCount = areas.maxAreaCount;
     Update();
 }
コード例 #19
0
 /// <summary>
 /// Get entity from adoxio_areas by key
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='adoxioAreaid'>
 /// key: adoxio_areaid of adoxio_area
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse <MicrosoftDynamicsCRMadoxioArea> GetByKeyWithHttpMessages(this IAreas operations, string adoxioAreaid, IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.GetByKeyWithHttpMessagesAsync(adoxioAreaid, select, expand, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
コード例 #20
0
 /// <summary>
 /// Update entity in adoxio_areas
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='adoxioAreaid'>
 /// key: adoxio_areaid of adoxio_area
 /// </param>
 /// <param name='body'>
 /// New property values
 /// </param>
 public static void Update(this IAreas operations, string adoxioAreaid, MicrosoftDynamicsCRMadoxioArea body)
 {
     operations.UpdateAsync(adoxioAreaid, body).GetAwaiter().GetResult();
 }
コード例 #21
0
 /// <summary>
 /// Delete entity from adoxio_areas
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='adoxioAreaid'>
 /// key: adoxio_areaid of adoxio_area
 /// </param>
 /// <param name='ifMatch'>
 /// ETag
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse DeleteWithHttpMessages(this IAreas operations, string adoxioAreaid, string ifMatch = default(string), Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.DeleteWithHttpMessagesAsync(adoxioAreaid, ifMatch, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
コード例 #22
0
 /// <summary>
 /// Update entity in adoxio_areas
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='adoxioAreaid'>
 /// key: adoxio_areaid of adoxio_area
 /// </param>
 /// <param name='body'>
 /// New property values
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse UpdateWithHttpMessages(this IAreas operations, string adoxioAreaid, MicrosoftDynamicsCRMadoxioArea body, Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.UpdateWithHttpMessagesAsync(adoxioAreaid, body, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
コード例 #23
0
 /// <summary>
 /// Invoked when the extension initializes.
 /// Thread: Main
 /// For more info on IAreas, see #IAreas.
 /// We don't use this because we already have another OnCreated method.
 /// </summary>
 /// <param name="areas">Areas.</param>
 public void OnCreated(IAreas areas)
 {
     Log("IAreasExtension::OnCreated");
 }
コード例 #24
0
 /// <summary>
 /// Delete entity from adoxio_areas
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='adoxioAreaid'>
 /// key: adoxio_areaid of adoxio_area
 /// </param>
 /// <param name='ifMatch'>
 /// ETag
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IAreas operations, string adoxioAreaid, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(adoxioAreaid, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
コード例 #25
0
 public virtual void OnCreated(IAreas areas)
 {
     this.AreasManager = areas;
     this.isCreated    = true;
 }
コード例 #26
0
 /// <summary>
 /// Get entities from adoxio_areas
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='top'>
 /// </param>
 /// <param name='skip'>
 /// </param>
 /// <param name='search'>
 /// </param>
 /// <param name='filter'>
 /// </param>
 /// <param name='count'>
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 public static MicrosoftDynamicsCRMadoxioAreaCollection Get(this IAreas operations, int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>))
 {
     return(operations.GetAsync(top, skip, search, filter, count, orderby, select, expand).GetAwaiter().GetResult());
 }
コード例 #27
0
 /// <summary>
 /// Get entities from adoxio_areas
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='top'>
 /// </param>
 /// <param name='skip'>
 /// </param>
 /// <param name='search'>
 /// </param>
 /// <param name='filter'>
 /// </param>
 /// <param name='count'>
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 /// <param name='customHeaders'>
 /// Headers that will be added to request.
 /// </param>
 public static HttpOperationResponse <MicrosoftDynamicsCRMadoxioAreaCollection> GetWithHttpMessages(this IAreas operations, int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), Dictionary <string, List <string> > customHeaders = null)
 {
     return(operations.GetWithHttpMessagesAsync(top, skip, search, filter, count, orderby, select, expand, customHeaders, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult());
 }
コード例 #28
0
 public void OnCreated(IAreas areas)
 {
 }
コード例 #29
0
 /// <summary>
 /// Add new entity to adoxio_areas
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// New entity
 /// </param>
 /// <param name='prefer'>
 /// Required in order for the service to return a JSON representation of the
 /// object.
 /// </param>
 public static MicrosoftDynamicsCRMadoxioArea Create(this IAreas operations, MicrosoftDynamicsCRMadoxioArea body, string prefer = "return=representation")
 {
     return(operations.CreateAsync(body, prefer).GetAwaiter().GetResult());
 }
コード例 #30
0
 public override void OnCreated(IAreas areas)
 {
     areas.maxAreaCount = 25;
 }
コード例 #31
0
 //Thread: Main
 public override void OnCreated(IAreas areas)
 {
     ChirpLog.Debug("IAreas Created");
 }