Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Sparks of the Future blocks to the grid analyzer. #37

Merged
merged 1 commit into from
Aug 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions workspaces/app/src/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ export * from './vega'
export { createStyles } from '@material-ui/core/styles' // TODO: '@material-ui/styles'
export { GridSize } from '@material-ui/core/Grid'

export const VERSION = 2

export const padTo2 = (value: number | string): string => {
const string = value.toString()
if(string.length < 2) return padTo2(`0${string}`)
Expand Down Expand Up @@ -154,7 +152,7 @@ export const linkCollectionProps = (id: string | number): ILinkProps => linkProp
*
* Example (elevation 16):
* IN: "0px 8px 10px -5px rgba(0,0,0,0.2),0px 16px 24px 2px rgba(0,0,0,0.14),0px 6px 30px 5px rgba(0,0,0,0.12)"
* OUT:
* OUT:
*/
export const dropShadowFromBoxShadow = (css: string): string => {
const boxShadows = css.match(/(\w+ \S+ \S+ \S+ \S+?\))/g) as string[]
Expand Down
56 changes: 30 additions & 26 deletions workspaces/app/src/containers/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import CubeBlocksDecorative1Link from '@sepraisal/praisal/vendor/DecorativePack/
import CubeBlocksDecorative2Link from '@sepraisal/praisal/vendor/DecorativePack2/CubeBlocks.sbc'
import CubeBlocksEconomyLink from '@sepraisal/praisal/vendor/Economy/CubeBlocks.sbc'
import CubeBlocksFrostbiteLink from '@sepraisal/praisal/vendor/Frostbite/CubeBlocks.sbc'
import CubeBlocksSparksOfTheFutureLink from '@sepraisal/praisal/vendor/SparksOfTheFuturePack/CubeBlocks.sbc'
Akuukis marked this conversation as resolved.
Show resolved Hide resolved
import MaterialsLink from '@sepraisal/praisal/vendor/Vanilla/Blueprints.sbc'
import ComponentsLink from '@sepraisal/praisal/vendor/Vanilla/Components.sbc'
import CubeBlocksCubeBlocksLink from '@sepraisal/praisal/vendor/Vanilla/CubeBlocks/CubeBlocks.sbc'
Expand All @@ -22,6 +23,7 @@ import CubeBlocksLogisticsLink from '@sepraisal/praisal/vendor/Vanilla/CubeBlock
import CubeBlocksMechanicalLink from '@sepraisal/praisal/vendor/Vanilla/CubeBlocks/CubeBlocks_Mechanical.sbc'
import CubeBlocksMedicalLink from '@sepraisal/praisal/vendor/Vanilla/CubeBlocks/CubeBlocks_Medical.sbc'
import CubeBlocksProductionLink from '@sepraisal/praisal/vendor/Vanilla/CubeBlocks/CubeBlocks_Production.sbc'
import CubeBlocksSymbolsLink from '@sepraisal/praisal/vendor/Vanilla/CubeBlocks/CubeBlocks_Symbols.sbc'
Akuukis marked this conversation as resolved.
Show resolved Hide resolved
import CubeBlocksThrustersLink from '@sepraisal/praisal/vendor/Vanilla/CubeBlocks/CubeBlocks_Thrusters.sbc'
import CubeBlocksToolsLink from '@sepraisal/praisal/vendor/Vanilla/CubeBlocks/CubeBlocks_Tools.sbc'
import CubeBlocksUtilityLink from '@sepraisal/praisal/vendor/Vanilla/CubeBlocks/CubeBlocks_Utility.sbc'
Expand Down Expand Up @@ -75,32 +77,34 @@ export default hot(createSmartFC(styles, __filename)<IProps>(({children, classes
fetch(MaterialsLink).then((res) => res.text()),
fetch(PhysicalItemsLink).then((res) => res.text()),

fetch(CubeBlocksCubeBlocksLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksArmorLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksAutomationLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksCommunicationsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksControlLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksDoorsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksEnergyLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksExtrasLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksGravityLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksInteriorsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksLCDPanelsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksLightsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksLogisticsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksMechanicalLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksMedicalLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksProductionLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksThrustersLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksToolsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksUtilityLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksWeaponsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksWheelsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksWindowsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksDecorative1Link ).then(async (res) => [await res.text(), VENDOR_MOD.DECORATIVE_1]),
fetch(CubeBlocksDecorative2Link ).then(async (res) => [await res.text(), VENDOR_MOD.DECORATIVE_2]),
fetch(CubeBlocksEconomyLink ).then(async (res) => [await res.text(), VENDOR_MOD.ECONOMY]),
fetch(CubeBlocksFrostbiteLink ).then(async (res) => [await res.text(), VENDOR_MOD.FROSTBITE]),
fetch(CubeBlocksCubeBlocksLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksArmorLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksAutomationLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksCommunicationsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksControlLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksDoorsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksEnergyLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksExtrasLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksGravityLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksInteriorsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksLCDPanelsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksLightsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksLogisticsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksMechanicalLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksMedicalLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksProductionLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
Akuukis marked this conversation as resolved.
Show resolved Hide resolved
fetch(CubeBlocksSymbolsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksThrustersLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksToolsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksUtilityLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksWeaponsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksWheelsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksWindowsLink ).then(async (res) => [await res.text(), VENDOR_MOD.VANILLA]),
fetch(CubeBlocksDecorative1Link ).then(async (res) => [await res.text(), VENDOR_MOD.DECORATIVE_1]),
fetch(CubeBlocksDecorative2Link ).then(async (res) => [await res.text(), VENDOR_MOD.DECORATIVE_2]),
fetch(CubeBlocksEconomyLink ).then(async (res) => [await res.text(), VENDOR_MOD.ECONOMY]),
fetch(CubeBlocksFrostbiteLink ).then(async (res) => [await res.text(), VENDOR_MOD.FROSTBITE]),
fetch(CubeBlocksSparksOfTheFutureLink ).then(async (res) => [await res.text(), VENDOR_MOD.SPARKSOFTHEFUTURE]),
] as never) as [string, string, string, ...[string, VENDOR_MOD][]]
const praisalManager = new PraisalManager()
await praisalManager.addPhysicalItemsSbc(physicalItemsSbc, VENDOR_MOD.VANILLA)
Expand Down
2 changes: 1 addition & 1 deletion workspaces/app/static/articles/fleets/mongo.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-env mongo */

var tagValidShips = {$set: {validShip: {$and: [
{$eq: ['$sbc._version', 7]}, // 2. Analyse-able.
{$eq: ['$sbc._version', 8]}, // 2. Analyse-able.
{$eq: ['$sbc.vanilla', true]}, // 3. Vanilla.
{$eq: ['$sbc.gridStatic', false]}, // 4. Dynamic grids.
{$or: [ // 5.1. Filter blueprints that have a power source.
Expand Down
4 changes: 2 additions & 2 deletions workspaces/common/src/IBlueprint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ export namespace IBlueprint {

export const VERSION = {
classes: 1,
sbc: 7,
steam: 2,
sbc: 8,
steam: 3,
thumb: 2,
} as const

Expand Down
1 change: 1 addition & 0 deletions workspaces/common/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export enum VENDOR_MOD {
FROSTBITE = 'Frostbite',
DECORATIVE_1 = 'DecorativePack',
DECORATIVE_2 = 'DecorativePack2',
SPARKSOFTHEFUTURE = 'SparksOfTheFuturePack',
}

export enum COMMUNITY_MOD {
Expand Down
1 change: 1 addition & 0 deletions workspaces/crawler/src/routines/2-scrape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const VENDOR_ID_TO_MOD = {
1241550: VENDOR_MOD.FROSTBITE,
1049790: VENDOR_MOD.DECORATIVE_1,
1167910: VENDOR_MOD.DECORATIVE_2,
1307680: VENDOR_MOD.SPARKSOFTHEFUTURE,
}

const thumbIdConvert = (url: string) => url.includes('default_image') ? null : `${url.split('/')[4]}-${url.split('/')[5]}`
Expand Down
Loading