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AAO;QACvB,IAAI,WAAW,OACX;QAEJ,OAAO,WAAW,CAAC,MAAM,EAAE,CAAC,GAAG;QAC/B,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,MAAM,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG;QACxD,OAAO,MAAM,GAAG,KAAK,KAAK,MAAM,KAAK;QACrC,OAAO,IAAI,GAAG;YAAE;YAAG;QAAE;IACzB;IAEJ,OAAO;AACX;AAEO,SAAS,kBAAkB,MAAgB;IAC9C,KAAK,MAAM,UAAU,OACjB,KAAK,MAAM,SAAS,OAAQ;QACxB,IAAI,WAAW,OACX;QAEJ,IAAI,OAAO,WAAW,CAAC,MAAM,EAAE,CAAC,KAAK,WACjC,OAAO,WAAW,CAAC,MAAM,EAAE,CAAC,GAAG;QAEnC,IAAI,OAAO,MAAM,MAAM,MAAM,MAAM,IAC/B,OAAO,WAAW,CAAC,MAAM,EAAE,CAAC,IAAI;QAEpC,OAAO,WAAW,CAAC,MAAM,EAAE,CAAC,IAAI,KAAK,KAAK,CAAC,KAAK,MAAM,KAAK,KAAK;IACpE;AAGR","sources":["node_modules/@parcel/runtime-browser-hmr/lib/runtime-f8a94d19a422717c.js","src/module.ts","src/lib.ts","src/items.json","src/recipes.json","node_modules/@parcel/transformer-js/src/esmodule-helpers.js","src/sim.ts"],"sourcesContent":["var HMR_HOST = null;var HMR_PORT = null;var HMR_SECURE = false;var HMR_ENV_HASH = \"d6ea1d42532a7575\";module.bundle.HMR_BUNDLE_ID = \"7fb99ceed593055f\";\"use strict\";\n\n/* global HMR_HOST, HMR_PORT, HMR_ENV_HASH, HMR_SECURE, chrome, browser, __parcel__import__, __parcel__importScripts__, ServiceWorkerGlobalScope */\n/*::\nimport type {\n HMRAsset,\n HMRMessage,\n} from '@parcel/reporter-dev-server/src/HMRServer.js';\ninterface ParcelRequire {\n (string): mixed;\n cache: {|[string]: ParcelModule|};\n hotData: {|[string]: mixed|};\n Module: any;\n parent: ?ParcelRequire;\n isParcelRequire: true;\n modules: {|[string]: [Function, {|[string]: string|}]|};\n HMR_BUNDLE_ID: string;\n root: ParcelRequire;\n}\ninterface ParcelModule {\n hot: {|\n data: mixed,\n accept(cb: (Function) => void): void,\n dispose(cb: (mixed) => void): void,\n // accept(deps: Array | string, cb: (Function) => void): void,\n // decline(): void,\n _acceptCallbacks: Array<(Function) => void>,\n _disposeCallbacks: Array<(mixed) => void>,\n |};\n}\ninterface ExtensionContext {\n runtime: {|\n reload(): void,\n getURL(url: string): string;\n getManifest(): {manifest_version: number, ...};\n |};\n}\ndeclare var module: {bundle: ParcelRequire, ...};\ndeclare var HMR_HOST: string;\ndeclare var HMR_PORT: string;\ndeclare var HMR_ENV_HASH: string;\ndeclare var HMR_SECURE: boolean;\ndeclare var chrome: ExtensionContext;\ndeclare var browser: ExtensionContext;\ndeclare var __parcel__import__: (string) => Promise;\ndeclare var __parcel__importScripts__: (string) => Promise;\ndeclare var globalThis: typeof self;\ndeclare var ServiceWorkerGlobalScope: Object;\n*/\nvar OVERLAY_ID = '__parcel__error__overlay__';\nvar OldModule = module.bundle.Module;\nfunction Module(moduleName) {\n OldModule.call(this, moduleName);\n this.hot = {\n data: module.bundle.hotData[moduleName],\n _acceptCallbacks: [],\n _disposeCallbacks: [],\n accept: function (fn) {\n this._acceptCallbacks.push(fn || function () {});\n },\n dispose: function (fn) {\n this._disposeCallbacks.push(fn);\n }\n };\n module.bundle.hotData[moduleName] = undefined;\n}\nmodule.bundle.Module = Module;\nmodule.bundle.hotData = {};\nvar checkedAssets /*: {|[string]: boolean|} */, assetsToDispose /*: Array<[ParcelRequire, string]> */, assetsToAccept /*: Array<[ParcelRequire, string]> */;\n\nfunction getHostname() {\n return HMR_HOST || (location.protocol.indexOf('http') === 0 ? location.hostname : 'localhost');\n}\nfunction getPort() {\n return HMR_PORT || location.port;\n}\n\n// eslint-disable-next-line no-redeclare\nvar parent = module.bundle.parent;\nif ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {\n var hostname = getHostname();\n var port = getPort();\n var protocol = HMR_SECURE || location.protocol == 'https:' && !/localhost|127.0.0.1|0.0.0.0/.test(hostname) ? 'wss' : 'ws';\n var ws;\n try {\n ws = new WebSocket(protocol + '://' + hostname + (port ? ':' + port : '') + '/');\n } catch (err) {\n if (err.message) {\n console.error(err.message);\n }\n ws = {};\n }\n\n // Web extension context\n var extCtx = typeof browser === 'undefined' ? typeof chrome === 'undefined' ? null : chrome : browser;\n\n // Safari doesn't support sourceURL in error stacks.\n // eval may also be disabled via CSP, so do a quick check.\n var supportsSourceURL = false;\n try {\n (0, eval)('throw new Error(\"test\"); //# sourceURL=test.js');\n } catch (err) {\n supportsSourceURL = err.stack.includes('test.js');\n }\n\n // $FlowFixMe\n ws.onmessage = async function (event /*: {data: string, ...} */) {\n checkedAssets = {} /*: {|[string]: boolean|} */;\n assetsToAccept = [];\n assetsToDispose = [];\n var data /*: HMRMessage */ = JSON.parse(event.data);\n if (data.type === 'update') {\n // Remove error overlay if there is one\n if (typeof document !== 'undefined') {\n removeErrorOverlay();\n }\n let assets = data.assets.filter(asset => asset.envHash === HMR_ENV_HASH);\n\n // Handle HMR Update\n let handled = assets.every(asset => {\n return asset.type === 'css' || asset.type === 'js' && hmrAcceptCheck(module.bundle.root, asset.id, asset.depsByBundle);\n });\n if (handled) {\n console.clear();\n\n // Dispatch custom event so other runtimes (e.g React Refresh) are aware.\n if (typeof window !== 'undefined' && typeof CustomEvent !== 'undefined') {\n window.dispatchEvent(new CustomEvent('parcelhmraccept'));\n }\n await hmrApplyUpdates(assets);\n\n // Dispose all old assets.\n let processedAssets = {} /*: {|[string]: boolean|} */;\n for (let i = 0; i < assetsToDispose.length; i++) {\n let id = assetsToDispose[i][1];\n if (!processedAssets[id]) {\n hmrDispose(assetsToDispose[i][0], id);\n processedAssets[id] = true;\n }\n }\n\n // Run accept callbacks. This will also re-execute other disposed assets in topological order.\n processedAssets = {};\n for (let i = 0; i < assetsToAccept.length; i++) {\n let id = assetsToAccept[i][1];\n if (!processedAssets[id]) {\n hmrAccept(assetsToAccept[i][0], id);\n processedAssets[id] = true;\n }\n }\n } else fullReload();\n }\n if (data.type === 'error') {\n // Log parcel errors to console\n for (let ansiDiagnostic of data.diagnostics.ansi) {\n let stack = ansiDiagnostic.codeframe ? ansiDiagnostic.codeframe : ansiDiagnostic.stack;\n console.error('🚨 [parcel]: ' + ansiDiagnostic.message + '\\n' + stack + '\\n\\n' + ansiDiagnostic.hints.join('\\n'));\n }\n if (typeof document !== 'undefined') {\n // Render the fancy html overlay\n removeErrorOverlay();\n var overlay = createErrorOverlay(data.diagnostics.html);\n // $FlowFixMe\n document.body.appendChild(overlay);\n }\n }\n };\n ws.onerror = function (e) {\n if (e.message) {\n console.error(e.message);\n }\n };\n ws.onclose = function () {\n console.warn('[parcel] 🚨 Connection to the HMR server was lost');\n };\n}\nfunction removeErrorOverlay() {\n var overlay = document.getElementById(OVERLAY_ID);\n if (overlay) {\n overlay.remove();\n console.log('[parcel] ✨ Error resolved');\n }\n}\nfunction createErrorOverlay(diagnostics) {\n var overlay = document.createElement('div');\n overlay.id = OVERLAY_ID;\n let errorHTML = '
';\n for (let diagnostic of diagnostics) {\n let stack = diagnostic.frames.length ? diagnostic.frames.reduce((p, frame) => {\n return `${p}\n${frame.location}\n${frame.code}`;\n }, '') : diagnostic.stack;\n errorHTML += `\n
\n
\n 🚨 ${diagnostic.message}\n
\n
${stack}
\n
\n ${diagnostic.hints.map(hint => '
💡 ' + hint + '
').join('')}\n
\n ${diagnostic.documentation ? `` : ''}\n
\n `;\n }\n errorHTML += '
';\n overlay.innerHTML = errorHTML;\n return overlay;\n}\nfunction fullReload() {\n if ('reload' in location) {\n location.reload();\n } else if (extCtx && extCtx.runtime && extCtx.runtime.reload) {\n extCtx.runtime.reload();\n }\n}\nfunction getParents(bundle, id) /*: Array<[ParcelRequire, string]> */{\n var modules = bundle.modules;\n if (!modules) {\n return [];\n }\n var parents = [];\n var k, d, dep;\n for (k in modules) {\n for (d in modules[k][1]) {\n dep = modules[k][1][d];\n if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {\n parents.push([bundle, k]);\n }\n }\n }\n if (bundle.parent) {\n parents = parents.concat(getParents(bundle.parent, id));\n }\n return parents;\n}\nfunction updateLink(link) {\n var href = link.getAttribute('href');\n if (!href) {\n return;\n }\n var newLink = link.cloneNode();\n newLink.onload = function () {\n if (link.parentNode !== null) {\n // $FlowFixMe\n link.parentNode.removeChild(link);\n }\n };\n newLink.setAttribute('href',\n // $FlowFixMe\n href.split('?')[0] + '?' + Date.now());\n // $FlowFixMe\n link.parentNode.insertBefore(newLink, link.nextSibling);\n}\nvar cssTimeout = null;\nfunction reloadCSS() {\n if (cssTimeout) {\n return;\n }\n cssTimeout = setTimeout(function () {\n var links = document.querySelectorAll('link[rel=\"stylesheet\"]');\n for (var i = 0; i < links.length; i++) {\n // $FlowFixMe[incompatible-type]\n var href /*: string */ = links[i].getAttribute('href');\n var hostname = getHostname();\n var servedFromHMRServer = hostname === 'localhost' ? new RegExp('^(https?:\\\\/\\\\/(0.0.0.0|127.0.0.1)|localhost):' + getPort()).test(href) : href.indexOf(hostname + ':' + getPort());\n var absolute = /^https?:\\/\\//i.test(href) && href.indexOf(location.origin) !== 0 && !servedFromHMRServer;\n if (!absolute) {\n updateLink(links[i]);\n }\n }\n cssTimeout = null;\n }, 50);\n}\nfunction hmrDownload(asset) {\n if (asset.type === 'js') {\n if (typeof document !== 'undefined') {\n let script = document.createElement('script');\n script.src = asset.url + '?t=' + Date.now();\n if (asset.outputFormat === 'esmodule') {\n script.type = 'module';\n }\n return new Promise((resolve, reject) => {\n var _document$head;\n script.onload = () => resolve(script);\n script.onerror = reject;\n (_document$head = document.head) === null || _document$head === void 0 || _document$head.appendChild(script);\n });\n } else if (typeof importScripts === 'function') {\n // Worker scripts\n if (asset.outputFormat === 'esmodule') {\n return __parcel__import__(asset.url + '?t=' + Date.now());\n } else {\n return new Promise((resolve, reject) => {\n try {\n __parcel__importScripts__(asset.url + '?t=' + Date.now());\n resolve();\n } catch (err) {\n reject(err);\n }\n });\n }\n }\n }\n}\nasync function hmrApplyUpdates(assets) {\n global.parcelHotUpdate = Object.create(null);\n let scriptsToRemove;\n try {\n // If sourceURL comments aren't supported in eval, we need to load\n // the update from the dev server over HTTP so that stack traces\n // are correct in errors/logs. This is much slower than eval, so\n // we only do it if needed (currently just Safari).\n // https://bugs.webkit.org/show_bug.cgi?id=137297\n // This path is also taken if a CSP disallows eval.\n if (!supportsSourceURL) {\n let promises = assets.map(asset => {\n var _hmrDownload;\n return (_hmrDownload = hmrDownload(asset)) === null || _hmrDownload === void 0 ? void 0 : _hmrDownload.catch(err => {\n // Web extension fix\n if (extCtx && extCtx.runtime && extCtx.runtime.getManifest().manifest_version == 3 && typeof ServiceWorkerGlobalScope != 'undefined' && global instanceof ServiceWorkerGlobalScope) {\n extCtx.runtime.reload();\n return;\n }\n throw err;\n });\n });\n scriptsToRemove = await Promise.all(promises);\n }\n assets.forEach(function (asset) {\n hmrApply(module.bundle.root, asset);\n });\n } finally {\n delete global.parcelHotUpdate;\n if (scriptsToRemove) {\n scriptsToRemove.forEach(script => {\n if (script) {\n var _document$head2;\n (_document$head2 = document.head) === null || _document$head2 === void 0 || _document$head2.removeChild(script);\n }\n });\n }\n }\n}\nfunction hmrApply(bundle /*: ParcelRequire */, asset /*: HMRAsset */) {\n var modules = bundle.modules;\n if (!modules) {\n return;\n }\n if (asset.type === 'css') {\n reloadCSS();\n } else if (asset.type === 'js') {\n let deps = asset.depsByBundle[bundle.HMR_BUNDLE_ID];\n if (deps) {\n if (modules[asset.id]) {\n // Remove dependencies that are removed and will become orphaned.\n // This is necessary so that if the asset is added back again, the cache is gone, and we prevent a full page reload.\n let oldDeps = modules[asset.id][1];\n for (let dep in oldDeps) {\n if (!deps[dep] || deps[dep] !== oldDeps[dep]) {\n let id = oldDeps[dep];\n let parents = getParents(module.bundle.root, id);\n if (parents.length === 1) {\n hmrDelete(module.bundle.root, id);\n }\n }\n }\n }\n if (supportsSourceURL) {\n // Global eval. We would use `new Function` here but browser\n // support for source maps is better with eval.\n (0, eval)(asset.output);\n }\n\n // $FlowFixMe\n let fn = global.parcelHotUpdate[asset.id];\n modules[asset.id] = [fn, deps];\n } else if (bundle.parent) {\n hmrApply(bundle.parent, asset);\n }\n }\n}\nfunction hmrDelete(bundle, id) {\n let modules = bundle.modules;\n if (!modules) {\n return;\n }\n if (modules[id]) {\n // Collect dependencies that will become orphaned when this module is deleted.\n let deps = modules[id][1];\n let orphans = [];\n for (let dep in deps) {\n let parents = getParents(module.bundle.root, deps[dep]);\n if (parents.length === 1) {\n orphans.push(deps[dep]);\n }\n }\n\n // Delete the module. This must be done before deleting dependencies in case of circular dependencies.\n delete modules[id];\n delete bundle.cache[id];\n\n // Now delete the orphans.\n orphans.forEach(id => {\n hmrDelete(module.bundle.root, id);\n });\n } else if (bundle.parent) {\n hmrDelete(bundle.parent, id);\n }\n}\nfunction hmrAcceptCheck(bundle /*: ParcelRequire */, id /*: string */, depsByBundle /*: ?{ [string]: { [string]: string } }*/) {\n if (hmrAcceptCheckOne(bundle, id, depsByBundle)) {\n return true;\n }\n\n // Traverse parents breadth first. All possible ancestries must accept the HMR update, or we'll reload.\n let parents = getParents(module.bundle.root, id);\n let accepted = false;\n while (parents.length > 0) {\n let v = parents.shift();\n let a = hmrAcceptCheckOne(v[0], v[1], null);\n if (a) {\n // If this parent accepts, stop traversing upward, but still consider siblings.\n accepted = true;\n } else {\n // Otherwise, queue the parents in the next level upward.\n let p = getParents(module.bundle.root, v[1]);\n if (p.length === 0) {\n // If there are no parents, then we've reached an entry without accepting. Reload.\n accepted = false;\n break;\n }\n parents.push(...p);\n }\n }\n return accepted;\n}\nfunction hmrAcceptCheckOne(bundle /*: ParcelRequire */, id /*: string */, depsByBundle /*: ?{ [string]: { [string]: string } }*/) {\n var modules = bundle.modules;\n if (!modules) {\n return;\n }\n if (depsByBundle && !depsByBundle[bundle.HMR_BUNDLE_ID]) {\n // If we reached the root bundle without finding where the asset should go,\n // there's nothing to do. Mark as \"accepted\" so we don't reload the page.\n if (!bundle.parent) {\n return true;\n }\n return hmrAcceptCheck(bundle.parent, id, depsByBundle);\n }\n if (checkedAssets[id]) {\n return true;\n }\n checkedAssets[id] = true;\n var cached = bundle.cache[id];\n assetsToDispose.push([bundle, id]);\n if (!cached || cached.hot && cached.hot._acceptCallbacks.length) {\n assetsToAccept.push([bundle, id]);\n return true;\n }\n}\nfunction hmrDispose(bundle /*: ParcelRequire */, id /*: string */) {\n var cached = bundle.cache[id];\n bundle.hotData[id] = {};\n if (cached && cached.hot) {\n cached.hot.data = bundle.hotData[id];\n }\n if (cached && cached.hot && cached.hot._disposeCallbacks.length) {\n cached.hot._disposeCallbacks.forEach(function (cb) {\n cb(bundle.hotData[id]);\n });\n }\n delete bundle.cache[id];\n}\nfunction hmrAccept(bundle /*: ParcelRequire */, id /*: string */) {\n // Execute the module.\n bundle(id);\n\n // Run the accept callbacks in the new version of the module.\n var cached = bundle.cache[id];\n if (cached && cached.hot && cached.hot._acceptCallbacks.length) {\n cached.hot._acceptCallbacks.forEach(function (cb) {\n var assetsToAlsoAccept = cb(function () {\n return getParents(module.bundle.root, id);\n });\n if (assetsToAlsoAccept && assetsToAccept.length) {\n assetsToAlsoAccept.forEach(function (a) {\n hmrDispose(a[0], a[1]);\n });\n\n // $FlowFixMe[method-unbinding]\n assetsToAccept.push.apply(assetsToAccept, assetsToAlsoAccept);\n }\n });\n }\n}","import * as lib from './lib';\r\n\r\nfor (const key in lib) {\r\n if (lib.hasOwnProperty(key)) {\r\n window[key] = lib[key];\r\n }\r\n}\r\n\r\nimport * as sim from './sim';\r\n\r\nfor (const key in sim) {\r\n if (sim.hasOwnProperty(key)) {\r\n window[key] = sim[key];\r\n }\r\n}","import itemsData from './items.json';\r\nimport recipesData from './recipes.json';\r\n\r\ninterface ItemDisplay {\r\n character: number;\r\n color: number;\r\n}\r\n\r\nexport class Item {\r\n id: number;\r\n name: string;\r\n tags: string[];\r\n display: ItemDisplay[];\r\n properties: { [key: string]: number } = {};\r\n\r\n static DEFAULT_ITEM = new Item(0, '', [], [{ character: 0, color: 0 }]);\r\n\r\n constructor(id: number, name: string, tags: string[], display: ItemDisplay[], properties: { [key: string]: number } = {}) {\r\n this.id = id;\r\n this.name = name;\r\n this.tags = tags;\r\n this.display = display;\r\n this.properties = properties;\r\n }\r\n\r\n get usedIn(): Recipe[] {\r\n return ((REGISTRY && REGISTRY.uses.get(this.id)?.map((id) => REGISTRY.getRecipe(id))) || []).filter((recipe, i, a) => a.indexOf(recipe) === i);\r\n }\r\n\r\n get resultedBy(): Recipe[] {\r\n return ((REGISTRY && REGISTRY.results.get(this.id)?.map((id) => REGISTRY.getRecipe(id))) || []).filter((recipe, i, a) => a.indexOf(recipe) === i);\r\n }\r\n\r\n get active(): boolean {\r\n return this.usedIn.some((recipe) => recipe.time);\r\n }\r\n\r\n get root(): boolean {\r\n return this.tags.includes('root') || this.tags.includes('natural') || this.resultedBy.length === 0;\r\n }\r\n \r\n depth(): number {\r\n return REGISTRY.depths.get(this.id) || 0;\r\n }\r\n\r\n resources(): Item[] {\r\n return [];\r\n }\r\n\r\n required(has: number[] = [], seen: Set = new Set()): number {\r\n if (has.includes(this.id) || seen.has(this.id)) {\r\n return 0;\r\n }\r\n seen.add(this.id);\r\n if (this.root) {\r\n return 1;\r\n }\r\n return this.resultedBy.reduce((acc, recipe) => acc + recipe.used().reduce((acc, item) => acc + REGISTRY.getItem(item).required(has, seen), 0), 0);\r\n }\r\n \r\n // recursive\r\n isNeededToMake(item: Item): boolean {\r\n if (this.id === item.id) {\r\n return true;\r\n }\r\n if (this.root) {\r\n return false;\r\n }\r\n return this.resultedBy.some((recipe) => REGISTRY.getItem(recipe.getAnOrigin()).isNeededToMake(item) || (recipe.actor && REGISTRY.getItem(recipe.getAnActor()).isNeededToMake(item)));\r\n }\r\n\r\n}\r\n\r\nexport class ItemState {\r\n id: number;\r\n value: number = 0;\r\n time: number = 0;\r\n inside?: ItemState[];\r\n \r\n constructor(id: number) {\r\n this.id = id;\r\n }\r\n\r\n get item(): Item {\r\n return REGISTRY.getItem(this.id);\r\n }\r\n\r\n clone(): ItemState {\r\n let clone = new ItemState(this.id);\r\n clone.value = this.value;\r\n clone.time = this.time;\r\n return clone;\r\n }\r\n}\r\n\r\nexport enum ItemConditionTypes {\r\n None = '',\r\n All = 'All',\r\n Is = 'Is',\r\n IsNot = 'IsNot',\r\n WithTag = 'WithTag',\r\n WithoutTag = 'WithoutTag',\r\n PropertyIs = 'PropertyIs',\r\n PropertyIsNot = 'PropertyIsNot',\r\n};\r\n\r\nfunction cmp(inp: number, op: string, ref: number): boolean {\r\n switch (op) {\r\n case '=':\r\n return inp === ref;\r\n case '>':\r\n return inp > ref;\r\n case '<':\r\n return inp < ref;\r\n case '>=':\r\n return inp >= ref;\r\n case '<=':\r\n return inp <= ref;\r\n default:\r\n return false;\r\n }\r\n}\r\n\r\nexport class ItemCondition {\r\n type: ItemConditionTypes;\r\n data: any;\r\n\r\n static matches(item: Item, condition: ItemCondition): boolean {\r\n switch (condition.type) {\r\n case ItemConditionTypes.All:\r\n return true;\r\n case ItemConditionTypes.Is:\r\n return item.id === condition.data;\r\n case ItemConditionTypes.IsNot:\r\n return item.id !== condition.data;\r\n case ItemConditionTypes.WithTag:\r\n return item.tags.indexOf(condition.data) > -1;\r\n case ItemConditionTypes.WithoutTag:\r\n return item.tags.indexOf(condition.data) === -1;\r\n case ItemConditionTypes.PropertyIs:\r\n return cmp(item.properties[condition.data.property], condition.data.op, condition.data.ref);\r\n case ItemConditionTypes.PropertyIsNot:\r\n return !cmp(item.properties[condition.data.property], condition.data.op, condition.data.ref);\r\n default:\r\n return false;\r\n }\r\n }\r\n}\r\n\r\nexport class ItemConditions {\r\n conditions: ItemCondition[];\r\n \r\n static matches(condition: ItemConditions, item: Item): boolean {\r\n return condition.conditions.every((c) => ItemCondition.matches(item, c));\r\n }\r\n}\r\n\r\nenum RecipeResultType {\r\n None = '',\r\n SameItem = 'SameItem',\r\n NewItem = 'NewItem',\r\n}\r\n\r\ntype RecipeResult = { type: RecipeResultType, data: any };\r\ntype RecipeResults = { origin: RecipeResult, actor?: RecipeResult, chance?: number }[];\r\nexport class Recipe {\r\n id: number;\r\n origin: ItemConditions;\r\n originValue?: { op: string, ref: number };\r\n time?: number;\r\n\r\n actor?: ItemConditions;\r\n actorValue?: { op: string, ref: number };\r\n\r\n results: RecipeResults = [];\r\n\r\n constructor(id: number, origin: ItemConditions, results: RecipeResults, options: Partial) {\r\n this.id = id;\r\n this.origin = origin;\r\n this.results = results;\r\n this.originValue = options.originValue;\r\n this.time = options.time;\r\n this.actor = options.actor;\r\n }\r\n\r\n willOccur(origin: ItemState, actor: ItemState | null, now: number) {\r\n return ItemConditions.matches(this.origin, origin.item) && (\r\n (!this.originValue || cmp(origin.value, this.originValue.op, this.originValue.ref))\r\n && (!this.time || now - origin.time >= this.time) \r\n && (!this.actor || (actor && (\r\n ItemConditions.matches(this.actor, actor.item)\r\n && (!this.actorValue || cmp(actor.value, this.actorValue.op, this.actorValue.ref))\r\n )))\r\n );\r\n }\r\n\r\n static getRandomResult(results: RecipeResults, random: number): { origin: RecipeResult, actor?: RecipeResult } {\r\n if (results.length === 0) {\r\n return { origin: { type: RecipeResultType.None, data: null } };\r\n }\r\n if (results.length === 1) {\r\n return results[0];\r\n }\r\n let total = 0;\r\n for (let i = 0; i < results.length; i++) {\r\n total += results[i].chance || 1;\r\n }\r\n let r = 0;\r\n for (let i = 0; i < results.length; i++) {\r\n r += (results[i].chance || 1) / total;\r\n if (r >= random) {\r\n return results[i];\r\n }\r\n }\r\n return results[0];\r\n }\r\n\r\n origins(): number[] {\r\n return (REGISTRY && REGISTRY.query(this.origin)) || [];\r\n }\r\n\r\n actors(): number[] {\r\n return (REGISTRY && REGISTRY.query(this.actor || { conditions: [{ type: ItemConditionTypes.None, data: null }] })) || [];\r\n }\r\n\r\n used(): number[] {\r\n return [...this.origins(), ...this.actors()];\r\n }\r\n\r\n simpleUsed(): number[] {\r\n return [...(this.getAnOrigin() === 0 ? [] : [ this.getAnOrigin() ]), ...(this.getAnActor() === 0 ? [] : [ this.getAnActor() ])];\r\n }\r\n\r\n resulted(): number[] {\r\n const resulted: number[] = [];\r\n for (const result of this.results) {\r\n if (result.origin.type === RecipeResultType.NewItem) {\r\n resulted.push(result.origin.data);\r\n } else if (result.origin.type === RecipeResultType.SameItem) {\r\n resulted.push(...this.origins());\r\n }\r\n if (result.actor) {\r\n if (result.actor.type === RecipeResultType.NewItem) {\r\n resulted.push(result.actor.data);\r\n } else if (result.actor.type === RecipeResultType.SameItem) {\r\n resulted.push(...this.actors());\r\n }\r\n }\r\n }\r\n // remove duplicates\r\n return resulted.filter((v, i, a) => a.indexOf(v) === i);\r\n }\r\n\r\n notableResulted(): number[] {\r\n const resulted: number[] = [];\r\n for (const result of this.results) {\r\n if (result.origin.type === RecipeResultType.NewItem) {\r\n resulted.push(result.origin.data);\r\n }\r\n if (result.actor) {\r\n if (result.actor.type === RecipeResultType.NewItem) {\r\n resulted.push(result.actor.data);\r\n }\r\n }\r\n }\r\n // remove duplicates\r\n return resulted.filter((v, i, a) => a.indexOf(v) === i);\r\n }\r\n\r\n getAnOrigin(): number {\r\n return this.origins()[0] || 0;\r\n }\r\n\r\n getAnActor(): number {\r\n return this.actor ? this.actors()[0] || 0 : 0;\r\n }\r\n\r\n static getResult(item: ItemState, result: RecipeResult) {\r\n let newItem: ItemState | null = null;\r\n switch (result.type) {\r\n case RecipeResultType.SameItem:\r\n newItem = item.clone();\r\n if (result.data) {\r\n switch (result.data.op) {\r\n case '=':\r\n newItem.value = result.data.ref;\r\n break;\r\n case '+':\r\n newItem.value += result.data.ref;\r\n break;\r\n case '-':\r\n newItem.value -= result.data.ref;\r\n break;\r\n }\r\n }\r\n break;\r\n case RecipeResultType.NewItem:\r\n newItem = new ItemState(result.data);\r\n break;\r\n }\r\n return newItem;\r\n }\r\n\r\n static getOptionalResult(item: ItemState | null | undefined, result: RecipeResult) {\r\n let newItem: ItemState | null = null;\r\n switch (result.type) {\r\n case RecipeResultType.SameItem:\r\n if (!item) {\r\n return null;\r\n }\r\n console.log(item);\r\n newItem = item.clone();\r\n if (result.data) {\r\n switch (result.data.op) {\r\n case '=':\r\n newItem.value = result.data.ref;\r\n break;\r\n case '+':\r\n newItem.value += result.data.ref;\r\n break;\r\n case '-':\r\n newItem.value -= result.data.ref;\r\n break;\r\n }\r\n }\r\n break;\r\n case RecipeResultType.NewItem:\r\n newItem = new ItemState(result.data);\r\n break;\r\n }\r\n return newItem;\r\n }\r\n\r\n getResults(origin: ItemState, actor?: ItemState, random?: number): [ItemState | null, ItemState | null] {\r\n if (this.results.length === 0) {\r\n return [null, null];\r\n }\r\n const result = !random ? this.results[0] : Recipe.getRandomResult(this.results, random);\r\n let originResult: ItemState | null = Recipe.getResult(origin, result.origin);\r\n let actorResult: ItemState | null = result.actor ? Recipe.getOptionalResult(actor, result.actor) : null;\r\n return [originResult, actorResult];\r\n }\r\n\r\n}\r\n\r\nclass Registry {\r\n public items: Item[] = [];\r\n public depths: Map = new Map();\r\n\r\n public recipes: Recipe[] = [];\r\n public uses: Map = new Map();\r\n public results: Map = new Map();\r\n\r\n constructor() {\r\n this.items = [];\r\n this.recipes = [];\r\n }\r\n\r\n setItems(itemsData: any[]) {\r\n itemsData = [Item.DEFAULT_ITEM, ...itemsData];\r\n itemsData.forEach((itemData) => {\r\n const id = this.items.length;\r\n this.items.push(new Item(id, itemData.name, itemData.tags, itemData.display, itemData.properties));\r\n });\r\n }\r\n\r\n setRecipes(recipesData: any[]) {\r\n recipesData.forEach((recipeData) => {\r\n const id = this.recipes.length;\r\n this.recipes.push(new Recipe(id, recipeData.origin, recipeData.results, recipeData));\r\n });\r\n }\r\n\r\n refresh() {\r\n this.recipes.forEach((_, i) => {\r\n this.recipes[i].used().forEach((id) => {\r\n if (!this.uses.has(id)) {\r\n this.uses.set(id, []);\r\n }\r\n this.uses.get(id)?.push(i);\r\n });\r\n this.recipes[i].notableResulted().forEach((id) => {\r\n if (!this.results.has(id)) {\r\n this.results.set(id, []);\r\n }\r\n this.results.get(id)?.push(i);\r\n });\r\n });\r\n \r\n for (const item of this.items) {\r\n if (item.root) {\r\n this.depths.set(item.id, 0);\r\n }\r\n }\r\n\r\n let changed = true;\r\n while (changed) {\r\n changed = false;\r\n for (const item of this.items) {\r\n if (item.root || this.depths.has(item.id)) {\r\n continue;\r\n }\r\n const recipes = item.resultedBy.filter((recipe) => recipe.used().every((result) => this.depths.has(result)));\r\n if (recipes.length === 0) {\r\n continue;\r\n }\r\n const depth = Math.max(...recipes.map((recipe) => Math.max(...recipe.used().map((result) => this.depths.get(result) || 0)))) + 1;\r\n this.depths.set(item.id, depth);\r\n changed = true;\r\n }\r\n }\r\n }\r\n\r\n query(condition: ItemConditions): number[] {\r\n let results: number[] = [];\r\n this.items.forEach((item) => {\r\n if (ItemConditions.matches(condition, item)) {\r\n results.push(item.id);\r\n }\r\n });\r\n return results;\r\n }\r\n\r\n itemsData(): string {\r\n return JSON.stringify(this.items.map((item) => ({ ...item, id: undefined })));\r\n }\r\n\r\n recipesData(): string {\r\n return JSON.stringify(this.recipes.map((recipe) => ({ ...recipe, id: undefined })));\r\n }\r\n\r\n get itemCount(): number {\r\n return this.items.length;\r\n }\r\n\r\n public getItem(id: number): Item {\r\n return this.items[id] || Item.DEFAULT_ITEM;\r\n }\r\n\r\n public getRecipe(id: number): Recipe {\r\n return this.recipes[id];\r\n }\r\n}\r\n\r\nexport const REGISTRY = new Registry();\r\nREGISTRY.setItems(itemsData);\r\nREGISTRY.setRecipes(recipesData);\r\nREGISTRY.refresh();\r\n\r\nexport const refreshRegistry = () => {\r\n REGISTRY.setItems(JSON.parse(REGISTRY.itemsData()));\r\n REGISTRY.setRecipes(JSON.parse(REGISTRY.recipesData()));\r\n REGISTRY.refresh();\r\n}","[\r\n {\"properties\":{},\"name\":\"Water\",\"tags\":[\"natural\",\"blocking\",\"static\"],\"display\":[{\"character\":247,\"color\":41}]},\r\n {\"properties\":{},\"name\":\"Ice\",\"tags\":[\"natural\",\"blocking\",\"static\"],\"display\":[{\"character\":178,\"color\":43}]},\r\n {\"properties\":{},\"name\":\"Red Cedar Tree\",\"tags\":[\"natural\",\"blocking\",\"static\"],\"display\":[{\"character\":5,\"color\":26}]},\r\n {\"properties\":{\"weight\":10},\"name\":\"Douglas Fir Tree\",\"tags\":[\"natural\",\"blocking\",\"static\"],\"display\":[{\"character\":6,\"color\":37}]},\r\n {\"properties\":{\"weight\":10},\"name\":\"Mountain Maple Tree\",\"tags\":[\"natural\",\"blocking\",\"static\"],\"display\":[{\"character\":5,\"color\":35}]},\r\n {\"properties\":{},\"name\":\"Western Juniper Tree\",\"tags\":[\"natural\",\"blocking\",\"static\"],\"display\":[{\"character\":20,\"color\":29}]},\r\n {\"properties\":{},\"name\":\"Large Boulder\",\"tags\":[\"natural\",\"blocking\",\"static\"],\"display\":[{\"character\":30,\"color\":5}]},\r\n {\"properties\":{},\"name\":\"Willow Tree\",\"tags\":[\"natural\",\"blocking\",\"static\"],\"display\":[{\"character\":158,\"color\":34}]},\r\n {\"properties\":{\"weight\":5},\"name\":\"Flint Deposit\",\"tags\":[\"natural\",\"blocking\",\"static\"],\"display\":[{\"character\":111,\"color\":9}]},\r\n {\"properties\":{\"weight\":20},\"name\":\"Fertile Soil\",\"tags\":[\"natural\",\"static\"],\"display\":[{\"character\":30,\"color\":20}]},\r\n {\"properties\":{\"weight\":10},\"name\":\"Clay Deposit\",\"tags\":[\"natural\",\"static\"],\"display\":[{\"character\":30,\"color\":27}]},\r\n {\"properties\":{},\"name\":\"Snow Bank\",\"tags\":[\"natural\",\"blocking\",\"static\"],\"display\":[{\"character\":30,\"color\":8}]},\r\n {\"properties\":{\"weight\":10},\"name\":\"Stone\",\"tags\":[\"natural\"],\"display\":[{\"character\":7,\"color\":5}]},\r\n {\"properties\":{},\"name\":\"Flint Deposit with Chip\",\"tags\":[\"static\"],\"display\":[{\"character\":149,\"color\":9}]},\r\n {\"properties\":{\"damage\":1},\"name\":\"Flint Chip\",\"tags\":[\"weapon\",\"tool\",\"knifelike\",\"important\"],\"display\":[{\"character\":47,\"color\":9}]},\r\n {\"properties\":{},\"name\":\"Large Branch\",\"tags\":[],\"display\":[{\"character\":244,\"color\":20}]},\r\n {\"properties\":{},\"name\":\"Shaft\",\"tags\":[],\"display\":[{\"character\":179,\"color\":20}]},\r\n {\"properties\":{},\"name\":\"Stick\",\"tags\":[],\"display\":[{\"character\":45,\"color\":20}]},\r\n {\"properties\":{\"weight\":50},\"name\":\"Ryegrass\",\"tags\":[\"natural\",\"static\"],\"display\":[{\"character\":35,\"color\":32}]},\r\n {\"properties\":{\"weight\":20},\"name\":\"Cat Tail\",\"tags\":[\"natural\",\"foodSource\",\"static\"],\"display\":[{\"character\":244,\"color\":34}]},\r\n {\"properties\":{},\"name\":\"Cat Tail Stalk\",\"tags\":[],\"display\":[{\"character\":47,\"color\":34}]},\r\n {\"properties\":{\"food\":10},\"name\":\"Cat Tail Head\",\"tags\":[\"edible\"],\"display\":[{\"character\":45,\"color\":27}]},\r\n {\"properties\":{},\"name\":\"Cordage Rope\",\"tags\":[],\"display\":[{\"character\":21,\"color\":24}]},\r\n {\"properties\":{},\"name\":\"Cordage Thread\",\"tags\":[],\"display\":[{\"character\":21,\"color\":22}]},\r\n {\"properties\":{},\"name\":\"Tied Stick\",\"tags\":[],\"display\":[{\"character\":45,\"color\":20},{\"character\":21,\"color\":24}]},\r\n {\"properties\":{\"weight\":5},\"name\":\"Flat Rock\",\"tags\":[\"natural\"],\"display\":[{\"character\":95,\"color\":7}]},\r\n {\"properties\":{\"weight\":5},\"name\":\"Full Blackberry Bush\",\"tags\":[\"natural\",\"foodSource\",\"static\"],\"display\":[{\"character\":42,\"color\":49}]},\r\n {\"properties\":{\"food\":5},\"name\":\"Blackberry\",\"tags\":[\"edible\"],\"display\":[{\"character\":249,\"color\":49}]},\r\n {\"properties\":{},\"name\":\"Blackberry Bush with 5 Berries\",\"tags\":[\"foodSource\",\"static\"],\"display\":[{\"character\":42,\"color\":49},{\"character\":53,\"color\":49}]},\r\n {\"properties\":{},\"name\":\"Blackberry Bush with 4 Berries\",\"tags\":[\"foodSource\",\"static\"],\"display\":[{\"character\":42,\"color\":49},{\"character\":52,\"color\":49}]},\r\n {\"properties\":{},\"name\":\"Blackberry Bush with 3 Berries\",\"tags\":[\"foodSource\",\"static\"],\"display\":[{\"character\":42,\"color\":49},{\"character\":51,\"color\":49}]},\r\n {\"properties\":{},\"name\":\"Blackberry Bush with 2 Berries\",\"tags\":[\"foodSource\",\"static\"],\"display\":[{\"character\":42,\"color\":49},{\"character\":50,\"color\":49}]},\r\n {\"properties\":{},\"name\":\"Blackberry Bush with 1 Berry\",\"tags\":[\"foodSource\",\"static\"],\"display\":[{\"character\":42,\"color\":49},{\"character\":49,\"color\":49}]},\r\n {\"properties\":{},\"name\":\"Empty Blackberry Bush\",\"tags\":[\"static\"],\"display\":[{\"character\":42,\"color\":53}]},\r\n {\"properties\":{\"damage\":3},\"name\":\"Flint Hatchet\",\"tags\":[\"weapon\",\"tool\",\"hatchetlike\",\"important\"],\"display\":[{\"character\":173,\"color\":9}]},\r\n {\"properties\":{\"weight\":10},\"name\":\"Stinging Nettle\",\"tags\":[\"natural\"],\"display\":[{\"character\":235,\"color\":34}]},\r\n {\"properties\":{},\"name\":\"Blackberry Seed\",\"tags\":[\"seed\"],\"display\":[{\"character\":249,\"color\":53}]},\r\n {\"properties\":{},\"name\":\"Fertile Plot\",\"tags\":[\"static\"],\"display\":[{\"character\":240,\"color\":20}]},\r\n {\"properties\":{},\"name\":\"Seeded Blackberry Bush\",\"tags\":[\"static\"],\"display\":[{\"character\":240,\"color\":20},{\"character\":249,\"color\":53}]},\r\n {\"properties\":{},\"name\":\"Watered Blackberry Bush\",\"tags\":[\"static\"],\"display\":[{\"character\":240,\"color\":20},{\"character\":236,\"color\":55}]},\r\n {\"properties\":{\"food\":10},\"name\":\"Wild Potato\",\"tags\":[\"edible\",\"natural\"],\"display\":[{\"character\":7,\"color\":21}]},\r\n {\"properties\":{\"food\":10},\"name\":\"Wild Carrot\",\"tags\":[\"edible\",\"natural\"],\"display\":[{\"character\":25,\"color\":29}]},\r\n {\"properties\":{\"food\":10},\"name\":\"Wild Onion\",\"tags\":[\"edible\",\"natural\"],\"display\":[{\"character\":162,\"color\":33}]},\r\n {\"properties\":{},\"name\":\"Fertile Soil Clump\",\"tags\":[],\"display\":[{\"character\":7,\"color\":20}]},\r\n {\"properties\":{},\"name\":\"Clay Ball\",\"tags\":[],\"display\":[{\"character\":7,\"color\":27}]},\r\n {\"properties\":{\"food\":15},\"name\":\"Chanterelle\",\"tags\":[\"edible\",\"natural\"],\"display\":[{\"character\":24,\"color\":32}]},\r\n {\"properties\":{\"weight\":5},\"name\":\"Full Rose Hip Bush\",\"tags\":[\"foodSource\",\"static\",\"natural\"],\"display\":[{\"character\":128,\"color\":60}]},\r\n {\"properties\":{\"food\":5},\"name\":\"Rose Hip\",\"tags\":[\"edible\"],\"display\":[{\"character\":46,\"color\":60}]},\r\n {\"properties\":{},\"name\":\"Rose Hip Bush with 2 Hips\",\"tags\":[\"foodSource\",\"static\"],\"display\":[{\"character\":128,\"color\":60},{\"character\":50,\"color\":60}]},\r\n {\"properties\":{},\"name\":\"Rose Hip Bush with 1 Hip\",\"tags\":[\"foodSource\",\"static\"],\"display\":[{\"character\":128,\"color\":60},{\"character\":49,\"color\":60}]},\r\n {\"properties\":{},\"name\":\"Empty Rose Hip Bush\",\"tags\":[],\"display\":[{\"character\":128,\"color\":62}]},\r\n {\"properties\":{},\"name\":\"Kindling\",\"tags\":[],\"display\":[{\"character\":37,\"color\":20}]},\r\n {\"properties\":{},\"name\":\"Curved Branch\",\"tags\":[],\"display\":[{\"character\":40,\"color\":20}]},\r\n {\"properties\":{},\"name\":\"Split Shaft\",\"tags\":[],\"display\":[{\"character\":179,\"color\":21}]},\r\n {\"properties\":{},\"name\":\"Split Shaft with Notch\",\"tags\":[],\"display\":[{\"character\":124,\"color\":21}]},\r\n {\"properties\":{},\"name\":\"Fire Starting Kit\",\"tags\":[\"important\"],\"display\":[{\"character\":29,\"color\":21}]},\r\n {\"properties\":{\"heat\":20},\"name\":\"Fire\",\"tags\":[\"static\",\"heatSource\",\"important\"],\"display\":[{\"character\":127,\"color\":0},{\"character\":127,\"color\":28},{\"character\":127,\"color\":0},{\"character\":127,\"color\":31}]},\r\n {\"properties\":{\"heat\":12},\"name\":\"Fire Embers\",\"tags\":[\"static\",\"heatSource\"],\"display\":[{\"character\":15,\"color\":0},{\"character\":15,\"color\":0},{\"character\":15,\"color\":28},{\"character\":15,\"color\":28}]},\r\n {\"properties\":{\"heat\":4},\"name\":\"Ignited Kit\",\"tags\":[\"static\",\"heatSource\"],\"display\":[{\"character\":42,\"color\":0},{\"character\":42,\"color\":28}]},\r\n {\"properties\":{},\"name\":\"Charcoal\",\"tags\":[\"static\"],\"display\":[{\"character\":236,\"color\":5}]},\r\n {\"properties\":{},\"name\":\"Bow\",\"tags\":[\"tool\",\"important\"],\"display\":[{\"character\":123,\"color\":20}]},\r\n {\"properties\":{},\"name\":\"Bow Drill\",\"tags\":[\"important\"],\"display\":[{\"character\":123,\"color\":20},{\"character\":45,\"color\":20}]},\r\n {\"properties\":{},\"name\":\"Curved Shaft\",\"tags\":[],\"display\":[{\"character\":60,\"color\":20}]},\r\n {\"properties\":{\"food\":10},\"name\":\"Tinder\",\"tags\":[],\"display\":[{\"character\":42,\"color\":27}]},\r\n {\"properties\":{},\"name\":\"Red Cedar Tree with Tinder\",\"tags\":[\"static\"],\"display\":[{\"character\":5,\"color\":26},{\"character\":42,\"color\":27}]},\r\n {\"properties\":{},\"name\":\"Clay Deposit with 3 Balls\",\"tags\":[\"static\"],\"display\":[{\"character\":30,\"color\":27},{\"character\":51,\"color\":27}]},\r\n {\"properties\":{},\"name\":\"Clay Deposit with 2 Balls\",\"tags\":[\"static\"],\"display\":[{\"character\":30,\"color\":27},{\"character\":50,\"color\":27}]},\r\n {\"properties\":{},\"name\":\"Clay Deposit with 1 Ball\",\"tags\":[\"static\"],\"display\":[{\"character\":30,\"color\":27},{\"character\":49,\"color\":27}]},\r\n {\"properties\":{},\"name\":\"Rye Grain\",\"tags\":[],\"display\":[{\"character\":37,\"color\":32}]},\r\n {\"properties\":{},\"name\":\"Straw\",\"tags\":[],\"display\":[{\"character\":186,\"color\":32}]},\r\n {\"properties\":{\"size\":3},\"name\":\"Straw Basket\",\"tags\":[\"container\",\"important\"],\"display\":[{\"character\":118,\"color\":32}]},\r\n {\"properties\":{},\"name\":\"Wet Clay Bowl\",\"tags\":[],\"display\":[{\"character\":118,\"color\":27}]},\r\n {\"properties\":{},\"name\":\"Clay Bowl\",\"tags\":[],\"display\":[{\"character\":118,\"color\":22}]},\r\n {\"properties\":{},\"name\":\"Clay Bowl with Water\",\"tags\":[],\"display\":[{\"character\":118,\"color\":22},{\"character\":4,\"color\":41}]},\r\n {\"properties\":{},\"name\":\"Harvested Mountain Maple Tree\",\"tags\":[\"static\"],\"display\":[{\"character\":5,\"color\":35},{\"character\":0,\"color\":1}]},\r\n {\"properties\":{},\"name\":\"Harvested Douglas Fir Tree\",\"tags\":[\"static\"],\"display\":[{\"character\":6,\"color\":37},{\"character\":0,\"color\":1}]},\r\n {\"properties\":{\"food\":15},\"name\":\"Roasted Potato\",\"tags\":[\"edible\"],\"display\":[{\"character\":7,\"color\":17}]},\r\n {\"properties\":{\"food\":15},\"name\":\"Roasted Carrot\",\"tags\":[\"edible\"],\"display\":[{\"character\":25,\"color\":17}]},\r\n {\"properties\":{\"food\":15},\"name\":\"Roasted Onion\",\"tags\":[\"edible\"],\"display\":[{\"character\":162,\"color\":17}]},\r\n {\"properties\":{\"food\":10},\"name\":\"Roasted Stinging Nettle\",\"tags\":[\"edible\"],\"display\":[{\"character\":235,\"color\":17}]},\r\n {\"properties\":{},\"name\":\"Bowl of Uncooked Rose Hip Tea\",\"tags\":[],\"display\":[{\"character\":118,\"color\":22},{\"character\":4,\"color\":63}]},\r\n {\"properties\":{\"food\":15,\"heal\":20,\"cure\":1,\"leftovers\":73},\"name\":\"Full Bowl of Rose Hip Tea\",\"tags\":[\"edible\",\"healing\"],\"display\":[{\"character\":118,\"color\":22},{\"character\":4,\"color\":0}]},\r\n {\"properties\":{},\"name\":\"Bowl with Rye Dough\",\"tags\":[],\"display\":[{\"character\":118,\"color\":22},{\"character\":9,\"color\":32}]},\r\n {\"properties\":{},\"name\":\"Bowl of Uncooked Stinging Nettle Tea\",\"tags\":[],\"display\":[{\"character\":118,\"color\":22},{\"character\":4,\"color\":37}]},\r\n {\"properties\":{\"food\":25,\"heal\":10,\"cure\":1,\"leftovers\":73},\"name\":\"Bowl of Stinging Nettle Tea\",\"tags\":[\"edible\",\"healing\"],\"display\":[{\"character\":118,\"color\":22},{\"character\":4,\"color\":34}]},\r\n {\"properties\":{},\"name\":\"Grave\",\"tags\":[\"static\"],\"display\":[{\"character\":157,\"color\":7}]},\r\n {\"properties\":{},\"name\":\"Harvested Willow Tree\",\"tags\":[\"static\"],\"display\":[{\"character\":158,\"color\":34},{\"character\":0,\"color\":1}]},\r\n {\"properties\":{\"food\":5,\"heal\":5},\"name\":\"Willow Bark\",\"tags\":[\"edible\",\"healing\"],\"display\":[{\"character\":126,\"color\":34}]},\r\n {\"properties\":{},\"name\":\"Rye Flour\",\"tags\":[],\"display\":[{\"character\":174,\"color\":32}]},\r\n {\"properties\":{},\"name\":\"Adobe\",\"tags\":[],\"display\":[{\"character\":81,\"color\":25}]},\r\n {\"properties\":{},\"name\":\"Adobe Oven\",\"tags\":[\"important\",\"static\"],\"display\":[{\"character\":117,\"color\":25}]},\r\n {\"properties\":{},\"name\":\"Adobe Forge\",\"tags\":[\"important\",\"static\"],\"display\":[{\"character\":234,\"color\":25}]},\r\n {\"properties\":{},\"name\":\"Rye Dough\",\"tags\":[],\"display\":[{\"character\":9,\"color\":32}]},\r\n {\"properties\":{},\"name\":\"Rye Dough on Flat Rock\",\"tags\":[],\"display\":[{\"character\":95,\"color\":7},{\"character\":9,\"color\":32}]},\r\n {\"properties\":{},\"name\":\"Rye Bread on Flat Rock\",\"tags\":[\"static\"],\"display\":[{\"character\":95,\"color\":7},{\"character\":233,\"color\":32}]},\r\n {\"properties\":{\"food\":30},\"name\":\"Rye Bread\",\"tags\":[\"edible\",\"delicious\"],\"display\":[{\"character\":233,\"color\":32}]},\r\n {\"properties\":{},\"name\":\"Iron Vein\",\"tags\":[\"natural\",\"static\"],\"display\":[{\"character\":94,\"color\":28}]},\r\n {\"properties\":{\"weight\":10},\"name\":\"Raw Iron Ore\",\"tags\":[\"natural\"],\"display\":[{\"character\":22,\"color\":28}]},\r\n {\"properties\":{},\"name\":\"Wet Clay Plate\",\"tags\":[],\"display\":[{\"character\":95,\"color\":27}]},\r\n {\"properties\":{},\"name\":\"Clay Plate\",\"tags\":[],\"display\":[{\"character\":95,\"color\":22}]},\r\n {\"properties\":{\"heat\":8},\"name\":\"Lit Torch\",\"tags\":[\"heatSource\"],\"display\":[{\"character\":26,\"color\":0},{\"character\":26,\"color\":31}]},\r\n {\"properties\":{},\"name\":\"Charcoal Piece\",\"tags\":[],\"display\":[{\"character\":96,\"color\":5}]},\r\n {\"properties\":{\"heat\":12},\"name\":\"Lit Oven\",\"tags\":[\"heatSource\",\"static\"],\"display\":[{\"character\":117,\"color\":0},{\"character\":117,\"color\":31}]},\r\n {\"properties\":{\"heat\":16},\"name\":\"Lit Forge\",\"tags\":[\"heatSource\",\"static\"],\"display\":[{\"character\":234,\"color\":0},{\"character\":234,\"color\":31}]},\r\n {\"properties\":{},\"name\":\"Bowl with Iron Ore\",\"tags\":[],\"display\":[{\"character\":118,\"color\":22},{\"character\":22,\"color\":28}]},\r\n {\"properties\":{},\"name\":\"Bowl with Charcoal\",\"tags\":[],\"display\":[{\"character\":118,\"color\":22},{\"character\":96,\"color\":5}]},\r\n {\"properties\":{},\"name\":\"Bowl with Steel Prerequisites\",\"tags\":[],\"display\":[{\"character\":118,\"color\":22},{\"character\":22,\"color\":28},{\"character\":96,\"color\":5}]},\r\n {\"properties\":{\"heat\":16},\"name\":\"Forge with Warming Iron Ore\",\"tags\":[\"static\",\"heatSource\"],\"display\":[{\"character\":234,\"color\":0},{\"character\":22,\"color\":28},{\"character\":234,\"color\":31},{\"character\":22,\"color\":28}]},\r\n {\"properties\":{\"heat\":16},\"name\":\"Forge with Hot Iron Ore\",\"tags\":[\"static\",\"heatSource\"],\"display\":[{\"character\":234,\"color\":0},{\"character\":22,\"color\":31},{\"character\":234,\"color\":31},{\"character\":22,\"color\":0}]},\r\n {\"properties\":{},\"name\":\"Wooden Tongs\",\"tags\":[],\"display\":[{\"character\":120,\"color\":20}]},\r\n {\"properties\":{},\"name\":\"Wooden Tongs with Hot Iron\",\"tags\":[],\"display\":[{\"character\":120,\"color\":20},{\"character\":22,\"color\":0},{\"character\":120,\"color\":20},{\"character\":22,\"color\":31}]},\r\n {\"properties\":{},\"name\":\"Flat Rock with Hot Iron\",\"tags\":[\"static\"],\"display\":[{\"character\":95,\"color\":7},{\"character\":22,\"color\":0},{\"character\":95,\"color\":7},{\"character\":22,\"color\":31}]},\r\n {\"properties\":{},\"name\":\"Flat Rock with Hot Iron Ingot\",\"tags\":[\"static\"],\"display\":[{\"character\":95,\"color\":7},{\"character\":169,\"color\":0}]},\r\n {\"properties\":{},\"name\":\"Flat Rock with Iron Ore\",\"tags\":[\"static\"],\"display\":[{\"character\":95,\"color\":7},{\"character\":22,\"color\":28}]},\r\n {\"properties\":{},\"name\":\"Flat Rock with Iron Ingot\",\"tags\":[\"static\"],\"display\":[{\"character\":95,\"color\":7},{\"character\":169,\"color\":28}]},\r\n {\"properties\":{},\"name\":\"Iron Ingot\",\"tags\":[\"resource\",\"important\"],\"display\":[{\"character\":169,\"color\":28}]},\r\n {\"properties\":{},\"name\":\"Smithing Hammer\",\"tags\":[\"tool\",\"important\"],\"display\":[{\"character\":231,\"color\":28}]},\r\n {\"properties\":{},\"name\":\"Unforged Steel Crucible\",\"tags\":[],\"display\":[{\"character\":110,\"color\":22},{\"character\":22,\"color\":28},{\"character\":96,\"color\":5}]},\r\n {\"properties\":{\"heat\":16},\"name\":\"Forge with Warming Steel Crucible\",\"tags\":[\"static\",\"heatSource\"],\"display\":[{\"character\":234,\"color\":0},{\"character\":110,\"color\":28},{\"character\":234,\"color\":31},{\"character\":110,\"color\":28}]},\r\n {\"properties\":{\"heat\":16},\"name\":\"Forge with Hot Steel Crucible\",\"tags\":[\"static\",\"heatSource\"],\"display\":[{\"character\":234,\"color\":0},{\"character\":110,\"color\":31},{\"character\":234,\"color\":31},{\"character\":110,\"color\":0}]},\r\n {\"properties\":{},\"name\":\"Wooden Tongs with Hot Steel Crucible\",\"tags\":[],\"display\":[{\"character\":120,\"color\":20},{\"character\":110,\"color\":0},{\"character\":120,\"color\":20},{\"character\":110,\"color\":31}]},\r\n {\"properties\":{},\"name\":\"Flat Rock with Hot Steel Crucible\",\"tags\":[\"static\"],\"display\":[{\"character\":95,\"color\":7},{\"character\":110,\"color\":0}]},\r\n {\"properties\":{},\"name\":\"Flat Rock with Steel Crucible\",\"tags\":[\"static\"],\"display\":[{\"character\":95,\"color\":7},{\"character\":110,\"color\":22}]},\r\n {\"properties\":{},\"name\":\"Forged Steel Crucible\",\"tags\":[\"static\"],\"display\":[{\"character\":110,\"color\":22}]},\r\n {\"properties\":{},\"name\":\"Bowl with Steel Ingot\",\"tags\":[\"static\"],\"display\":[{\"character\":118,\"color\":22},{\"character\":254,\"color\":7}]},\r\n {\"properties\":{\"food\":20000},\"name\":\"Steel Ingot\",\"tags\":[\"edible\"],\"display\":[{\"character\":254,\"color\":7}]},\r\n \r\n \r\n]","[\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":29},\"actor\":{\"type\":\"NewItem\",\"data\":28}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":27}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":30},\"actor\":{\"type\":\"NewItem\",\"data\":28}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":29}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":31},\"actor\":{\"type\":\"NewItem\",\"data\":28}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":30}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":32},\"actor\":{\"type\":\"NewItem\",\"data\":28}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":31}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":33},\"actor\":{\"type\":\"NewItem\",\"data\":28}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":32}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":34},\"actor\":{\"type\":\"NewItem\",\"data\":28}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":33}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":25},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":18}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":23}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":23},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":21}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":21}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":23},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":36}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":36}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":21},\"actor\":{\"type\":\"NewItem\",\"data\":22}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":20}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":14},\"actor\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":9}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":13}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":9},\"actor\":{\"type\":\"NewItem\",\"data\":15}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":14}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":17},\"actor\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":16}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":15}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":18},\"actor\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":17}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":15}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":37},\"actor\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":28}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":15}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":38},\"actor\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":44}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":13}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":44},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":10}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":39},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":38}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":37}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":49},\"actor\":{\"type\":\"NewItem\",\"data\":48}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":47}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":50},\"actor\":{\"type\":\"NewItem\",\"data\":48}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":49}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":51},\"actor\":{\"type\":\"NewItem\",\"data\":48}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":50}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":52},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":16}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":35}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":35},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":25}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":15}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":54},\"actor\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":17}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":35}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":55},\"actor\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":54}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":15}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":56},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":55}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":64}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":63},\"actor\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":53}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":15}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":64},\"actor\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":22}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":15}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":57},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":59}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":52}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":58},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":57}]},\"time\":86400},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":60},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":58}]},\"time\":86400},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":59},\"actor\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":56}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":62}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":61},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":63}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":23}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":62},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":61}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":18}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":65},\"actor\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":3}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":15}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":3},\"actor\":{\"type\":\"NewItem\",\"data\":64}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":65}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":66},\"actor\":{\"type\":\"NewItem\",\"data\":45}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":11}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":67},\"actor\":{\"type\":\"NewItem\",\"data\":45}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":66}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":68},\"actor\":{\"type\":\"NewItem\",\"data\":45}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":67}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":45},\"actor\":{\"type\":\"NewItem\",\"data\":45}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":68}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":69},\"actor\":{\"type\":\"NewItem\",\"data\":70}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":19}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":72},\"actor\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":45}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":13}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}},\"actor\":{\"type\":\"NewItem\",\"data\":73}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":57}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":72}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}},\"actor\":{\"type\":\"NewItem\",\"data\":74}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":1}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":73}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":76},\"actor\":{\"type\":\"NewItem\",\"data\":16}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":4}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":75},\"actor\":{\"type\":\"NewItem\",\"data\":53}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":5}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}},\"actor\":{\"type\":\"NewItem\",\"data\":77}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":57}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":41}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}},\"actor\":{\"type\":\"NewItem\",\"data\":78}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":57}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":42}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}},\"actor\":{\"type\":\"NewItem\",\"data\":79}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":57}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":43}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}},\"actor\":{\"type\":\"NewItem\",\"data\":80}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":57}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":36}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":4},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":76}]},\"time\":14400},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":5},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":75}]},\"time\":14400},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":81},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":74}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":48}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":84},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":74}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":36}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}},\"actor\":{\"type\":\"NewItem\",\"data\":82}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":57}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":81}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}},\"actor\":{\"type\":\"NewItem\",\"data\":85}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":57}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":84}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":20},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":22}]},\"time\":28800},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":57},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":58}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":52}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":87},\"actor\":{\"type\":\"NewItem\",\"data\":88}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":8}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":89},\"actor\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":69}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":13}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":90},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":45}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":70}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":93},\"actor\":{\"type\":\"NewItem\",\"data\":73}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":89}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":74}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":94},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":26}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":93}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}},\"actor\":{\"type\":\"NewItem\",\"data\":101}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":57}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":18}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}},\"actor\":{\"type\":\"NewItem\",\"data\":100}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":57}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":99}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":99},\"actor\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":45}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":26}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":60},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":101}]},\"time\":3600},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":102},\"actor\":{\"type\":\"NewItem\",\"data\":102}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":60}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":91},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":90}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":90}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":92},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":91}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":90}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":103},\"actor\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":91}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":101}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":104},\"actor\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":92}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":101}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":91},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":103}]},\"time\":28800},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":92},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":104}]},\"time\":28800},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":57},\"actor\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":52}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":101}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}},\"actor\":{\"type\":\"NewItem\",\"data\":95}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":103}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":94}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":26},\"actor\":{\"type\":\"NewItem\",\"data\":96}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":95}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":71},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":70}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":70}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}},\"actor\":{\"type\":\"NewItem\",\"data\":102}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":57}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":22}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":105},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":73}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":98}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":106},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":73}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":102}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":107},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":105}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":102}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":107},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":106}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":98}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":108},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":104}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":98}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":109},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":108}]},\"time\":600},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":110},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":18}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":18}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":104},\"actor\":{\"type\":\"NewItem\",\"data\":111}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":109}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":110}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":114},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":112}]},\"time\":3600},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":26},\"actor\":{\"type\":\"NewItem\",\"data\":98}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":114}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":112},\"actor\":{\"type\":\"NewItem\",\"data\":110}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":26}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":111}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":113},\"actor\":{\"type\":\"SameItem\",\"data\":{\"op\":\"\",\"ref\":0}}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":112}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":13}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":115},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":113}]},\"time\":1800},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":26},\"actor\":{\"type\":\"NewItem\",\"data\":116}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":115}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":118},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":107}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":100}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":119},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":104}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":118}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":120},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":119}]},\"time\":600},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":104},\"actor\":{\"type\":\"NewItem\",\"data\":121}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":120}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":110}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":122},\"actor\":{\"type\":\"NewItem\",\"data\":110}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":26}]},\"actor\":{\"conditions\":[{\"type\":\"Is\",\"data\":121}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":123},\"actor\":{\"type\":\"\"}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":122}]},\"time\":1800},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":26},\"actor\":{\"type\":\"NewItem\",\"data\":124}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":123}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":125},\"actor\":{\"type\":\"NewItem\",\"data\":100}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":124}]}},\r\n {\"results\":[{\"origin\":{\"type\":\"NewItem\",\"data\":73},\"actor\":{\"type\":\"NewItem\",\"data\":126}}],\"origin\":{\"conditions\":[{\"type\":\"Is\",\"data\":125}]}}\r\n]","exports.interopDefault = function (a) {\n return a && a.__esModule ? a : {default: a};\n};\n\nexports.defineInteropFlag = function (a) {\n Object.defineProperty(a, '__esModule', {value: true});\n};\n\nexports.exportAll = function (source, dest) {\n Object.keys(source).forEach(function (key) {\n if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function () {\n return source[key];\n },\n });\n });\n\n return dest;\n};\n\nexports.export = function (dest, destName, get) {\n Object.defineProperty(dest, destName, {\n enumerable: true,\n get: get,\n });\n};\n","import { Item, ItemCondition, ItemConditionTypes, ItemConditions, ItemState, REGISTRY, Recipe } from \"./lib\";\r\n\r\nexport const WORLD_SIZE = 40;\r\nexport const CHUNK_SIZE = 10;\r\n\r\ntype PositionedItem = { x: number, y: number, item: ItemState | null };\r\n\r\nexport class Chunk {\r\n x: number;\r\n y: number;\r\n items: Array;\r\n\r\n constructor(x: number, y: number, items: Array) {\r\n this.x = x;\r\n this.y = y;\r\n this.items = items;\r\n }\r\n\r\n get(x: number, y: number) {\r\n return this.items[y * CHUNK_SIZE + x] || null;\r\n }\r\n\r\n set(x: number, y: number, item: ItemState | null) {\r\n this.items[y * CHUNK_SIZE + x] = item;\r\n }\r\n\r\n has(selector: ItemConditions) {\r\n return this.items.some(item => item != null && ItemConditions.matches(selector, item.item));\r\n }\r\n\r\n find(selector: ItemConditions): PositionedItem | null {\r\n const index = this.items.findIndex(item => item != null && ItemConditions.matches(selector, item.item));\r\n if (index === -1) {\r\n return null;\r\n }\r\n return { x: this.x * CHUNK_SIZE + index % CHUNK_SIZE, y: this.y + Math.floor(index / CHUNK_SIZE), item: this.items[index] };\r\n }\r\n \r\n get active() {\r\n return this.items.some(item => item != null && item.item.active);\r\n }\r\n\r\n get heatProduced() {\r\n return this.items.reduce((a, b) => a + (b?.item.properties.heat || 0), 0);\r\n }\r\n}\r\n\r\nexport class World {\r\n chunks: Chunk[] = [];\r\n heat: number[] = [];\r\n\r\n constructor() {\r\n for (let y = 0; y < WORLD_SIZE; y += 1) {\r\n for (let x = 0; x < WORLD_SIZE; x += 1) {\r\n this.chunks.push(new Chunk(x, y, new Array(CHUNK_SIZE * CHUNK_SIZE).fill(null)));\r\n this.heat.push(0);\r\n }\r\n }\r\n }\r\n\r\n update(temp: number) {\r\n for (let y = 0; y < WORLD_SIZE; y += 1) {\r\n for (let x = 0; x < WORLD_SIZE; x += 1) {\r\n const index = y * WORLD_SIZE + x;\r\n this.heat[index] = mlerp(this.heat[index], temp + this.chunks[index].heatProduced, 0.05);\r\n }\r\n }\r\n // disperse\r\n for (let y = 0; y < WORLD_SIZE; y += 1) {\r\n for (let x = 0; x < WORLD_SIZE; x += 1) {\r\n const index = y * WORLD_SIZE + x;\r\n const temp = this.heat[index];\r\n\r\n const left = (x > 0) ? this.heat[index - 1] : temp;\r\n const right = (x < WORLD_SIZE - 1) ? this.heat[index + 1] : temp;\r\n const up = (y > 0) ? this.heat[index - WORLD_SIZE] : temp;\r\n const down = (y < WORLD_SIZE - 1) ? this.heat[index + WORLD_SIZE] : temp;\r\n\r\n const avg = (left + right + up + down) / 4;\r\n if (avg > temp) {\r\n this.heat[index] = mlerp(temp, avg, 0.2);\r\n } else {\r\n this.heat[index] = mlerp(temp, avg, 0.01);\r\n }\r\n \r\n }\r\n }\r\n }\r\n\r\n get size() {\r\n return WORLD_SIZE * CHUNK_SIZE;\r\n }\r\n\r\n getChunk(x: number, y: number) {\r\n return this.chunks[y * WORLD_SIZE + x];\r\n }\r\n\r\n active() {\r\n return this.chunks.filter(chunk => chunk.active).map(chunk => {\r\n const res: PositionedItem[] = [];\r\n let index = chunk.items.findIndex(item => item != null && item.item.active);\r\n while (index !== -1) {\r\n res.push({ x: chunk.x * CHUNK_SIZE + index % CHUNK_SIZE, y: chunk.y * CHUNK_SIZE + Math.floor(index / CHUNK_SIZE), item: chunk.items[index] });\r\n index = chunk.items.findIndex((item, i) => i > index && item != null && item.item.active);\r\n }\r\n return res;\r\n }).flat();\r\n }\r\n\r\n get(x: number, y: number) {\r\n return this.getChunk(Math.floor(x / CHUNK_SIZE), Math.floor(y / CHUNK_SIZE))?.get(x % CHUNK_SIZE, y % CHUNK_SIZE) || null;\r\n }\r\n\r\n set(x: number, y: number, item: ItemState | null) {\r\n this.getChunk(Math.floor(x / CHUNK_SIZE), Math.floor(y / CHUNK_SIZE)).set(x % CHUNK_SIZE, y % CHUNK_SIZE, item);\r\n }\r\n\r\n localWorld(x: number, y: number, size: number): PositionedItem[] {\r\n const local: ({x: number, y: number, item: ItemState | null})[] = [];\r\n for (let dy = -size; dy <= size; dy += 1) {\r\n for (let dx = -size; dx <= size; dx += 1) {\r\n const xx = x + dx;\r\n const yy = y + dy;\r\n if (xx < 0 || yy < 0 || xx >= this.size || yy >= this.size) {\r\n local.push({x: xx, y: yy, item: null});\r\n } else {\r\n local.push({x: xx, y: yy, item: this.get(xx, yy)});\r\n }\r\n }\r\n }\r\n return local;\r\n }\r\n\r\n\r\n}\r\n\r\nexport function generateName() {\r\n const vowels = 'eaiou';\r\n const consonants = 'tnsrhldcymfwgpbvkxjqz';\r\n const syllables = Math.round(Math.random() * 3 + 1);\r\n let name = '';\r\n for (let i = 0; i < syllables; i += 1) {\r\n name += consonants[Math.floor(Math.random() ** 2 * consonants.length)];\r\n name += vowels[Math.floor(Math.random() * vowels.length)];\r\n if (Math.random() < 0.5) {\r\n name += consonants[Math.floor(Math.random() ** 2 * consonants.length)];\r\n }\r\n }\r\n return name;\r\n}\r\n\r\nexport function generateId() {\r\n return Math.random().toString(36).substring(2, 9);\r\n}\r\n\r\nexport function hashString(str: string) {\r\n let hash = 0;\r\n for (let i = 0; i < str.length; i += 1) {\r\n hash += str.charCodeAt(i);\r\n hash += (hash << 10);\r\n hash ^= (hash >> 6);\r\n hash += (hash << 3);\r\n }\r\n return hash;\r\n}\r\n\r\nexport function mlerp(a: number, b: number, t: number) {\r\n return a + (b - a) * t;\r\n}\r\n\r\nexport function sigmoid(x: number) {\r\n return 1 / (1 + Math.exp(-x));\r\n}\r\n\r\nexport function normal(x: number) {\r\n return Math.exp(-(x ** 2));\r\n}\r\n\r\nenum Needs {\r\n Health = 'health',\r\n Hunger = 'hunger',\r\n Temperature = 'temperature',\r\n Boredom = 'boredom',\r\n}\r\n\r\nenum Direction {\r\n Here = 0,\r\n Up = 1,\r\n Left = 2,\r\n Down = 3,\r\n Right = 4,\r\n}\r\n\r\nenum ActionType {\r\n Nothing = 'nothing',\r\n Move = 'move',\r\n Interact = 'interact',\r\n Eat = 'eat',\r\n}\r\n\r\ninterface Action {\r\n type: ActionType;\r\n data: any;\r\n}\r\n\r\ninterface ActionNothing extends Action {\r\n type: ActionType.Nothing;\r\n data: {};\r\n}\r\n\r\ninterface ActionMove extends Action {\r\n type: ActionType.Move;\r\n data: {\r\n direction: Direction;\r\n };\r\n}\r\n\r\ninterface ActionInteract extends Action {\r\n type: ActionType.Interact;\r\n data: {\r\n direction: Direction;\r\n };\r\n}\r\n\r\ninterface ActionEat extends Action {\r\n type: ActionType.Eat;\r\n data: {};\r\n}\r\n\r\nconst Action = {\r\n Nothing: (): ActionNothing => ({\r\n type: ActionType.Nothing,\r\n data: {},\r\n }),\r\n Move: (direction: Direction): ActionMove => ({\r\n type: ActionType.Move,\r\n data: { direction },\r\n }),\r\n Interact: (direction: Direction): ActionInteract => ({\r\n type: ActionType.Interact,\r\n data: { direction },\r\n }),\r\n Eat: (): ActionEat => ({\r\n type: ActionType.Eat,\r\n data: {},\r\n }),\r\n};\r\n\r\nenum NounType {\r\n Person = 'person',\r\n Place = 'place',\r\n Thing = 'thing',\r\n}\r\n\r\ninterface Noun {\r\n type: NounType;\r\n data: any;\r\n}\r\n\r\ninterface NounPerson extends Noun {\r\n type: NounType.Person;\r\n data: {\r\n id: string;\r\n };\r\n}\r\n\r\ninterface NounPlace extends Noun {\r\n type: NounType.Place;\r\n data: {\r\n x: number;\r\n y: number;\r\n };\r\n}\r\n\r\ninterface NounThing extends Noun {\r\n type: NounType.Thing;\r\n data: {\r\n selector: ItemConditions;\r\n };\r\n}\r\n\r\nconst Noun = {\r\n Person: (id: string): NounPerson => ({\r\n type: NounType.Person,\r\n data: { id },\r\n }),\r\n Place: (x: number, y: number): NounPlace => ({\r\n type: NounType.Place,\r\n data: { x, y },\r\n }),\r\n Thing: (selector: ItemConditions): NounThing => ({\r\n type: NounType.Thing,\r\n data: { selector },\r\n }),\r\n}\r\n\r\nenum MemoryType {\r\n Location = 'location',\r\n PersonKnows = 'personKnows',\r\n Exists = 'exists',\r\n}\r\n\r\ninterface Memory {\r\n type: MemoryType;\r\n data: any;\r\n time: number;\r\n}\r\n\r\ninterface MemoryLocation extends Memory {\r\n type: MemoryType.Location;\r\n data: {\r\n noun: Noun;\r\n x: number;\r\n y: number;\r\n };\r\n}\r\n\r\ninterface MemoryPersonKnows extends Memory {\r\n type: MemoryType.PersonKnows;\r\n data: {\r\n person: NounPerson;\r\n memory: Memory;\r\n };\r\n}\r\n\r\ninterface MemoryExists extends Memory {\r\n type: MemoryType.Exists;\r\n data: {\r\n noun: Noun;\r\n };\r\n}\r\n\r\nconst Memory = {\r\n Location: (noun: Noun, x: number, y: number, time: number): MemoryLocation => ({\r\n type: MemoryType.Location,\r\n data: { noun, x, y},\r\n time,\r\n }),\r\n PersonKnows: (person: NounPerson, memory: Memory, time: number): MemoryPersonKnows => ({\r\n type: MemoryType.PersonKnows,\r\n data: { person, memory },\r\n time,\r\n }),\r\n Exists: (noun: Noun, time: number): MemoryExists => ({\r\n type: MemoryType.Exists,\r\n data: { noun },\r\n time,\r\n }),\r\n}\r\n\r\nenum ObjectiveType {\r\n FulfillNeed = 'fulfillNeed',\r\n Obtain = 'obtain',\r\n BoredomTask = 'boredomTask',\r\n}\r\n\r\ninterface Objective {\r\n type: ObjectiveType;\r\n data: any;\r\n}\r\n\r\ninterface ObjectiveFulfillNeed extends Objective {\r\n type: ObjectiveType.FulfillNeed;\r\n data: {\r\n need: Needs;\r\n };\r\n}\r\n\r\ninterface ObjectiveObtain extends Objective {\r\n type: ObjectiveType.Obtain;\r\n data: {\r\n noun: NounThing;\r\n another: boolean;\r\n children: number[];\r\n };\r\n}\r\n\r\nenum BoredomTaskType {\r\n Craft = 'craft',\r\n Organize = 'organize',\r\n Farm = 'farm',\r\n Build = 'build',\r\n}\r\n\r\ninterface ObjectiveBoredomTask extends Objective {\r\n type: ObjectiveType.BoredomTask;\r\n data: {\r\n task: BoredomTaskType;\r\n expiry: number;\r\n };\r\n}\r\n\r\nconst Objective = {\r\n FulfillNeed: (need: Needs): ObjectiveFulfillNeed => ({\r\n type: ObjectiveType.FulfillNeed,\r\n data: { need },\r\n }),\r\n Obtain: (noun: NounThing, another: boolean = false): ObjectiveObtain => ({\r\n type: ObjectiveType.Obtain,\r\n data: { noun, another, children: [] },\r\n }),\r\n BoredomTask: (task: BoredomTaskType, expiry: number): ObjectiveBoredomTask => ({\r\n type: ObjectiveType.BoredomTask,\r\n data: { task, expiry },\r\n }),\r\n}\r\n\r\nexport default class Person {\r\n id: string;\r\n name: string;\r\n surname: string;\r\n born: number;\r\n x: number;\r\n y: number;\r\n gender: number;\r\n\r\n home: { x: number, y: number } | null = null;\r\n\r\n health: number = 100;\r\n hunger: number = 100;\r\n temperature: number = 0;\r\n score: number = 0;\r\n\r\n reputations: { [id: string]: number } = {};\r\n needs: { [id in Needs]: number } = {\r\n [Needs.Health]: 0,\r\n [Needs.Hunger]: 0,\r\n [Needs.Temperature]: 0,\r\n [Needs.Boredom]: 0,\r\n };\r\n\r\n memory: Memory[] = [];\r\n objectives: Objective[] = [];\r\n\r\n long: { [key: string]: any } = {};\r\n short: { [key: string]: any } = {};\r\n\r\n common: { [key: number]: number } = {};\r\n\r\n holding: ItemState | null = null;\r\n\r\n nextAction: Action | null = null;\r\n \r\n constructor(id: string, name: string, surname: string, born: number, x: number, y: number) {\r\n this.id = id;\r\n this.name = name;\r\n this.surname = surname;\r\n this.born = born;\r\n this.x = x;\r\n this.y = y;\r\n this.gender = Math.random();\r\n }\r\n\r\n male() {\r\n return this.gender < 0.5;\r\n }\r\n\r\n female() {\r\n return this.gender > 0.5;\r\n }\r\n\r\n get fullName() {\r\n return `${this.name} ${this.surname}`;\r\n }\r\n\r\n get color() {\r\n return Math.abs(hashString(this.surname)) % 64;\r\n }\r\n\r\n get altColor() {\r\n return Math.abs(hashString(this.name)) % 64;\r\n }\r\n\r\n get display() {\r\n const myDisplay = [{ character: this.male() ? 11 : 12, color: this.color }];\r\n const holdingDisplay = this.holding?.item.display ?? [];\r\n return [...myDisplay, ...holdingDisplay];\r\n }\r\n\r\n get known() {\r\n return this.memory.filter(memory => \r\n memory.type === MemoryType.Location \r\n && memory.data.noun.type === NounType.Thing)\r\n .map(memory => REGISTRY.query(memory.data.noun.data.selector))\r\n .flat()\r\n .filter((item, index, self) => self.indexOf(item) === index);\r\n }\r\n\r\n hungerSeverity() {\r\n return this.hunger < 20 ? 1 : sigmoid((50 - this.hunger) / 10)\r\n }\r\n\r\n update(world: World) {\r\n \r\n const temp = world.heat[this.outerIndex()];\r\n this.temperature = mlerp(this.temperature, temp, 0.02);\r\n\r\n this.score += (this.temperature / 20) ** 3;\r\n \r\n if (this.health < 100) {\r\n this.score -= ((100 - this.health) / 100) ** 2;\r\n this.health += sigmoid((this.hunger - 50) / 10) * 0.01;\r\n }\r\n\r\n const tempEffect = 1 - sigmoid(this.temperature / 2);\r\n this.hunger -= 0.03 * (0.1 + tempEffect * 0.9);\r\n if (this.hunger < 0) {\r\n this.health -= 1.0 * tempEffect * tempEffect;\r\n this.hunger = 0;\r\n }\r\n if (this.hunger > 100) {\r\n this.health += (this.hunger - 100);\r\n this.hunger = 100;\r\n }\r\n if (this.health > 100) {\r\n this.score += (this.health - 100) ** 2;\r\n this.health = 100;\r\n }\r\n\r\n if (this.score < 0) {\r\n this.score = 0;\r\n }\r\n }\r\n\r\n think(world: World, people: Person[], now: number) {\r\n // compute needs\r\n this.needs[Needs.Health] = (80 - Math.min(this.health, 80)) ** 3;\r\n this.needs[Needs.Hunger] = (90 - Math.min(this.hunger, 90)) ** 2;\r\n this.needs[Needs.Temperature] = (Math.max((5 - this.temperature) * 10, 0));\r\n this.needs[Needs.Boredom] = (this.health > 80 && this.hunger > 80) ? 60 : 0;\r\n\r\n const local = world.localWorld(this.x, this.y, 10);\r\n const localPeople = people.filter(person => Math.abs(person.x - this.x) < 10 && Math.abs(person.y - this.y) < 10);\r\n const indices = [\r\n { x: this.x, y: this.y },\r\n { x: this.x, y: this.y - 1 },\r\n { x: this.x - 1, y: this.y },\r\n { x: this.x, y: this.y + 1 },\r\n { x: this.x + 1, y: this.y },\r\n ];\r\n\r\n // forget memories after a day\r\n this.memory = this.memory.filter(memory => now - memory.time < 86400);\r\n\r\n for (const person of localPeople) {\r\n this.memory = this.memory.filter(\r\n memory => !(memory.type === MemoryType.Exists \r\n && memory.data.noun.type === NounType.Person \r\n && memory.data.noun.data.id === person.id)\r\n );\r\n if (person.id !== this.id) {\r\n this.memory.push(Memory.Exists(Noun.Person(person.id), now));\r\n }\r\n this.memory = this.memory.filter(\r\n memory => !(memory.type === MemoryType.Location \r\n && memory.data.noun.type === NounType.Person \r\n && memory.data.noun.data.id === person.id)\r\n );\r\n if (person.id !== this.id) {\r\n this.memory.push(Memory.Location({ type: NounType.Person, data: { id: person.id }} as NounPerson, person.x, person.y, now));\r\n }\r\n }\r\n\r\n // if we find out an item is missing, remove it from memory\r\n this.memory = this.memory.filter(memory => {\r\n if (memory.type != MemoryType.Location || memory.data.noun.type != NounType.Thing) {\r\n return true;\r\n }\r\n if (memory.data.x < this.x - 10 || memory.data.x > this.x + 10 || memory.data.y < this.y - 10 || memory.data.y > this.y + 10) {\r\n return true;\r\n }\r\n const item = local.find(({ x, y }) => x === memory.data.x && y === memory.data.y);\r\n return !(item == null || item.item == null || !ItemConditions.matches(memory.data.noun.data.selector, item.item.item)); // eww\r\n });\r\n\r\n // similar but for people\r\n this.memory = this.memory.filter(memory => {\r\n if (memory.type != MemoryType.Location || memory.data.noun.type != NounType.Person) {\r\n return true;\r\n }\r\n // if two people move away at the exact time, can unintentionally forget where they are\r\n if (memory.data.x < this.x - 8 || memory.data.x > this.x + 8 || memory.data.y < this.y - 8 || memory.data.y > this.y + 8) {\r\n return true;\r\n }\r\n const person = localPeople.find(({ x, y }) => x === memory.data.x && y === memory.data.y);\r\n return !(person == null || person.id === this.id);\r\n });\r\n\r\n for (const { x, y, item } of local) {\r\n if (item != null) {\r\n if (item.item.root) {\r\n this.common[item.id] = (this.common[item.id] ?? 0) + 1;\r\n }\r\n if (!this.short['justDropped']) {\r\n let i = 0;\r\n for (const objective of this.objectives.slice(0, this.objectives.length - 1)) {\r\n if (objective.type === ObjectiveType.Obtain && !objective.data.another) {\r\n if (ItemConditions.matches(objective.data.noun.data.selector, item.item)) {\r\n this.completeAltObjective(i);\r\n this.memory.push(Memory.Location(objective.data.noun, x, y, now));\r\n break;\r\n }\r\n }\r\n i += 1;\r\n }\r\n }\r\n if (\r\n item.item.tags.includes('important') \r\n || item.item.tags.includes('foodSource') \r\n || item.item.tags.includes('heatSource')\r\n || item.item.tags.includes('healing') \r\n || item.item.tags.includes('edible')\r\n ) {\r\n this.memory = this.memory.filter(\r\n memory => !(memory.type === MemoryType.Location\r\n && memory.data.noun.type === NounType.Thing\r\n && memory.data.noun.data.selector.conditions.find(\r\n (condition: ItemCondition) => condition.type === ItemConditionTypes.Is \r\n && condition.data === item.item.id\r\n ))\r\n );\r\n this.memory.push(Memory.Location(\r\n { type: NounType.Thing, data: { selector: { conditions: [{ type: ItemConditionTypes.Is, data: item.item.id }] } } }, \r\n x, y, now\r\n ));\r\n \r\n }\r\n }\r\n }\r\n\r\n let focus = Needs.Health;\r\n for (const need of [Needs.Health, Needs.Hunger, Needs.Temperature, Needs.Boredom]) {\r\n if (this.needs[need] > this.needs[focus]) {\r\n focus = need;\r\n }\r\n }\r\n\r\n // focus = Needs.Hunger;\r\n\r\n if (this.objectives.length === 0 || this.objectives[0].type !== ObjectiveType.FulfillNeed || this.objectives[0].data.need !== focus) {\r\n this.objectives = [];\r\n this.addObjective(Objective.FulfillNeed(focus));\r\n\r\n }\r\n\r\n const rootObjective = this.objectives[0];\r\n\r\n if (rootObjective.type === ObjectiveType.FulfillNeed) {\r\n if (rootObjective.data.need === Needs.Hunger) {\r\n if (Math.random() < 0.002) {\r\n this.objectives = [rootObjective];\r\n this.short = {};\r\n }\r\n }\r\n }\r\n\r\n const objective = this.objectives[this.objectives.length - 1];\r\n this.nextAction = Action.Nothing();\r\n\r\n if (this.short['goto'] != null) {\r\n if (this.x === this.short['goto'].x && this.y === this.short['goto'].y) {\r\n this.short['goto'] = null;\r\n } else {\r\n if (this.short['calculated']) {\r\n // if (this.short['lastIndex'] === this.index()) {\r\n // this.short['path'] = null;\r\n // }\r\n // let path: { [key: number]: Direction };\r\n // if (!this.short['path']) {\r\n // this.short['path'] = this.computePath(world, this.short['goto'].x, this.short['goto'].y, people.map(({ x, y }) => ({ x, y })).filter(({ x, y }) => x !== this.x || y !== this.y));\r\n // this.nextAction = Action.Move(1 + Math.floor(Math.random() * 4) as Direction);\r\n // }\r\n // if (!this.short['path']) {\r\n // this.short['goto'] = null;\r\n // this.nextAction = Action.Move(1 + Math.floor(Math.random() * 4) as Direction);\r\n // } else if (this.nextAction.type === ActionType.Nothing) {\r\n // path = this.short['path'] as { [key: number]: Direction };\r\n // const next = path[this.index()];\r\n // this.short['lastIndex'] = this.index();\r\n // if (!next) {\r\n // this.short['path'] = null;\r\n // this.nextAction = Action.Move(1 + Math.floor(Math.random() * 4) as Direction);\r\n // } else {\r\n // this.nextAction = Action.Move(next);\r\n // }\r\n // }\r\n } else {\r\n const dx = this.short['goto'].x - this.x;\r\n const dy = this.short['goto'].y - this.y;\r\n\r\n const worldAtGoto = world.get(this.short['goto'].x, this.short['goto'].y);\r\n if (worldAtGoto != null && worldAtGoto.item.tags.includes('blocking')) {\r\n this.short['goto'] = this.gotoNoBlocking(world, this.short['goto'].x, this.short['goto'].y);\r\n }\r\n \r\n if (Math.abs(dx) > Math.abs(dy)) { // super simple pathfinding\r\n if (dx > 0) {\r\n this.nextAction = Action.Move(Direction.Right);\r\n } else {\r\n this.nextAction = Action.Move(Direction.Left);\r\n }\r\n } else {\r\n if (dy > 0) {\r\n this.nextAction = Action.Move(Direction.Down);\r\n } else {\r\n this.nextAction = Action.Move(Direction.Up);\r\n }\r\n }\r\n const next = indices[this.nextAction.data.direction];\r\n if ((world.get(next.x, next.y) != null && world.get(next.x, next.y)?.item.tags.includes('blocking')) \r\n || people.some(person => person.id != this.id && person.x === next.x && person.y === next.y)) {\r\n this.nextAction = this.moveRandomly(world, indices);\r\n }\r\n }\r\n }\r\n \r\n // _ _ ___ ___ ___ ___ \r\n // | \\| | __| __| \\/ __|\r\n // | .` | _|| _|| |) \\__ \\\r\n // |_|\\_|___|___|___/|___/\r\n \r\n } else if (objective.type === ObjectiveType.FulfillNeed) {\r\n\r\n if (objective.data.need === Needs.Health) {\r\n if (this.holding != null && this.holding.item.tags.includes('healing')) {\r\n this.nextAction = Action.Eat();\r\n } else if (world.get(this.x, this.y) != null && world.get(this.x, this.y)!.item.tags.includes('healing')) {\r\n if (this.holding != null) {\r\n this.tryToDrop(world, indices, now);\r\n } else {\r\n this.nextAction = Action.Interact(Direction.Here);\r\n }\r\n } else {\r\n const allHealing = REGISTRY.items.filter(item => item.tags.includes('healing'));\r\n this.addObjective(Objective.Obtain(Noun.Thing({ conditions: [{ type: ItemConditionTypes.Is, data: allHealing[Math.floor(Math.random() * allHealing.length)].id }] }), false));\r\n }\r\n\r\n\r\n\r\n } else if (objective.data.need === Needs.Hunger) {\r\n\r\n if (this.holding != null && this.holding.item.tags.includes('edible')) {\r\n this.nextAction = Action.Eat();\r\n } else if (world.get(this.x, this.y) != null && world.get(this.x, this.y)!.item.tags.includes('edible')) {\r\n if (this.holding != null) {\r\n this.tryToDrop(world, indices, now);\r\n } else {\r\n this.nextAction = Action.Interact(Direction.Here);\r\n }\r\n } else {\r\n // priority when NOT SEVERE: make a food source / work towards good food\r\n // priority when SEVERE: find food\r\n\r\n const nutritionScore = (item: Item) => {\r\n const food = item.properties.food;\r\n const heal = item.properties.heal || 0;\r\n\r\n return (food + Math.log2(heal + 1)) ** 2;\r\n }\r\n\r\n const foodScore = (item: Item) => {\r\n const nutrition = nutritionScore(item);\r\n\r\n const depth = item.depth();\r\n const knowsLocation = this.memory.some(memory => memory.type === MemoryType.Location \r\n && memory.data.noun.type === NounType.Thing \r\n && ItemConditions.matches(memory.data.noun.data.selector, item)\r\n );\r\n\r\n const effort = (Math.log2(depth) * item.required(this.known)) ** (knowsLocation ? 1 : 2) + 1;\r\n\r\n return (nutrition / effort) * (0.8 + Math.random() * 0.4);\r\n }\r\n\r\n const foodSourceScore = (item: Item) => {\r\n const foodItMakes = item.usedIn.map(recipe => recipe.notableResulted().map(id => REGISTRY.getItem(id))).flat().filter(item => item.tags.includes('edible'));\r\n const score = foodItMakes.map(nutritionScore).reduce((a, b) => a + b, 0);\r\n\r\n const depth = 0;\r\n const knowsLocation = this.memory.some(memory => memory.type === MemoryType.Location \r\n && memory.data.noun.type === NounType.Thing \r\n && ItemConditions.matches(memory.data.noun.data.selector, item)\r\n );\r\n\r\n const effort = (depth + 1) ** (knowsLocation ? 1 : 2);\r\n\r\n return (score / effort) * (0.8 + Math.random() * 0.4);\r\n }\r\n\r\n const allEdible = REGISTRY.items.filter(item => item.tags.includes('edible'));\r\n const allFoodSources = REGISTRY.items.filter(item => item.tags.includes('foodSource'));\r\n\r\n if (false && Math.random() > this.hungerSeverity()) {\r\n // find food source\r\n const foodSources = allFoodSources.filter(item => foodSourceScore(item) > 0);\r\n const bestFoodSource = foodSources.sort((a, b) => foodSourceScore(b) - foodSourceScore(a))[0];\r\n if (bestFoodSource) {\r\n this.addObjective(Objective.Obtain(Noun.Thing({ conditions: [{ type: ItemConditionTypes.Is, data: bestFoodSource.id }] }), false));\r\n }\r\n } else {\r\n // find food\r\n const food = allEdible.filter(item => foodScore(item) > 0);\r\n const bestFood = food.sort((a, b) => foodScore(b) - foodScore(a))[0];\r\n\r\n console.table(food.map(item => ({ name: item.name, score: foodScore(item), nutrition: nutritionScore(item), effort: (item.depth() * item.required(this.known)) ** (this.memory.some(memory => memory.type === MemoryType.Location \r\n && memory.data.noun.type === NounType.Thing \r\n && ItemConditions.matches(memory.data.noun.data.selector, item)\r\n ) ? 1 : 2) + 1 })));\r\n\r\n if (bestFood) {\r\n this.addObjective(Objective.Obtain(Noun.Thing({ conditions: [{ type: ItemConditionTypes.Is, data: bestFood.id }] }), false));\r\n }\r\n }\r\n }\r\n } else if (objective.data.need === Needs.Temperature || objective.data.need === Needs.Boredom) {\r\n // fire?\r\n const fire = REGISTRY.getItem(57);\r\n const kindling = REGISTRY.getItem(52);\r\n const fireMemory = this.locationMemory(fire);\r\n\r\n if (fireMemory) {\r\n if (this.temperature < 2) {\r\n if (world.chunks[this.outerIndex()].items.some(item => item != null && item.item.id === fire.id)) {\r\n // randomly move within chunk\r\n const dir = [ Direction.Up, Direction.Left, Direction.Down, Direction.Right ].filter(dir => {\r\n const next = indices[dir];\r\n const chunkIndex = next.x / CHUNK_SIZE + next.y / CHUNK_SIZE * WORLD_SIZE;\r\n return chunkIndex === this.outerIndex();\r\n });\r\n this.nextAction = Action.Move(dir[Math.floor(Math.random() * dir.length)]);\r\n } else {\r\n this.nextAction = this.moveRandomly(world, indices);\r\n this.short['goto'] = this.gotoNoBlocking(world, fireMemory.data.x, fireMemory.data.y);\r\n }\r\n } else {\r\n if (this.holding && this.holding.item.id === kindling.id) {\r\n // put kindling near fire\r\n if (world.chunks[this.outerIndex()].items.some(item => item != null && item.item.id === fire.id)) {\r\n this.tryToDrop(world, indices, now);\r\n this.short['goto'] = this.gotoNoBlocking(world, this.x + Math.floor(Math.random() * 10 - 5), this.y + Math.floor(Math.random() * 10 - 5));\r\n } else {\r\n this.nextAction = this.moveRandomly(world, indices);\r\n this.short['goto'] = this.gotoNoBlocking(world, fireMemory.data.x, fireMemory.data.y);\r\n }\r\n } else if (world.get(this.x, this.y) != null && world.get(this.x, this.y)!.id === kindling.id) {\r\n this.nextAction = Action.Interact(Direction.Here);\r\n } else {\r\n this.addObjective(Objective.Obtain(Noun.Thing({ conditions: [{ type: ItemConditionTypes.Is, data: kindling.id }] }), true));\r\n this.short['goto'] = this.gotoNoBlocking(world, this.x + Math.floor(Math.random() * 10 - 5), this.y + Math.floor(Math.random() * 10 - 5));\r\n } \r\n }\r\n } else {\r\n this.addObjective(Objective.Obtain(Noun.Thing({ conditions: [{ type: ItemConditionTypes.Is, data: fire.id }] }), false));\r\n }\r\n } else if (objective.data.need === Needs.Boredom) {\r\n // const allImportant = REGISTRY.items.filter(item => item.tags.includes('important'));\r\n \r\n // const priority = (item: Item) => {\r\n // const knowsLocation = this.memory.some(memory => memory.type === MemoryType.Location \r\n // && memory.data.noun.type === NounType.Thing \r\n // && ItemConditions.matches(memory.data.noun.data.selector, item)\r\n // );\r\n // if (knowsLocation) {\r\n // return 0; // want to craft new items!\r\n // }\r\n\r\n // const effort = (item.depth() * item.required(this.known)) + 1;\r\n // return (0.8 + Math.random() * 0.4) / effort;\r\n // }\r\n\r\n // const bestItem = allImportant.sort((a, b) => priority(b) - priority(a))[0];\r\n\r\n // console.table(allImportant.map(item => ({ name: item.name, priority: priority(item), effort: (item.depth() * item.required(this.known)) + 1 })));\r\n\r\n // this.addObjective(Objective.Obtain(Noun.Thing({ conditions: [{ type: ItemConditionTypes.Is, data: bestItem.id }] }), false));\r\n }\r\n\r\n // ___ ___ _____ _ ___ _ _ \r\n // / _ \\| _ )_ _/_\\ |_ _| \\| |\r\n // | (_) | _ \\ | |/ _ \\ | || .` |\r\n // \\___/|___/ |_/_/ \\_\\___|_|\\_|\r\n \r\n } else if (objective.type === ObjectiveType.Obtain) {\r\n const item = REGISTRY.getItem(REGISTRY.query(objective.data.noun.data.selector)[0]);\r\n const memory = this.memory.find(memory => memory.type === MemoryType.Location && memory.data.noun.type === NounType.Thing && ItemConditions.matches(memory.data.noun.data.selector, item));\r\n\r\n if (!objective.data.another && this.holding != null && ItemConditions.matches(objective.data.noun.data.selector, this.holding.item)) {\r\n this.nextAction = Action.Nothing();\r\n this.completeObjective();\r\n } else if (!this.short['justDropped'] && indices.map(i => world.get(i.x, i.y)).some(other => other != null && other.item.id === item.id)) {\r\n const dir = indices.findIndex(i => world.get(i.x, i.y) != null && world.get(i.x, i.y)!.item.id === item.id);\r\n this.memory.push(Memory.Location(Noun.Thing({ conditions: [{ type: ItemConditionTypes.Is, data: item.id }] }), \r\n indices[dir].x, indices[dir].y, now\r\n ));\r\n this.completeObjective();\r\n } else if (!objective.data.another && !this.short['justDropped'] && memory) {\r\n this.short['goto'] = this.gotoNoBlocking(world, memory.data.x, memory.data.y);\r\n } else if (!item.root) {\r\n const recipes = item.resultedBy;\r\n const recipe = recipes.find(recipe => recipe.simpleUsed().map(id => REGISTRY.getItem(id)).every(item => \r\n (this.holding != null && this.holding.id === item.id) ||\r\n this.memory.find(memory => \r\n memory.type === MemoryType.Location \r\n && memory.data.noun.type === NounType.Thing\r\n && ItemConditions.matches(memory.data.noun.data.selector, item)\r\n )));\r\n \r\n if (recipe) {\r\n\r\n const shouldBeHolding = recipe.actor;\r\n const shouldBeNextTo = recipe.origin;\r\n\r\n const holdingTheActor = (!!shouldBeHolding && this.holding != null && ItemConditions.matches(shouldBeHolding, this.holding.item)) || (!shouldBeHolding && !this.holding)\r\n const nextToOriginIndex = indices.findIndex(i => world.get(i.x, i.y) != null && ItemConditions.matches(shouldBeNextTo, world.get(i.x, i.y)!.item));\r\n\r\n if (!holdingTheActor) {\r\n if (this.holding && (!shouldBeHolding || !ItemConditions.matches(shouldBeHolding, this.holding.item))) {\r\n this.tryToDrop(world, indices, now);\r\n } else if (indices.some(i => world.get(i.x, i.y) != null && ItemConditions.matches(shouldBeHolding!, world.get(i.x, i.y)!.item))) {\r\n this.nextAction = Action.Interact(indices.findIndex(i => world.get(i.x, i.y) != null && world.get(i.x, i.y)!.item.id === shouldBeHolding!.conditions[0].data) as Direction);\r\n } else {\r\n const item = REGISTRY.getItem(recipe.getAnActor());\r\n // find memory\r\n const memory = this.memory.find(memory => memory.type === MemoryType.Location && memory.data.noun.type === NounType.Thing && ItemConditions.matches(memory.data.noun.data.selector, item));\r\n if (memory) {\r\n this.short['goto'] = this.gotoNoBlocking(world, memory.data.x, memory.data.y);\r\n } else { // this should hopefully never happen\r\n this.addObjective(Objective.Obtain(Noun.Thing({ conditions: [{ type: ItemConditionTypes.Is, data: item.id }] }), true), objective);\r\n this.nextAction = Action.Nothing();\r\n }\r\n }\r\n } else if (nextToOriginIndex === -1) {\r\n if (this.holding && (!shouldBeHolding || !ItemConditions.matches(shouldBeHolding, this.holding.item))) {\r\n this.tryToDrop(world, indices, now);\r\n } else {\r\n const item = REGISTRY.getItem(recipe.getAnOrigin());\r\n // find memory\r\n const memory = this.memory.find(memory => memory.type === MemoryType.Location && memory.data.noun.type === NounType.Thing && ItemConditions.matches(memory.data.noun.data.selector, item));\r\n if (memory) {\r\n this.short['goto'] = this.gotoNoBlocking(world, memory.data.x, memory.data.y);\r\n } else { // this should hopefully never happen\r\n this.addObjective(Objective.Obtain(Noun.Thing({ conditions: [{ type: ItemConditionTypes.Is, data: item.id }] }), true), objective);\r\n this.nextAction = Action.Nothing();\r\n }\r\n }\r\n } else { // able to craft\r\n this.nextAction = Action.Interact(nextToOriginIndex as Direction);\r\n }\r\n\r\n } else {\r\n const itemEffort = (item: Item) => {\r\n if (this.objectives.some(objective => objective.type === ObjectiveType.Obtain && ItemConditions.matches(objective.data.noun.data.selector, item) && !objective.data.another)) {\r\n return Infinity;\r\n }\r\n const craftEffort = (item.depth() || 0) ** 2 + 1;\r\n const canFindEasily = this.memory.find(memory => \r\n memory.type === MemoryType.Location \r\n && memory.data.noun.type === NounType.Thing \r\n && ItemConditions.matches(memory.data.noun.data.selector, item)\r\n ) || local.find(({ item: i }) => i != null && i.item.id === item.id);\r\n const howCommon = item.resources().reduce((a, b) => a + (this.common[b.id] ?? 0), 0);\r\n\r\n return (canFindEasily ? (Math.sqrt(craftEffort) / 2) : craftEffort) / Math.log(howCommon + Math.E) * (0.8 + Math.random() * 0.4);\r\n }\r\n const recipeEffort = (recipe: Recipe) => {\r\n if (recipe.actor && recipe.results.some(result => result.actor && result.actor.type === 'SameItem')) {\r\n return Infinity;\r\n }\r\n return itemEffort(REGISTRY.getItem(recipe.getAnOrigin())) * (recipe.actor ? itemEffort(REGISTRY.getItem(recipe.getAnActor())) : 1) * (recipe.time || 1);\r\n }\r\n const bestRecipe = recipes.sort((a, b) => recipeEffort(a) - recipeEffort(b))[0];\r\n \r\n const items = bestRecipe.simpleUsed().map(id => REGISTRY.getItem(id));\r\n\r\n const seen = new Set();\r\n \r\n for (const item of items.sort((a, b) => a.active || b.active ? ((a.active === b.active) ? 0 : a.active ? -1 : 1) : a.depth() - b.depth())) {\r\n if (seen.has(item.id)) {\r\n this.objectives[this.objectives.length - 1].data.another = true;\r\n }\r\n this.addObjective(Objective.Obtain(Noun.Thing({ conditions: [{ type: ItemConditionTypes.Is, data: item.id }] }), false), objective);\r\n seen.add(item.id);\r\n }\r\n this.nextAction = Action.Nothing();\r\n }\r\n } else {\r\n // first see if in vicinity\r\n const item = this.nearestItem(local, objective.data.noun.data.selector);\r\n \r\n if (item != null && item.item != null) {\r\n this.short['goto'] = this.gotoNoBlocking(world, item.x, item.y);\r\n } else if (this.whereIsItem(objective.data.noun.data.selector)) {\r\n const location = this.whereIsItem(objective.data.noun.data.selector)!;\r\n this.short['goto'] = this.gotoNoBlocking(world, location.x, location.y);\r\n } else { // otherwise, go somewhere random!\r\n this.short['searched'] = [...(this.short['searched'] ?? []), [this.x, this.y]];\r\n let x = Math.min(Math.max(this.x + Math.round(Math.random() * 20 - 10), 0), world.size - 1);\r\n let y = Math.min(Math.max(this.y + Math.round(Math.random() * 20 - 10), 0), world.size - 1);\r\n let limit = 0;\r\n while (this.short['searched'].find(([sx, sy]) => sx > x - 10 && sx < x + 10 && sy > y - 10 && sy < y + 10)) {\r\n x = Math.min(Math.max(this.x + Math.round(Math.random() * (20 + limit * 4) - (10 + limit * 2)), 0), world.size - 1);\r\n y = Math.min(Math.max(this.y + Math.round(Math.random() * (20 + limit * 4) - (10 + limit * 2)), 0), world.size - 1);\r\n limit += 1;\r\n if (limit > 10) {\r\n break;\r\n }\r\n }\r\n this.short['goto'] = this.gotoNoBlocking(world, x, y);\r\n }\r\n }\r\n\r\n }\r\n\r\n if (this.nextAction.type === ActionType.Nothing && Math.random() < 0.5) {\r\n this.nextAction = this.moveRandomly(world, indices);\r\n }\r\n \r\n \r\n }\r\n\r\n gotoNoBlocking(world: World, x: number, y: number) {\r\n console.log('GOTO NOT BLOCKING:', x, y, world.get(x, y), world.get(x,y) && world.get(x, y)!.item.tags.includes('blocking'));\r\n if (world.get(x, y) != null && world.get(x, y)!.item.tags.includes('blocking')) {\r\n for (const [xx, yy] of [[x, y + 1], [x, y - 1], [x + 1, y], [x - 1, y]]) {\r\n if (world.get(xx, yy) == null || !world.get(xx, yy)!.item.tags.includes('blocking')) {\r\n return { x: xx, y: yy };\r\n }\r\n }\r\n return { x, y };\r\n } else {\r\n return { x, y };\r\n }\r\n }\r\n\r\n moveRandomly(world: World, indices: { x: number, y: number }[]) {\r\n const dirs = [Direction.Up, Direction.Left, Direction.Down, Direction.Right].filter(dir => {\r\n const next = indices[dir];\r\n return world.get(next.x, next.y) == null || !world.get(next.x, next.y)!.item.tags.includes('blocking');\r\n });\r\n if (dirs.length > 0) {\r\n return Action.Move(dirs[Math.floor(Math.random() * dirs.length)] as Direction);\r\n } else {\r\n return Action.Move(1 + Math.floor(Math.random() * 4) as Direction);\r\n }\r\n }\r\n \r\n addItemToMemory(world: World, x: number, y: number, now: number) {\r\n if (world.get(x, y) != null) {\r\n this.memory.push(Memory.Location(Noun.Thing({ conditions: [{ type: ItemConditionTypes.Is, data: world.get(x, y)!.item.id }] }), x, y, now));\r\n }\r\n }\r\n\r\n tryToDrop(world: World, indices: { x: number, y: number }[], now: number) {\r\n this.short['justDropped'] = true;\r\n for (let i = 0; i < indices.length; i += 1) {\r\n if (world.get(indices[i].x, indices[i].y) == null) {\r\n this.nextAction = Action.Interact(i as Direction);\r\n this.memory.push(Memory.Location(Noun.Thing({ conditions: [{ type: ItemConditionTypes.Is, data: this.holding!.item.id }] }), indices[i].x, indices[i].y, now));\r\n return true;\r\n }\r\n }\r\n this.nextAction = this.moveRandomly(world, indices);\r\n return false;\r\n }\r\n\r\n nearestItem(world: {x: number, y: number, item: ItemState | null}[], selector: ItemConditions) {\r\n const items = world.filter(({ item }) => item != null && ItemConditions.matches(selector, item.item));\r\n if (items.length === 0) {\r\n return null;\r\n }\r\n return items.sort((a, b) => {\r\n const aDist = (a.x - this.x) ** 2 + (a.y - this.y) ** 2;\r\n const bDist = (b.x - this.x) ** 2 + (b.y - this.y) ** 2;\r\n return aDist - bDist;\r\n })[0];\r\n }\r\n\r\n nearestItemWithoutNearbyPerson(world: {x: number, y: number, item: ItemState | null}[], selector: ItemConditions, people: Person[]) {\r\n const items = world.filter(({ item }) => item != null && ItemConditions.matches(selector, item.item));\r\n if (items.length === 0) {\r\n return null;\r\n }\r\n const peopleDist = items.map(({ x, y }) => people.reduce((a, b) => Math.min(a, (b.x - x) ** 2 + (b.y - y) ** 2), Infinity));\r\n return items.sort((a, b) => {\r\n const aDist = ((a.x - this.x) ** 2 + (a.y - this.y) ** 2) / (peopleDist[items.indexOf(a)] + 1);\r\n const bDist = ((b.x - this.x) ** 2 + (b.y - this.y) ** 2) / (peopleDist[items.indexOf(b)] + 1);\r\n return aDist - bDist;\r\n })[0];\r\n\r\n }\r\n\r\n completeAltObjective(index: number) {\r\n const marked = new Set();\r\n const queue = [index];\r\n const map = this.objectives.map(obj => obj.type === ObjectiveType.Obtain ? obj.data.noun : null);\r\n\r\n this.short['goto'] = null;\r\n this.short['path'] = null;\r\n\r\n while (queue.length > 0) {\r\n const current = queue.pop()!;\r\n marked.add(current);\r\n if (this.objectives[current].type === ObjectiveType.Obtain) {\r\n this.objectives[current].data.children.forEach((child: number) => {\r\n if (!marked.has(child)) {\r\n queue.push(child);\r\n }\r\n });\r\n }\r\n }\r\n this.objectives = this.objectives.filter((_, i) => !marked.has(i));\r\n this.objectives.forEach(objective => {\r\n if (objective.type === ObjectiveType.Obtain) {\r\n objective.data.children = objective.data.children.filter((child: number) => !marked.has(child)).map((child: number) => this.objectives.findIndex(obj => obj.data.noun === map[child]));\r\n }\r\n });\r\n }\r\n\r\n /*\r\n computePath(world: World, x: number, y: number, obstacles: {x: number, y: number}[] = []): { [key: number]: Direction } | null {\r\n // A* pathfinding, cannot move through items tagged 'blocking'\r\n // returns a map of which index we're at and which direction to move from there.\r\n\r\n const heuristic = (index: number) => {\r\n const dx = index % WORLD_SIZE - x;\r\n const dy = Math.floor(index / WORLD_SIZE) - y;\r\n return Math.sqrt(dx ** 2 + dy ** 2);\r\n }\r\n\r\n const obstaclesSet = new Set(obstacles.map(({ x, y }) => y * WORLD_SIZE + x));\r\n\r\n const start = this.index();\r\n const end = Math.min(Math.max(y, 0), WORLD_SIZE - 1) * WORLD_SIZE + Math.min(Math.max(x, 0), WORLD_SIZE - 1);\r\n\r\n if (start === end) {\r\n return {};\r\n }\r\n if (obstaclesSet.has(end)) {\r\n return null;\r\n }\r\n\r\n const open: number[] = [start];\r\n const closed = new Set();\r\n\r\n const cost: { [key: number]: number } = {};\r\n const parent: { [key: number]: number | null } = {};\r\n\r\n cost[start] = 0;\r\n parent[start] = null;\r\n\r\n let i = 0;\r\n while (open.length > 0) {\r\n const current = open.reduce((a, b) => cost[a] ?? 0 + heuristic(a) < cost[b] ?? 0 + heuristic(b) ? a : b, open[0]);\r\n if (current === end) {\r\n break;\r\n }\r\n \r\n open.splice(open.indexOf(current), 1);\r\n closed.add(current);\r\n\r\n const neighbors = [\r\n current - WORLD_SIZE,\r\n current - 1,\r\n current + 1,\r\n current + WORLD_SIZE,\r\n ];\r\n\r\n for (const neighbor of neighbors) {\r\n const nx = neighbor % WORLD_SIZE;\r\n const ny = Math.floor(neighbor / WORLD_SIZE);\r\n if (nx < 0 || ny < 0 || nx >= WORLD_SIZE || ny >= WORLD_SIZE) {\r\n continue;\r\n }\r\n if (closed.has(neighbor)) {\r\n continue;\r\n }\r\n if (obstaclesSet.has(neighbor)) {\r\n continue;\r\n }\r\n if (world[neighbor] != null && world[neighbor]!.item.tags.includes('blocking')) {\r\n continue;\r\n }\r\n const newCost = cost[current] + 1;\r\n if (!open.includes(neighbor)) {\r\n open.push(neighbor);\r\n } else if (newCost >= cost[neighbor]) {\r\n continue;\r\n }\r\n cost[neighbor] = newCost;\r\n parent[neighbor] = current;\r\n }\r\n\r\n i += 1;\r\n if (i > 10000) {\r\n console.log('search exceeded 10000 node limit');\r\n break;\r\n }\r\n }\r\n\r\n if (open.length === 0) {\r\n console.log('ran out of nodes?', i);\r\n }\r\n \r\n if (parent[end] == null) {\r\n console.log('no path found', this.x, this.y, x, y);\r\n return null;\r\n }\r\n\r\n const path: { [key: number]: Direction } = {};\r\n let current = end;\r\n while (current !== start) {\r\n const next = parent[current]!;\r\n if (next === current - WORLD_SIZE) {\r\n path[next] = Direction.Down;\r\n } else if (next === current - 1) {\r\n path[next] = Direction.Right;\r\n } else if (next === current + 1) {\r\n path[next] = Direction.Left;\r\n } else if (next === current + WORLD_SIZE) {\r\n path[next] = Direction.Up;\r\n }\r\n current = next;\r\n }\r\n return path;\r\n } */\r\n\r\n locationMemory(item: Item) {\r\n return this.memory.find(memory => memory.type === MemoryType.Location && memory.data.noun.type === NounType.Thing && ItemConditions.matches(memory.data.noun.data.selector, item));\r\n }\r\n\r\n whereIsItem(item: ItemConditions) {\r\n const memory = this.memory.find(memory => \r\n memory.type === MemoryType.Location \r\n && memory.data.noun.type === NounType.Thing \r\n && ItemConditions.matches( \r\n item,\r\n REGISTRY.getItem(REGISTRY.query(memory.data.noun.data.selector)[0] || 0)\r\n ));\r\n if (memory == null) {\r\n return null;\r\n }\r\n return memory.data;\r\n }\r\n\r\n completeObjective() {\r\n const lastIndex = this.objectives.length - 1;\r\n this.objectives.forEach(objective => {\r\n if (objective.type === ObjectiveType.Obtain) {\r\n objective.data.children = objective.data.children.filter((child: number) => child !== lastIndex);\r\n }\r\n });\r\n this.objectives.pop();\r\n this.short = {};\r\n }\r\n\r\n addObjective(objective: Objective, parent?: Objective) {\r\n if (parent != null && parent.type === ObjectiveType.Obtain && objective.type === ObjectiveType.Obtain) {\r\n parent.data.children.push(this.objectives.length);\r\n }\r\n this.objectives.push(objective);\r\n this.short = {};\r\n }\r\n\r\n act() {\r\n if (this.nextAction != null) {\r\n return this.nextAction;\r\n } else {\r\n return Action.Nothing();\r\n }\r\n }\r\n\r\n outerIndex() {\r\n return Math.floor(this.y / CHUNK_SIZE) * WORLD_SIZE + Math.floor(this.x / CHUNK_SIZE);\r\n }\r\n\r\n innerIndex() {\r\n return (this.y % CHUNK_SIZE) * CHUNK_SIZE + (this.x % CHUNK_SIZE);\r\n }\r\n \r\n}\r\n\r\nexport function generateGroup(now: number, world: World) {\r\n const surname = generateName();\r\n const size = Math.round(Math.random() * 4 + 2);\r\n const x = Math.round(Math.random() * world.size);\r\n const y = Math.round(Math.random() * world.size);\r\n\r\n const group: Person[] = [];\r\n const takenPositions: [number, number][] = [];\r\n\r\n for (let i = 0; i < size; i += 1) {\r\n const name = generateName();\r\n let px = x;\r\n let py = y;\r\n while (takenPositions.find(([tx, ty]) => tx === px && ty === py) || world.get(px, py) != null) {\r\n px = Math.min(Math.max(x + Math.round(Math.random() * 20 - 10), 0), world.size - 1);\r\n py = Math.min(Math.max(y + Math.round(Math.random() * 20 - 10), 0), world.size - 1);\r\n }\r\n takenPositions.push([px, py]);\r\n group.push(new Person(generateId(), name, surname, now, px, py));\r\n }\r\n for (const person of group) {\r\n for (const other of group) {\r\n if (person === other) {\r\n continue;\r\n }\r\n person.reputations[other.id] = 100;\r\n person.memory.push(Memory.Exists(Noun.Person(other.id), now));\r\n person.health = 80 + Math.random() * 20;\r\n person.home = { x, y };\r\n }\r\n }\r\n return group;\r\n}\r\n\r\nexport function assignReputations(people: Person[]) {\r\n for (const person of people) {\r\n for (const other of people) {\r\n if (person === other) {\r\n continue;\r\n }\r\n if (person.reputations[other.id] === undefined) {\r\n person.reputations[other.id] = 0;\r\n }\r\n if (person.female() != other.female()) { // heterosexual FOR NOW :)\r\n person.reputations[other.id] += 50;\r\n }\r\n person.reputations[other.id] += Math.round(Math.random() * 20 - 10);\r\n }\r\n }\r\n\r\n}\r\n\r\n"],"names":[],"version":3,"file":"index.d593055f.js.map","sourceRoot":"/__parcel_source_root/"}