protected static void OnRoomChanged(Event e) { Sim obj = e.Actor as Sim; if (obj != null) { if (Woohooer.Settings.NeedsChange(obj)) { if (Woohooer.Settings.mChangeRoomClothings) { bool needsChange = false; try { if (obj.CurrentOutfitCategory == Sims3.SimIFace.CAS.OutfitCategories.Naked) { needsChange = (SkinnyDipClothingPile.FindClothingPile(obj) == null); } } catch { } if (needsChange) { if (!InteractionsEx.HasInteraction <Shower.TakeShower.Definition>(obj)) { Sim.ClothesChangeReason reason = Sim.ClothesChangeReason.GoingToBed; if (obj.IsOutside) { reason = Sim.ClothesChangeReason.GoingOutside; } else if (Woohooer.Settings.mSwitchToEverydayAfterNakedWoohoo) { reason = Sim.ClothesChangeReason.LeavingRoom; } SwitchOutfits.SwitchNoSpin(obj, reason); } } } Woohooer.Settings.RemoveChange(obj); } } }
protected static void OnRoomChanged(Event e) { Sim sim = e.Actor as Sim; if (sim != null) { if (sim.HasBeenDestroyed) { return; } bool needsChange = false; if (sim.IsHuman) { if ((!sim.IsSelectable) || (Dresser.Settings.mTransitionAffectActive)) { if (sim.IsOutside) { try { if (Dresser.Settings.mSwitchOnOutside) { switch (sim.CurrentOutfitCategory) { case OutfitCategories.Sleepwear: needsChange = true; break; case OutfitCategories.Naked: if (SkinnyDipClothingPile.FindClothingPile(sim) == null) { needsChange = true; } break; case OutfitCategories.Athletic: switch (sim.CurrentWalkStyle) { case Sim.WalkStyle.Jog: case Sim.WalkStyle.FastJog: break; default: needsChange = true; break; } break; } } } catch { } } else { switch (sim.CurrentOutfitCategory) { case OutfitCategories.Sleepwear: if (Dresser.Settings.mSwitchSleepwear) { needsChange = true; } break; case OutfitCategories.Naked: if (Dresser.Settings.mSwitchSleepwear) { if (SkinnyDipClothingPile.FindClothingPile(sim) == null) { needsChange = true; } } break; } } } } if (needsChange) { if (sim.IsOutside) { CommonSpace.Helpers.SwitchOutfits.SwitchNoSpin(sim, Sim.ClothesChangeReason.GoingOutside); } else { CommonSpace.Helpers.SwitchOutfits.SwitchNoSpin(sim, Sim.ClothesChangeReason.LeavingRoom); } } } }