Infinite Craft
571–580 of 831 posts
[flagged]
Re: Infinite Craft
#572[flagged]
Re: Infinite Craft
#573Re: Infinite Craft
#574How do you get eve im trying to
Re: Infinite Craft
#575[flagged]
Re: Infinite Craft
#576[flagged]
Re: Infinite Craft
#577The 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; ```
I made a bookmarklet that loads the state from localstorage and also autosaves the state on each new craft
javascript:(function(){
const exportState = () => 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
});
const importState = (state) => {
const { discoveries, elements } = JSON.parse(state);
const gameInstance = window.$nuxt.$root.$children[2].$children[0].$children[0]._data;
gameInstance.discoveries = discoveries;
gameInstance.elements = elements;
};
/* Set up a MutationObserver to listen for changes in the DOM and automatically export the current state. */
const observer = new MutationObserver((mutations) => {
const state = exportState();
localStorage.setItem('gameState', state);
});
/* Start observing DOM changes to auto-save the game state. */
const startObserving = () => {
const targetNode = document.querySelector('.sidebar');
observer.observe(targetNode, { childList: true, subtree: true });
};
/* Check for a saved state in localStorage and import it if available. */
const savedState = localStorage.getItem('gameState');
if (savedState) importState(savedState);
else localStorage.setItem('gameState', exportState() );
startObserving();
})();Re: Infinite Craft
#578albatross + river = amazon? im so confused but it worked for me
Re: Infinite Craft
#579Heheh, my favourite has been:
Sailor Moon + Sashimi = Sailor Mercury
Re: Infinite Craft
#580This is so cool, thanks for the tip! :D