public void OnDelayedWorldLoadFinished() { foreach (Lot lot in LotManager.AllLots) { if (MapTagHelper.ShouldReplace(lot)) { if (Tagger.Settings.TypeHasCustomSettings((uint)lot.CommercialLotSubType)) { TagSettingKey key = Tagger.Settings.mCustomTagSettings[(uint)lot.CommercialLotSubType]; if (key.MetaAutonomyType > 0) { SetMetaAutonomyType(lot, (Lot.MetaAutonomyType)key.MetaAutonomyType); } } else { SetMetaAutonomyType(lot, Lot.MetaAutonomyType.Hangout); } } } foreach (KeyValuePair <Lot.MetaAutonomyType, MetaAutonomySettingKey> key in Tagger.Settings.mMetaAutonomySettings) { key.Value.InjectTuning(); } }
public static void InitTags(bool lotOnly) { MapTagsModel model = MapTagsModel.Singleton; if (model != null) { if (CameraController.IsMapViewModeEnabled()) { Tagger.Settings.ValidateActiveFilters(false); if (!lotOnly) { if (Tagger.staticData.Count > 0) { foreach (IMapTag tag in model.GetCurrentMapTags()) { MapTagHelper.OnMapTagAdded(tag); } } if (Tagger.Settings.mEnableSimTags || Tagger.Settings.mTaggedSims.Count > 0) { if (Tagger.Settings.mColorByCash) { TagDataHelper.GenerateMoneyGraphData(); } foreach (Sim sim in LotManager.Actors) { if (sim.SimDescription.CreatedSim != null && !sim.HasBeenDestroyed) { MapTagHelper.SetupSimTag(sim); } } } } if (Tagger.Settings.mEnableLotTags) { if (Tagger.Settings.mColorLotTagsByCash) { TagDataHelper.GenerateMoneyGraphData(); } foreach (Lot lot in LotManager.AllLots) { if (lot.Household != null && lot.ObjectId != ObjectGuid.InvalidObjectGuid) { MapTagHelper.SetupLotTag(lot); } } } } else { RemoveTags(); } } }
public ListenerAction OnSimInstantiated(Event e) { Sim sim = e.TargetObject as Sim; if (sim != null) { MapTagHelper.SetupSimTag(sim); } return(ListenerAction.Keep); }
public ListenerAction OnSimInstantiated(Event e) { Sim sim = e.TargetObject as Sim; if (sim != null && CameraController.IsMapViewModeEnabled()) { MapTagHelper.SetupSimTag(sim); } return(ListenerAction.Keep); }
public static void InitTags(bool lotOnly) { MapTagsModel model = MapTagsModel.Singleton; if (model != null) { if (CameraController.IsMapViewModeEnabled()) { if (!lotOnly) { Tagger.sReplaced.Clear(); if (Tagger.staticData.Count > 0) { foreach (IMapTag tag in model.GetCurrentMapTags()) { MapTagHelper.OnMapTagAdded(tag); } } if (Tagger.Settings.mEnableSimTags || Tagger.Settings.mTaggedSims.Count > 0) { foreach (Sim sim in LotManager.Actors) { if (sim.SimDescription.CreatedSim != null) { MapTagHelper.SetupSimTag(sim); } } } } if (Tagger.Settings.mEnableLotTags) { foreach (Lot lot in LotManager.AllLots) { if (lot.Household != null && lot.ObjectId != ObjectGuid.InvalidObjectGuid) { MapTagHelper.SetupLotTag(lot); } } } model.FireMapTagRefreshAll(); } else { RemoveTags(); } } }
// doesn't seem to be firing... public static void OnLotTypeChanged(object sender, EventArgs args) { // until I can work on custom MA types, this should push some Sims to the lots (and urge them to buy stuff if the items exist) World.OnLotTypeChangedEventArgs args2 = args as World.OnLotTypeChangedEventArgs; if (args2 != null) { Lot lot = LotManager.GetLot(args2.LotId); if (lot != null) { if (MapTagHelper.ShouldReplace(lot)) { SetMetaAutonomyType(lot, Lot.MetaAutonomyType.MarketSmall); } } } }