Convert remaining files to CRLF

This commit is contained in:
Ryan Holmes
2017-02-07 11:01:40 -05:00
parent dfc5627031
commit a8ab876053
18 changed files with 306 additions and 306 deletions

View File

@@ -1,8 +1,8 @@
version = "0.2.3"
tag = "git"
def test():
import tests.runTests
import unittest
unittest.main(defaultTest="discover", testLoader=tests.runTests.loader)
version = "0.2.3"
tag = "git"
def test():
import tests.runTests
import unittest
unittest.main(defaultTest="discover", testLoader=tests.runTests.loader)

View File

@@ -1,30 +1,30 @@
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
#
# eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# 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 sqlalchemy import Column, Table, String
from sqlalchemy.orm import mapper
from eos.db import gamedata_meta
from eos.types import MetaData
metadata_table = Table("metadata", gamedata_meta,
Column("field_name", String, primary_key=True),
Column("field_value", String))
mapper(MetaData, metadata_table)
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
#
# eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# 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 sqlalchemy import Column, Table, String
from sqlalchemy.orm import mapper
from eos.db import gamedata_meta
from eos.types import MetaData
metadata_table = Table("metadata", gamedata_meta,
Column("field_name", String, primary_key=True),
Column("field_value", String))
mapper(MetaData, metadata_table)

View File

@@ -1,13 +1,13 @@
# modifyActiveArmorResonancePostPercent
#
# Used by:
# Modules from group: Armor Hardener (156 of 156)
# Modules from group: Flex Armor Hardener (4 of 4)
type = "active"
def handler(fit, module, context):
for damageType in ("kinetic", "thermal", "explosive", "em"):
fit.ship.boostItemAttr("armor%sDamageResonance" % damageType.capitalize(),
module.getModifiedItemAttr("%sDamageResistanceBonus" % damageType),
stackingPenalties=True)
# modifyActiveArmorResonancePostPercent
#
# Used by:
# Modules from group: Armor Hardener (156 of 156)
# Modules from group: Flex Armor Hardener (4 of 4)
type = "active"
def handler(fit, module, context):
for damageType in ("kinetic", "thermal", "explosive", "em"):
fit.ship.boostItemAttr("armor%sDamageResonance" % damageType.capitalize(),
module.getModifiedItemAttr("%sDamageResistanceBonus" % damageType),
stackingPenalties=True)

View File

@@ -1,13 +1,13 @@
# modifyActiveShieldResonancePostPercent
#
# Used by:
# Modules from group: Flex Shield Hardener (5 of 5)
# Modules from group: Shield Hardener (97 of 97)
type = "active"
def handler(fit, module, context):
for damageType in ("kinetic", "thermal", "explosive", "em"):
fit.ship.boostItemAttr("shield" + damageType.capitalize() + "DamageResonance",
module.getModifiedItemAttr(damageType + "DamageResistanceBonus"),
stackingPenalties=True)
# modifyActiveShieldResonancePostPercent
#
# Used by:
# Modules from group: Flex Shield Hardener (5 of 5)
# Modules from group: Shield Hardener (97 of 97)
type = "active"
def handler(fit, module, context):
for damageType in ("kinetic", "thermal", "explosive", "em"):
fit.ship.boostItemAttr("shield" + damageType.capitalize() + "DamageResonance",
module.getModifiedItemAttr(damageType + "DamageResistanceBonus"),
stackingPenalties=True)

View File

@@ -1,10 +1,10 @@
# shipBonusRepairSystemsBonusATC2
#
# Used by:
# Ship: Vangel
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Repair Systems"),
"armorDamageAmount", ship.getModifiedItemAttr("shipBonusATC2"))
# shipBonusRepairSystemsBonusATC2
#
# Used by:
# Ship: Vangel
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Repair Systems"),
"armorDamageAmount", ship.getModifiedItemAttr("shipBonusATC2"))

View File

@@ -1,11 +1,11 @@
# shipEnergyNeutralizerTransferAmountBonusAB
#
# Used by:
# Ship: Bhaalgorn
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
"energyNeutralizerAmount", ship.getModifiedItemAttr("shipBonusAB"),
skill="Amarr Battleship")
# shipEnergyNeutralizerTransferAmountBonusAB
#
# Used by:
# Ship: Bhaalgorn
type = "passive"
def handler(fit, ship, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Energy Neutralizer",
"energyNeutralizerAmount", ship.getModifiedItemAttr("shipBonusAB"),
skill="Amarr Battleship")

View File

@@ -1,13 +1,13 @@
# skillReactiveArmorHardenerCapNeedBonus
#
# Used by:
# Skill: Resistance Phasing
type = "passive"
def handler(fit, src, context):
lvl = src.level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Armor Resistance Shift Hardener", "capacitorNeed",
src.getModifiedItemAttr("capNeedBonus") * lvl)
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Resistance Phasing"), "capacitorNeed",
src.getModifiedItemAttr("capNeedBonus") * lvl)
# skillReactiveArmorHardenerCapNeedBonus
#
# Used by:
# Skill: Resistance Phasing
type = "passive"
def handler(fit, src, context):
lvl = src.level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Armor Resistance Shift Hardener", "capacitorNeed",
src.getModifiedItemAttr("capNeedBonus") * lvl)
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Resistance Phasing"), "capacitorNeed",
src.getModifiedItemAttr("capNeedBonus") * lvl)

View File

@@ -1,13 +1,13 @@
# skillReactiveArmorHardenerDurationBonus
#
# Used by:
# Skill: Resistance Phasing
type = "passive"
def handler(fit, src, context):
lvl = src.level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Armor Resistance Shift Hardener", "duration",
src.getModifiedItemAttr("durationBonus") * lvl)
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Resistance Phasing"), "duration",
src.getModifiedItemAttr("durationBonus") * lvl)
# skillReactiveArmorHardenerDurationBonus
#
# Used by:
# Skill: Resistance Phasing
type = "passive"
def handler(fit, src, context):
lvl = src.level
fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Armor Resistance Shift Hardener", "duration",
src.getModifiedItemAttr("durationBonus") * lvl)
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Resistance Phasing"), "duration",
src.getModifiedItemAttr("durationBonus") * lvl)

View File

@@ -1,11 +1,11 @@
# subsystemBonusAmarrDefensiveArmorRepairAmount
#
# Used by:
# Subsystem: Legion Defensive - Nanobot Injector
type = "passive"
def handler(fit, module, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Repair Systems"),
"armorDamageAmount", module.getModifiedItemAttr("subsystemBonusAmarrDefensive"),
skill="Amarr Defensive Systems")
# subsystemBonusAmarrDefensiveArmorRepairAmount
#
# Used by:
# Subsystem: Legion Defensive - Nanobot Injector
type = "passive"
def handler(fit, module, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Repair Systems"),
"armorDamageAmount", module.getModifiedItemAttr("subsystemBonusAmarrDefensive"),
skill="Amarr Defensive Systems")

View File

@@ -1,11 +1,11 @@
# subsystemBonusGallenteDefensiveArmorRepairAmount
#
# Used by:
# Subsystem: Proteus Defensive - Nanobot Injector
type = "passive"
def handler(fit, module, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Repair Systems"),
"armorDamageAmount", module.getModifiedItemAttr("subsystemBonusGallenteDefensive"),
skill="Gallente Defensive Systems")
# subsystemBonusGallenteDefensiveArmorRepairAmount
#
# Used by:
# Subsystem: Proteus Defensive - Nanobot Injector
type = "passive"
def handler(fit, module, context):
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Repair Systems"),
"armorDamageAmount", module.getModifiedItemAttr("subsystemBonusGallenteDefensive"),
skill="Gallente Defensive Systems")

View File

@@ -1,23 +1,23 @@
class Enum():
def __init__(self):
pass
@classmethod
def getTypes(cls):
for stuff in cls.__dict__:
if stuff.upper() == stuff:
yield stuff
@classmethod
def getName(cls, v):
map = getattr(cls, "_map", None)
if map is None:
map = cls._map = {}
for type in cls.getTypes():
map[cls.getValue(type)] = type
return map.get(v)
@classmethod
def getValue(cls, type):
return cls.__dict__[type]
class Enum():
def __init__(self):
pass
@classmethod
def getTypes(cls):
for stuff in cls.__dict__:
if stuff.upper() == stuff:
yield stuff
@classmethod
def getName(cls, v):
map = getattr(cls, "_map", None)
if map is None:
map = cls._map = {}
for type in cls.getTypes():
map[cls.getValue(type)] = type
return map.get(v)
@classmethod
def getValue(cls, type):
return cls.__dict__[type]

View File

@@ -1,29 +1,29 @@
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
#
# eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# 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/>.
# ===============================================================================
class EqBase(object):
def __eq__(self, other):
return type(self) == type(other) and self.ID == other.ID
def __ne__(self, other):
return type(self) != type(other) or self.ID != other.ID
def __hash__(self):
return id(type(self)) + self.ID
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
#
# eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# 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/>.
# ===============================================================================
class EqBase(object):
def __eq__(self, other):
return type(self) == type(other) and self.ID == other.ID
def __ne__(self, other):
return type(self) != type(other) or self.ID != other.ID
def __hash__(self):
return id(type(self)) + self.ID

View File

@@ -1,118 +1,118 @@
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
#
# eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# 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/>.
# ===============================================================================
import itertools
class Graph(object):
def __init__(self, fit, function, data=None):
self.fit = fit
self.data = {}
if data is not None:
for name, d in data.iteritems():
self.setData(Data(name, d))
self.function = function
def clearData(self):
self.data.clear()
def setData(self, data):
self.data[data.name] = data
def getIterator(self):
pointNames = []
pointIterators = []
for data in self.data.itervalues():
pointNames.append(data.name)
pointIterators.append(data)
return self._iterator(pointNames, pointIterators)
def _iterator(self, pointNames, pointIterators):
for pointValues in itertools.product(*pointIterators):
point = {}
for i in xrange(len(pointValues)):
point[pointNames[i]] = pointValues[i]
yield point, self.function(point)
class Data(object):
def __init__(self, name, dataString, step=None):
self.name = name
self.step = step
self.data = self.parseString(dataString)
def parseString(self, dataString):
if not isinstance(dataString, basestring):
return (Constant(dataString),)
dataList = []
for data in dataString.split(";"):
if isinstance(data, basestring) and "-" in data:
# Dealing with a range
dataList.append(Range(data, self.step))
else:
dataList.append(Constant(data))
return dataList
def __iter__(self):
for data in self.data:
for value in data:
yield value
def isConstant(self):
return len(self.data) == 1 and self.data[0].isConstant()
class Constant(object):
def __init__(self, const):
if isinstance(const, basestring):
self.value = None if const == "" else float(const)
else:
self.value = const
def __iter__(self):
yield self.value
def isConstant(self):
return True
class Range(object):
def __init__(self, string, step):
start, end = string.split("-")
self.start = float(start)
self.end = float(end)
self.step = step
def __iter__(self):
current = start = self.start
end = self.end
step = self.step or (end - start) / 50.0
i = 1
while current < end:
current = start + i * step
i += 1
yield current
def isConstant(self):
return False
# ===============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of eos.
#
# eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# 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/>.
# ===============================================================================
import itertools
class Graph(object):
def __init__(self, fit, function, data=None):
self.fit = fit
self.data = {}
if data is not None:
for name, d in data.iteritems():
self.setData(Data(name, d))
self.function = function
def clearData(self):
self.data.clear()
def setData(self, data):
self.data[data.name] = data
def getIterator(self):
pointNames = []
pointIterators = []
for data in self.data.itervalues():
pointNames.append(data.name)
pointIterators.append(data)
return self._iterator(pointNames, pointIterators)
def _iterator(self, pointNames, pointIterators):
for pointValues in itertools.product(*pointIterators):
point = {}
for i in xrange(len(pointValues)):
point[pointNames[i]] = pointValues[i]
yield point, self.function(point)
class Data(object):
def __init__(self, name, dataString, step=None):
self.name = name
self.step = step
self.data = self.parseString(dataString)
def parseString(self, dataString):
if not isinstance(dataString, basestring):
return (Constant(dataString),)
dataList = []
for data in dataString.split(";"):
if isinstance(data, basestring) and "-" in data:
# Dealing with a range
dataList.append(Range(data, self.step))
else:
dataList.append(Constant(data))
return dataList
def __iter__(self):
for data in self.data:
for value in data:
yield value
def isConstant(self):
return len(self.data) == 1 and self.data[0].isConstant()
class Constant(object):
def __init__(self, const):
if isinstance(const, basestring):
self.value = None if const == "" else float(const)
else:
self.value = const
def __iter__(self):
yield self.value
def isConstant(self):
return True
class Range(object):
def __init__(self, string, step):
start, end = string.split("-")
self.start = float(start)
self.end = float(end)
self.step = step
def __iter__(self):
current = start = self.start
end = self.end
step = self.step or (end - start) / 50.0
i = 1
while current < end:
current = start + i * step
i += 1
yield current
def isConstant(self):
return False

Binary file not shown.

View File

@@ -1 +1 @@
__all__ = ["fitDps"]
__all__ = ["fitDps"]

View File

@@ -1,2 +1,2 @@
__all__ = ["ammo", "ammoIcon", "attributeDisplay", "baseIcon", "baseName",
"capacitorUse", "maxRange", "price", "propertyDisplay", "state", "misc", "abilities"]
__all__ = ["ammo", "ammoIcon", "attributeDisplay", "baseIcon", "baseName",
"capacitorUse", "maxRange", "price", "propertyDisplay", "state", "misc", "abilities"]

Binary file not shown.