Exemplo n.º 1
0
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================
"""
In CCP dogma code, 'online' effect has custom processing. Actual effect has
'active' effect category, which lets all item types with it to be in active
state according to eos' effect handling. We do not want any special processing,
thus just fix it here.
"""

from logging import getLogger

from eos.const.eve import EffectCategoryId
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory

logger = getLogger(__name__)


def fix_online_category(effect):
    if effect.category_id == EffectCategoryId.online:
        msg = 'online effect category does not need to be adjusted'
        logger.info(msg)
    else:
        effect.category_id = EffectCategoryId.online


EffectFactory.reg_cust_instance_by_id(fix_online_category, EffectId.online)
Exemplo n.º 2
0
#
# Eos is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Eos. If not, see <http://www.gnu.org/licenses/>.
# ==============================================================================

from logging import getLogger

from eos.const.eos import EffectBuildStatus
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .modifier import make_rah_modifiers

logger = getLogger(__name__)


def add_rah_modifiers(effect):
    if effect.modifiers:
        msg = 'reactive armor hardener effect has modifiers, overwriting them'
        logger.warning(msg)
    effect.modifiers = make_rah_modifiers()
    effect.build_status = EffectBuildStatus.custom


EffectFactory.reg_cust_instance_by_id(add_rah_modifiers,
                                      EffectId.adaptive_armor_hardener)
Exemplo n.º 3
0
from eos.const.eos import EffectBuildStatus
from eos.const.eve import EffectId
from eos.eve_obj.effect import EffectFactory
from .modifier import make_ab_modifiers
from .modifier import make_mwd_modifiers

logger = getLogger(__name__)


def add_ab_modifiers(effect):
    if effect.modifiers:
        msg = 'afterburner effect has modifiers, overwriting them'
        logger.info(msg)
    effect.modifiers = make_ab_modifiers()
    effect.build_status = EffectBuildStatus.custom


def add_mwd_modifiers(effect):
    if effect.modifiers:
        msg = 'microwarpdrive effect has modifiers, overwriting them'
        logger.info(msg)
    effect.modifiers = make_mwd_modifiers()
    effect.build_status = EffectBuildStatus.custom


EffectFactory.reg_cust_instance_by_id(add_ab_modifiers,
                                      EffectId.module_bonus_afterburner)
EffectFactory.reg_cust_instance_by_id(add_mwd_modifiers,
                                      EffectId.module_bonus_microwarpdrive)