diff --git a/README.md b/README.md index 79ce53a..dc0d13d 100644 --- a/README.md +++ b/README.md @@ -157,19 +157,25 @@ For example to add Sewing Machines to Artisans: ```typescript { - productionChain: 'sewingMachines', - chainMultiplier: '2', - mermaidDefinition: endent` - flowchart LR - Charcoal(1) - Steel(1) - SewingMachines(1) - Iron(50%1) - Steel - Wood(50%1) - Charcoal & Iron --> Steel --> SewingMachines - Wood --> SewingMachines - ` + colBreak: false, + tierName: 'Artisans', + productionChains: [ + { + productionChain: 'sewingMachines', + chainMultiplier: '2', + mermaidDefinition: endent` + flowchart LR + Charcoal(1) + Steel(1) + SewingMachines(1) + Iron(50%1) + Steel + Wood(50%1) + Charcoal & Iron --> Steel --> SewingMachines + Wood --> SewingMachines + ` + } + ] } ``` @@ -177,7 +183,7 @@ for details on the `mermaidDefinition` see the section below. ## Mermaid definitions -See the documentation for mermaid flowcharts [here](https://mermaid-js.github.io/mermaid/#/flowchart) for more information. +See the documentation for mermaid flowcharts [here](https://mermaid-js.github.io/mermaid/#/flowchart). A mermaid definition starts with @@ -236,7 +242,6 @@ Charcoal(1) SewingMachines(1) Iron(50%1) -Steel Wood(50%1) Charcoal & Iron --> Steel --> SewingMachines Wood --> SewingMachines diff --git a/src/pages/data/production-chains-base.ts b/src/pages/data/production-chains-base.ts index 7f54914..e77b289 100644 --- a/src/pages/data/production-chains-base.ts +++ b/src/pages/data/production-chains-base.ts @@ -286,7 +286,6 @@ export const productionChainsBase: TieredProductionChain[] = [ Steel(1) SewingMachines(1) Iron(50%1) - Steel Wood(50%1) Charcoal & Iron --> Steel --> SewingMachines Wood --> SewingMachines diff --git a/src/pages/data/production-chains-expansions.ts b/src/pages/data/production-chains-expansions.ts index 0162a02..da58a0c 100644 --- a/src/pages/data/production-chains-expansions.ts +++ b/src/pages/data/production-chains-expansions.ts @@ -1,3 +1,4 @@ +import endent from 'endent'; import { TieredProductionChain } from './models'; import * as icons from './icons'; @@ -8,11 +9,21 @@ export const productionChainsExpansions: TieredProductionChain[] = [ productionChains: [ { productionChain: 'tractorGrain', - mermaidDefinition: `flowchart LR; TractorGrain(1) --> Grain(4)` + mermaidDefinition: endent` + flowchart LR + TractorGrain(1) + Grain(4) + TractorGrain --> Grain + ` }, { productionChain: 'siloPig', - mermaidDefinition: `flowchart LR; SiloPig(1) --> Pig(2.66)` + mermaidDefinition: endent` + flowchart LR + SiloPig(1) + Pig(2.66) + SiloPig --> Pig + ` } ] }, @@ -22,11 +33,26 @@ export const productionChainsExpansions: TieredProductionChain[] = [ productionChains: [ { productionChain: 'tractor', - mermaidDefinition: `flowchart LR; OilWell(1) --> Fuel(1) --> Tractor(20)` + mermaidDefinition: endent` + flowchart LR + OilWell(1) + Fuel(1) + Tractor(20) + OilWell --> Fuel --> Tractor + ` }, { productionChain: 'silos', - mermaidDefinition: `flowchart TB; Grain(1); Corn(1); Teff(1); Silo(5); Grain --> Silo; Corn --> Silo; Teff --> Silo` + mermaidDefinition: endent` + flowchart TB + Grain(1) + Corn(1) + Teff(1) + Silo(5) + Grain --> Silo + Corn --> Silo + Teff --> Silo + ` } ] }, @@ -36,15 +62,46 @@ export const productionChainsExpansions: TieredProductionChain[] = [ productionChains: [ { productionChain: 'shampoo', - mermaidDefinition: `flowchart LR; CoconutOil(1) & Cinnamon(1) --> Shampoo(1); Pigs(2) --> Tallow(2) --> Soap(1) --> Shampoo` + mermaidDefinition: endent` + flowchart LR + CoconutOil(1) + Cinnamon(1) + Shampoo(1) + Pigs(2) + Tallow(2) + Soap(1) + CoconutOil & Cinnamon --> Shampoo + Pigs --> Tallow --> Soap --> Shampoo + ` }, { productionChain: 'lemonade', - mermaidDefinition: `flowchart LR; SugarCane(1) --> Sugar(1) --> Lemonade(1); Citrus(1) & Saltpeter(4) --> Lemonade` + mermaidDefinition: endent` + flowchart LR + SugarCane(1) + Sugar(1) + Lemonade(1) + Citrus(1) + Saltpeter(4) + SugarCane --> Sugar --> Lemonade + Citrus --> Lemonade + Saltpeter --> Lemonade + ` }, { productionChain: 'souvenirs', - mermaidDefinition: `flowchart LR; CamphorWax(1) --> Souvenirs(1); Sand(1) --> Glass(1) --> Souvenirs; Cotton(2) --> Souvenirs` + mermaidDefinition: endent` + flowchart LR + CamphorWax(1) + Souvenirs(1) + Sand(1) + Glass(1) + Souvenirs + Cotton(2) + CamphorWax --> Souvenirs + Sand --> Glass --> Souvenirs + Cotton --> Souvenirs + ` } ] }, @@ -54,23 +111,65 @@ export const productionChainsExpansions: TieredProductionChain[] = [ productionChains: [ { productionChain: 'archdukeSchnitzel', - mermaidDefinition: `flowchart LR; Pigs0(1) --> Schnitzel(1); Potato(50%1) --> Schnitzel; Pigs1(1) --> Tallow(1) --> Schnitzel` + mermaidDefinition: endent` + flowchart LR + Pigs0(1) + Schnitzel(1) + Potato(50%1) + Schnitzel + Pigs1(1) + Tallow(1) + Pigs0 --> Schnitzel + Potato --> Schnitzel + Pigs1 --> Tallow --> Schnitzel + ` }, { productionChain: 'stroggofGoulash', - mermaidDefinition: `flowchart LR; Beef(2) & RedPeppers(2) & Corn(1) --> StroggofGoulash(1)` + mermaidDefinition: endent` + flowchart LR + Beef(2) + RedPeppers(2) + Corn(1) + StroggofGoulash(1) + Beef & RedPeppers & Corn --> StroggofGoulash + ` }, { productionChain: 'fishFrites', - mermaidDefinition: `flowchart LR; Fish(50%1) & Potato(50%1) & Citrus(50%1) --> FishFrites(1)` + mermaidDefinition: endent` + flowchart LR + Fish(50%1) + Potato(50%1) + Citrus(50%1) + FishFrites(1) + Fish & Potato & Citrus --> FishFrites + ` }, { productionChain: 'venisonEnCroute', - mermaidDefinition: `flowchart LR; Grain(1) --> Flour(50%1) --> VenisonEnCroute(1); Potato(50%1) & Caribou(1) --> VenisonEnCroute` + mermaidDefinition: endent` + flowchart LR + Grain(1) + Flour(50%1) + VenisonEnCroute(1) + Potato(50%1) + Caribou(1) + Grain --> Flour --> VenisonEnCroute + Potato --> VenisonEnCroute + Caribou --> VenisonEnCroute + ` }, { productionChain: 'lobsterCheminee', - mermaidDefinition: `flowchart LR; Lobster(1) & Ctirus(50%1) & Tobacco(2) --> LobsterCheminee(1)` + mermaidDefinition: endent` + flowchart LR + Lobster(1) + Citrus(50%1) + Tobacco(2) + LobsterCheminee(1) + Lobster & Citrus & Tobacco --> LobsterCheminee + ` } ] }