From f8d8c9e2066aa8e4952b70058aceb328faa5295f Mon Sep 17 00:00:00 2001 From: unimatrixgit <95320811+unimatrixgit@users.noreply.github.com> Date: Thu, 3 Dec 2026 22:36:28 +0100 Subject: [PATCH] Add source-bound spice cooker and rail Cookbook recipes and grades --- .../cookbook/icons/spice_blast_furnace.png | Bin 0 -> 912 bytes .../data/cookbook/icons/spice_campfire.png | Bin 0 -> 1370 bytes website/data/cookbook/icons/spice_coal.png | Bin 0 -> 1121 bytes website/data/cookbook/icons/spice_furnace.png | Bin 0 -> 807 bytes website/data/cookbook/icons/spice_smoker.png | Bin 0 -> 882 bytes .../cookbook/icons/spice_soul_campfire.png | Bin 0 -> 1408 bytes website/data/cookbook/icons/spice_tender.png | Bin 0 -> 1604 bytes website/data/cookbook/item-grades.json | 98 ++++++++++++++++++ website/data/cookbook/spice-crafting.json | 72 +++++++++++++ website/scripts/recipe-catalogue.mjs | 21 ++++ website/tests/cookbook-item-grades.test.mjs | 2 +- .../tests/spice-crafting-cookbook.test.mjs | 44 ++++++++ 12 files changed, 236 insertions(+), 1 deletion(-) create mode 100644 website/data/cookbook/icons/spice_blast_furnace.png create mode 100644 website/data/cookbook/icons/spice_campfire.png create mode 100644 website/data/cookbook/icons/spice_coal.png create mode 100644 website/data/cookbook/icons/spice_furnace.png create mode 100644 website/data/cookbook/icons/spice_smoker.png create mode 100644 website/data/cookbook/icons/spice_soul_campfire.png create mode 100644 website/data/cookbook/icons/spice_tender.png create mode 100644 website/data/cookbook/spice-crafting.json create mode 100644 website/tests/spice-crafting-cookbook.test.mjs diff --git a/website/data/cookbook/icons/spice_blast_furnace.png b/website/data/cookbook/icons/spice_blast_furnace.png new file mode 100644 index 0000000000000000000000000000000000000000..f9d87058e4d2d316f66b561363dfeb19242f6eb7 GIT binary patch literal 912 zcmV;B18@9^P)kLfI%o7nl z^+vqUhMa-l!4lBioS@cZ3ng5aTAC8nlyIr1w}<9t-xCu;+r?s0+l94)wpW%{w4Kj? zr`%GW78i4r%`V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MOIB+N+ihQ}Uj8r-$C4us=HWpwujzt@><$5JF3tN1z_}(I!N=bQG+P>nZ zHB79|0q+sV4n4Uv5>bT3g(YM%8RW8Aq%&Q(er*~i()e{DmM)n7@B>7VmVoqy-X0_) zgYum+y0TexXS$H?%HaBqX-Q<~maJ&w>L2rKdUMSnVz!*)%s!c9wibzG3N~h~A(RG% zJE=QIEvKKgVb9PZknF{~@V!TPUJk1;Mw=j-07xId%w@ZT&M(eSpk^&9Rf|fcic~6r zm6aNH4(0{mV1EwQ6L4UmbZZIDSxo(YQvlvsT#?}6g!I@x&=bll<9YR$Q&R)2lTIdI zUD;GJL079BudD1y&&%)$s^=fOK)S&?B#evP`SE(!;m6ukUs2b!_d;^8<@Qex1ZY_38NymS?wMGML=0Fsw zkQM)#6>G{C7e+`Ydz~r|s^@&5m)T&g{Adv`>JNaaA11(c3R=q7YE1@eHIJE_%lK^U zs%%6`#n*=o!AN_`nX}ra!jxek3lo`DZ!L^50*IdL$Si@uw-F)hJ3B{O8zQ;aKROGY c@V^E77q$SX6z+biH~;_u07*qoM6N<$f@*t`NdN!< literal 0 HcmV?d00001 diff --git a/website/data/cookbook/icons/spice_coal.png b/website/data/cookbook/icons/spice_coal.png new file mode 100644 index 0000000000000000000000000000000000000000..751e68d42adade3d13c3714206d06b9e3968c70b GIT binary patch literal 1121 zcmV-n1fKheP)LTlD28pYAI9-f*uNj;6V?9f(wFPTA_zhsUC_&6hsf=O;3U-9$Y}wiwf4F zC`xgoR8jFPf*@EZ9u${it8LOOlbQMD`)A(x&z3|FBKV+W>14j;eeeAV(f?30PX`3+ zRGA^NJ$v)6=Dk2-@#gFDI)1L#Ljd5*JC^t^J+-q-dg95||~ZBfdZK-+>wI=tGTBhO6| zLXZ$dEsZJq`aM@yJGf#Uh*JY#{Gm?1(rHmPLkpWSbnnu3vTY|Oweq4?qywxRY5~TN zYFV~TmMv%|S0Y;oYH3K3C4_t*L~?~vT~5S0pn@`q?mg|213>V921g5q&uyi-f+4{{ ztX?N#9axZU@~LM+2pnv8fE=|@4)DfwQi9{XqG6Jr)X1`|s!r6L0`4~+0S>hQn8}ws za1c?!@fsc&rd`vC*ge3&och-0j8qQW0igCgU#!s0Lo2+!fZG3fUOH2;oR%P0QF|if z04JD%Q3x4Zi&0Z;2Y4oxq=EDAeIdQDElZY-yf}`odLFf4+Aj}v(uoba2LRx*>45N5435saPT7>u67EzuBO0s_0a(vV1{+RI zJHTP{#F|dus3kO_isg=^+jCZ4u9)(EX3l` zhd~gW-2?c1$sj?3zRw%zJab-nhVo%F^M;QT*H+6|nl9Ap|Zj`a-8M5LHtDA02#%i?ee zY&i6PDmmDsZd==((>2*z08{NC(CW^5%OV`oT%l zJa8@sk5a8x$bnfLDj8?F%$H0`>j`(%1dU(op)I@bdbZ24(ljzmQ_eXrA{2U#QdLKh z@nrzJ+Nc;bn=eX50Ecpf4x_edmmeHGe>u`Ci2$&7&Y=E6W!N8OClhk9!inN zF)k<>25Dr=BX#U*k27lSSgr5B6A8|v2BmC0z_B}^ItY%c`K7diBVAcC=sBhY%JpQD zie^ literal 0 HcmV?d00001 diff --git a/website/data/cookbook/icons/spice_furnace.png b/website/data/cookbook/icons/spice_furnace.png new file mode 100644 index 0000000000000000000000000000000000000000..b73aea76c03dfd51fee08c4f08b57a361464b32d GIT binary patch literal 807 zcmV+?1K9kDP)LV*cJS{z(qWOh4OegbK?>?$RRshHs7iJGNMdwPt>2vL* zLyj-JLuJ|pLJq(ML@t-6Qh?|m+@0&IraOzvDFFjR);9?=i{L%A`0~O`$ z)L6=io*aN>t#)pKtzX;w5;1yeB)(56cCn>(cL7p7d;{`K)Y)hs2v9dlQL`2GUIQRU z!6D}dMeL>~g;N#w;D8iiH}cm{ZqW4Y7p!l&e2K^7<0bm@sYY{^w~210aH`_d<0G;R za*HrdL%Z572oV4x0SIjoL>&RJ-t!dinNtF8C(Je(0SG{Z&)SHWB7Hi4n%8jT%geP? zjNHhAh#EmeJ3;6;;I!gwhqI#;yDRtBnRILO8;_$G&QSUOB+u=X0I=QnJQh;$-Olf( zAk*Ol<;i0-Q96<2w_2<7`qt79D%a{%S#NZ%t<{q`A{X+VAZ}we90Af^L)1a$5HML= z2n19wpG}dA1Ncqg`yMG}2nTAY=yw-@8W3{KZGap|2%df5b@qGP4K6-IT#R|hKLu8A z7hu!tV?(){>;>4K7rDR@kbSURn;xgD6T|;Re5HN$YW$AS&Yn%&Qw`WJ7}&&K+s}9DaA>b0CJ1BlVj(UzJL27H l!0Cr`U^aGlRXA+9z2LgB^M!wU{1z^ z4~VFs!8|}>j6p?IViX^VBs)9Z@>NgG_B?hNvP1>HW$2!MRDJbzb@z@#F&yh`*AHf2 zI%u}*d4Tb0aa5>y1D)8%|{6msW~7JBAbbX0vFEpZ>B%GeEohzg@^)w19fqylQXaXD35WbRPuasU56&7-*emHjyuhTxUujaBXzuM7Zfk4V zNlI(dT9fZri&rF~`Kxk6#-i(Y&J}j2zBIH5-W~z?$QYm?cA1Z>BWbT1dT372n~)dQ}I#{4PKn$J{xuta(=~-$N|T3coGg4I|t?$SC~Yx zXDgdPT_WakWRBaVUts4{DP;)~1aQ7Hf}>S1G_}T&3P5Q7V5=z?S0YPbFGWRxMDUE% z+t9EkR>6iu7e*OGZIc3o5FoayA@wehTMcKsjoELxJ`rf_&3ZVkP;jYW8Ck1zF%ksC zxvX7pdkdX9kp6eO8oK&S&$aQ7Tw*KcS0K1jO=-5y*t4IJE7i_yIb`4jNnQ%}y>*6V zqRL5FagOWMzR#;U#~9mreVs8a(aU=rsUIfUoNGhY*VX@t-??CZzD3tnRsaA107*qo IM6N<$f+kLeW&i*H literal 0 HcmV?d00001 diff --git a/website/data/cookbook/icons/spice_soul_campfire.png b/website/data/cookbook/icons/spice_soul_campfire.png new file mode 100644 index 0000000000000000000000000000000000000000..8567baaa561848eb354415195bbbcc3379633559 GIT binary patch literal 1408 zcmV-`1%LX9P)ll`mB*h|YP?_2eoxQJEwigeXlM zfz}!aoF(rZrlwA)m5#7;cFgZO=a0^SGALJG1GIq-1N4s_6gD2lIol&MkV>b}S004Y zjDg^y2r5|lb1md-opZKFWdlK{tE3*GUTQdXW`wx&J!qlmg;w76&W820u zF8?zx4)Q}~C&?6~n6{D$KQOn|e0PD?;RPakxcTATNW5h06>l);wQk3ky^6NI=h z_#u?{B0|;zC1Wg*wOLmN#>Xd!sUNJoDx%x5bp)O~))#w4d`v&r|Bfxgu+HMvY!w3& zuVBAz5?PB=r=}hlP1j^G^8T?(oPVVRDH|)E$irx$aOopx9k27Klt%u=Lo#-=t_&y> zBAqW{baXegHYoM36NZ@uqZG#b7lG&B$L(8LSm!Xh_gOe=ar*RcP(j$ue|HA>mJynT zZUskPkdbpRMnjR8Zpdk1aeD9Ks&Ksi7z`ZVyHj$X+Bc5I!U8T{okb7?*g8@|7zWs0 z{Scz zYc&-5me8~gUrcK_>yX}1f+h>-K=yrGJBH}YdAyVV9jt!4+o4{sAwN2fW-~(cIgxW7 zKm2m`J|>nizyf=E(}2`=5E#IFtjnYY6$_nn&6~Ia1U<1zNYG1HBo7UKcuvqsB6nn%+%Q`eb;$)zZm5awlPM&h9 zB!~aLHUpZQ$F561OHf~3%f#(Bxss0*b1W5MZVh27gWBB~y|q?) z1~)J65khHVZ3d*#D23cQu4lq`C(p=%g*!{|E^b1+XY+6YL;;=}=#i#mw1Kq_Gjn$k zS%-^P=MhRIo}I+qyl<95uGrDi04n$4tF5MuU{s#(SW8(%OR*XO1DM#_Cc*QMzjA|6H=h6aO$ zEJ9;&b#_5$y?MKaz!*WzBL~Xk$Y7rUVWINAp<-4v^V7NN$_y|ue3&O((=FwSCKzSH z0-Nk3R(vd6elL|G4<(~~B0a7O8o;ojdn!rfMYo&u(kW$js z>( literal 0 HcmV?d00001 diff --git a/website/data/cookbook/icons/spice_tender.png b/website/data/cookbook/icons/spice_tender.png new file mode 100644 index 0000000000000000000000000000000000000000..38437f4269972de8df765aba8c114aa75f229080 GIT binary patch literal 1604 zcmV-K2D|x*P)+@E7>#g9a0M(l=jt z0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>%@LEwv7;Fv>x`MyBF?>Cq40 zp4kYcY+Sy2lS|hSsd7rjzE=jYhk%nEDTt*+Rwqh|-i?}hL1_r$hhp;aDg>4(OT%!o zmlCN|lHs;3JBOg+mC7W94+6?kc)YNPskCqYJzeD)~J05TI!_8;dg%R*o#` zREmSJmF;u~^)UCm;>(Hp&ZXMP(pD%d53v)r%XJOCPwx^Mj~*qx$w=aH!2N4iKVPzHiZ;q|{0vCM^sYbE6C2lY^Yz4*xcfi18{{hdl-$QeXHgH#ZBS-awcSMPxTcBO+}jni^j-_ zqh}si&KjGG7dc c.toUpperCase()), output.material); + grid = [iron, spice, iron, spice, cooker, spice, iron, spice, iron]; + inputs = grid.filter(Boolean); + shaped = true; + } + grid ??= Array.from({length: 9}, (_, index) => inputs[index] ?? null); + recipes.push({id: spec.id, station: crafting, inputs, grid, output, amount: 1, shaped, + notes: spec.details + (spec.id === 'spice_coal' ? ' Requires genuine raw Melange; ordinary orange dye will not work. One Spice Coal smelts 50 items.' : spec.id === 'spice_tender' ? ' Requires genuine Spice Coal; ordinary coal will not work.' : ' Requires genuine raw Melange and the matching vanilla cooker.')}); + } for (const recipe of recipes) { if (foodIds.has(recipe.output.id)) { const definition = JSON.parse(readFileSync(new URL(recipe.output.id + '.yml', arrakisItems), 'utf8')); diff --git a/website/tests/cookbook-item-grades.test.mjs b/website/tests/cookbook-item-grades.test.mjs index 9c2a7eb8..33f6cadb 100644 --- a/website/tests/cookbook-item-grades.test.mjs +++ b/website/tests/cookbook-item-grades.test.mjs @@ -6,7 +6,7 @@ import {itemLoreModel} from '../control-panel/public/item-lore-model.mjs'; test('all Cookbook outputs have source-bound grades or explicitly preserve input metadata',()=>{ const recipes=recipeCatalogue(),metadata=JSON.parse(readFileSync(new URL('../data/cookbook/item-grades.json',import.meta.url))); - assert.equal(recipes.length,39);assert.equal(new Set(recipes.map(r=>r.output.id)).size,32); + assert.equal(recipes.length,46);assert.equal(new Set(recipes.map(r=>r.output.id)).size,39); assert.equal(metadata.sourceRepository,'unimatrix/plugins');assert.match(metadata.sourceCommit,/^[a-f0-9]{40}$/); for(const hash of Object.values(metadata.files))assert.match(hash,/^[a-f0-9]{64}$/); for(const recipe of recipes){ diff --git a/website/tests/spice-crafting-cookbook.test.mjs b/website/tests/spice-crafting-cookbook.test.mjs new file mode 100644 index 00000000..63139988 --- /dev/null +++ b/website/tests/spice-crafting-cookbook.test.mjs @@ -0,0 +1,44 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import {readFileSync} from 'node:fs'; +import {createHash} from 'node:crypto'; +import {recipeCatalogue,recipeIcons} from '../scripts/recipe-catalogue.mjs'; +import {itemLoreModel} from '../control-panel/public/item-lore-model.mjs'; + +const catalogue=JSON.parse(readFileSync(new URL('../data/cookbook/spice-crafting.json',import.meta.url))); +const grades=JSON.parse(readFileSync(new URL('../data/cookbook/item-grades.json',import.meta.url))); +const records=recipeCatalogue().filter(r=>catalogue.some(s=>s.id===r.output.id)); + +test('all seven new recipe cards use the exact native catalogue grade, base plus one',()=>{ + assert.equal(records.length,7); + for(const spec of catalogue){ + const recipe=records.find(r=>r.output.id===spec.id),card=itemLoreModel({...recipe.output,nativeMetadata:true}); + assert.equal(card.quality,spec.quality);assert.equal(card.mark,spec.baseMark+1); + assert.equal(recipe.output.material,spec.material.toLowerCase()); + assert.equal(recipe.output.name,spec.name);assert.equal(recipe.output.custom,true); + } + assert.equal(records.find(r=>r.output.id==='spice_soul_campfire').output.equipmentMark,4); + assert.equal(records.find(r=>r.output.id==='spice_campfire').output.equipmentMark,5); +}); + +test('cooker recipes preserve the raw-spice cross and four iron corners',()=>{ + for(const recipe of records.filter(r=>r.shaped)){ + assert.equal(recipe.station,'Crafting table');assert.equal(recipe.amount,1);assert.equal(recipe.grid.length,9); + for(const slot of [0,2,6,8])assert.equal(recipe.grid[slot].id,'iron_ingot'); + for(const slot of [1,3,5,7]){assert.equal(recipe.grid[slot].id,'spice');assert.equal(recipe.grid[slot].custom,true);} + assert.equal(recipe.grid[4].material,recipe.output.material);assert.equal(recipe.grid[4].custom,false); + } + const coal=records.find(r=>r.id==='spice_coal');assert.equal(coal.shaped,false); + assert.deepEqual(coal.inputs.map(i=>i.id),['spice','coal']);assert.match(coal.inputs[1].name,/Charcoal/); + const tender=records.find(r=>r.id==='spice_tender');assert.equal(tender.shaped,false); + assert.deepEqual(tender.inputs.map(i=>[i.id,i.custom]),[['minecart',false],['spice_coal',true]]); +}); + +test('the seven Cookbook icons and catalogue are bound to the reviewed plugin source',()=>{ + const source=grades.additionalSources.spiceCookersAndRails; + assert.equal(source.sourceCommit,'13a8f23247497ac5cd9d59b6869e19097ee307be'); + const bytes=readFileSync(new URL('../data/cookbook/spice-crafting.json',import.meta.url)); + assert.equal(createHash('sha256').update(bytes).digest('hex'),source.files['network/content-assets/cookbook/spice-crafting.json']); + const icons=new Map(recipeIcons(records));assert.equal(icons.size,7); + for(const icon of Object.values(source.icons))assert.equal(createHash('sha256').update(readFileSync(new URL('../data/cookbook/'+icon.path,import.meta.url))).digest('hex'),icon.sha256); +});