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


C# Lot类代码示例

本文整理汇总了C#中Lot的典型用法代码示例。如果您正苦于以下问题:C# Lot类的具体用法?C# Lot怎么用?C# Lot使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Lot类属于命名空间,在下文中一共展示了Lot类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Run

        protected override OptionResult Run(Lot lot, Household me)
        {
            if (lot != null)
            {
                List<Item> allOptions = new List<Item>();

                foreach (Household house in Household.sHouseholdList)
                {
                    if (house.RealEstateManager == null) continue;

                    PropertyData data = house.RealEstateManager.FindProperty(lot);
                    if (data == null) continue;

                    allOptions.Add(new Item(house, lot, RealEstate.OwnerType.Full, data.TotalValue));
                }

                if (allOptions.Count == 0)
                {
                    SimpleMessageDialog.Show(Name, Common.Localize(GetTitlePrefix() + ":Failure"));
                    return OptionResult.Failure;
                }

                CommonSelection<Item>.Results choices = new CommonSelection<Item>(Name, allOptions).SelectMultiple();
                if ((choices == null) || (choices.Count == 0)) return OptionResult.Failure;

                foreach (Item item in choices)
                {
                    item.Perform();
                }
            }

            return OptionResult.SuccessClose;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:33,代码来源:VenueOwnership.cs

示例2: Satisfies

        public bool Satisfies(ManagerCareer manager, SimDescription sim, Lot newLot, bool inspecting)
        {
            if (!inspecting)
            {
                Occupation career = CareerManager.GetStaticOccupation(mCareer);
                if (career == null) return false;

                if ((GameUtils.IsFutureWorld()) && (!career.AvailableInFutureWorld)) return false;

                if (sim.IsEP11Bot)
                {
                    if (!sim.HasTrait(TraitNames.ProfessionalChip))
                    {
                        return false;
                    }
                }

                if (sim.CreatedSim != null)
                {
                    if ((sim.Occupation == null) || (sim.Occupation.Guid != mCareer))
                    {
                        GreyedOutTooltipCallback greyedOutTooltipCallback = null;
                        if (!career.CanAcceptCareer(sim.CreatedSim.ObjectId, ref greyedOutTooltipCallback)) return false;
                    }
                }
            }

            return PrivateSatisfies(manager, sim, newLot, inspecting);
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:29,代码来源:DreamJob.cs

示例3: SetupLotTag

        public static void SetupLotTag(Lot lot)
        {
            Sim active = Sims3.Gameplay.Actors.Sim.ActiveActor;
            if (active == null) return;

            MapTagManager mtm = active.MapTagManager;
            if (mtm == null) return;

            try
            {
                MapTag tag = mtm.GetTag(lot);

                if (Tagger.Settings.Filters.Matches(lot.Household.AllSimDescriptions) && Tagger.Settings.mEnableLotTags)
                {
                    if ((tag != null) && (!(tag is TrackedLot)) && (!(tag is HomeLotMapTag)))
                    {
                        mtm.RemoveTag(tag);
                    }
                    if (!mtm.HasTag(lot))
                    {
                        mtm.AddTag(new TrackedLot(lot, mtm.Actor));                        
                    }
                }
                else if (tag is TrackedLot)
                {
                    mtm.RemoveTag(tag);                    
                }
            }
            catch (Exception exception)
            {
                Common.DebugException(lot, exception);
            }
        }
开发者ID:GnatGoSplat,项目名称:NRaas,代码行数:33,代码来源:MapTagHelper.cs

示例4: IsValidResidentialLot

        public static string IsValidResidentialLot(Lot lot)
        {
            if (lot.Household != null)
            {
                return "Occupied";
            }
            else if (lot.IsCommunityLot)
            {
                return "Community lot";
            }
            else if (lot.ResidentialLotSubType == ResidentialLotSubType.kEP1_PlayerOwnable)
            {
                return "Vacation Home";
            }
            else if (lot.ResidentialLotSubType == ResidentialLotSubType.kEP10_PrivateLot)
            {
                return "Private Lot";
            }
            else if (lot.IsWorldLot)
            {
                return "World lot";
            }

            return null;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:25,代码来源:Households.cs

示例5: Test

            public override bool Test(Sim actor, Lot target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                // Stops the dead from leaving the cemetery
                if ((actor.SimDescription.IsDead) && (!actor.SimDescription.IsPlayableGhost)) return false;

                return base.Test(actor, target, isAutonomous, ref greyedOutTooltipCallback);
            }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:7,代码来源:GoToVirtualHomeMetaEx.cs

示例6: OnExitBuildBuy

 public void OnExitBuildBuy(Lot lot)
 {
     foreach (ISprinkler sprinkler in lot.GetObjects<ISprinkler>())
     {
         this.SetSprinklerAlarm(sprinkler);
     }
 }
开发者ID:GnatGoSplat,项目名称:NRaas,代码行数:7,代码来源:SprinklerEx.cs

示例7: EnsureInstantiate

        public static bool EnsureInstantiate(SimDescription sim, Lot lot)
        {
            if (sim.CreatedSim == null)
            {
                if (sim.Household == null)
                {
                    if (!sim.IsValidDescription)
                    {
                        sim.Fixup();
                    }

                    Urnstone urnstone = Urnstones.CreateGrave(sim, SimDescription.DeathType.OldAge, false, true);
                    if (urnstone != null)
                    {
                        Common.Sleep();

                        if (!Urnstones.GhostSpawn(urnstone, lot))
                        {
                            return false;
                        }
                    }
                }
                else
                {
                    Instantiation.Perform(sim, null);
                }
            }

            return (sim.CreatedSim != null);
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:30,代码来源:Instantiation.cs

示例8: AddLot

        public static void AddLot(Lot lot, AuctionEntities au)
        {
            if (lot.IdLot == 0)
            {
                au.Lots.Add(lot);
            }
            else
            {
                Lot dbLot = au.Lots.Find(lot.IdLot);
                if (dbLot != null)
                {
                    dbLot.IdSection = lot.IdSection;
                    dbLot.Name = lot.Name;
                    dbLot.Description = lot.Description;
                    dbLot.StartDate = lot.StartDate;
                    dbLot.EndDate = lot.EndDate;
                    dbLot.StartPrice = lot.StartPrice;
                    dbLot.Tick = lot.Tick;
                    dbLot.CurrentPrice = lot.CurrentPrice;
                    dbLot.Status = lot.Status;
                    dbLot.Img = lot.Img;

                }
            }
        }
开发者ID:Po1ydeuces,项目名称:MyProjects,代码行数:25,代码来源:Methods.cs

示例9: OnExitBuildBuy

		public void OnExitBuildBuy(Lot lot)
		{
			foreach(ComboRabbitHole comboRH in lot.GetObjects<ComboRabbitHole>())
			{
				AddContainedRabbitHolesToLot (comboRH);
			}
		}
开发者ID:Robobeurre,项目名称:NRaas,代码行数:7,代码来源:FixComboRabbitHoleMetaAds.cs

示例10: PayForWorkOut

 public static void PayForWorkOut(Sim sim, Lot lot, int fee)
 {
     if (lot.IsCommunityLot)
     {
         //Pay if we don't own the lot
         Household lotOwner = ReturnLotOwner(lot);
         
         //If we don't own the lot
         if (lotOwner != null && lotOwner != sim.Household)
         {
             lotOwner.ModifyFamilyFunds(fee);
                               
             //pay if we have the money, if not add to next bill
             if (sim.FamilyFunds >= fee)
             {
                 sim.Household.ModifyFamilyFunds(-fee);
             }
             else
             {
                 sim.Household.UnpaidBills += fee;
             }                  
         }
         else
         {
             //if the lot has no owner, or we don't own the lot
             if (lotOwner == null || (lotOwner != null && lotOwner != sim.Household))
             {
                 sim.Household.ModifyFamilyFunds(-fee);
             }
         }
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:32,代码来源:CommonMethods.cs

示例11: OnExitBuildBuy

 public void OnExitBuildBuy(Lot lot)
 {
     foreach (ShowStage stage in lot.GetObjects<ShowStage>())
     {
         ShowStageEx.StoreChanges(stage, Overwatch.Log);
     }
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:7,代码来源:CleanupShowStage.cs

示例12: ReturnLotOwner

        public static Household ReturnLotOwner(Lot lot)
        {
            Household lotOwner = null;

            if (lot != null)
            {

                List<Household> hList = new List<Household>(Sims3.Gameplay.Queries.GetObjects<Household>());

                Sims3.Gameplay.RealEstate.PropertyData pd = null;
                if (hList != null && hList.Count > 0)
                {
                    foreach (Household h in hList)
                    {
                        pd = h.RealEstateManager.FindProperty(lot);
                        if (pd != null && pd.Owner != null)
                        {
                            lotOwner = pd.Owner.OwningHousehold;
                            break;
                        }
                    }
                }

            }

            return lotOwner;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:27,代码来源:CommonMethods.cs

示例13: Reset

        public override void Reset()
        {
            base.Reset();

            if (SimTypes.IsDead(Sim)) return;

            mHouse = Sim.Household;

            mNetWorth = 0;
            if (mHouse != null)
            {
                if (mHouse.LotHome != null)
                {
                    if (mHouse.LotHome != mLot)
                    {
                        mLot = mHouse.LotHome;

                        mLotHomeCost = StoryProgression.Main.Lots.GetLotCost(mLot);
                    }

                    mNetWorth = mHouse.FamilyFunds + mLotHomeCost;
                }
                else
                {
                    mNetWorth = mHouse.NetWorth();

                    mLot = null;
                    mLotHomeCost = 0;
                }
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:31,代码来源:StoredNetWorkSimData.cs

示例14: Run

        protected override OptionResult Run(Lot lot, Household me)
        {
            if (me == null) return OptionResult.Failure;

            string text = StringInputDialog.Show(Name, Common.Localize(GetTitlePrefix() + ":Prompt"), me.Name);
            if (string.IsNullOrEmpty(text)) return OptionResult.Failure;

            if (AcceptCancelDialog.Show(Common.Localize(GetTitlePrefix() + ":SimsPrompt", false, new object[] { me.Name, text })))
            {
                foreach (SimDescription sim in CommonSpace.Helpers.Households.All(me))
                {
                    if (sim.LastName.Trim().ToLower() == me.Name.Trim().ToLower())
                    {
                        sim.LastName = text;

                        if (me == Household.ActiveHousehold)
                        {
                            HudModel hudModel = Sims3.UI.Responder.Instance.HudModel as HudModel;
                            if (sim.CreatedSim != null)
                            {
                                Household.AddDirtyNameSimID(sim.SimDescriptionId);
                                hudModel.NotifyNameChanged(sim.CreatedSim.ObjectId);
                            }
                        }
                    }
                }
            }

            me.Name = text;
            return OptionResult.SuccessClose;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:31,代码来源:ChangeName.cs

示例15: PayForCoffee

        public static void PayForCoffee(Sim sim, Lot lot)
        {
            //Pay for the coffee if we don't own the lot
            Household lotOwner = ReturnLotOwner(lot);

            if (lot.IsCommunityLot)
            {
                //If we don't own the lot
                int price = ReturnPrice();
                if (lotOwner != null && lotOwner != sim.Household)
                {
                    lotOwner.ModifyFamilyFunds(price);

                    //Can the customer pay, 
                    if (sim.Household.FamilyFunds >= price)
                    {
                        sim.Household.ModifyFamilyFunds(-price);
                    }
                    else
                    {
                        //Add to next bill
                        sim.Household.UnpaidBills += price;
                    }
                }
                else
                {
                    //if the lot has no owner
                    if (lotOwner == null)
                    {
                        sim.Household.ModifyFamilyFunds(-price);
                    }
                }
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:34,代码来源:CommonMethods.cs


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