Ejemplo n.º 1
0
 def get_buffs(cls, sim_info: SimInfo) -> List[Buff]:
     """
         Retrieve all buffs currently active on a sim.
     """
     if sim_info is None:
         CommonExceptionHandler.log_exception(ModInfo.get_identity().name, 'argument sim_info was \'None\' for {} of class {}'.format(CommonBuffUtils.get_buffs.__name__, CommonBuffUtils.__name__))
         return list()
     if not hasattr(sim_info, 'get_active_buff_types'):
         return list()
     return list(sim_info.get_active_buff_types())
    def get_buffs(sim_info: SimInfo) -> List[Buff]:
        """get_buffs(sim_info)

        Retrieve all buffs currently active on a Sim.

        :param sim_info: The Sim to retrieve the buffs of.
        :type sim_info: SimInfo
        :return: A collection of currently active buffs on the Sim.
        :rtype: Tuple[Buff]
        """
        if sim_info is None:
            CommonExceptionHandler.log_exception(ModInfo.get_identity().name, 'Argument \'sim_info\' was \'None\' for \'{}\' of class \'{}\''.format(CommonBuffUtils.get_buffs.__name__, CommonBuffUtils.__name__))
            return list()
        if not hasattr(sim_info, 'get_active_buff_types'):
            return list()
        return list(sim_info.get_active_buff_types())