Infinite Craft
491–500 of 831 posts
Re: Infinite Craft
#492The game state clears on reload, so here's a wee console snippet to export your list of elements: console.log(JSON.stringify({discoveries: window.$nuxt.$root.$children[2].$children[0].$children[0]._data.discoveries, elements:window.$nuxt.$root.$children[2].$children[0].$children[0]._data.elements})) I'll figure out how to re-import the state later, but it's past midnight for me now.
Re: Infinite Craft
#493Re: Infinite Craft
#494I'm sure there are others, but this reminds me of Stacklands https://sokpop.itch.io/stacklands
Re: Infinite Craft
#495Re: Infinite Craft
#496Re: Infinite Craft
#497 const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
let elements = [
' Water',
' Fire',
' Wind',
' Earth'
];
let pairs = {};
async function getResponse(left, right) {
const url = `https://neal.fun/api/infinite-craft/pair?first=${left}&second=${right}`;
return await (await fetch(url)).json();
}
function getRandom() {
return elements[Math.floor(Math.random() * elements.length)];
}
async function run() {
while (true) {
let left = getRandom();
let right = getRandom();
if (pairs[`${left} + ${right}`]) {
continue;
}
let result = await getResponse(left.split(' ').slice(1).join(' '), right.split(' ').slice(1).join(' '));
if (result.isNew) {
console.log('‼ new one ‼');
}
result = `${result.emoji} ${result.result}`;
console.log(`${left} + ${right} = ${result}`);
if (result != ' Nothing') {
pairs[`${left} + ${right}`] = result;
elements.push(result);
}
await sleep(1000);
}
}
run();Re: Infinite Craft
#498The game state clears on reload, so here's a wee console snippet to export your list of elements: console.log(JSON.stringify({discoveries: window.$nuxt.$root.$children[2].$children[0].$children[0]._data.discoveries, elements:window.$nuxt.$root.$children[2].$children[0].$children[0]._data.elements})) I'll figure out how to re-import the state later, but it's past midnight for me now.
The state can be re-imported like this: ``` a = (insert JSON output here) window.$nuxt.$root.$children[2].$children[0].$children[0]._data.elements = a.elements; window.$nuxt.$root.$children[2].$children[0].$children[0]._data.discoveries = a.discoveries; ```
Re: Infinite Craft
#499Some of my First Discoveries: * Frankenstein + angel = Angelstein. (Then Angelstein + Baby = Angelina Jolie.) * something + Something from Michael Jackson = Dangerous. * Dangerous + Sherlock Holmes = Moriarty. * Multiverse + White => Dark Multiverse + Law => Dark Law. * Dark Law + us Constitution => Dark Constitution. * Quark + Ocean -> Neutreno * Thor + Guardian -> Heimdall * Batman + vet => Batvet * Avengers + Mult…
Lincoln + Wife = Lincoln's wife
Should have seen that one coming.
Re: Infinite Craft
#500Earlier quoted context omitted.
One man’s nonsense is another’s profound truth. mud + brick = Adobe, for example. Doesn’t seem to make sense, yet it does.
adobe is literally mudbrick, this is too easy – like fire and water = steam