From 32068e8d8e56aa80924e3eef0c057f2ac3db8618 Mon Sep 17 00:00:00 2001 From: Ebag333 Date: Wed, 19 Oct 2016 08:22:45 -0700 Subject: [PATCH] Create set directly --- eos/saveddata/drone.py | 5 ++++- eos/saveddata/fighter.py | 5 ++++- eos/saveddata/module.py | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/eos/saveddata/drone.py b/eos/saveddata/drone.py index 9a329e9f2..1ca07a784 100644 --- a/eos/saveddata/drone.py +++ b/eos/saveddata/drone.py @@ -201,7 +201,10 @@ class Drone(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): # Do not allow to apply offensive modules on ship with offensive module immunite, with few exceptions # (all effects which apply instant modification are exception, generally speaking) if item.offensive and projectedOnto.ship.getModifiedItemAttr("disallowOffensiveModifiers") == 1: - offensiveNonModifiers = set(("energyDestabilizationNew", "leech", "energyNosferatuFalloff", "energyNeutralizerFalloff")) + offensiveNonModifiers = {"energyDestabilizationNew", + "leech", + "energyNosferatuFalloff", + "energyNeutralizerFalloff"} if not offensiveNonModifiers.intersection(set(item.effects)): return False # If assistive modules are not allowed, do not let to apply these altogether diff --git a/eos/saveddata/fighter.py b/eos/saveddata/fighter.py index 5043f1ad6..e409b1578 100644 --- a/eos/saveddata/fighter.py +++ b/eos/saveddata/fighter.py @@ -236,7 +236,10 @@ class Fighter(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): # Do not allow to apply offensive modules on ship with offensive module immunite, with few exceptions # (all effects which apply instant modification are exception, generally speaking) if item.offensive and projectedOnto.ship.getModifiedItemAttr("disallowOffensiveModifiers") == 1: - offensiveNonModifiers = set(("energyDestabilizationNew", "leech", "energyNosferatuFalloff", "energyNeutralizerFalloff")) + offensiveNonModifiers = {"energyDestabilizationNew", + "leech", + "energyNosferatuFalloff", + "energyNeutralizerFalloff"} if not offensiveNonModifiers.intersection(set(item.effects)): return False # If assistive modules are not allowed, do not let to apply these altogether diff --git a/eos/saveddata/module.py b/eos/saveddata/module.py index be1aed929..9ae63aafd 100644 --- a/eos/saveddata/module.py +++ b/eos/saveddata/module.py @@ -489,7 +489,10 @@ class Module(HandledItem, HandledCharge, ItemAttrShortcut, ChargeAttrShortcut): # Do not allow to apply offensive modules on ship with offensive module immunite, with few exceptions # (all effects which apply instant modification are exception, generally speaking) if item.offensive and projectedOnto.ship.getModifiedItemAttr("disallowOffensiveModifiers") == 1: - offensiveNonModifiers = set(("energyDestabilizationNew", "leech", "energyNosferatuFalloff", "energyNeutralizerFalloff")) + offensiveNonModifiers = {"energyDestabilizationNew", + "leech", + "energyNosferatuFalloff", + "energyNeutralizerFalloff"} if not offensiveNonModifiers.intersection(set(item.effects)): return False # If assistive modules are not allowed, do not let to apply these altogether