Skip to content

Commit

Permalink
feat: list all modules for adding them to fits (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueBrain authored Dec 9, 2023
1 parent d9063bf commit e60aa71
Show file tree
Hide file tree
Showing 11 changed files with 418 additions and 39 deletions.
2 changes: 2 additions & 0 deletions src/EveDataProvider/DataTypes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export interface TypeID {
published: boolean,
factionID?: number,
marketGroupID?: number,
metaGroupID?: number,
capacity?: number,
mass?: number,
radius?: number,
Expand All @@ -36,6 +37,7 @@ export interface GroupID {
export interface MarketGroup {
name: string,
parentGroupID?: number,
iconID?: number,
}

export interface DogmaAttribute {
Expand Down
56 changes: 33 additions & 23 deletions src/EveDataProvider/esf_pb2.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,13 @@ export const esf = $root.esf = (() => {
TypeID.prototype.groupID = 0;
TypeID.prototype.categoryID = 0;
TypeID.prototype.published = false;
TypeID.prototype.factionID = 0;
TypeID.prototype.marketGroupID = 0;
TypeID.prototype.capacity = 0;
TypeID.prototype.mass = 0;
TypeID.prototype.radius = 0;
TypeID.prototype.volume = 0;
TypeID.prototype.factionID = undefined;
TypeID.prototype.marketGroupID = undefined;
TypeID.prototype.metaGroupID = undefined;
TypeID.prototype.capacity = undefined;
TypeID.prototype.mass = undefined;
TypeID.prototype.radius = undefined;
TypeID.prototype.volume = undefined;

TypeID.decode = function decode(r, l) {
if (!(r instanceof $Reader))
Expand Down Expand Up @@ -302,18 +303,22 @@ export const esf = $root.esf = (() => {
break;
}
case 7: {
m.capacity = r.float();
m.metaGroupID = r.int32();
break;
}
case 8: {
m.mass = r.float();
m.capacity = r.float();
break;
}
case 9: {
m.radius = r.float();
m.mass = r.float();
break;
}
case 10: {
m.radius = r.float();
break;
}
case 11: {
m.volume = r.float();
break;
}
Expand Down Expand Up @@ -511,7 +516,8 @@ export const esf = $root.esf = (() => {
}

MarketGroup.prototype.name = "";
MarketGroup.prototype.parentGroupID = 0;
MarketGroup.prototype.parentGroupID = undefined;
MarketGroup.prototype.iconID = undefined;

MarketGroup.decode = function decode(r, l) {
if (!(r instanceof $Reader))
Expand All @@ -528,6 +534,10 @@ export const esf = $root.esf = (() => {
m.parentGroupID = r.int32();
break;
}
case 3: {
m.iconID = r.int32();
break;
}
default:
r.skipType(t & 7);
break;
Expand Down Expand Up @@ -738,14 +748,14 @@ export const esf = $root.esf = (() => {
DogmaEffect.prototype.isWarpSafe = false;
DogmaEffect.prototype.propulsionChance = false;
DogmaEffect.prototype.rangeChance = false;
DogmaEffect.prototype.dischargeAttributeID = 0;
DogmaEffect.prototype.durationAttributeID = 0;
DogmaEffect.prototype.rangeAttributeID = 0;
DogmaEffect.prototype.falloffAttributeID = 0;
DogmaEffect.prototype.trackingSpeedAttributeID = 0;
DogmaEffect.prototype.fittingUsageChanceAttributeID = 0;
DogmaEffect.prototype.resistanceAttributeID = 0;
DogmaEffect.prototype.modifierInfo = emptyArray;
DogmaEffect.prototype.dischargeAttributeID = undefined;
DogmaEffect.prototype.durationAttributeID = undefined;
DogmaEffect.prototype.rangeAttributeID = undefined;
DogmaEffect.prototype.falloffAttributeID = undefined;
DogmaEffect.prototype.trackingSpeedAttributeID = undefined;
DogmaEffect.prototype.fittingUsageChanceAttributeID = undefined;
DogmaEffect.prototype.resistanceAttributeID = undefined;
DogmaEffect.prototype.modifierInfo = undefined;

DogmaEffect.decode = function decode(r, l) {
if (!(r instanceof $Reader))
Expand Down Expand Up @@ -855,11 +865,11 @@ export const esf = $root.esf = (() => {

ModifierInfo.prototype.domain = 0;
ModifierInfo.prototype.func = 0;
ModifierInfo.prototype.modifiedAttributeID = 0;
ModifierInfo.prototype.modifyingAttributeID = 0;
ModifierInfo.prototype.operation = 0;
ModifierInfo.prototype.groupID = 0;
ModifierInfo.prototype.skillTypeID = 0;
ModifierInfo.prototype.modifiedAttributeID = undefined;
ModifierInfo.prototype.modifyingAttributeID = undefined;
ModifierInfo.prototype.operation = undefined;
ModifierInfo.prototype.groupID = undefined;
ModifierInfo.prototype.skillTypeID = undefined;

ModifierInfo.decode = function decode(r, l) {
if (!(r instanceof $Reader))
Expand Down
57 changes: 57 additions & 0 deletions src/HardwareListing/HardwareListing.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
.listing {
background-color: #111111;
color: #c5c5c5;
font-size: 15px;
height: 100%;
position: relative;
width: 100%;
}

.listingContent {
height: calc(100% - 42px - 32px - 5px);
overflow-y: auto;
padding-right: 20px;
}

.topbar {
display: flex;
}

.topbar > input {
background-color: #1d1d1d;
color: #c5c5c5;
flex: 1;
height: 24px;
line-height: 24px;
margin: 6px 0;
padding-left: 6px;
}

.filter {
display: flex;
margin-bottom: 5px;
}
.filter > span {
border-radius: 5px;
cursor: pointer;
display: inline-block;
height: 32px;
line-height: 32px;
text-align: center;
user-select: none;
width: 32px;
}
.filter > span:hover {
background-color: #4f4f4f;
}
.filter > span.selected {
background-color: #7a7a7a;
}

.filter > span.disabled {
color: #7a7a7a;
cursor: default;
}
.filter > span.disabled:hover {
background-color: #111111;
}
29 changes: 29 additions & 0 deletions src/HardwareListing/HardwareListing.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import type { Decorator, Meta, StoryObj } from '@storybook/react';
import React from "react";

import { EveDataProvider } from '../EveDataProvider';

import { HardwareListing } from './';

const meta: Meta<typeof HardwareListing> = {
component: HardwareListing,
tags: ['autodocs'],
title: 'Component/HardwareListing',
};

export default meta;
type Story = StoryObj<typeof HardwareListing>;

const withEveDataProvider: Decorator<Record<string, never>> = (Story) => {
return (
<EveDataProvider>
<div style={{height: "400px"}}>
<Story />
</div>
</EveDataProvider>
);
}

export const Default: Story = {
decorators: [withEveDataProvider],
};
Loading

0 comments on commit e60aa71

Please sign in to comment.