Beispiel #1
0
        public ActualLawViewModel(CountryPolicy policy)
        {
            CurrencySymbol = Persistent.Countries.GetCountryCurrency(policy.CountryID).Symbol;

            CitizenFee                         = policy.CitizenFee;
            CitizenCompanyCost                 = policy.CitizenCompanyCost;
            OrganisationCompanyCost            = policy.OrganisationCompanyCost;
            NormalJobMarketFee                 = policy.NormalJobMarketFee;
            ContractJobMarketFee               = policy.ContractJobMarketFee;
            MinimumContractLength              = policy.MinimumContractLength;
            MaximumContractLength              = policy.MaximumContractLength;
            NormalCongressVotingWinPercentage  = (double)policy.NormalCongressVotingWinPercentage;
            PartyFoundingFee                   = policy.PartyFoundingFee;
            PartyPresidentCadenceLength        = policy.PartyPresidentCadenceLength;
            CongressCadenceLength              = policy.CongressCadenceLength;
            CongressVotingLength               = policy.CongressVotingLength;
            PresidentCadenceLength             = policy.PresidentCadenceLength;
            OrganisationCreateCost             = policy.OrganisationCreateCost;
            MarketOfferCost                    = policy.MarketOfferCost;
            NewspaperCreateCost                = policy.NewspaperCreateCost;
            ArticleTax                         = (double)policy.ArticleTax;
            MonetaryTaxRate                    = (double)policy.MonetaryTaxRate;
            MinimumMonetaryTax                 = (double)policy.MinimumMonetaryTax;
            TreasuryLawAllowHolder             = (LawAllowHolderEnum)policy.TreasuryVisibilityLawAllowHolderID;
            NationalCompanyBuildLawAllowHolder = (LawAllowHolderEnum)policy.CountryCompanyBuildLawAllowHolder;
            MinimalWage                        = policy.MinimalWage;
        }
Beispiel #2
0
        public static string ToHumanReadableString(this LawAllowHolderEnum holder)
        {
            switch (holder)
            {
            case LawAllowHolderEnum.Congress:
                return("congress");

            case LawAllowHolderEnum.President:
                return("president");

            case LawAllowHolderEnum.PresidentAndCongress:
                return("president and congress");
            }
            throw new NotImplementedException();
        }
Beispiel #3
0
 public ViewChangeTreasureLawHolderViewModel(Entities.CongressVoting voting, bool isPlayerCongressman, bool canVote)
     : base(voting, isPlayerCongressman, canVote)
 {
     LawHolder = (LawAllowHolderEnum)Enum.Parse(typeof(LawAllowHolderEnum), voting.Argument1);
 }
Beispiel #4
0
 public ChangeTreasureLawHolderVotingParameters(LawAllowHolderEnum lawHolder)
 {
     this.LawHolder = lawHolder;
 }
Beispiel #5
0
 public ChangeCompanyCreationLawHolderVotingParameters(LawAllowHolderEnum lawHolder)
 {
     LawHolder = lawHolder;
 }