def set_age(sim_info: SimInfo, age: Union[Age, int]) -> bool: """ Set the Age of a sim. """ try: sim_info.apply_age(age) return True except Exception as ex: CommonExceptionHandler.log_exception( ModInfo.get_identity().name, 'Failed to set age of sim {} to {}.'.format( pformat(sim_info), age), exception=ex) return False
def set_age(sim_info: SimInfo, age: Union[Age, int]) -> bool: """set_age(sim_info, age) Set the Age of a Sim. :param sim_info: The Sim to set the Age of. :type sim_info: SimInfo :param age: The Age to set the Sim to. :type age: Union[Age, int] :return: True, if the Age was set successfully. False, if not. :rtype: bool """ sim_info.apply_age(age) return True
def set_age(sim_info: SimInfo, age: Union[Age, int]) -> bool: """set_age(sim_info, age) Set the Age of a Sim. :param sim_info: The Sim to set the Age of. :type sim_info: SimInfo :param age: The Age to set the Sim to. :type age: Union[Age, int] :return: True, if the Age was set successfully. False, if not. :rtype: bool """ try: sim_info.apply_age(age) return True except Exception as ex: CommonExceptionHandler.log_exception( ModInfo.get_identity(), 'Failed to set age of sim {} to {}.'.format( pformat(sim_info), age), exception=ex) return False