def _on_sim_add_occult_type(self, occult_tracker: OccultTracker, occult_type: OccultType): sim_info = occult_tracker._sim_info return CommonEventRegistry.get().dispatch(S4CLSimAddedOccultTypeEvent(sim_info, occult_type, occult_tracker))
def _on_sim_change_occult_type(self, occult_tracker: OccultTracker, occult_type: OccultType, *_, **__): sim_info = occult_tracker._sim_info return CommonEventRegistry.get().dispatch(S4CLSimChangedOccultTypeEvent(sim_info, occult_type, occult_tracker))
def _on_sim_spawned(self, sim_info: SimInfo, *_, **__): from sims4communitylib.events.zone_spin.common_zone_spin_event_dispatcher import CommonZoneSpinEventDispatcher if CommonZoneSpinEventDispatcher.get().game_loading: return False from sims4communitylib.utils.sims.common_sim_utils import CommonSimUtils return CommonEventRegistry.get().dispatch(S4CLSimSpawnedEvent(CommonSimUtils.get_sim_info(sim_info)))
def _on_sim_change_age(self, sim_info: SimInfo, new_age: Age, current_age: Age): from sims4communitylib.utils.sims.common_sim_utils import CommonSimUtils return CommonEventRegistry.get().dispatch(S4CLSimChangedAgeEvent(CommonSimUtils.get_sim_info(sim_info), current_age, new_age))
def _on_sim_load(self, sim_info: SimInfo, *_, **__): from sims4communitylib.events.zone_spin.common_zone_spin_event_dispatcher import CommonZoneSpinEventDispatcher if CommonZoneSpinEventDispatcher.get().game_loading: return False return CommonEventRegistry.get().dispatch(S4CLSimLoadedEvent(sim_info))
def _on_sim_init(self, sim_info: SimInfo, *_, **__): CommonEventRegistry.get().dispatch(S4CLSimInitializedEvent(sim_info))
def _on_sim_spawned(self, sim_info: SimInfo, *_, **__): from sims4communitylib.utils.sims.common_sim_utils import CommonSimUtils return CommonEventRegistry.get().dispatch( S4CLSimSpawnedEvent(CommonSimUtils.get_sim_info(sim_info)))
def _on_zone_save(self, zone: Zone, save_slot_data: Any = None): CommonEventRegistry.get().dispatch( S4CLZoneSaveEvent(zone, save_slot_data=save_slot_data, game_loaded=self.game_loaded, game_loading=self.game_loading))
def _on_early_zone_load(self, zone: Zone): CommonEventRegistry.get().dispatch( S4CLZoneEarlyLoadEvent(zone, game_loaded=self.game_loaded, game_loading=self.game_loading))