<<set $power -= 500>><<set $fixedProbe = 1>>With a shower of sparks, the probe comes back online. It chirps and hovers across the room, eager to start its work.\n\n<<link "roomRight" "[Continue]">>
<<set $sabatierOverloadLevel -= 1>>You press a button, decreasing the flow of auxiliary power to the Sabatier System. The water within its tubes bubbles a bit before the flow slows and normalizes.\n\n<<link "roomSabatier" "[Continue]">>
<<linkMany "leftPane" "testLeft" "rightPane" "testRight" "go back!">>
<<set $sabatierOverloadLevel = 0>>You key in a command, quickly cutting off all auxility power to the Sabatier System. Tubes twitch under the sudden change in pressure, but after a moment the machine settles back into its normal rhythm.\n\n<<link "roomSabatier" "[Continue]">>
<<set $terrariumPowerLevel = 0>>You swipe your finger across the terrarium's glass, entering the command to cease operations. The mechanical arm slows and returns to its resting position, while existing sprouts are left to fend for themselves.\n\n<<link "roomTerrarium" "[Continue]">>
Behind a layer of glass lies the terrarium. You can feel a hint of warmth coming from the lights within.<<if $terrariumPowerLevel eq 0>> A thin covering of dirt is scattered across the bottom, while a mechanical arm hangs from the ceiling, ready to manipulate the terrarium's contents.<<else>> A mechanical arm drifts back and forth, tending to several small green sprouts.<<endif>>\n\nCapacitive buttons built into the glass allow you to send instructions to the terrarium. Currently, its production speed is set to <<print $terrariumPowerLevel>>.\n\n<<link "terrariumPowerUp" "[Increase production]">><<if $terrariumPowerLevel gt 0>>\n<<link "terrariumPowerDown" "[Decrease production]">>\n<<link "terrariumPowerOff" "[Reset production]">><<endif>>
<<display "variableInit">>It's dark and cold. You feel chunks of ice cracking under your feet. You are in [[a room|findLights]].
<<cyclinglink "grass" "a flower" "a cloud" "the road">>\n\n<<cyclinglink "3 cookies" "2 cookies" "1 cookie" "a few crumbs" end>>\n\n<<cyclinglink $heat "off" "low" "high" "fearsome">>
<<nobr>>\n<<set $day = 0>>\n<<set $totalDays = 3650>>\n<<set $commProgress = 0>>\n\n<<set $discoveredTerrarium = 0>>\n<<set $discoveredSabatier = 0>>\n<<set $discoveredNutrientCube = 0>>\n<<set $discoveredFoodDecompression = 0>>\n\n<<set $terrariumPowerLevel = 0>>\n<<set $sabatierOverloadLevel = 0>>\n<<set $improvedSabatier = false>>\n\n<<set $power = 300>>\n<<set $water = 100>>\n<<set $food = 250>>\n<<set $material = 50>>\n\n<<set $junkRemaining = 5>>\n<<set $fixedProbe = 0>>\n\n<<set $solarCells = 0>>\n<<set $improvedSolarCells = false>>\n<<endnobr>>
>>You're doing well, but remember that your food won't last the whole trip. Make sure you have a plan in place before it's too late.\n\n>>Take advantage of what power and materials you have at your disposal, water and food are what you need to survive, after all.\n\n>>Although, keep in mind that the core life support systems do require some level of power to be present at all times.\n\n[Comm link session closed remotely]<<set $commProgress = 2>>\n\n[[[Continue]|computer]]
<<set $terrariumPowerLevel -= 1>>You place a finger on the terrarium's glass and it emits a descending chime. The motions of the mechanical arm slow.\n\n<<link "roomTerrarium" "[Continue]">>
.transition-in .char {\n\tcolor:transparent !important;\n\ttext-shadow: #fff 0 0 1em;\n}\n.passage:not(.transition-out) .char {\n\ttransition: 2s;\n\t-webkit-transition: 2s;\n}\n.transition-out {\n\tdisplay:none;\n}
The mining probe requires a burst of 500 units of power in order to become operational. Once repaired, it will continually harvest materials.\n\n<<if $power gte 500>><<link "fixProbeGO" "[Use power]">>\n<<endif>><<link "roomRight" "[Cancel]">>
<<set $sabatierOverloadLevel += 1>>You press a button, increasing the flow of auxiliary power to the Sabatier System. It groans briefly under the increased load before stabilizing.\n\n<<link "roomSabatier" "[Continue]">>
<center><big>Decade</big>\nby @graebor\n\nMade for Ludum Dare 37\nTheme: "One Room"\n\n<hr>\n<big>[[[Play]|Start2]]</big></center>
<<pane "topPane" "resources">><<pane "leftPane" "computerLeftBase">><<pane "rightPane" "computerRightBase">>
[Sabatier Optimization]\n\nWhile the Sabatier System is already a highly refined piece of machinery, potential optimizations do still exist.\n\nInvesting in this upgrade will reduce the amount of power that the overloaded Sabatier System will consume.\n\nCost:\n500 Material\n\nActions:\n<<if $material gte 500>>...<<link "completeImprovedSabatier" "[Print]" 1>>\n<<endif>>...<<link "computerRightBase" "[Cancel]" 1>>
>>While we do recommend you attempt to survive by any means necessary, we are legally obligated to inform you that overuse of nutrient cube synthesis will invalidate your health insurance plan.\n\n>>Plus, we know they taste terrible. See if you can't figure out a better, perhaps more permanent, solution.\n\n[Comm link session closed remotely]<<set $discoveredNutrientCube = 2>>\n\n[[[Continue]|computer]]
.........................\n\n<<set $improvedSabatier = true>><<set $material -= 500>>Sabatier System optimizations processed and applied. Power consumption per overload level has been reduced.\n\n<<link "computerRightBase" "[Continue]" 1>>
<<set $red=1>>Hi.\n<<timedloop 1s>>You have <<set $red += 1>><<print $red>> seed pods.<<endtimedloop>>
This is the test of the typewriter transition script.
.header {\n\tposition:fixed;\n\ttop: 0;\n\tleft: 0;\n\tmargin: 0;\n\twidth:100%;\n\theight:100%;\n\tbackground-color:transparent;\n\ttransition: 3s;\n\t-webkit-transition: 3s;\n\tz-index: -10;\n}\n.transition-in > .header {\n\tbackground-color:black;\n\tz-index: 1000;\n}\n.transition-out {\n\tdisplay:none;\n}\n.transition-in .char {\n\tcolor:transparent !important;\n\ttext-shadow: #fff 0 5 1em;\n}\n.passage:not(.transition-out) .char {\n\ttransition: 4s;\n\t-webkit-transition: 4s;\n}
Test right!\n<<linkMany "leftPane" "test3" "rightPane" "test3" "this link targets both panes">>
<<set $junkRemaining -= 1>><<set $material += 45>>You gather up some pieces of scrap, sorting out metals and plastics that look like they could be recycled into other products.\n\nYou've gained 45 materials.\n\n<<link "roomRight" "[Continue]">>
<<linkTo "rightPaneRoom" "roomRight" "- Room">><<if $discoveredSabatier gt 0>>\n<<linkTo "rightPaneRoom" "roomSabatier" "- Sabatier System">><<endif>><<if $discoveredTerrarium gt 0>>\n<<linkTo "rightPaneRoom" "roomTerrarium" "- Terrarium">><<endif>>\n\n[[- Computer|desktopWithFlash]]
Lights stream against the outer windows as the craft decelerates. A round smear of green makes itself visible towards the front, seeming to unfold from an invisible rift in the void of space. Before long, it is massive, enveloping your vision.\n\n[[[Continue]|gameoverWin2]]
The water supply has dried up, and your journey comes to an end. <<roundedNumber $day>> days after your awakening, you succumb to dehydration.\n\n[[[Retry]|Start]]
Pulling on an emergency exo-suit, you fumble against the wall, trying to find a light. Cold chunks of ice crumble and fall from your legs to the floor, and mist rises from your body as your muscles come back online. The dim light of the stars outside gives you just enough visual information to locate and flip a switch. In the new, harsh light, you see a [[computer terminal|computerIntro1]], which comes to life in a green flash.
[3D Printer control]\n\nAvailable fabrication routines\n...<<link "infoSolarCell" "[Solar Cell]" 1>><<if ($solarCells gt 0 && $improvedSolarCells eq false)>>\n...<<link "infoImprovedSolarCells" "[High Density Solar]" 1>><<endif>>\n...<<link "infoNutrientCube" "[Nutrient Cube]" 1>>\n...<<link "infoFoodDecompression" "[Ration Decompression]" 1>><<if ($improvedSabatier eq false && $discoveredSabatier gte 2)>>\n...<<link "infoImprovedSabatier" "[Sabatier Optimization]" 1>><<endif>>
<<set $discoveredSabatier = 1>>One of the machines is a complicated series of valves and tubes which you don't fully understand. Upon closer inspection of the labels, you read that this is the [[Sabatier System|room]], responsible for generating and recycling your water supply.
>>The programs on the computer will help you, but don't forget to log out and look around the room as well. There should be a few systems in there you can take advantage of.\n\n>>We know it's probably not much of a comfort, but the first 230 years of your trip went extremely well. So what's another 10, right?\n\n>>We're all rooting for you. We always have been.\n\n[Comm link session closed remotely]<<set $commProgress = 1>>\n\n[[[Continue]|computer]]
[Solar Cell]\n\nWill provide a small amount of energy over time. Can be synthesized by the printer using a small amount of raw materials.\n\nCost:\n50 Material\n\nActions:\n<<if $material gte 50>>...<<link "completeSolarCell" "[Print]" 1>>\n<<endif>>...<<link "computerRightBase" "[Cancel]" 1>>
<<set $discoveredTerrarium = 1>>Amongst the machines is large glass box, built into the wall of the room. Upon closer inspection, you realize it is a [[terrarium|room]].
Decade
(function(){postrender.typewriter = function (b) {\nif(this.tags){var r=new RegExp("t8n.typewriter.([0-9]+)(?:[^0-9]|$)","g");var t=r.exec(this.tags.toString());\nif(t){typeout(b,t[1]+0);}}return b;};var typeout=function(c,t){var Furl=function(current){this.n=current;\nthis.out=false;this.data=current.nodeValue;current.nodeValue="";this.kids=[];var cn=current.childNodes;\nif(current.style && current.style.display=="none"){return;}while(cn.length>0){var f=new Furl(cn[0]);\ncurrent.removeChild(cn[0]);f.out=true;this.kids.push(f);}};var nodes=new Furl(c);\nvar unfurl=function(furled,d){var n=furled.n;if(furled.out){d.appendChild(n);furled.out=false;\n}if(furled.data){n.nodeValue+=furled.data[0];furled.data=furled.data.slice(1);return true;\n}for(var j=0;j<furled.kids.length;j++){var ret=unfurl(furled.kids[j],n);if(ret){return true;\n}}return false;};var title=state.history[0].passage.title;var intr=setInterval(function(){if(state.history[0].passage.title==title&&unfurl(nodes,null)){return;\n}clearInterval(intr);},t);};}());
* <<timedgoto "underwater" 2.5s >> goes to the "underwater" passage if you stay at the current passage for 2 and 1/2 seconds.\n* <<timedgoto $deathpassage 5s >> goes to the passage whose name is in the $deathpassage variable if you stay at the current passage for 5 seconds.\n* <<timedgoto $playerType + "pit" 1s >> goes to the $playerType + "pit" passage if you stay at the current passage for 1 second.\n* <<goto "Throne">> - This shorter version functions the same as <<timedgoto "Throne" 0s>>
<<timedreplace 3s>>First<<becomes>>Second<<endtimedreplace>>\n\n<<hoverreplace "HoverFirst">>HoverSecond<<endhoverreplace>>\n\n<<replace "First">>Second<<becomes>>Third<<becomes>>Fourth<<gains>>-and-a-half<<endreplace>>.\n\nYou see <<replace "a half-eaten cake">>a plate of crumbs<<endreplace>>\n\nYou see <<replace "ten dollars">>five dollars<<becomes>>two dollars<<becomes>>fifty cents<<endreplace>>\n\nYou see <<replace>>a //big// boulder!<<becomes>>some pebbles.<<endreplace>>\n\nI find it <<insert "repugnant">>that he's made such comments<<endinsert>>.\n\nYou go outside. <<continue "Next.">>The sun blinds you momentarily.<<continue "Next.">>Has it been so long?\n\n<<revision side>>Off to the side is a <<revise side "stable">> for the wagon-pulling animals.<<becomes>>Some other text.<<endrevision>>\n\n
<<timedloop 1s>><<nobr>>\n<<set $hasPower = true>>\n<<set $day += 2.25>>\n<<set $dayPerc = ($day / $totalDays * 100)>>\n<<set $year = ($day / 365)>>\n\n<<set $powerDelta = 0>>\n<<if $improvedSolarCells eq true>>\n\t<<set $powerDelta += $solarCells>>\n<<else>>\n\t<<set $powerDelta += $solarCells / 2>>\n<<endif>>\n<<if $improvedSabatier eq true>>\n\t<<set $powerDelta -= ($sabatierOverloadLevel * 1.25)>>\n<<else>>\n\t<<set $powerDelta -= ($sabatierOverloadLevel * 2)>>\n<<endif>>\n<<set $powerDelta -= ($terrariumPowerLevel * 0.75)>>\n\n<<set $foodDelta = -0.5>>\n<<set $foodDelta += ($terrariumPowerLevel / 1.25)>>\n\n<<set $waterDelta = 0>>\n<<set $waterDelta += ($sabatierOverloadLevel / 2)>>\n<<set $waterDelta -= ($terrariumPowerLevel / 2)>>\n\n<<set $materialDelta = 0>>\n<<if $fixedProbe gt 0>>\n\t<<set $materialDelta += 0.5>>\n<<endif>>\n\n<<set $power += $powerDelta>>\n<<set $material += $materialDelta>>\n\n<<if $power lte 0>>\n<<set $hasPower = false>>\n<<set $power = 0>>\n<<set $foodDelta = -1>>\n<<set $waterDelta = -1>>\n<<endif>>\n\n<<set $food += $foodDelta>>\n<<set $water += $waterDelta>>\n\n<<endnobr>>Progress: <<roundedNumber $dayPerc>>% (Year <<roundedNumber $year>>)\n\nPower: <<roundedNumber $power>> <<if $powerDelta neq 0>>@@color:white;(<<if $powerDelta gte 0>>+<<endif>><<print $powerDelta>>)@@<<endif>>\nWater: <<roundedNumber $water>> <<if $waterDelta neq 0>>@@color:white;(<<if $waterDelta gte 0>>+<<endif>><<print $waterDelta>>)@@<<endif>>\nFood: <<roundedNumber $food>> <<if $foodDelta neq 0>>@@color:white;(<<if $foodDelta gte 0>>+<<endif>><<print $foodDelta>>)@@<<endif>>\nMaterials: <<roundedNumber $material>> <<if $materialDelta neq 0>>@@color:white;(<<if $materialDelta gte 0>>+<<endif>><<print $materialDelta>>)@@<<endif>><<if $hasPower eq false>>\n@@color:red;[POWER LOSS, LIFE SUPPORT IN DANGER]@@<<endif>>\n\n@@color:#555;background-color:#555;<hr>@@\n<<nobr>>\n\n<<if $day gte $totalDays>><<goto "gameoverWin">><<else>>\n<<if $food lte 0>><<goto "gameoverFood">><<else>>\n<<if $water lte 0>><<goto "gameoverWater">><<endif>>\n<<endif>>\n<<endif>>\n\n<<endnobr>><<endtimedloop>>
Test left!\n\nHi. You will leave this passage in 2 seconds, hopefully.\n\n<<timedlink "testRight" 2s>>
function round(value, decimals) {\n return Number(Math.round(value + 'e' + decimals) + 'e-' + decimals);\n}\nmacros['roundedNumber'] =\n{\n handler: function (place, macroName, params, parser) {\n var t;\n var v = params[0][0] == "$" ? eval(Wikifier.parse(params[0])) : params[0];\n if (params.length == 2) {\n t = round(v + 0, params[1] + 0);\n }\n else {\n t = round(v + 0, 0);\n }\n new Wikifier(place, t + "");\n }\n}
>>You seem to have quite a solid grasp on things at this point. We're going to discontinue further mission updates and allow you time to focus.\n\n>>We will contact you again once you are nearing the colony.\n\n[Comm link session closed remotely]<<set $commProgress = 3>>\n\n[[[Continue]|computer]]
(function () {\n version.extensions['timedloopMacro'] = {\n major: 1,\n minor: 1,\n revision: 0\n };\n macros['timedloop'] = {\n handler: function (g, e, f, b) {\n function cssTimeUnit(s) {\n if (typeof s == "string") {\n if (s.slice(-2).toLowerCase() == "ms") {\n return Number(s.slice(0, -2)) || 0;\n }\n else if (s.slice(-1).toLowerCase() == "s") {\n return Number(s.slice(0, -1)) * 1000 || 0;\n }\n }\n throwError(g, s + " isn't a CSS time unit");\n return 0;\n }\n\n function tagcontents(starttag, endtag, k) {\n var a = b.source.slice(k);\n var l = 0;\n var c = "";\n for (var i = 0; i < a.length; i++) {\n var w = endtag.length;\n if (a.substr(i, w) == endtag) {\n if (l == 0) {\n b.nextMatch = k + i + w;\n return c;\n }\n else {\n l--;\n c += a.charAt(i);\n }\n }\n else {\n if (a.substr(i, starttag.length) == starttag) {\n l++;\n }\n c += a.charAt(i);\n }\n }\n return "";\n }\n var tl = "<<" + e;\n var etl = "<<end" + e + ">>";\n var k = b.source.indexOf('>>', b.matchStart) + 2;\n var d = tagcontents(tl, etl, k);\n var tm;\n tm = cssTimeUnit(f[0]);\n var h;\n if (d) {\n var m = insertElement(g, "span", null, "timedloop", null);\n new Wikifier(m, d);\n setTimeout(function to() {\n if (m && elexists(m)) {\n var oldm = m;\n oldm.classList.add("replacement-out");\n setTimeout(function () {\n if (oldm) {\n if (oldm.parentNode) oldm.parentNode.removeChild(oldm);\n }\n }, Math.min(tm, 1000));\n m = insertElement(null, "span", null, "timedloop replacement-in", null);\n new Wikifier(m, d);\n setTimeout(function () {\n if (m) m.classList.remove("replacement-in");\n }, 1);\n oldm.parentNode.insertBefore(m, oldm.nextSibling);\n scrollWindowTo(m);\n setTimeout(to, tm);\n }\n }, tm);\n }\n else {\n throwError(g, "can't find matching end" + e);\n return;\n }\n }\n }\n elexists = function (e) {\n while (e = e.parentNode) {\n if (e === document) return true;\n }\n }\n macros['endtimedloop'] = {\n handler: function () { }\n }\n scrollWindowTo = function (E) {\n var D = window.scrollY;\n var G = J(E);\n if (!G) return;\n var C = Math.abs(D - G);\n var B = 0;\n var I = (D > G) ? -1 : 1;\n var F = window.setInterval(H, 25);\n\n function H() {\n B += 0.1;\n window.scrollTo(0, D + I * (C * Math.easeInOut(B)));\n if (B >= 1) {\n window.clearInterval(F)\n }\n }\n\n function J(N) {\n var O = A(N);\n var P = O + N.offsetHeight;\n var L = window.innerHeight;\n var M = D + L;\n if (O >= D && P > M) {\n return ((N.offsetHeight < L) ? O - (L - N.offsetHeight) + 20 : O)\n }\n }\n\n function A(K) {\n var L = 0;\n while (K.offsetParent) {\n L += K.offsetTop;\n K = K.offsetParent;\n }\n return L\n }\n }\n}());
jquery:off\nhash:off\nbookmark:on\nmodernizr:off\nundo:off\nobfuscate:off\nexitprompt:off\nblankcss:off\n
<<set $testVar = 1.36567>>\n\n<<roundedNumber $testVar>> Test!
.timedloop.replacement-in {\n\tdisplay: none;\n}\n.timedloop {\n\ttransition: 0s;\n\t-webkit-transition: 0s;\n}\n.timedloop.replacement-out {\n\tdisplay:none;\n}
function reshowAll(e) {\n var t = document.querySelectorAll(".passage ." + e.replace(" ", "_")), n2 = false;\n for (var r = 0; r < t.length; r++) {\n n2 = reshow(t[r])\n }\n return n2\n}\nfunction reshowAllAsync(e, t2) {\n var t = document.querySelectorAll(".passage ." + e.replace(" ", "_")), n2 = false;\n for (var r = 0; r < t.length; r++) {\n n2 = reshow(t[r])\n var typeout = function (c, t) {\n var Furl = function (current) {\n this.n = current;\n this.out = false; this.data = current.nodeValue; current.nodeValue = "";\n this.kids = [];\n var cn = current.childNodes;\n if (current.style && current.style.display == "none") { return; }\n while (cn.length > 0) {\n var f = new Furl(cn[0]);\n current.removeChild(cn[0]);\n f.out = true;\n this.kids.push(f);\n }\n }; var nodes = new Furl(c);\n var unfurl = function (furled, d) {\n var n = furled.n; if (furled.out) {\n d.appendChild(n); furled.out = false;\n } if (furled.data) {\n n.nodeValue += furled.data[0]; furled.data = furled.data.slice(1); return true;\n } for (var j = 0; j < furled.kids.length; j++) {\n var ret = unfurl(furled.kids[j], n); if (ret) {\n return true;\n }\n } return false;\n }; var title = state.history[0].passage.title; var intr = setInterval(function () {\n if (state.history[0].passage.title == title && unfurl(nodes, null)) {\n return;\n } clearInterval(intr);\n }, t);\n };\n typeout(t[r], t2 + 0);\n }\n return n2\n}\nfunction reshow(e) {\n e.innerHTML = "";\n new Wikifier(e, e.tweecode);\n e.classList.remove("revision-span-out");\n e.classList.add("revision-span-in");\n if (e.timeout) { clearTimeout(e.timeout) }\n e.timeout = setTimeout(function () { e.classList.remove("revision-span-in") }, 1)\n}\nmacros.pane = {\n handler: function (place, macroName, params, parser) {\n var name = params[0][0] == "$" ? eval(Wikifier.parse(params[0])) : params[0];\n var passage = params[1][0] == "$" ? eval(Wikifier.parse(params[1])) : params[1];\n var pane = document.createElement("span");\n var contents = document.createElement("span");\n pane.id = name.replace(" ", "_");\n contents.className = " " + name.replace(" ", "_");\n contents.tweecode = '<<set $_ to $_current.push ("' + name + '")>><<display $_' + name + ">><<set $_ to $_current.pop()>>";\n var h = state.history[0].variables;\n h["_" + name] = passage;\n if (typeof h._current == "undefined") { h._current = [] }\n pane.insertBefore(contents, null);\n place.insertBefore(pane, null);\n new Wikifier(contents, contents.tweecode)\n }\n};\nmacros.link = macros.linkTo = {\n handler: function (place, macroName, params, parser) {\n var to, text, target;\n var doType, typeSpeed;\n var gotoTime;\n var h = state.history[0].variables;\n if (typeof h._current == "undefined") { h._current = [] }\n if (macroName == "link") {\n if (params.length < 2) {\n throwError(place, macroName + " macro needs 2 parameters"); return\n }\n to = params[0][0] == "$" ? eval(Wikifier.parse(params[0])) : params[0];\n text = params[1][0] == "$" ? eval(Wikifier.parse(params[1])) : params[1];\n target = h._current[h._current.length - 1]\n if (params.length == 3) {\n doType = true;\n typeSpeed = params[2];\n gotoTime = 0;\n }\n else if (params.length == 4)\n {\n doType = true;\n typeSpeed = params[2];\n gotoTime = params[3];\n }\n else {\n doType = false;\n }\n }\n else {\n if (params.length < 3) {\n throwError(place, macroName + " macro needs 3 parameters"); return\n }\n target = params[0][0] == "$" ? eval(Wikifier.parse(params[0])) : params[0];\n to = params[1][0] == "$" ? eval(Wikifier.parse(params[1])) : params[1];\n text = params[2][0] == "$" ? eval(Wikifier.parse(params[2])) : params[2]\n if (params.length == 4)\n {\n doType = true;\n typeSpeed = params[3];\n gotoTime = 0;\n }\n else if (params.length == 5)\n {\n doType = true;\n typeSpeed = params[3];\n gotoTime = params[4];\n }\n else\n {\n doType = false;\n }\n }\n var link = Wikifier.createInternalLink();\n link.className = "internalLink paneLink";\n link.id = to;\n link.insertBefore(document.createTextNode(text), null);\n link.onclick = function () {\n h["_" + target] = to;\n if (doType) {\n reshowAllAsync(target, typeSpeed);\n }\n else {\n reshowAll(target)\n }\n };\n place.insertBefore(link, null)\n }\n};\nmacros.linkMany = {\n handler: function (place, macroName, params, parser) {\n if (params.length < 3 || params.length % 2 != 1) {\n throwError(place, macroName + ": invalid args, needs [pane passage...] link text"); return\n }\n var h = state.history[0].variables;\n if (typeof h._current == "undefined") {\n h._current = []\n }\n var text = params[params.length - 1][0] == "$" ? eval(Wikifier.parse(params[params.length - 1])) : params[params.length - 1];\n var to, target;\n var link = Wikifier.createInternalLink();\n link.className = "internalLink paneLink";\n link.insertBefore(document.createTextNode(text), null);\n link.onclick = function () {\n while (params.length != 1) {\n target = params.shift();\n target = text[0] == "$" ? eval(Wikifier.parse(target)) : target;\n to = params.shift();\n to = to[0] == "$" ? eval(Wikifier.parse(to)) : to;\n h["_" + target] = to; reshowAll(target)\n }\n };\n place.insertBefore(link, null)\n }\n}\n\n\nversion.extensions.timedlinkMacro = { major: 1, minor: 2, revision: 0 };\nmacros["goto"] = macros.timedlink = {\n timer: null, handler: function (place, macroName, params, parser) {\n function cssTimeUnit(s) {\n if (typeof s == "string") {\n if (s.slice(-2).toLowerCase() == "ms") {\n return +(s.slice(0, -2)) || 0\n } else {\n if (s.slice(-1).toLowerCase() == "s") {\n return +(s.slice(0, -1)) * 1000 || 0\n }\n }\n } throwError(place, s + " isn't a CSS time unit"); return 0\n }\n var t, d, m, s;\n t = params[params.length - 1];\n parser = parser.fullArgs();\n m = 0;\n if (macroName != "goto") {\n d = parser.slice(0, parser.lastIndexOf(t));\n m = cssTimeUnit(t)\n }\n d = eval(Wikifier.parse(d));\n if (d + "" && state && state.init) {\n if (macros["goto"].timer) {\n clearTimeout(macros["goto"].timer)\n }\n //s = state.history[0].passage.title;\n macros["goto"].timer = setTimeout(function () {\n\n var to, text, target, doType, typeSpeed;\n\n var h = state.history[0].variables;\n if (typeof h._current == "undefined") { h._current = [] }\n\n to = params[0][0] == "$" ? eval(Wikifier.parse(params[0])) : params[0];\n //text = params[1][0] == "$" ? eval(Wikifier.parse(params[1])) : params[1];\n target = h._current[h._current.length - 1]\n if (params.length == 3) {\n doType = true;\n typeSpeed = params[1];\n }\n else {\n doType = false;\n }\n\n h["_" + target] = to;\n if (doType) {\n reshowAllAsync(target, typeSpeed);\n }\n else {\n reshowAll(target)\n }\n\n\n //if (state.history[0].passage.title == s) {\n // state.display(d, a)\n //}\n }, m)\n }\n }\n};
[High Density Solar]\n\nProvides a one-time upgrade to global solar cell efficiency. All existing and future cells will produce considerably more power.\n\nCost:\n250 Material\n\nActions:\n<<if $material gte 250>>...<<link "completeImprovedSolarCells" "[Print]" 1>>\n<<endif>>...<<link "computerRightBase" "[Cancel]" 1>>
>>The Sabatier System regulates your water supply. It's able to generate water using the byproducts of the other life support systems.\n\n>>Right now it should be generating just enough water to break even, but if you were to feed it more power, you might be able to produce a surplus.\n\n>>We'll add the required permission to your bio profile, adjust the Sabatier at your own discretion.\n\n[Comm link session closed remotely]<<set $discoveredSabatier = 2>>\n\n[[[Continue]|computer]]
<<pane "leftPane" "testLeft">><<pane "rightPane" "testRight">>
try {\n macros['macrodemo'] = {\n handler: function(place, macroName, params, parser) \n\t{\n\t\tnew Wikifier(place, \n\t\t"Hello World! <<print either(\s"test1\s", \s"test2\s")>>"\n\t\t);\n },\n init: function() { },\n };\n} catch(e) {\n throwError(place,"macrodemo Setup Error: "+e.message); \n}
>>You're up. We didn't expect this.\n\n>>We need to conserve power, we can't keep this channel open for long.\n\n>>It's roughly 10 more years before you get to the colony. We don't understand why, but your chamber was unsealed and we don't have the supplies to put you back under properly. You're going to have to stay awake.\n\n>>There aren't many resources onboard. Use the ship's facilities, do whatever you need to in order to survive. We need you at the colony.\n\n[Comm link session closed remotely]\n\n[[[Continue]|computer]]
[Connection established]<<timedgoto "computerIntro3" 1.75s>>
[Connecting to dedicated comm link server]<<timedgoto "computerIntro2" 6s>>
Comm link connection is idle.\n\n...<<link "computerLeftBase" "[Scan for messages]" 1>><<if $commProgress eq 0>>\n...[[[Mission Update]|computerComm0A]]<<endif>><<if ($commProgress eq 1 && $day gte 300)>>\n...[[[Mission Update]|computerComm1A]]<<endif>><<if ($commProgress eq 2 && $day gte 900)>>\n...[[[Mission Update]|computerComm2A]]<<endif>><<if ($commProgress eq 3 && $day gte 3100)>>\n...[[[Final Contact]|computerComm3A]]<<endif>><<if $discoveredNutrientCube eq 1>>\n...[[[re: Nutrient Cubes]|computerDiscoverNutrientCube]]<<endif>><<if $discoveredTerrarium eq 1>>\n...[[[re: Terrarium]|computerDiscoverTerrarium]]<<endif>><<if $discoveredSabatier eq 1>>\n...[[[re: Sabatier System]|computerDiscoverSabatier]]<<endif>><<if $fixedProbe eq 1>>\n...[[[re: Probe]|computerDiscoverProbe]]<<endif>>\n\n...[[[Log Out]|room]]
<<set $terrariumPowerLevel += 1>>You tap an area on the terrarium's glass and it produces a soft tone in response. The mechanical arm within moves back and forth, preparing the soil for new seeds.\n\n<<link "roomTerrarium" "[Continue]">>
body {\n\tbackground-color: #001100;\n\tcolor: #00FF00;\n\ttext-shadow: 0px 0px 10px #00FF00;\n}\na.internalLink,a.externalLink,a.back,a.visited,a.hover {\n\tcolor:#DEFF00;\n\ttext-shadow: 0px 0px 10px #DEFF00;\n}\nhr {\n\tbackground-color: #00FF00;\n\tcolor: #00FF00;\nborder: 0px;\nheight: 1px;\n}
.header {\n\tposition:fixed;\n\ttop: 0;\n\tleft: 0;\n\tmargin: 0;\n\twidth:100%;\n\theight:100%;\n\tbackground-color:transparent;\n\ttransition: 0.6s;\n\t-webkit-transition: 0.6s;\n\tz-index: -10;\n}\n.transition-in > .header {\n\tbackground-color:#003300;\n\tz-index: 1000;\n}\n.transition-out {\n\tdisplay:none;\n}\n.transition-in .char {\n\tcolor:transparent !important;\n\ttext-shadow: #fff 0 0 1em;\n}\n.passage:not(.transition-out) .char {\n\ttransition: 1s;\n\t-webkit-transition: 1s;\n}
.........................\n\n<<set $improvedSolarCells = true>><<set $material -= 250>>Solar cell improvements processed and applied. Solar cell efficiency has been increased.\n\n<<link "computerRightBase" "[Continue]" 1>>
#topPane{\nwidth: 900px;\nheight: 170px;\ntext-align: center;\nfloat: left;\nclear: both;\n}\n#leftPane {width:400px; \nmargin-right: 50px;\nfloat:left;}\n#rightPane {width:400px; \nmargin-left: 50px;\nfloat:right;}\n\n#leftPaneRoom {width: 185px;\nmargin-right: 15px;\nfloat: left;}\n#rightPaneRoom {width: 685px;\nmargin-left: 15px;\nfloat: right;}\n\nbody{\nbackground-color:#111;\ncolor:#fff;\nfont-family:Verdana,sans-serif;\nfont-size:62.5%;\npadding-top: 50px; \nmargin: 0px;\n}\n#passages{\nwidth: 900px; \nmargin: auto; \nborder: 0px; \npadding: 0px;\n}\n.passage{\nfont-size:1.2em;\nline-height:175%;\ntext-align:left;\n}\n#sidebar{\ndisplay: none;\n}\na.internalLink,a.externalLink,a.back{\ncolor:#00ffff;\nfont-weight:bold;\ntext-decoration:none;\n}\na.internalLink:hover,a.externalLink:hover,a.back:hover{text-decoration:underline;}
The room is no longer surrounded by darkness. Air, dirt, and grass have rushed upwards to meet the floor. With an impossible smoothness, warm light has flooded in through the windows. A panel in the wall shakes, emits a fan of sparks, then slides open with a groan. Tall grass falls gently into the opening, welcoming you to the sweet smelling atmosphere.\n\nYou leave the room.\n\nYou're here.
.........................\n\n<<nobr>>\n<<if $discoveredNutrientCube eq 0>><<set $discoveredNutrientCube = 1>><<endif>>\n<<set $food += 40>>\n<<set $material -= 20>>\n<<set $water -= 20>>\n<<set $power -= 250>>\n<<endnobr>>Nutrient Cube successfully synthesized and added to ration storage.\n\n<<link "computerRightBase" "[Continue]" 1>>
You're standing in a room, surrounded by various instruments and <<if $discoveredSabatier eq 0>><<link "discoverSabatier" "machinery">><<else>>machinery<<endif>>.<<if $discoveredTerrarium eq 0>> You notice that one of the walls is covered in a <<link "discoverTerrarium" "large pane of glass">>.<<endif>><<if $junkRemaining gt 3>>\n\nA pile of scrap lies on the floor. It looks like there may be useful components within it, if only you took the time to <<link "collectJunk" "sort and collect them">>.<<else>><<if $junkRemaining gt 1>>\n\nThe pile of scrap is dwindling, but there are at least a few more pieces that you could most likely <<link "collectJunk" "salvage">>.<<else>><<if $junkRemaining gt 0>>\n\nThe scrap pile is all but cleaned up, only a handful of objects remain to be <<link "collectJunk" "collected">>.<<endif>><<endif>><<endif>><<if $fixedProbe eq 0>>\n\nA defunct mining probe lies on the floor. With a <<link "fixProbe" "burst of power">>, it could probably be made operational again.<<else>>\n\nThe mining probe can be seen outside, sending out flashes of light as it extracts materials from passing asteroids.<<endif>>
<<pane "topPane" "resources">><<pane "leftPaneRoom" "roomLeft">><<pane "rightPaneRoom" "roomRight">>
The Sabatier System is humming quietly, giving off a hiss every once in a while. <<if $sabatierOverloadLevel eq 0>>A dial on the side indicates that it is operating normally.<<else>>A dial on the side fluctuates nervously as it processes the incoming flow of auxiliary power.<<endif>>\n\n<<if $discoveredSabatier gte 2>>A small screen allows you to adjust the system's settings. Currently, the machine's auxiliary power input level is set to <<print $sabatierOverloadLevel>>.\n\n<<link "sabatierOverloadUp" "[Increase power input]">><<if $sabatierOverloadLevel gt 0>>\n<<link "sabatierOverloadDown" "[Decrease power input]">>\n<<link "sabatierOverloadOff" "[Disable all aux power]">><<endif>><<else>>There is a small screen which appears to allow access to the system's settings, but it is locked.<<endif>>
.header {\n\tposition:fixed;\n\ttop: 0;\n\tleft: 0;\n\tmargin: 0;\n\twidth:100%;\n\theight:100%;\n\tbackground-color:transparent;\n\ttransition: 1.5s;\n\t-webkit-transition: 1.5s;\n\tz-index: -10;\n}\n.transition-in > .header {\n\tbackground-color:black;\n\tz-index: 1000;\n}\n.transition-out {\n\tdisplay:none;\n}\n.transition-in .char {\n\tcolor:transparent !important;\n\ttext-shadow: #fff 0 0 1em;\n}\n.passage:not(.transition-out) .char {\n\ttransition: 3s;\n\t-webkit-transition: 3s;\n}
version.extensions.timedgotoMacro={major:1,minor:2,revision:0};\nmacros["goto"]=macros.timedgoto={timer:null,handler:function(a,b,c,d){function cssTimeUnit(s){if(typeof s=="string"){if(s.slice(-2).toLowerCase()=="ms"){return +(s.slice(0,-2))||0\n}else{if(s.slice(-1).toLowerCase()=="s"){return +(s.slice(0,-1))*1000||0\n}}}throwError(a,s+" isn't a CSS time unit");return 0}var t,d,m,s;\nt=c[c.length-1];d=d.fullArgs();m=0;if(b!="goto"){d=d.slice(0,d.lastIndexOf(t));\nm=cssTimeUnit(t)}d=eval(Wikifier.parse(d));if(d+""&&state&&state.init){if(macros["goto"].timer){clearTimeout(macros["goto"].timer)\n}s=state.history[0].passage.title;macros["goto"].timer=setTimeout(function(){if(state.history[0].passage.title==s){state.display(d,a)\n}},m)}}};
[Nutrient Cube]\n\nNot recommended for sustained consumption, energy can be molecularly combined with a small amount of water and other material in order to create a basic ration of food.\n\nCost:\n250 Power\n20 Water\n20 Material\n\nProduct:\n40 Food\n\nActions:\n<<if ($material gte 20 && $water gte 20 && $power gte 250)>>...<<link "completeNutrientCube" "[Print]" 1>>\n<<endif>>...<<link "computerRightBase" "[Cancel]" 1>>
.header {\n\tposition:fixed;\n\ttop: 0;\n\tleft: 0;\n\tmargin: 0;\n\twidth:100%;\n\theight:100%;\n\tbackground-color:transparent;\n\ttransition: 1.5s;\n\t-webkit-transition: 1.5s;\n\tz-index: -10;\n}\n.transition-in > .header {\n\tbackground-color:green;\n\tz-index: 1000;\n}\n.transition-out {\n\tdisplay:none;\n}\n.transition-in .char {\n\tcolor:transparent !important;\n\ttext-shadow: #fff 0 0 1em;\n}\n.passage:not(.transition-out) .char {\n\ttransition: 3s;\n\t-webkit-transition: 3s;\n}
.........................\n\n<<set $solarCells += 1>><<set $material -= 50>>Solar cell printed and installed successfully.\n\n<<link "computerRightBase" "[Continue]" 1>>
// JavaScript source code\n(function () {\n version.extensions.replaceMacrosCombined = { major: 1, minor: 1, revision: 7 }; var nullobj = { handler: function () { } }; function showVer(n, notrans) {\n if (!n) { return; } n.innerHTML = "";\n new Wikifier(n, n.tweecode); n.setAttribute("data-enabled", "true"); n.style.display = "inline"; n.classList.remove("revision-span-out"); if (!notrans) {\n n.classList.add("revision-span-in");\n if (n.timeout) { clearTimeout(n.timeout); } n.timeout = setTimeout(function () { n.classList.remove("revision-span-in"); n = null; }, 20);\n }\n } function hideVer(n, notrans) {\n if (!n) {\n return;\n } n.setAttribute("data-enabled", "false"); n.classList.remove("revision-span-in"); if (n.timeout) { clearTimeout(n.timeout); } if (!notrans) {\n n.classList.add("revision-span-out");\n n.timeout = setTimeout(function () {\n if (n.getAttribute("data-enabled") == "false") { n.classList.remove("revision-span-out"); n.style.display = "none"; n.innerHTML = ""; } n = null;\n }, 1000);\n } else { n.style.display = "none"; n.innerHTML = ""; n = null; }\n } function tagcontents(b, starttags, desttags, endtags, k) {\n var l = 0, c = "", tg, a, i; function tagfound(i, e, endtag) {\n for (var j = 0;\n j < e.length; j++) { if (a.indexOf("<<" + e[j] + (endtag ? ">>" : ""), i) == i) { return e[j]; } }\n } a = b.source.slice(k); for (i = 0; i < a.length; i++) {\n if (tg = tagfound(i, starttags)) { l++; } else {\n if ((tg = tagfound(i, desttags, true)) && l == 0) {\n b.nextMatch = k + i + tg.length + 4;\n return [c, tg];\n } else { if (tg = tagfound(i, endtags, true)) { l--; if (l < 0) { return null; } } }\n } c += a.charAt(i);\n } return null;\n } var begintags = []; var endtags = []; function revisionSpanHandler(g, e, f, b) {\n var k = b.source.indexOf(">>", b.matchStart) + 2, vsns = [], vtype = e, flen = f.length, becomes, c, cn, m, h, vsn;\n function mkspan(vtype) { h = insertElement(m, "span", null, "revision-span " + vtype); h.setAttribute("data-enabled", false); h.style.display = "none"; h.tweecode = ""; return h; } if (this.shorthand && flen) {\n while (f.length > 0) {\n vsns.push([f.shift(), (this.flavour == "insert" ? "gains" : "becomes")]);\n }\n } else { if (this.flavour == "insert" || (this.flavour == "continue" && this.trigger == "time")) { vsns.push(["", "becomes"]); } } if (this.flavour == "continue" && flen) {\n b.nextMatch = k + b.source.slice(k).length;\n vsns.push([b.source.slice(k), vtype]);\n } else {\n becomes = ["becomes", "gains"]; c = tagcontents(b, begintags, becomes.concat(endtags), endtags, k); if (c && endtags.indexOf(c[1]) == -1) {\n while (c) {\n vsns.push(c);\n c = tagcontents(b, begintags, becomes, endtags, b.nextMatch);\n } c = tagcontents(b, begintags, ["end" + e], endtags, b.nextMatch);\n } if (!c) {\n throwError(g, "can't find matching end" + e);\n return;\n } vsns.push(c); if (this.flavour == "continue") { k = b.nextMatch; b.nextMatch = k + b.source.slice(k).length; vsns.push([b.source.slice(k), ""]); }\n } if (this.flavour == "remove") {\n vsns.push(["", "becomes"]);\n } cn = 0; m = insertElement(g, "span", null, e); m.setAttribute("data-flavour", this.flavour); h = mkspan("initial"); vsn = vsns.shift(); h.tweecode = vsn[0]; showVer(h, true); while (vsns.length > 0) {\n if (vsn) {\n vtype = vsn[1];\n } vsn = vsns.shift(); h = mkspan(vtype); h.tweecode = vsn[0];\n } if (typeof this.setup == "function") { this.setup(m, g, f); }\n } function quantity(m) {\n return (m.children.length - 1) + (m.getAttribute("data-flavour") == "remove");\n } function revisionSetup(m, g, f) { m.className += " " + f[0].replace(" ", "_"); } function keySetup(m, g, f) {\n var key = f[0]; m.setEventListener("keydown", function l(e) {\n var done = !revise("revise", m);\n if (done) { m.removeEventListener("keydown", l); }\n });\n } function timeSetup(m, g, f) {\n function cssTimeUnit(s) {\n if (typeof s == "string") {\n if (s.slice(-2).toLowerCase() == "ms") {\n return Number(s.slice(0, -2)) || 0;\n } else { if (s.slice(-1).toLowerCase() == "s") { return Number(s.slice(0, -1)) * 1000 || 0; } }\n } throwError(g, s + " isn't a CSS time unit"); return 0;\n } var tm = cssTimeUnit(f[0]); var s = state.history[0].passage.title;\n setTimeout(function timefn() { if (state.history[0].passage.title == s) { var done = !revise("revise", m); if (!done) { setTimeout(timefn, tm); } } }, tm);\n } function hoverSetup(m) {\n var fn, noMouseEnter = (document.head.onmouseenter !== null), m1 = m.children[0], m2 = m.children[1], gains = m2.className.indexOf("gains") > -1;\n if (!m1 || !m2) { return; } m1.onmouseenter = function (e) {\n var efp = document.elementFromPoint(e.clientX, e.clientY); while (efp && efp !== this) { efp = efp.parentNode; } if (!efp) {\n return;\n } if (this.getAttribute("data-enabled") != "false") { revise("revise", this.parentNode); }\n }; m2.onmouseleave = function (e) {\n var efp = document.elementFromPoint(e.clientX, e.clientY);\n while (efp && efp !== this) { efp = efp.parentNode; } if (efp) { return; } if (this.getAttribute("data-enabled") != "false") { revise("revert", this.parentNode); }\n }; if (gains) {\n m1.onmouseleave = m2.onmouseleave;\n } if (noMouseEnter) {\n fn = function (n) {\n return function (e) {\n if (!event.relatedTarget || (event.relatedTarget != this && !(this.compareDocumentPosition(event.relatedTarget) & Node.DOCUMENT_POSITION_CONTAINED_BY))) {\n this[n]();\n }\n };\n }; m1.onmouseover = fn("onmouseenter"); m2.onmouseout = fn("onmouseleave"); if (gains) { m1.onmouseout = m2.onmouseout; }\n } m = null;\n } function mouseSetup(m) {\n var evt = (document.head.onmouseenter === null ? "onmouseenter" : "onmouseover");\n m[evt] = function () { var done = !revise("revise", this); if (done) { this[evt] = null; } }; m = null;\n } function linkSetup(m, g, f) {\n var l = Wikifier.createInternalLink(), p = m.parentNode;\n l.className = "internalLink replaceLink"; p.insertBefore(l, m); l.insertBefore(m, null); l.onclick = function () {\n var p, done = false; if (m && m.parentNode == this) {\n done = !revise("revise", m);\n scrollWindowTo(m);\n } if (done) { this.parentNode.insertBefore(m, this); this.parentNode.removeChild(this); }\n }; l = null;\n } function visitedSetup(m, g, f) {\n var i, done, shv = state.history[0].variables, os = "once seen", d = (m.firstChild && (this.flavour == "insert" ? m.firstChild.nextSibling : m.firstChild).tweecode);\n shv[os] = shv[os] || {}; if (d && !shv[os].hasOwnProperty(d)) { shv[os][d] = 1; } else {\n for (i = shv[os][d]; i > 0 && !done; i--) { done = !revise("revise", m, true); } if (shv[os].hasOwnProperty(d)) {\n shv[os][d] += 1;\n }\n }\n } [{ name: "insert", flavour: "insert", trigger: "link", setup: linkSetup }, { name: "timedinsert", flavour: "insert", trigger: "time", setup: timeSetup }, { name: "insertion", flavour: "insert", trigger: "revisemacro", setup: revisionSetup }, { name: "later", flavour: "insert", trigger: "visited", setup: visitedSetup }, { name: "keyinsert", flavour: "insert", trigger: "key", setup: keySetup }, { name: "replace", flavour: "replace", trigger: "link", setup: linkSetup }, { name: "timedreplace", flavour: "replace", trigger: "time", setup: timeSetup }, { name: "mousereplace", flavour: "replace", trigger: "mouse", setup: mouseSetup }, { name: "hoverreplace", flavour: "replace", trigger: "hover", setup: hoverSetup }, { name: "revision", flavour: "replace", trigger: "revisemacro", setup: revisionSetup }, { name: "keyreplace", flavour: "replace", trigger: "key", setup: keySetup }, { name: "timedremove", flavour: "remove", trigger: "time", setup: timeSetup }, { name: "mouseremove", flavour: "remove", trigger: "mouse", setup: mouseSetup }, { name: "hoverremove", flavour: "remove", trigger: "hover", setup: hoverSetup }, { name: "removal", flavour: "remove", trigger: "revisemacro", setup: revisionSetup }, { name: "once", flavour: "remove", trigger: "visited", setup: visitedSetup }, { name: "keyremove", flavour: "remove", trigger: "key", setup: keySetup }, { name: "continue", flavour: "continue", trigger: "link", setup: linkSetup }, { name: "timedcontinue", flavour: "continue", trigger: "time", setup: timeSetup }, { name: "mousecontinue", flavour: "continue", trigger: "mouse", setup: mouseSetup }, { name: "keycontinue", flavour: "continue", trigger: "key", setup: keySetup }, { name: "cycle", flavour: "cycle", trigger: "revisemacro", setup: revisionSetup }, { name: "mousecycle", flavour: "cycle", trigger: "mouse", setup: mouseSetup }, { name: "timedcycle", flavour: "cycle", trigger: "time", setup: timeSetup }, { name: "keycycle", flavour: "replace", trigger: "key", setup: keySetup }].forEach(function (e) {\n e.handler = revisionSpanHandler;\n e.shorthand = (["link", "mouse", "hover"].indexOf(e.trigger) > -1); macros[e.name] = e; macros["end" + e.name] = nullobj; begintags.push(e.name); endtags.push("end" + e.name);\n }); function insideDepartingSpan(elem) {\n var r = elem.parentNode;\n while (!r.classList.contains("passage")) { if (r.classList.contains("revision-span-out")) { return true; } r = r.parentNode; }\n } function reviseAll(rt, rname) {\n var rall = document.querySelectorAll(".passage [data-flavour]." + rname), ret = false;\n for (var i = 0; i < rall.length; i++) { if (!insideDepartingSpan(rall[i])) { ret = revise(rt, rall[i]) || ret; } } return ret;\n } function revise(rt, r, notrans) {\n notrans = true;\n var ind2, curr, next, ind = -1, rev = (rt == "revert"), rnd = (rt.indexOf("random") > -1), fl = r.getAttribute("data-flavour"), rc = r.childNodes, cyc = (fl == "cycle"), rcl = rc.length - 1;\n function doToGainerSpans(n, fn) { for (var k = n - 1; k >= 0; k--) { if (rc[k + 1].classList.contains("gains")) { fn(rc[k], notrans); } else { break; } } } for (var k = 0; k <= rcl; k++) {\n if (rc[k].getAttribute("data-enabled") == "true") {\n ind = k;\n }\n } if (rev) { ind -= 1; } curr = (ind >= 0 ? rc[ind] : (cyc ? rc[rcl] : null)); ind2 = ind; if (rnd) { ind2 = (ind + (Math.floor(Math.random() * rcl))) % rcl; } next = ((ind2 < rcl) ? rc[ind2 + 1] : (cyc ? rc[0] : null));\n var docurr = (rev ? showVer : hideVer); var donext = (rev ? hideVer : showVer); var currfn = function () {\n if (!(next && next.classList.contains("gains")) || rnd) {\n docurr(curr, notrans); doToGainerSpans(ind, docurr, notrans);\n }\n }; var nextfn = function () { donext(next, notrans); if (rnd) { doToGainerSpans(ind2 + 1, donext, notrans); } }; if (!rev) { currfn(); nextfn(); } else { nextfn(); currfn(); } return (cyc ? true : (rev ? (ind > 0) : (ind2 < rcl - 1)));\n } macros.revert = macros.revise = macros.randomise = macros.randomize = {\n handler: function (a, b, c) {\n var l, rev, rname; function disableLink(l) { l.style.display = "none"; } function enableLink(l) {\n l.style.display = "inline";\n } function updateLink(l) {\n if (l.className.indexOf("random") > -1) { enableLink(l); return; } var rall = document.querySelectorAll(".passage [data-flavour]." + rname), cannext, canprev, i, ind, r, fl;\n for (i = 0; i < rall.length; i++) {\n r = rall[i], fl = r.getAttribute("data-flavour"); if (insideDepartingSpan(r)) { continue; } if (fl == "cycle") { cannext = canprev = true; } else {\n if (r.firstChild.getAttribute("data-enabled") == !1 + "") {\n canprev = true;\n } if (r.lastChild.getAttribute("data-enabled") == !1 + "") { cannext = true; }\n }\n } var can = (l.classList.contains("revert") ? canprev : cannext); (can ? enableLink : disableLink)(l);\n } function toggleText(w) {\n w.classList.toggle(rl + "Enabled");\n w.classList.toggle(rl + "Disabled"); w.style.display = ((w.style.display == "none") ? "inline" : "none");\n } var rl = "reviseLink"; if (c.length < 2) {\n throwError(a, b + " macro needs 2 parameters");\n return;\n } rname = c.shift().replace(" ", "_"); l = Wikifier.createInternalLink(a, null); l.className = "internalLink " + rl + " " + rl + "_" + rname + " " + b; var v = ""; var end = false; var out = false;\n if (c.length > 1 && c[0][0] == "$") { v = c[0].slice(1); c.shift(); } switch (c[c.length - 1]) { case "end": end = true; c.pop(); break; case "out": out = true; c.pop(); break; } var h = state.history[0].variables;\n for (var i = 0; i < c.length; i++) {\n var on = (i == Math.max(c.indexOf(h[v]), 0)); var d = insertElement(null, "span", null, rl + ((on) ? "En" : "Dis") + "abled"); if (on) {\n h[v] = c[i]; l.setAttribute("data-cycle", i);\n } else { d.style.display = "none"; } insertText(d, c[i]); l.appendChild(d);\n } l.onclick = function () {\n reviseAll(b, rname); var t = this.childNodes, u = this.getAttribute("data-cycle") - 0, m = t.length, n, lall, i;\n if ((end || out) && u >= m - (end ? 2 : 1)) {\n if (end) { n = this.removeChild(t[u + 1] || t[u]); n.className = rl + "End"; n.style.display = "inline"; this.parentNode.replaceChild(n, this); } else {\n this.parentNode.removeChild(this);\n return;\n }\n } else { toggleText(t[u]); u = (u + 1) % m; if (v) { h[v] = c[u]; } toggleText(t[u]); this.setAttribute("data-cycle", u); } lall = document.getElementsByClassName(rl + "_" + rname);\n for (i = 0; i < lall.length; i++) { updateLink(lall[i]); }\n }; disableLink(l); setTimeout((function (l) { return function () { updateLink(l); }; }(l)), 1); l = null;\n }\n }; macros.mouserevise = macros.hoverrevise = {\n handler: function (a, b, c, d) {\n var endtags = ["end" + b], evt = (window.onmouseenter === null ? "onmouseenter" : "onmouseover"), t = tagcontents(d, [b], endtags, endtags, d.source.indexOf(">>", d.matchStart) + 2);\n if (t) {\n var rname = c[0].replace(" ", "_"), h = insertElement(a, "span", null, "hoverrevise hoverrevise_" + rname), f = function () {\n var done = !reviseAll("revise", rname); if (b != "hoverrevise" && done) {\n this[evt] = null;\n }\n }; new Wikifier(h, t[0]); if (b == "hoverrevise") { h.onmouseover = f; h.onmouseout = function () { reviseAll("revert", rname); }; } else { h[evt] = f; } h = null;\n }\n }\n }; macros.instantrevise = {\n handler: function (a, b, c, d) {\n reviseAll("revise", c[0].replace(" ", "_"));\n }\n }; macros.endmouserevise = nullobj; macros.endhoverrevise = nullobj;\n}());
The food stores have dwindled, and your journey comes to an end. <<roundedNumber $day>> days after your awakening, you succumb to hunger.\n\n[[[Retry]|Start]]
>>If you haven't figured it out yet, the terrarium can be used to grow food. \n\n>>We don't advise activating it until you have a reliable power source, however. In fact, it consumes quite a large amount of energy, so you may not be able to turn it on at all until you charge the batteries up further.\n\n>>There aren't many options, but the ship is still able to produce replacement solar cells, that should help.\n\n[Comm link session closed remotely]<<set $discoveredTerrarium = 2>>\n\n[[[Continue]|computer]]
>>This is it. You're nearing the colony. We are all so proud of you for getting this far.\n\n>>There's really nothing more to say. We've been watching this whole time, and we're quite impressed.\n\n>>We look forward to seeing you on the surface. Just a little while longer now.\n\n[Comm link session closed remotely]<<set $commProgress = 4>>\n\n[[[Continue]|computer]]
.header {\n\tposition:fixed;\n\ttop: 0;\n\tleft: 0;\n\tmargin: 0;\n\twidth:100%;\n\theight:100%;\n\tbackground-color:transparent;\n\ttransition: 3s;\n\t-webkit-transition: 3s;\n\tz-index: -10;\n}\n.transition-in > .header {\n\tbackground-color:white;\n\tz-index: 1000;\n}\n.transition-out {\n\tdisplay:none;\n}\n.transition-in .char {\n\tcolor:transparent !important;\n\ttext-shadow: #fff 0 5 1em;\n}\n.passage:not(.transition-out) .char {\n\ttransition: 4s;\n\t-webkit-transition: 4s;\n}
@graebor
.........................\n\n<<nobr>>\n<<if $discoveredFoodDecompression eq 0>><<set $discoveredFoodDecompression = 1>><<endif>>\n<<set $food -= 50>>\n<<set $material += 20>>\n<<set $power -= 25>>\n<<endnobr>>Rations successfully decompressed and resynthesized. Extracted compounds have been added to material storage.\n\n<<link "computerRightBase" "[Continue]" 1>>
version.extensions.cyclinglinkMacro={major:3,minor:3,revision:0};\nmacros.cyclinglink={handler:function(a,b,c){var rl="cyclingLink";\nfunction toggleText(w){w.classList.remove("cyclingLinkInit");\nw.classList.toggle(rl+"Enabled");w.classList.toggle(rl+"Disabled");\nw.style.display=((w.style.display=="none")?"inline":"none")}switch(c[c.length-1]){case"end":var end=true;\nc.pop();break;case"out":var out=true;c.pop();break}var v="";if(c.length&&c[0][0]=="$"){v=c[0].slice(1);\nc.shift()}var h=state.history[0].variables;if(out&&h[v]===""){return\n}var l=Wikifier.createInternalLink(a,null);l.className="internalLink cyclingLink";\nl.setAttribute("data-cycle",0);for(var i=0;i<c.length;i++){var on=(i==Math.max(c.indexOf(h[v]),0));\nvar d=insertElement(null,"span",null,"cyclingLinkInit cyclingLink"+((on)?"En":"Dis")+"abled");\nif(on){h[v]=c[i];l.setAttribute("data-cycle",i)}else{d.style.display="none"\n}insertText(d,c[i]);if(on&&end&&i==c.length-1){l.parentNode.replaceChild(d,l)\n}else{l.appendChild(d)}}l.onclick=function(){var t=this.childNodes;\nvar u=this.getAttribute("data-cycle")-0;var m=t.length;toggleText(t[u]);\nu=(u+1);if(!(out&&u==m)){u%=m;if(v){h[v]=c[u]}}else{h[v]=""}if((end||out)&&u==m-(end?1:0)){if(end){var n=this.removeChild(t[u]);\nn.className=rl+"End";n.style.display="inline";this.parentNode.replaceChild(n,this)\n}else{this.parentNode.removeChild(this);return}return}toggleText(t[u]);\nthis.setAttribute("data-cycle",u)}}};
[Ration Decompression]\n\nExcess rations can be decompressed and restructured into other materials. In the unlikely case that surplus rations are available, this printer is capable of resequencing nutrient-rich molecules into usable metals and plastics.\n\nCost:\n50 Food\n25 Power\n\nProduct:\n20 Materials\n\nActions:\n<<if ($food gte 50 && $power gte 25)>>...<<link "completeFoodDecompression" "[Process]" 1>>\n<<endif>>...<<link "computerRightBase" "[Cancel]" 1>>
macros.forgetall = macros.rememberall = {\n handler: function (a, name) {\n var s = state.history[0].variables;\n for (variable in s) {\n if (s.hasOwnProperty(variable)) {\n if (name == "forgetall") {\n delete window.localStorage[macros.remember.prefix + variable];\n delete s[variable];\n } else {\n window.localStorage[macros.remember.prefix + variable] = s[variable];\n }\n }\n }\n }\n}
Logging in...<<timedgoto "computer" 2s>>
>>It was a good idea to focus on getting that mining probe up and running again. We regret that we did not think of that ourselves.\n\n>>The flow of materials should help you expand your operation. Best of luck.\n\n[Comm link session closed remotely]<<set $fixedProbe = 2>>\n\n[[[Continue]|computer]]