From 0603b472fa6d9822c7830b25dfc69baac016d173 Mon Sep 17 00:00:00 2001 From: Lloyd Richards Date: Wed, 17 Jun 2020 16:05:09 +0200 Subject: [PATCH] content: Filling out Routes --- .../LifePlastic/Interfaces/Interfaces.tsx | 1 + components/LifePlastic/RootRoutes.tsx | 87 ++++++++++--------- components/LifePlastic/Routes.tsx | 2 +- components/LifePlastic/Routes/HandRoutes.tsx | 2 +- components/animejs/garbage.tsx | 2 +- pages/experiment/010.tsx | 2 + 6 files changed, 53 insertions(+), 43 deletions(-) diff --git a/components/LifePlastic/Interfaces/Interfaces.tsx b/components/LifePlastic/Interfaces/Interfaces.tsx index 1d0f698..1e3a642 100644 --- a/components/LifePlastic/Interfaces/Interfaces.tsx +++ b/components/LifePlastic/Interfaces/Interfaces.tsx @@ -19,6 +19,7 @@ export interface SystemList { LDPEMachineSort: boolean; OTHERMachineSort: boolean; SeperatedPETGrinder: boolean; + OTHERRefiner: boolean; } export interface PlasticType { diff --git a/components/LifePlastic/RootRoutes.tsx b/components/LifePlastic/RootRoutes.tsx index 129d808..421fc2e 100644 --- a/components/LifePlastic/RootRoutes.tsx +++ b/components/LifePlastic/RootRoutes.tsx @@ -6,77 +6,77 @@ export const RootRoutes: Array = [ { parent: "Mixed-Garbage", require: "TRASHBin", - possible: ["Garbage"], + possible: [""], waste: "none", wasteChance: 0, }, { parent: "Other-Garbage", require: "TRASHBin", - possible: ["Garbage"], + possible: [""], waste: "none", wasteChance: 0, }, { parent: "LDPE-Garbage", require: "TRASHBin", - possible: ["Garbage"], + possible: [""], waste: "none", wasteChance: 0, }, { parent: "ESP-Garbage", require: "TRASHBin", - possible: ["Garbage"], + possible: [""], waste: "none", wasteChance: 0, }, { parent: "SeperateHDPE-Garbage", require: "TRASHBin", - possible: ["Garbage"], + possible: [""], waste: "none", wasteChance: 0, }, { parent: "SeperatePETE-Garbage", require: "TRASHBin", - possible: ["Garbage"], + possible: [""], waste: "none", wasteChance: 0, }, { parent: "PVC-Garbage", require: "TRASHBin", - possible: ["Garbage"], + possible: [""], waste: "none", wasteChance: 0, }, { parent: "MixedPS-Garbage", require: "TRASHBin", - possible: ["Garbage"], + possible: [""], waste: "none", wasteChance: 0, }, { parent: "PP-Garbage", require: "TRASHBin", - possible: ["Garbage"], + possible: [""], waste: "none", wasteChance: 0, }, { parent: "MixedPETE-Garbage", require: "TRASHBin", - possible: ["Garbage"], + possible: [""], waste: "none", wasteChance: 0, }, { parent: "MixedHDPE-Garbage", require: "TRASHBin", - possible: ["Garbage"], + possible: [""], waste: "none", wasteChance: 0, }, @@ -185,6 +185,13 @@ export const RootRoutes: Array = [ waste: "none", wasteChance: 0, }, + { + parent: "Garbage", + require: "TRASHBin", + possible: [""], + waste: "none", + wasteChance: 0, + }, //----------------------------------------------------- //-----------------MIXED Routes //----------------------------------------------------- @@ -334,7 +341,7 @@ export const RootRoutes: Array = [ "Pellet-GreenrPET", "Pellet-BluerPET", "Pellet-BrownrPET", - "Pellet-ClearnrPET", + "Pellet-ClearrPET", "Regrind-PP-Recovered", "Regrind-MixedPETE-Recovered", ], @@ -357,7 +364,7 @@ export const RootRoutes: Array = [ "Pellet-GreenrPET", "Pellet-BluerPET", "Pellet-BrownrPET", - "Pellet-ClearnrPET", + "Pellet-ClearrrPET", "Regrind-PP-Recovered", "Regrind-MixedPETE-Recovered", ], @@ -373,7 +380,7 @@ export const RootRoutes: Array = [ "Pellet-GreenrPET", "Pellet-BluerPET", "Pellet-BrownrPET", - "Pellet-ClearnrPET", + "Pellet-ClearrPET", "Regrind-PP-Recovered", "Regrind-MixedPETE-Recovered", ], @@ -512,16 +519,16 @@ export const RootRoutes: Array = [ }, { parent: "Bale-Other-Hand", - require: "PETBin", - possible: [""], - waste: "", + require: "OTHERRefiner", + possible: ["Pellet-Other-Concrete", "Pellet-Other-Furniture"], + waste: "Other-Garbage", wasteChance: 0.1, }, { parent: "Bale-Other-Machine", - require: "PETBin", - possible: [""], - waste: "", + require: "OTHERRefiner", + possible: ["Pellet-Other-Concrete", "Pellet-Other-Furniture"], + waste: "Other-Garbage", wasteChance: 0.1, }, //----------------------------------------------------- @@ -551,9 +558,9 @@ export const RootRoutes: Array = [ { parent: "Pellet-MixedPETE-Fibre", require: "PETBin", - possible: [""], - waste: "", - wasteChance: 0.1, + possible: ["rPET-Fibre"], + waste: "none", + wasteChance: 0, }, { parent: "Pellet-MixedPETE-Furniture", @@ -662,17 +669,17 @@ export const RootRoutes: Array = [ }, { parent: "Pellet-Other-Furniture", - require: "PETBin", - possible: [""], - waste: "", - wasteChance: 0.1, + require: "TRASHBin", + possible: ["Product-Furniture"], + waste: "none", + wasteChance: 0, }, { parent: "Pellet-Other-Concrete", - require: "PETBin", - possible: [""], - waste: "", - wasteChance: 0.1, + require: "TRASHBin", + possible: ["Product-Concrete"], + waste: "none", + wasteChance: 0, }, { parent: "Regrind-SeperateHDPE", @@ -784,10 +791,10 @@ export const RootRoutes: Array = [ }, { parent: "Other", - require: "PETBin", - possible: [""], - waste: "", - wasteChance: 0.1, + require: "OTHERBin", + possible: ["Bale-Other-Hand"], + waste: "none", + wasteChance: 0, }, { parent: "PCV", @@ -807,8 +814,8 @@ export const RootRoutes: Array = [ //-----------------PRODUCT Routes //----------------------------------------------------- { - parent: "rPET Fibre", - require: "PETBin", + parent: "rPET-Fibre", + require: "TRASHBin", possible: [ "Product-Cloths", "Product-NylonBags", @@ -849,7 +856,7 @@ export const RootRoutes: Array = [ { parent: "Product-Frames", require: "OTHERBin", - possible: ["OTHER"], + possible: ["Other"], waste: "none", wasteChance: 0, }, @@ -912,7 +919,7 @@ export const RootRoutes: Array = [ { parent: "Product-Bucket", require: "OTHERBin", - possible: ["OTHER"], + possible: ["Other"], waste: "none", wasteChance: 0, }, @@ -933,7 +940,7 @@ export const RootRoutes: Array = [ { parent: "Product-Furniture", require: "OTHERBin", - possible: ["OTHER"], + possible: ["Other"], waste: "none", wasteChance: 0, }, diff --git a/components/LifePlastic/Routes.tsx b/components/LifePlastic/Routes.tsx index 794f222..972e611 100644 --- a/components/LifePlastic/Routes.tsx +++ b/components/LifePlastic/Routes.tsx @@ -435,7 +435,7 @@ export const Routes = () => { d="M519.526 1767.81v136.16c0 3.44-1.774 6.64-4.695 8.47l-6.589 4.13a9.986 9.986 0 00-4.695 8.47v138.59" /> diff --git a/components/LifePlastic/Routes/HandRoutes.tsx b/components/LifePlastic/Routes/HandRoutes.tsx index 671d09c..e0c8f25 100644 --- a/components/LifePlastic/Routes/HandRoutes.tsx +++ b/components/LifePlastic/Routes/HandRoutes.tsx @@ -56,7 +56,7 @@ export const HandRoutes: Array = [ type: "PET", plastic: "PET", amount: 1, - name: "rPET Fibre", + name: "rPET-Fibre", path: "M583.287 336.001v69.936c0 5.523 4.477 10 10 10h32.518c2.129 0 4.203-.68 5.92-1.94l8.442-6.202a9.997 9.997 0 004.081-8.059V224.347a10 10 0 013.812-7.855l7.74-6.097a9.994 9.994 0 016.188-2.145h23.156c5.522 0 10 4.477 10 10v5.751", }, diff --git a/components/animejs/garbage.tsx b/components/animejs/garbage.tsx index b1bcfe6..3a4c896 100644 --- a/components/animejs/garbage.tsx +++ b/components/animejs/garbage.tsx @@ -37,7 +37,7 @@ export const Garbage = ({ pathRef, onComplete, delay }: BoxProps) => { width: 25, backgroundColor: "green", position: "absolute", - top: "415px", + top: "350px", left: "-12px", }} > diff --git a/pages/experiment/010.tsx b/pages/experiment/010.tsx index e17fe88..d9fd065 100644 --- a/pages/experiment/010.tsx +++ b/pages/experiment/010.tsx @@ -45,6 +45,7 @@ const Experiment010: React.FC = () => { LDPEMachineSort: true, OTHERMachineSort: true, SeperatedPETGrinder: true, + OTHERRefiner: true, }); const pickPath = (path: RouteType): PathType => { @@ -66,6 +67,7 @@ const Experiment010: React.FC = () => { const currentPath = RootRoutes.find((i) => i.parent === item.name); if (currentPath) { const nextPath = pickPath(currentPath); + console.log(nextPath); for (var x = 0; x < nextPath.amount; x++) nextMaterial(setMaterials)(item, nextPath); }