本文整理汇总了C#中Lot.GetUnfurnishedCost方法的典型用法代码示例。如果您正苦于以下问题:C# Lot.GetUnfurnishedCost方法的具体用法?C# Lot.GetUnfurnishedCost怎么用?C# Lot.GetUnfurnishedCost使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lot
的用法示例。
在下文中一共展示了Lot.GetUnfurnishedCost方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetDetails
public static string GetDetails(Lot lot, Household me)
{
string msg = null;
if (me != null)
{
msg += Common.Localize("StatusHouse:HouseName", false, new object[] { me.Name });
}
if (lot != null)
{
msg += Common.Localize("StatusHouse:LotName", false, new object[] { lot.Name });
}
if (me != null)
{
msg += Common.Localize("StatusHouse:Funds", false, new object[] { me.FamilyFunds });
if (me.RealEstateManager != null)
{
int realEstate = 0;
foreach (PropertyData data in me.RealEstateManager.AllProperties)
{
realEstate += data.TotalValue;
}
msg += Common.Localize("StatusHouse:RealEstate", false, new object[] { realEstate });
}
if (lot != null)
{
int taxes, savings, vacationHome;
GetTaxes(me, out taxes, out savings, out vacationHome);
msg += Common.Localize("StatusHouse:Taxes", false, new object[] { (taxes - vacationHome) + savings, vacationHome, savings, taxes });
}
}
if (lot == null)
{
msg += Common.Localize("StatusHouse:Homeless");
}
else
{
msg += Common.Localize("StatusHouse:Address", false, new object[] { lot.Address, Lots.GetUnfurnishedCost(lot), lot.Cost - lot.GetUnfurnishedCost(), lot.Cost });
int iFridges = 0, iCribs = 0, iSingleBeds = 0, iDoubleBeds = 0;
List<IGameObject> lotObjects = new List<IGameObject>(lot.GetObjects<IGameObject>());
foreach (IGameObject obj in lotObjects)
{
if (obj is Sims3.Gameplay.Objects.Appliances.Fridge)
{
iFridges++;
}
else if (obj is ICrib)
{
iCribs++;
}
else if (obj is IBedDouble)
{
iDoubleBeds++;
}
else if (obj is IBedSingle)
{
iSingleBeds++;
}
}
msg += Common.Localize("StatusHouse:Objects", false, new object[] { iFridges, iCribs, iDoubleBeds, iSingleBeds });
}
if ((me != null) && (!SimTypes.IsService(me)))
{
int count = 0;
string occupants = null;
foreach (SimDescription sim in CommonSpace.Helpers.Households.All(me))
{
occupants += Common.NewLine + sim.FullName;
count++;
if (count >= 24) break;
}
msg += Common.Localize("StatusHouse:Occupants", false, new object[] { occupants });
}
return msg;
}
示例2: GetLotCost
public static int GetLotCost(Lot lot, bool buyFurnished)
{
if (Settings.mFreeRealEstate) return 0;
if ((BinModel.Singleton != null) && (BinModel.Singleton.FreeRealEstate)) return 0;
if (lot.IsApartmentLot) return 0;
if (sStoryProgressionGetLotCost.Valid)
{
int rentalCost = sStoryProgressionGetLotCost.Invoke<int>(new object[] { lot });
if (rentalCost != lot.Cost)
{
if (buyFurnished)
{
return rentalCost;
}
else
{
return 0;
}
}
}
if (buyFurnished)
{
return lot.Cost;
}
else
{
return lot.GetUnfurnishedCost();
}
}