public static Lot GetPostionTargetLot(Vector3 pos) { if (LotManager.sLots == null) { return(LotManager.GetWorldLot()); } LotLocation LotLocation = default(LotLocation); ulong Location = World.GetLotLocation(pos, ref LotLocation); Lot TargetLot = LotManager.GetLot(Location); if (TargetLot == null) { return(LotManager.GetWorldLot()); } return(TargetLot); }
public static int OnMakeSim(object[] parameters) { try { Sim actor = Sim.MakeRandomSim(Service.GetPositionInRandomLot(LotManager.GetWorldLot()), CASAgeGenderFlags.YoungAdult, CASAgeGenderFlags.Male); if (actor != null) { PlumbBob.ForceSelectActor(actor); } } catch (Exception e) { Common.Exception("OnMakeSim", e); } return(0); }
protected override bool OnPerform() { if (Decensor.Settings.mDisable) { return(true); } if (mSims == null) { Lot worldLot = LotManager.GetWorldLot(); if (worldLot == null) { return(true); } mSims = new List <Sim>(worldLot.GetAllActors()); mIndex = -1; mCount = 0; } mCount++; mIndex++; if (mIndex >= mSims.Count) { if (mCount > (Decensor.Settings.mDelay / sDelay)) { mSims.Clear(); mSims = null; } } else { VerifyCensor(mSims[mIndex]); } return(true); }
public void ToggleGlobalPrivacy() { TogglePrivacy(new PrivacyRoom(LotManager.GetWorldLot().LotId, 0)); }
public bool GetGlobalPrivacy() { return(!Lookup.ContainsKey(new PrivacyRoom(LotManager.GetWorldLot().LotId, 0))); }
public override bool Run() { Lot alot = Actor.LotCurrent; if (alot == null) { alot = Actor.mLotCurrent = LotManager.GetWorldLot(); } if (alot.IsWorldLot && NiecHelperSituation.WorkingNiecHelperSituationCount == 0) { //Actor.Motives.MaxEverything(); //Actor.FadeIn(); //Sim Acvice = null; try { List <Lot> lieastwt = new List <Lot>(); Lot lotwt = null; foreach (object obtj in LotManager.AllLotsWithoutCommonExceptions) { Lot lott2 = (Lot)obtj; if (lott2 != null && lott2.IsResidentialLot) { lieastwt.Add(lott2); } } if (lieastwt.Count != 0) { lotwt = RandomUtil.GetRandomObjectFromList <Lot>(lieastwt); } Actor.SetPosition(lotwt.Position); } catch (ResetException) { throw; } catch { } alot = Actor.LotCurrent; if (alot.IsWorldLot && runI == null) { Actor.Motives.MaxEverything(); Actor.FadeIn(); return(false); } } if (runI == null) { if (Actor.LotCurrent.IsWorldLot) { Actor.Motives.MaxEverything(); Actor.FadeIn(); return(false); } return(base.Run()); } runI.simDeathType = base.simDeathType; runI.PlayDeathAnimation = base.PlayDeathAnimation; runI.mMustRun = true; return(runI.Run()); }