当前位置: 首页>>代码示例>>C#>>正文


C# Lot.LotLocationIsPublicResidential方法代码示例

本文整理汇总了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;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:38,代码来源:RepairAll.cs

示例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))
//.........这里部分代码省略.........
开发者ID:Robobeurre,项目名称:NRaas,代码行数:101,代码来源:CleanAll.cs


注:本文中的Lot.LotLocationIsPublicResidential方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。