本文整理汇总了C#中Lot.GetAllActors方法的典型用法代码示例。如果您正苦于以下问题:C# Lot.GetAllActors方法的具体用法?C# Lot.GetAllActors怎么用?C# Lot.GetAllActors使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lot
的用法示例。
在下文中一共展示了Lot.GetAllActors方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Run
//.........这里部分代码省略.........
{
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))
{
me.SharedFridgeInventory.Inventory.TryToAdd(container, false);
}
}
}
}
}
foreach (Sim sim in lot.GetAllActors())
{
if (sim.Inventory == null) continue;
foreach (IThrowAwayable awayable in sim.Inventory.FindAll<IThrowAwayable>(true))
{
if (awayable == null) continue;
if (!awayable.HandToolAllowUserPickupBase()) continue;
if (!awayable.ShouldBeThrownAway()) continue;
if (awayable.InUse) continue;
if ((awayable is Newspaper) && !(awayable as Newspaper).IsOld) continue;
if (awayable is TrashPileOpportunity) continue;
if ((awayable is PreparedFood) && !(awayable as PreparedFood).IsSpoiled) continue;
awayable.ThrowAwayImmediately();
}
}
return OptionResult.SuccessClose;
}
示例2: RegisterRoomListeners
public static void RegisterRoomListeners(Lot lot)
{
if (lot != null && !mRegistered.Contains(lot.LotId) && !lot.IsWorldLot)
{
LotDisplayLevelInfo info = World.LotGetDisplayLevelInfo(lot.LotId);
for (int i = info.mMin; i <= info.mMax; i++)
{
foreach (int room in World.GetInsideRoomsAtLevel(lot.LotId, i, eRoomDefinition.LightBlocking))
{
List<Lot.OnAllowedInRoomCheck> list;
if (!lot.mRoomRestrictionCheckCallbacks.TryGetValue(room, out list))
{
list = new List<Lot.OnAllowedInRoomCheck>();
lot.mRoomRestrictionCheckCallbacks.Add(room, list);
}
if (!list.Contains(new Lot.OnAllowedInRoomCheck(OnAllowedInRoomCheck)))
{
list.Add(new Lot.OnAllowedInRoomCheck(OnAllowedInRoomCheck));
}
}
}
foreach (Sim sim in lot.GetAllActors())
{
if (sim != null)
{
sim.mAllowedRooms.Remove(lot.LotId);
}
}
mRegistered.Add(lot.LotId);
}
}