Skip to content

Commit

Permalink
Enable Structure calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebag333 committed Oct 13, 2016
1 parent c339314 commit dbe6c6b
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 10 deletions.
23 changes: 19 additions & 4 deletions eos/const/eve.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
@unique
class Attribute(IntEnum):
"""Attribute ID holder"""

# This is a static mapping of data from dmgattribs
# if attribs are added/updated, this will have to be manually changed

mass = 4
hp = 9
power_output = 11
Expand Down Expand Up @@ -100,14 +104,28 @@ class Attribute(IntEnum):
required_skill_6_level = 1288
required_skill_5 = 1289
required_skill_6 = 1290

#Ship Groups
can_fit_ship_group_1 = 1298
can_fit_ship_group_2 = 1299
can_fit_ship_group_3 = 1300
can_fit_ship_group_4 = 1301
can_fit_ship_group_5 = 1872
can_fit_ship_group_6 = 1879
can_fit_ship_group_7 = 1880
can_fit_ship_group_8 = 1881
can_fit_ship_group_9 = 2065
can_fit_ship_group_10 = 2396

#Ship Types
can_fit_ship_type_1 = 1302
can_fit_ship_type_2 = 1303
can_fit_ship_type_3 = 1304
can_fit_ship_type_4 = 1305
can_fit_ship_type_5 = 1944
can_fit_ship_type_6 = 2103
can_fit_ship_type_7 = 2463

subsystem_slot = 1366
max_subsystems = 1367
fits_to_shiptype = 1380
Expand All @@ -116,10 +134,7 @@ class Attribute(IntEnum):
allowed_drone_group_1 = 1782
allowed_drone_group_2 = 1783
reload_time = 1795
can_fit_ship_group_5 = 1872
can_fit_ship_group_6 = 1879
can_fit_ship_group_7 = 1880
can_fit_ship_group_8 = 1881



@unique
Expand Down
17 changes: 12 additions & 5 deletions eos/fit/restriction_tracker/register/holder_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,29 @@
Attribute.implantness in item.attributes
),
ModuleHigh: lambda item: (
item.category == Category.module and
(item.category == Category.module or
item.category == Category.structureModule) and
Slot.module_high in item.slots
),
ModuleMed: lambda item: (
item.category == Category.module and
(item.category == Category.module or
item.category == Category.structureModule) and
Slot.module_med in item.slots
),
ModuleLow: lambda item: (
item.category == Category.module and
(item.category == Category.module or
item.category == Category.structureModule) and
Slot.module_low in item.slots
),
Rig: lambda item: (
item.category == Category.module and
(item.category == Category.module or
item.category == Category.structureModule) and
Slot.rig in item.slots
),
Ship: lambda item: item.category == Category.ship,
Ship: lambda item: (
item.category == Category.ship or
item.category == Category.structure
),
Skill: lambda item: item.category == Category.skill,
Stance: lambda item: item.group == Group.ship_modifier,
Subsystem: lambda item: (
Expand Down
7 changes: 6 additions & 1 deletion eos/fit/restriction_tracker/register/ship_type_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
Attribute.can_fit_ship_type_2,
Attribute.can_fit_ship_type_3,
Attribute.can_fit_ship_type_4,
Attribute.can_fit_ship_type_5,
Attribute.can_fit_ship_type_6,
Attribute.can_fit_ship_type_7,
Attribute.fits_to_shiptype
)
GROUP_RESTRICTION_ATTRS = (
Expand All @@ -43,7 +46,9 @@
Attribute.can_fit_ship_group_5,
Attribute.can_fit_ship_group_6,
Attribute.can_fit_ship_group_7,
Attribute.can_fit_ship_group_8
Attribute.can_fit_ship_group_8,
Attribute.can_fit_ship_group_9,
Attribute.can_fit_ship_group_10
)


Expand Down

0 comments on commit dbe6c6b

Please sign in to comment.