Esempio n. 1
0
    private bool CanAfford(Tradable tradable, int quantity)
    {
        DepartmentOfTheTreasury agency = base.Empire.GetAgency <DepartmentOfTheTreasury>();
        float priceWithSalesTaxes      = tradable.GetPriceWithSalesTaxes(TradableTransactionType.Buyout, base.Empire, (float)quantity);

        return(agency.CanAfford(new ConstructionCost[]
        {
            new ConstructionCost(DepartmentOfTheTreasury.Resources.EmpireMoney, priceWithSalesTaxes, true, false)
        }));
    }
Esempio n. 2
0
    private string GetFormattedPrice(Tradable tradable, int quantity)
    {
        float priceWithSalesTaxes = tradable.GetPriceWithSalesTaxes(TradableTransactionType.Buyout, base.Empire, (float)quantity);

        ConstructionCost[] costs = new ConstructionCost[]
        {
            new ConstructionCost(DepartmentOfTheTreasury.Resources.EmpireMoney, priceWithSalesTaxes, true, false)
        };
        return(GuiFormater.FormatCost(base.Empire, costs, false, 1, null));
    }