本文整理汇总了C#中Lot.LotLocationIsPublicResidential方法的典型用法代码示例。如果您正苦于以下问题:C# Lot.LotLocationIsPublicResidential方法的具体用法?C# Lot.LotLocationIsPublicResidential怎么用?C# Lot.LotLocationIsPublicResidential使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lot
的用法示例。
在下文中一共展示了Lot.LotLocationIsPublicResidential方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Run
protected override OptionResult Run(Lot lot, Household me)
{
if (lot == null) return OptionResult.Failure;
foreach (GameObject obj in lot.GetObjects<GameObject>())
{
if ((obj.InUse) || (!obj.InWorld)) continue;
if (obj.Charred)
{
obj.Charred = false;
if (obj is Windows)
{
RepairableComponent.CreateReplaceObject(obj);
}
}
RepairableComponent repairable = obj.Repairable;
if ((repairable != null) && (repairable.Broken))
{
repairable.ForceRepaired(Sim.ActiveActor);
}
}
LotLocation[] burntTiles = World.GetBurntTiles(lot.LotId, LotLocation.Invalid);
if (burntTiles.Length > 0x0)
{
foreach (LotLocation burnt in burntTiles)
{
if ((lot.LotLocationIsPublicResidential(burnt)) && ((lot.TombRoomManager == null) || !lot.TombRoomManager.IsObjectInATombRoom(burnt)))
{
World.SetBurnt(lot.LotId, burnt, false);
}
}
}
return OptionResult.SuccessClose;
}
示例2: Run
protected override OptionResult Run(Lot lot, Household me)
{
if (lot == null) return OptionResult.Failure;
World.DecayLeaves(lot.LotId, 1f);
foreach (GameObject obj in lot.GetObjects<GameObject>())
{
if (obj.InUse) continue;
if (obj.InInventory) continue;
if (obj.IsCleanable)
{
obj.Cleanable.ForceClean();
}
Hamper hamper = obj as Hamper;
if (hamper != null)
{
hamper.RemoveClothingPiles();
}
IThrowAwayable awayable = obj as IThrowAwayable;
if ((awayable != null) &&
(!awayable.InUse) &&
(awayable.HandToolAllowUserPickupBase()) &&
(awayable.ShouldBeThrownAway()) &&
((awayable.Parent == null) || (!awayable.Parent.InUse)) &&
(!(awayable is Bar.Glass)) &&
(!(awayable is Bill)))
{
bool flag = false;
if (awayable is BarTray)
{
foreach (Slot slot in awayable.GetContainmentSlots())
{
if (awayable.GetContainedObject(slot) is Bar.Glass)
{
flag = true;
break;
}
}
}
if (!flag)
{
awayable.ThrowAwayImmediately();
}
}
if (obj is IDestroyOnMagicalCleanup)
{
obj.FadeOut(false, true);
}
}
lot.FireManager.RestoreObjects();
LotLocation[] puddles = World.GetPuddles(lot.LotId, LotLocation.Invalid);
if (puddles.Length > 0x0)
{
foreach (LotLocation location in puddles)
{
if ((lot.TombRoomManager == null) || !lot.TombRoomManager.IsObjectInATombRoom(location))
{
PuddleManager.RemovePuddle(lot.LotId, location);
}
}
}
LotLocation[] burntTiles = World.GetBurntTiles(lot.LotId, LotLocation.Invalid);
if (burntTiles.Length > 0x0)
{
foreach (LotLocation location2 in burntTiles)
{
if ((lot.LotLocationIsPublicResidential(location2)) && ((lot.TombRoomManager == null) || !lot.TombRoomManager.IsObjectInATombRoom(location2)))
{
World.SetBurnt(lot.LotId, location2, false);
}
}
}
if (me != null)
{
List<Fridge> fridges = new List<Fridge>(lot.GetObjects<Fridge>());
if (fridges.Count > 0)
{
Fridge fridge = fridges[0];
if ((fridge != null) &&
(me.SharedFridgeInventory != null) &&
(me.SharedFamilyInventory.Inventory != null))
{
foreach (ServingContainer container in Sims3.Gameplay.Queries.GetObjects<ServingContainer>(lot))
{
if ((!container.InUse) &&
(fridge.HandToolAllowDragDrop(container)) &&
(container.HasFood) &&
(container.HasFoodLeft()) &&
(!container.IsSpoiled) &&
(container.GetQuality() >= Quality.Neutral))
//.........这里部分代码省略.........