Esempio n. 1
0
 public long SetMarketRate(SectorManager.MarketFreedom marketFreedom, CountryGovernment cityInGovernment, long budgetValue)
 {
     switch (marketFreedom)
     {
     case SectorManager.MarketFreedom.NoMarket:
     case SectorManager.MarketFreedom.FreeInternationalMarket:
     case SectorManager.MarketFreedom.FreeRegionMarket:
     case SectorManager.MarketFreedom.EmergingMarket:
     case SectorManager.MarketFreedom.GovernmentRegulatedMarket:
     case SectorManager.MarketFreedom.PublicPrivateControlled:
     case SectorManager.MarketFreedom.StateControlled:
     case SectorManager.MarketFreedom.IllegalMonopoly:
     case SectorManager.MarketFreedom.Monopoly:
     default:
         return(budgetValue);
     }
 }
Esempio n. 2
0
    /// <summary>
    /// this gets the budget funding for a market sector, basic the money the government uses a subity for the industry, the government backstops profit losses and min income from the
    /// sector based on the public funding, ie they are there own customer so Aerospace Public Funding is 500M, the Industry generates 1.5B in profits, the first 500M isn't actually profit
    /// so it wont be counte as income, the 1B will be taxed and produce income for the state, the benefit of Public is to gurantee against lose, if the 500M and the industrial collapses
    /// and loses 1.5B dollars the government absorbs the first 500M of the lost so it is only 1B dollars now if the states Public budget is 500M and they industry only does 300M in profit
    /// then there is no negative impact and the funding is reallocated into the next quarters budget as a surplus
    /// </summary>
    /// <param name="sector"></param>
    /// <param name="marketFreedom"></param>
    /// <param name="cityInGovernment"></param>
    /// <param name="budget"></param>
    /// <returns></returns>
    public long SetSectorPublicBudget(SectorManager.Sectors sector, SectorManager.MarketFreedom marketFreedom, CountryGovernment cityInGovernment, CountryBudget budget)
    {
        switch (sector)
        {
        case SectorManager.Sectors.Aerospace:
            SetMarketRate(marketFreedom, cityInGovernment, budget.CountryExpenses.Aerospace);
            break;

        case SectorManager.Sectors.Banking:
            SetMarketRate(marketFreedom, cityInGovernment, budget.CountryFixedExpenses.DebtPayment);
            break;

        case SectorManager.Sectors.Insurance:
            SetMarketRate(marketFreedom, cityInGovernment, budget.CountryFixedExpenses.DebtPayment);
            break;

        case SectorManager.Sectors.ConsumerGoods:
            SetMarketRate(marketFreedom, cityInGovernment, budget.CountryExpenses.Commerce);
            break;

        case SectorManager.Sectors.Defense:
            SetMarketRate(marketFreedom, cityInGovernment, budget.CountryFixedExpenses.SecurityMilitary);
            break;

        case SectorManager.Sectors.Energy:
            SetMarketRate(marketFreedom, cityInGovernment, budget.CountryExpenses.Energy);
            break;

        case SectorManager.Sectors.Manufacturing:
            SetMarketRate(marketFreedom, cityInGovernment, budget.CountryFixedExpenses.UnitProduction);
            break;

        case SectorManager.Sectors.Mining:
            SetMarketRate(marketFreedom, cityInGovernment, budget.CountryExpenses.InfrastructureConstruction);
            break;

        case SectorManager.Sectors.Pharma:
            SetMarketRate(marketFreedom, cityInGovernment, budget.CountryExpenses.HealthCare);
            break;

        case SectorManager.Sectors.RealEstate:
            SetMarketRate(marketFreedom, cityInGovernment, budget.CountryFixedExpenses.UnitProduction);
            break;

        case SectorManager.Sectors.Health:
            SetMarketRate(marketFreedom, cityInGovernment, budget.CountryExpenses.HealthCare);
            break;

        case SectorManager.Sectors.Tourism:
            SetMarketRate(marketFreedom, cityInGovernment, budget.CountryExpenses.Tourism);
            break;

        case SectorManager.Sectors.Telecom:
            SetMarketRate(marketFreedom, cityInGovernment, budget.CountryExpenses.Telecom);
            break;

        case SectorManager.Sectors.Technology:
            SetMarketRate(marketFreedom, cityInGovernment, budget.CountryExpenses.Research);
            break;

        case SectorManager.Sectors.Transport:
            SetMarketRate(marketFreedom, cityInGovernment, budget.CountryFixedExpenses.InfrastructureMainance);
            break;

        case SectorManager.Sectors.Agriculture:
            SetMarketRate(marketFreedom, cityInGovernment, budget.CountryExpenses.Agriculture);
            break;

        default:
            return(0);
        }
        return(0);
    }