Merge remote-tracking branch 'upstream/master' into issue115

Conflicts:
	script/outside.js
	script/path.js
This commit is contained in:
Travis Weston
2015-02-10 07:11:10 -05:00
32 changed files with 16631 additions and 17977 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ Available | Languages
[Polish](http://adarkroom.doublespeakgames.com/?lang=pl) | [Portuguese](http://adarkroom.doublespeakgames.com/?lang=pt) [Polish](http://adarkroom.doublespeakgames.com/?lang=pl) | [Portuguese](http://adarkroom.doublespeakgames.com/?lang=pt)
[Russian](http://adarkroom.doublespeakgames.com/?lang=ru) | [Spanish](http://adarkroom.doublespeakgames.com/?lang=es) [Russian](http://adarkroom.doublespeakgames.com/?lang=ru) | [Spanish](http://adarkroom.doublespeakgames.com/?lang=es)
[Swedish](http://adarkroom.doublespeakgames.com/?lang=sv) | [Turkish](http://adarkroom.doublespeakgames.com/?lang=tr) [Swedish](http://adarkroom.doublespeakgames.com/?lang=sv) | [Turkish](http://adarkroom.doublespeakgames.com/?lang=tr)
[Ukrainian](http://adarkroom.doublespeakgames.com/?lang=uk) | [Ukrainian](http://adarkroom.doublespeakgames.com/?lang=uk) | [Vietnamese] (http://adarkroom.doublespeakgames.com/?lang=vi)
[Play on GitHub](http://continuities.github.io/adarkroom) [Play on GitHub](http://continuities.github.io/adarkroom)
+511 -493
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2014-09-27 12:34+0200\n" "POT-Creation-Date: 2014-09-27 12:34+0200\n"
"PO-Revision-Date: 2014-11-10 18:25+0100\n" "PO-Revision-Date: 2015-02-07 14:14-0500\n"
"Last-Translator: Thilo Voigt <eiskalt555@web.de>\n" "Last-Translator: Thilo Voigt <eiskalt555@web.de>\n"
"Language-Team: German\n" "Language-Team: German\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
+1624 -2343
View File
File diff suppressed because it is too large Load Diff
+1631 -2354
View File
File diff suppressed because it is too large Load Diff
+3 -4
View File
@@ -3,14 +3,14 @@ msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2014-09-27 12:34+0200\n" "POT-Creation-Date: 2014-09-27 12:34+0200\n"
"PO-Revision-Date: 2014-11-10 21:44+0100\n" "PO-Revision-Date: 2015-02-07 14:15-0500\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: it_IT\n" "Language: it_IT\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.6.10\n" "X-Generator: Poedit 1.5.4\n"
"X-Poedit-Basepath: .\n" "X-Poedit-Basepath: .\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
@@ -702,8 +702,7 @@ msgstr "arriva un piccolo gruppo, macilento e impolverato."
#: script/outside.js:193 #: script/outside.js:193
msgid "a convoy lurches in, equal parts worry and hope." msgid "a convoy lurches in, equal parts worry and hope."
msgstr "" msgstr "una carovana arriva incerta, colma di ansia e speranza in egual misura"
"una carovana arriva incerta, colma di ansia e speranza in egual misura"
#: script/outside.js:195 #: script/outside.js:195
msgid "the town's booming. word does get around." msgid "the town's booming. word does get around."
+21 -8
View File
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: adarkroom\n" "Project-Id-Version: adarkroom\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2014-09-27 12:34+0200\n" "POT-Creation-Date: 2014-09-27 12:34+0200\n"
"PO-Revision-Date: 2015-01-02 12:23+0900\n" "PO-Revision-Date: 2015-02-07 14:15-0500\n"
"Last-Translator: satofumi <satofumi@hyakuren-soft.sakura.ne.jp>\n" "Last-Translator: satofumi <satofumi@hyakuren-soft.sakura.ne.jp>\n"
"Language-Team: Japanese\n" "Language-Team: Japanese\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@@ -12,6 +12,7 @@ msgstr ""
"Generated-By: Babel 1.3\n" "Generated-By: Babel 1.3\n"
"Language: ja\n" "Language: ja\n"
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 1.5.4\n"
#: script/dropbox.js:64 #: script/dropbox.js:64
msgid "Dropbox connection" msgid "Dropbox connection"
@@ -1201,7 +1202,8 @@ msgstr "発進!"
msgid "" msgid ""
"somewhere above the debris cloud, the wanderer fleet hovers. been on this " "somewhere above the debris cloud, the wanderer fleet hovers. been on this "
"rock too long." "rock too long."
msgstr "瓦礫の雲の上のどこかに、放浪者艦隊は浮かんでいる。この岩の上に長らくあった。" msgstr ""
"瓦礫の雲の上のどこかに、放浪者艦隊は浮かんでいる。この岩の上に長らくあった。"
#: script/ship.js:116 script/ship.js:129 #: script/ship.js:116 script/ship.js:129
msgid "not enough alien alloy" msgid "not enough alien alloy"
@@ -1410,7 +1412,9 @@ msgstr "やせ地は乾燥した風に揺れる瀕死の草の海で終わる。
msgid "" msgid ""
"a wall of gnarled trees rises from the dust. their branches twist into a " "a wall of gnarled trees rises from the dust. their branches twist into a "
"skeletal canopy overhead." "skeletal canopy overhead."
msgstr "節くれだった木の壁が、埃から立ち上がる。枝は天蓋の骨組みのように頭上で絡み合っている。" msgstr ""
"節くれだった木の壁が、埃から立ち上がる。枝は天蓋の骨組みのように頭上で絡み"
"合っている。"
#: script/world.js:812 #: script/world.js:812
msgid "Wanderer" msgid "Wanderer"
@@ -1966,7 +1970,9 @@ msgstr "謎の放浪者"
msgid "" msgid ""
"a wanderer arrives with an empty cart. says if he leaves with wood, he'll be " "a wanderer arrives with an empty cart. says if he leaves with wood, he'll be "
"back with more." "back with more."
msgstr "放浪者は空の荷車を持ってきた。木材を渡せば、彼はより多くを持って戻って来ると言う。" msgstr ""
"放浪者は空の荷車を持ってきた。木材を渡せば、彼はより多くを持って戻って来ると"
"言う。"
#: script/events/room.js:270 #: script/events/room.js:270
msgid "builder's not sure he's to be trusted." msgid "builder's not sure he's to be trusted."
@@ -1992,7 +1998,9 @@ msgstr "謎の放浪者が荷車に木材を高く積み上げて戻ってきた
msgid "" msgid ""
"a wanderer arrives with an empty cart. says if she leaves with furs, she'll " "a wanderer arrives with an empty cart. says if she leaves with furs, she'll "
"be back with more." "be back with more."
msgstr "放浪者は空の荷車を持ってきた。毛皮を渡せば、彼女はより多くを持って戻って来ると言う。" msgstr ""
"放浪者は空の荷車を持ってきた。毛皮を渡せば、彼女はより多くを持って戻って来る"
"と言う。"
#: script/events/room.js:341 #: script/events/room.js:341
msgid "builder's not sure she's to be trusted." msgid "builder's not sure she's to be trusted."
@@ -2468,7 +2476,8 @@ msgstr "ゴミ漁りは学校に小さなキャンプを持っていた。"
#: script/events/setpieces.js:1052 #: script/events/setpieces.js:1052
msgid "collected scraps spread across the floor like they fell from heaven." msgid "collected scraps spread across the floor like they fell from heaven."
msgstr "集めたスクラップは、まるで天から降ってきたかのように床に散らばっている。" msgstr ""
"集めたスクラップは、まるで天から降ってきたかのように床に散らばっている。"
#: script/events/setpieces.js:1094 #: script/events/setpieces.js:1094
msgid "scavenger'd been looking for supplies in here, it seems." msgid "scavenger'd been looking for supplies in here, it seems."
@@ -2519,7 +2528,9 @@ msgstr "廃墟の街"
#: script/events/setpieces.js:1242 #: script/events/setpieces.js:1242
msgid "" msgid ""
"a battered highway sign stands guard at the entrance to this once-great city." "a battered highway sign stands guard at the entrance to this once-great city."
msgstr "ぼろぼろの高速道路の看板が、このかつて偉大だった都市の入り口を守って立っている。" msgstr ""
"ぼろぼろの高速道路の看板が、このかつて偉大だった都市の入り口を守って立ってい"
"る。"
#: script/events/setpieces.js:1243 #: script/events/setpieces.js:1243
msgid "" msgid ""
@@ -3101,7 +3112,9 @@ msgstr "古い鉄鉱山がある。道具類は放置されて錆びるに任さ
msgid "" msgid ""
"bleached bones are strewn about the entrance. many, deeply scored with " "bleached bones are strewn about the entrance. many, deeply scored with "
"jagged grooves." "jagged grooves."
msgstr "白い骨が入り口の辺りに散らばっている。深いギザギザの溝がたくさん刻まれている。" msgstr ""
"白い骨が入り口の辺りに散らばっている。深いギザギザの溝がたくさん刻まれてい"
"る。"
#: script/events/setpieces.js:3448 #: script/events/setpieces.js:3448
msgid "feral howls echo out of the darkness." msgid "feral howls echo out of the darkness."
+2 -2
View File
@@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2014-09-27 12:34+0200\n" "POT-Creation-Date: 2014-09-27 12:34+0200\n"
"PO-Revision-Date: 2014-10-25 19:29+1000\n" "PO-Revision-Date: 2015-02-07 14:15-0500\n"
"Last-Translator: Sung Won Cho <mikeswcho@gmail.com>\n" "Last-Translator: Sung Won Cho <mikeswcho@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 1.3\n" "Generated-By: Babel 1.3\n"
"X-Generator: Poedit 1.6.10\n" "X-Generator: Poedit 1.5.4\n"
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
"Language: ko\n" "Language: ko\n"
+1
View File
@@ -13,5 +13,6 @@ var langs = {
'sv':'svenska', 'sv':'svenska',
'tr':'türkçe', 'tr':'türkçe',
'uk':'українська', 'uk':'українська',
'vi':'tiếng việt',
'zh_cn':'简体中文' 'zh_cn':'简体中文'
}; };
+133 -94
View File
@@ -6,14 +6,14 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: adarkroom\n" "Project-Id-Version: adarkroom\n"
"POT-Creation-Date: 2015-02-01 20:15+0100\n" "POT-Creation-Date: 2015-02-01 20:15+0100\n"
"PO-Revision-Date: 2015-02-03 19:10+0100\n" "PO-Revision-Date: 2015-02-07 14:15-0500\n"
"Last-Translator: Jan Gerhard Schøpp <jgschoepp@gmail.com>\n" "Last-Translator: Jan Gerhard Schøpp <jgschoepp@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: no\n" "Language: no\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.7.4\n" "X-Generator: Poedit 1.5.4\n"
#: script/dropbox.js:64 #: script/dropbox.js:64
msgid "Dropbox connection" msgid "Dropbox connection"
@@ -357,18 +357,19 @@ msgid "stunned"
msgstr "lamslått" msgstr "lamslått"
#: script/events.js:494 script/events/global.js:42 script/events/global.js:59 #: script/events.js:494 script/events/global.js:42 script/events/global.js:59
#: script/events/room.js:142 script/events/room.js:162 script/events/room.js:182 #: script/events/room.js:142 script/events/room.js:162
#: script/events/setpieces.js:25 script/events/setpieces.js:48 #: script/events/room.js:182 script/events/setpieces.js:25
#: script/events/setpieces.js:65 script/events/setpieces.js:83 #: script/events/setpieces.js:48 script/events/setpieces.js:65
#: script/events/setpieces.js:106 script/events/setpieces.js:535 #: script/events/setpieces.js:83 script/events/setpieces.js:106
#: script/events/setpieces.js:1253 script/events/setpieces.js:2943 #: script/events/setpieces.js:535 script/events/setpieces.js:1253
#: script/events/setpieces.js:2977 script/events/setpieces.js:3000 #: script/events/setpieces.js:2943 script/events/setpieces.js:2977
#: script/events/setpieces.js:3037 script/events/setpieces.js:3090 #: script/events/setpieces.js:3000 script/events/setpieces.js:3037
#: script/events/setpieces.js:3119 script/events/setpieces.js:3165 #: script/events/setpieces.js:3090 script/events/setpieces.js:3119
#: script/events/setpieces.js:3292 script/events/setpieces.js:3314 #: script/events/setpieces.js:3165 script/events/setpieces.js:3292
#: script/events/setpieces.js:3434 script/events/setpieces.js:3458 #: script/events/setpieces.js:3314 script/events/setpieces.js:3434
#: script/events/setpieces.js:3491 script/events/setpieces.js:3510 #: script/events/setpieces.js:3458 script/events/setpieces.js:3491
#: script/events/setpieces.js:3533 script/events/setpieces.js:3561 #: script/events/setpieces.js:3510 script/events/setpieces.js:3533
#: script/events/setpieces.js:3561
msgid "leave" msgid "leave"
msgstr "forlat" msgstr "forlat"
@@ -794,11 +795,11 @@ msgstr "felle"
#: script/room.js:25 #: script/room.js:25
msgid "" msgid ""
"builder says she can make traps to catch any creatures might still be alive out " "builder says she can make traps to catch any creatures might still be alive "
"there" "out there"
msgstr "" msgstr ""
"byggeren sier hun kan lage feller til å fange skapningene som kanskje enda er der " "byggeren sier hun kan lage feller til å fange skapningene som kanskje enda "
"ute" "er der ute"
#: script/room.js:26 #: script/room.js:26
msgid "more traps to catch more creatures" msgid "more traps to catch more creatures"
@@ -830,7 +831,8 @@ msgstr "byggeren sier det er flere vandrere. sier de vil jobbe også."
#: script/room.js:54 #: script/room.js:54
msgid "builder puts up a hut, out in the forest. says word will get around." msgid "builder puts up a hut, out in the forest. says word will get around."
msgstr "byggeren setter opp en liten hytte ute i skogen. sier ryktet vil spre seg." msgstr ""
"byggeren setter opp en liten hytte ute i skogen. sier ryktet vil spre seg."
#: script/room.js:55 #: script/room.js:55
msgid "no more room for huts." msgid "no more room for huts."
@@ -857,7 +859,8 @@ msgid "a trading post would make commerce easier"
msgstr "et handelsområde ville gjort handel lettere" msgstr "et handelsområde ville gjort handel lettere"
#: script/room.js:84 #: script/room.js:84
msgid "now the nomads have a place to set up shop, they might stick around a while" msgid ""
"now the nomads have a place to set up shop, they might stick around a while"
msgstr "nå som nomadene har en plass å sette opp butikk vil de kanskje bli" msgstr "nå som nomadene har en plass å sette opp butikk vil de kanskje bli"
#: script/room.js:94 #: script/room.js:94
@@ -877,9 +880,11 @@ msgid "smokehouse"
msgstr "røykeri" msgstr "røykeri"
#: script/room.js:111 #: script/room.js:111
msgid "should cure the meat, or it'll spoil. builder says she can fix something up." msgid ""
"should cure the meat, or it'll spoil. builder says she can fix something up."
msgstr "" msgstr ""
"burde kurere kjøttet, ellers vil det råtne. bygger sier hun kan fikse en løsning." "burde kurere kjøttet, ellers vil det råtne. bygger sier hun kan fikse en "
"løsning."
#: script/room.js:112 #: script/room.js:112
msgid "builder finishes the smokehouse. she looks hungry." msgid "builder finishes the smokehouse. she looks hungry."
@@ -892,7 +897,8 @@ msgstr "verksted"
#: script/room.js:125 #: script/room.js:125
msgid "builder says she could make finer things, if she had the tools" msgid "builder says she could make finer things, if she had the tools"
msgstr "" msgstr ""
"byggeren sier hun kan lage finere ting, om hun bare hadde hatt det rette utstyret" "byggeren sier hun kan lage finere ting, om hun bare hadde hatt det rette "
"utstyret"
#: script/room.js:126 #: script/room.js:126
msgid "workshop's finally ready. builder's excited to get to it" msgid "workshop's finally ready. builder's excited to get to it"
@@ -1059,8 +1065,8 @@ msgid ""
"the stranger is standing by the fire. she says she can help. says she builds " "the stranger is standing by the fire. she says she can help. says she builds "
"things." "things."
msgstr "" msgstr ""
"den fremmede står ved bålet. hun sier hun kanskje kan hjelpe. sier hun kanskje " "den fremmede står ved bålet. hun sier hun kanskje kan hjelpe. sier hun "
"kan bygge ting." "kanskje kan bygge ting."
#: script/room.js:593 #: script/room.js:593
msgid "freezing" msgid "freezing"
@@ -1133,11 +1139,14 @@ msgstr "ikke mer ved igjen"
#: script/room.js:739 #: script/room.js:739
msgid "a ragged stranger stumbles through the door and collapses in the corner" msgid "a ragged stranger stumbles through the door and collapses in the corner"
msgstr "" msgstr ""
"en tynnslig kledd fremmed snubler seg inn igjennom døra og kollapser i hjørnet" "en tynnslig kledd fremmed snubler seg inn igjennom døra og kollapser i "
"hjørnet"
#: script/room.js:747 #: script/room.js:747
msgid "the stranger shivers, and mumbles quietly. her words are unintelligible." msgid ""
msgstr "den fremmede skjelver, og mumler for seg selv. det hun sier er uforståelig" "the stranger shivers, and mumbles quietly. her words are unintelligible."
msgstr ""
"den fremmede skjelver, og mumler for seg selv. det hun sier er uforståelig"
#: script/room.js:750 #: script/room.js:750
msgid "the stranger in the corner stops shivering. her breathing calms." msgid "the stranger in the corner stops shivering. her breathing calms."
@@ -1181,11 +1190,11 @@ msgstr "ta av"
#: script/ship.js:101 #: script/ship.js:101
msgid "" msgid ""
"somewhere above the debris cloud, the wanderer fleet hovers. been on this rock " "somewhere above the debris cloud, the wanderer fleet hovers. been on this "
"too long." "rock too long."
msgstr "" msgstr ""
"et eller annet sted over rusk skyen venter vandrerens flåte. har vært på denne " "et eller annet sted over rusk skyen venter vandrerens flåte. har vært på "
"steinen alt for lenge." "denne steinen alt for lenge."
#: script/ship.js:116 script/ship.js:129 #: script/ship.js:116 script/ship.js:129
msgid "not enough alien alloy" msgid "not enough alien alloy"
@@ -1372,7 +1381,8 @@ msgid "the trees yield to dry grass. the yellowed brush rustles in the wind."
msgstr "trærne reduseres til tørt gress. de gule bladene rasler i vinden." msgstr "trærne reduseres til tørt gress. de gule bladene rasler i vinden."
#: script/world.js:585 #: script/world.js:585
msgid "the trees are gone. parched earth and blowing dust are poor replacements." msgid ""
"the trees are gone. parched earth and blowing dust are poor replacements."
msgstr "" msgstr ""
"trærne er borte. den tørre jorden og støvete vinden er en dårlig ærstattning" "trærne er borte. den tørre jorden og støvete vinden er en dårlig ærstattning"
@@ -1381,8 +1391,8 @@ msgid ""
"trees loom on the horizon. grasses gradually yield to a forest floor of dry " "trees loom on the horizon. grasses gradually yield to a forest floor of dry "
"branches and fallen leaves." "branches and fallen leaves."
msgstr "" msgstr ""
"trærne synes på horisonten. gresset blir gradvis tildekket av tørre kvister og " "trærne synes på horisonten. gresset blir gradvis tildekket av tørre kvister "
"fallne blader." "og fallne blader."
#: script/world.js:595 #: script/world.js:595
msgid "the grasses thin. soon, only dust remains." msgid "the grasses thin. soon, only dust remains."
@@ -1390,15 +1400,16 @@ msgstr "gresset er tørt. snart er det bare støv igjen."
#: script/world.js:602 #: script/world.js:602
msgid "the barrens break at a sea of dying grass, swaying in the arid breeze." msgid "the barrens break at a sea of dying grass, swaying in the arid breeze."
msgstr "tundraen stopper ved et hav av dødt gress, svaiende in den kalde brisen." msgstr ""
"tundraen stopper ved et hav av dødt gress, svaiende in den kalde brisen."
#: script/world.js:605 #: script/world.js:605
msgid "" msgid ""
"a wall of gnarled trees rises from the dust. their branches twist into a skeletal " "a wall of gnarled trees rises from the dust. their branches twist into a "
"canopy overhead." "skeletal canopy overhead."
msgstr "" msgstr ""
"en vegg av knudrete trær stiger opp fra støvet. grenene vrir seg til et skjelett-" "en vegg av knudrete trær stiger opp fra støvet. grenene vrir seg til et "
"lignende tak." "skjelett-lignende tak."
#: script/world.js:812 #: script/world.js:812
msgid "Wanderer" msgid "Wanderer"
@@ -1613,7 +1624,8 @@ msgid "the villagers hang the thief high in front of the store room."
msgstr "innbyggerne henger tyven etter halsen foran lagerrommet." msgstr "innbyggerne henger tyven etter halsen foran lagerrommet."
#: script/events/global.js:33 #: script/events/global.js:33
msgid "the point is made. in the next few days, the missing supplies are returned." msgid ""
"the point is made. in the next few days, the missing supplies are returned."
msgstr "" msgstr ""
"et poeng har blitt gjort av mannen. innen de neste få dagene, blirde savnede " "et poeng har blitt gjort av mannen. innen de neste få dagene, blirde savnede "
"forsyningene returnert." "forsyningene returnert."
@@ -1646,7 +1658,8 @@ msgstr "noen av fellene har blitt ødelagt"
msgid "track them" msgid "track them"
msgstr "følg dem" msgstr "følg dem"
#: script/events/outside.js:30 script/events/room.js:71 script/events/room.js:122 #: script/events/outside.js:30 script/events/room.js:71
#: script/events/room.js:122
msgid "ignore them" msgid "ignore them"
msgstr "ignorer dem" msgstr "ignorer dem"
@@ -1786,8 +1799,8 @@ msgstr "Nomaden"
msgid "" msgid ""
"a nomad shuffles into view, laden with makeshift bags bound with rough twine." "a nomad shuffles into view, laden with makeshift bags bound with rough twine."
msgstr "" msgstr ""
"en nomade sysler inn i synsvinkel, med hjemmelagde sekker på ryggen festet med " "en nomade sysler inn i synsvinkel, med hjemmelagde sekker på ryggen festet "
"hyssing" "med hyssing"
#: script/events/room.js:14 #: script/events/room.js:14
msgid "won't say from where he came, but it's clear that he's not staying." msgid "won't say from where he came, but it's clear that he's not staying."
@@ -1821,13 +1834,15 @@ msgstr "kjøp kompass"
#: script/events/room.js:42 #: script/events/room.js:42
msgid "the old compass is dented and dusty, but it looks to work." msgid "the old compass is dented and dusty, but it looks to work."
msgstr "" msgstr ""
"det gamle kompasset er bulkete og støvete, men den ser ut til å være i fungerende " "det gamle kompasset er bulkete og støvete, men den ser ut til å være i "
"stand." "fungerende stand."
#: script/events/room.js:46 script/events/room.js:227 script/events/room.js:240 #: script/events/room.js:46 script/events/room.js:227
#: script/events/room.js:253 script/events/room.js:305 script/events/room.js:324 #: script/events/room.js:240 script/events/room.js:253
#: script/events/room.js:376 script/events/room.js:395 script/events/room.js:434 #: script/events/room.js:305 script/events/room.js:324
#: script/events/room.js:552 script/events/room.js:568 script/events/room.js:584 #: script/events/room.js:376 script/events/room.js:395
#: script/events/room.js:434 script/events/room.js:552
#: script/events/room.js:568 script/events/room.js:584
#: script/events/room.js:595 #: script/events/room.js:595
msgid "say goodbye" msgid "say goodbye"
msgstr "si hadet bra" msgstr "si hadet bra"
@@ -1866,9 +1881,11 @@ msgid "go back inside"
msgstr "gå tilbake" msgstr "gå tilbake"
#: script/events/room.js:91 #: script/events/room.js:91
msgid "a bundle of sticks lies just beyond the threshold, wrapped in coarse furs." msgid ""
"a bundle of sticks lies just beyond the threshold, wrapped in coarse furs."
msgstr "" msgstr ""
"en liten samling pinner ligger rett utenfor døråpningen, innpakket i grov pels" "en liten samling pinner ligger rett utenfor døråpningen, innpakket i grov "
"pels"
#: script/events/room.js:92 #: script/events/room.js:92
msgid "the night is silent." msgid "the night is silent."
@@ -1886,7 +1903,8 @@ msgstr "det er noe der."
msgid "something's in the store room" msgid "something's in the store room"
msgstr "noe er inne i lager-rommet" msgstr "noe er inne i lager-rommet"
#: script/events/room.js:129 script/events/room.js:149 script/events/room.js:169 #: script/events/room.js:129 script/events/room.js:149
#: script/events/room.js:169
msgid "some wood is missing." msgid "some wood is missing."
msgstr "noe ved mangler." msgstr "noe ved mangler."
@@ -1922,15 +1940,18 @@ msgstr "en tigger ankommer"
msgid "give 50" msgid "give 50"
msgstr "gi 50" msgstr "gi 50"
#: script/events/room.js:209 script/events/room.js:276 script/events/room.js:347 #: script/events/room.js:209 script/events/room.js:276
#: script/events/room.js:347
msgid "give 100" msgid "give 100"
msgstr "gi 100" msgstr "gi 100"
#: script/events/room.js:214 script/events/room.js:286 script/events/room.js:466 #: script/events/room.js:214 script/events/room.js:286
#: script/events/room.js:466
msgid "turn him away" msgid "turn him away"
msgstr "få ham til å snu" msgstr "få ham til å snu"
#: script/events/room.js:222 script/events/room.js:235 script/events/room.js:248 #: script/events/room.js:222 script/events/room.js:235
#: script/events/room.js:248
msgid "the beggar expresses his thanks." msgid "the beggar expresses his thanks."
msgstr "tiggeren utrykker sin takknemlighet." msgstr "tiggeren utrykker sin takknemlighet."
@@ -1952,11 +1973,11 @@ msgstr "Den Mystiske Vandreren"
#: script/events/room.js:269 #: script/events/room.js:269
msgid "" msgid ""
"a wanderer arrives with an empty cart. says if he leaves with wood, he'll be back " "a wanderer arrives with an empty cart. says if he leaves with wood, he'll be "
"with more." "back with more."
msgstr "" msgstr ""
"en vandrer ankommer med en tom vogn. sier at hvis han reiser bort med ved kommer " "en vandrer ankommer med en tom vogn. sier at hvis han reiser bort med ved "
"han tilbake med mer." "kommer han tilbake med mer."
#: script/events/room.js:270 #: script/events/room.js:270
msgid "builder's not sure he's to be trusted." msgid "builder's not sure he's to be trusted."
@@ -1980,11 +2001,11 @@ msgstr "den mystiske vandreren returnerer, vognen stablet høyt med ved."
#: script/events/room.js:340 #: script/events/room.js:340
msgid "" msgid ""
"a wanderer arrives with an empty cart. says if she leaves with furs, she'll be " "a wanderer arrives with an empty cart. says if she leaves with furs, she'll "
"back with more." "be back with more."
msgstr "" msgstr ""
"en vandrer ankommer med en tom vogn, sier at hvis han reiser bort med pels vil " "en vandrer ankommer med en tom vogn, sier at hvis han reiser bort med pels "
"hun komme tilbake med mer." "vil hun komme tilbake med mer."
#: script/events/room.js:341 #: script/events/room.js:341
msgid "builder's not sure she's to be trusted." msgid "builder's not sure she's to be trusted."
@@ -2098,11 +2119,13 @@ msgstr "mannen svelger medisinen ivrig"
msgid "tell him to leave" msgid "tell him to leave"
msgstr "snu ham ryggen" msgstr "snu ham ryggen"
#: script/events/room.js:543 script/events/room.js:559 script/events/room.js:575 #: script/events/room.js:543 script/events/room.js:559
#: script/events/room.js:575
msgid "the man is thankful." msgid "the man is thankful."
msgstr "mannen er takknemlig." msgstr "mannen er takknemlig."
#: script/events/room.js:544 script/events/room.js:560 script/events/room.js:576 #: script/events/room.js:544 script/events/room.js:560
#: script/events/room.js:576
msgid "he leaves a reward." msgid "he leaves a reward."
msgstr "han legger igjen en belønning." msgstr "han legger igjen en belønning."
@@ -2326,10 +2349,11 @@ msgstr "en liten forstad kommer til syne, tomme hus svidde og nedbrent."
#: script/events/setpieces.js:526 #: script/events/setpieces.js:526
msgid "" msgid ""
"broken streetlights stand, rusting. light hasn't graced this place in a long time." "broken streetlights stand, rusting. light hasn't graced this place in a long "
"time."
msgstr "" msgstr ""
"ødelagte gatelykter står og ruster. lys har ikke prydet denne plassen på veldig " "ødelagte gatelykter står og ruster. lys har ikke prydet denne plassen på "
"lenge." "veldig lenge."
#: script/events/setpieces.js:528 #: script/events/setpieces.js:528
msgid "the town lies abandoned, its citizens long dead" msgid "the town lies abandoned, its citizens long dead"
@@ -2341,8 +2365,8 @@ msgstr "utforsk"
#: script/events/setpieces.js:543 #: script/events/setpieces.js:543
msgid "" msgid ""
"where the windows of the schoolhouse aren't shattered, they're blackened with " "where the windows of the schoolhouse aren't shattered, they're blackened "
"soot." "with soot."
msgstr "hvor vinduene i skolehuset ikke er knust, er de dekket av sort sot." msgstr "hvor vinduene i skolehuset ikke er knust, er de dekket av sort sot."
#: script/events/setpieces.js:544 #: script/events/setpieces.js:544
@@ -2393,10 +2417,11 @@ msgstr "en veltet campingvogn ligger spredd utover gata."
#: script/events/setpieces.js:730 #: script/events/setpieces.js:730
msgid "" msgid ""
"it's been picked over by scavengers, but there's still some things worth taking." "it's been picked over by scavengers, but there's still some things worth "
"taking."
msgstr "" msgstr ""
"den har blitt fraplukket av hjemløse, men det er fremdeles noen ting av verdi som " "den har blitt fraplukket av hjemløse, men det er fremdeles noen ting av "
"kan bli tatt." "verdi som kan bli tatt."
#: script/events/setpieces.js:792 #: script/events/setpieces.js:792
msgid "a madman attacks, screeching." msgid "a madman attacks, screeching."
@@ -2435,8 +2460,10 @@ msgid "a fight, maybe."
msgstr "en slosskamp, kanskje." msgstr "en slosskamp, kanskje."
#: script/events/setpieces.js:948 #: script/events/setpieces.js:948
msgid "a small basket of food is hidden under a park bench, with a note attached." msgid ""
msgstr "en liten kurv med mat er gjemt under en park-benk, med en lapp vedlagt." "a small basket of food is hidden under a park bench, with a note attached."
msgstr ""
"en liten kurv med mat er gjemt under en park-benk, med en lapp vedlagt."
#: script/events/setpieces.js:949 #: script/events/setpieces.js:949
msgid "can't read the words." msgid "can't read the words."
@@ -2456,7 +2483,8 @@ msgstr "hjemløse hadde en liten leir inne på skolen."
#: script/events/setpieces.js:1052 #: script/events/setpieces.js:1052
msgid "collected scraps spread across the floor like they fell from heaven." msgid "collected scraps spread across the floor like they fell from heaven."
msgstr "samlet småting spredt rundt på gulvet, som om de hadde falt fra himmelen." msgstr ""
"samlet småting spredt rundt på gulvet, som om de hadde falt fra himmelen."
#: script/events/setpieces.js:1094 #: script/events/setpieces.js:1094
msgid "scavenger'd been looking for supplies in here, it seems." msgid "scavenger'd been looking for supplies in here, it seems."
@@ -2468,9 +2496,11 @@ msgstr "hadde vært en skam å la det han har funnet gå til spille."
#: script/events/setpieces.js:1127 #: script/events/setpieces.js:1127
msgid "" msgid ""
"beneath the wanderer's rags, clutched in one of its many hands, a glint of steel." "beneath the wanderer's rags, clutched in one of its many hands, a glint of "
"steel."
msgstr "" msgstr ""
"under vandrerens filler, klemt inn i en av dens mange henner, et glimp av stål." "under vandrerens filler, klemt inn i en av dens mange henner, et glimp av "
"stål."
#: script/events/setpieces.js:1128 #: script/events/setpieces.js:1128
msgid "worth killing for, it seems." msgid "worth killing for, it seems."
@@ -2508,12 +2538,13 @@ msgstr "En Ruinert By"
msgid "" msgid ""
"a battered highway sign stands guard at the entrance to this once-great city." "a battered highway sign stands guard at the entrance to this once-great city."
msgstr "" msgstr ""
"et ødelagt motorvei-skilt vakter over inngangen til denne en gang flotte byen." "et ødelagt motorvei-skilt vakter over inngangen til denne en gang flotte "
"byen."
#: script/events/setpieces.js:1243 #: script/events/setpieces.js:1243
msgid "" msgid ""
"the towers that haven't crumbled jut from the landscape like the ribcage of some " "the towers that haven't crumbled jut from the landscape like the ribcage of "
"ancient beast." "some ancient beast."
msgstr "" msgstr ""
"tårnene som ikke har falt enda kan sees fra landskapet, som ribbeina fra et " "tårnene som ikke har falt enda kan sees fra landskapet, som ribbeina fra et "
"eldgammelt beist." "eldgammelt beist."
@@ -2804,9 +2835,10 @@ msgstr "den lille militær leiren er godt provisjonert."
#: script/events/setpieces.js:2446 #: script/events/setpieces.js:2446
msgid "" msgid ""
"arms and munitions, relics from the war, are neatly arranged on the store-room " "arms and munitions, relics from the war, are neatly arranged on the store-"
"floor." "room floor."
msgstr "våpen og kuler, minner fra krigen, er organisert på lager-rommets gulv." msgstr ""
"våpen og kuler, minner fra krigen, er organisert på lager-rommets gulv."
#: script/events/setpieces.js:2447 #: script/events/setpieces.js:2447
msgid "just as deadly now as they were then." msgid "just as deadly now as they were then."
@@ -2829,7 +2861,8 @@ msgid "the small settlement has clearly been burning a while."
msgstr "denne lille landsbyen har brent en stund." msgstr "denne lille landsbyen har brent en stund."
#: script/events/setpieces.js:2523 #: script/events/setpieces.js:2523
msgid "the bodies of the wanderers that lived here are still visible in the flames." msgid ""
"the bodies of the wanderers that lived here are still visible in the flames."
msgstr "likene til vandrere som har bodd her er fremdeles synlige i flammene." msgstr "likene til vandrere som har bodd her er fremdeles synlige i flammene."
#: script/events/setpieces.js:2524 #: script/events/setpieces.js:2524
@@ -2837,7 +2870,8 @@ msgid "still time to rescue a few supplies."
msgstr "det er fremdeles tid til å redde noen provisjoner." msgstr "det er fremdeles tid til å redde noen provisjoner."
#: script/events/setpieces.js:2558 #: script/events/setpieces.js:2558
msgid "the remaining settlers flee from the violence, their belongings forgotten." msgid ""
"the remaining settlers flee from the violence, their belongings forgotten."
msgstr "de resterende innbyggerne rømmer fra volden, deres eiendeler glemt." msgstr "de resterende innbyggerne rømmer fra volden, deres eiendeler glemt."
#: script/events/setpieces.js:2559 #: script/events/setpieces.js:2559
@@ -2953,8 +2987,10 @@ msgid "a battle was fought here, long ago."
msgstr "en krig ble utkjempet her, for lenge siden." msgstr "en krig ble utkjempet her, for lenge siden."
#: script/events/setpieces.js:3051 #: script/events/setpieces.js:3051
msgid "battered technology from both sides lays dormant on the blasted landscape." msgid ""
msgstr "ødelagt teknologi fra begge sider ligger stille på det sprengte landskapet." "battered technology from both sides lays dormant on the blasted landscape."
msgstr ""
"ødelagt teknologi fra begge sider ligger stille på det sprengte landskapet."
#: script/events/setpieces.js:3099 #: script/events/setpieces.js:3099
msgid "A Huge Borehole" msgid "A Huge Borehole"
@@ -2962,7 +2998,8 @@ msgstr "Et Digert Borehull"
#: script/events/setpieces.js:3103 #: script/events/setpieces.js:3103
msgid "a huge hole is cut deep into the earth, evidence of the past harvest." msgid "a huge hole is cut deep into the earth, evidence of the past harvest."
msgstr "et digert hull er borret dypt inn i jorda, som beviset på gammel høsting." msgstr ""
"et digert hull er borret dypt inn i jorda, som beviset på gammel høsting."
#: script/events/setpieces.js:3104 #: script/events/setpieces.js:3104
msgid "they took what they came for, and left." msgid "they took what they came for, and left."
@@ -2970,7 +3007,8 @@ msgstr "de tok det de kom for, og gikk."
#: script/events/setpieces.js:3105 #: script/events/setpieces.js:3105
msgid "" msgid ""
"castoff from the mammoth drills can still be found by the edges of the precipice." "castoff from the mammoth drills can still be found by the edges of the "
"precipice."
msgstr "biter fra mammut-drillen kan fremdeles bli sett på kanten av stupet." msgstr "biter fra mammut-drillen kan fremdeles bli sett på kanten av stupet."
#: script/events/setpieces.js:3128 #: script/events/setpieces.js:3128
@@ -2978,7 +3016,8 @@ msgid "A Crashed Ship"
msgstr "Et Krasjet Skip" msgstr "Et Krasjet Skip"
#: script/events/setpieces.js:3137 #: script/events/setpieces.js:3137
msgid "the familiar curves of a wanderer vessel rise up out of the dust and ash. " msgid ""
"the familiar curves of a wanderer vessel rise up out of the dust and ash. "
msgstr "de kjente linjene fra et vandrer-skip stiger frem fra støvet og asken." msgstr "de kjente linjene fra et vandrer-skip stiger frem fra støvet og asken."
#: script/events/setpieces.js:3138 #: script/events/setpieces.js:3138
@@ -3085,8 +3124,8 @@ msgstr "en gammel jerngruve er her, utstyr forlatt og latt ruste."
#: script/events/setpieces.js:3447 #: script/events/setpieces.js:3447
msgid "" msgid ""
"bleached bones are strewn about the entrance. many, deeply scored with jagged " "bleached bones are strewn about the entrance. many, deeply scored with "
"grooves." "jagged grooves."
msgstr "kritthvite ben er strødd utover inngangen. mange med dype skraper." msgstr "kritthvite ben er strødd utover inngangen. mange med dype skraper."
#: script/events/setpieces.js:3448 #: script/events/setpieces.js:3448
+1 -1
View File
@@ -3,7 +3,7 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.6.9\n" "X-Generator: Poedit 1.5.4\n"
"Project-Id-Version: ADR\n" "Project-Id-Version: ADR\n"
"Language: pl\n" "Language: pl\n"
"POT-Creation-Date: \n" "POT-Creation-Date: \n"
+2 -2
View File
@@ -3,14 +3,14 @@ msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2014-09-27 12:34+0200\n" "POT-Creation-Date: 2014-09-27 12:34+0200\n"
"PO-Revision-Date: 2014-11-28 09:39-0800\n" "PO-Revision-Date: 2015-02-07 14:15-0500\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: pt\n" "Language: pt\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.6.10\n" "X-Generator: Poedit 1.5.4\n"
"X-Poedit-Basepath: .\n" "X-Poedit-Basepath: .\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
+2161 -2293
View File
File diff suppressed because it is too large Load Diff
+1882 -2744
View File
File diff suppressed because it is too large Load Diff
+1631 -2342
View File
File diff suppressed because it is too large Load Diff
+1881 -2736
View File
File diff suppressed because it is too large Load Diff
+3
View File
@@ -0,0 +1,3 @@
.button{width: 120px !important;}
#outsidePanel .button{width: 115px !important;}
.eventPanel .button {width: 122px !important;}
File diff suppressed because one or more lines are too long
+3193
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+1742 -2408
View File
File diff suppressed because it is too large Load Diff
+30 -6
View File
@@ -74,7 +74,8 @@
state: null, state: null,
debug: false, debug: false,
log: false, log: false,
dropbox: false dropbox: false,
doubleTime: false
}, },
init: function(options) { init: function(options) {
@@ -114,11 +115,11 @@
.addClass('customSelect') .addClass('customSelect')
.addClass('menuBtn') .addClass('menuBtn')
.appendTo(menu); .appendTo(menu);
var options = $('<span>') var selectOptions = $('<span>')
.addClass('customSelectOptions') .addClass('customSelectOptions')
.appendTo(customSelect); .appendTo(customSelect);
var optionsList = $('<ul>') var optionsList = $('<ul>')
.appendTo(options); .appendTo(selectOptions);
$('<li>') $('<li>')
.text("language.") .text("language.")
.appendTo(optionsList); .appendTo(optionsList);
@@ -138,6 +139,18 @@
.click(Engine.turnLightsOff) .click(Engine.turnLightsOff)
.appendTo(menu); .appendTo(menu);
$('<span>')
.addClass('menuBtn')
.text(_('hyper.'))
.click(function(){
Engine.options.doubleTime = !Engine.options.doubleTime;
if(Engine.options.doubleTime)
$(this).text(_('classic.'));
else
$(this).text(_('hyper.'));
})
.appendTo(menu);
$('<span>') $('<span>')
.addClass('menuBtn') .addClass('menuBtn')
.text(_('restart.')) .text(_('restart.'))
@@ -339,7 +352,7 @@
} }
} }
}); });
Engine.autoSelect('#description textarea') Engine.autoSelect('#description textarea');
}, },
import64: function(string64) { import64: function(string64) {
@@ -462,7 +475,6 @@
var darkCss = Engine.findStylesheet('darkenLights'); var darkCss = Engine.findStylesheet('darkenLights');
if (darkCss == null) { if (darkCss == null) {
$('head').append('<link rel="stylesheet" href="css/dark.css" type="text/css" title="darkenLights" />'); $('head').append('<link rel="stylesheet" href="css/dark.css" type="text/css" title="darkenLights" />');
Engine.turnLightsOff;
$('.lightsOff').text(_('lights on.')); $('.lightsOff').text(_('lights on.'));
} else if (darkCss.disabled) { } else if (darkCss.disabled) {
darkCss.disabled = false; darkCss.disabled = false;
@@ -496,7 +508,7 @@
var diff = Math.abs(panelIndex - currentIndex); var diff = Math.abs(panelIndex - currentIndex);
slider.animate({left: -(panelIndex * 700) + 'px'}, 300 * diff); slider.animate({left: -(panelIndex * 700) + 'px'}, 300 * diff);
if($SM.get('stores.wood') != undefined) { if($SM.get('stores.wood') !== undefined) {
// FIXME Why does this work if there's an animation queue...? // FIXME Why does this work if there's an animation queue...?
stores.animate({right: -(panelIndex * 700) + 'px'}, 300 * diff); stores.animate({right: -(panelIndex * 700) + 'px'}, 300 * diff);
} }
@@ -693,7 +705,19 @@
if(lang && typeof Storage != 'undefined' && localStorage) { if(lang && typeof Storage != 'undefined' && localStorage) {
localStorage.lang = lang; localStorage.lang = lang;
} }
},
setTimeout: function(callback, timeout, skipDouble){
if( Engine.options.doubleTime && !skipDouble ){
Engine.log('Double time, cutting timeout in half');
timeout /= 2;
}
return setTimeout(callback, timeout);
} }
}; };
function eventNullifier(e) { function eventNullifier(e) {
+20 -22
View File
@@ -19,7 +19,7 @@ var Events = {
); );
// Build the Event Pool // Build the Event Pool
Events.EventPool = new Array().concat( Events.EventPool = [].concat(
Events.Global, Events.Global,
Events.Room, Events.Room,
Events.Outside Events.Outside
@@ -35,9 +35,7 @@ var Events = {
options: {}, // Nothing for now options: {}, // Nothing for now
activeEvent: null,
activeScene: null, activeScene: null,
eventPanel: null,
loadScene: function(name) { loadScene: function(name) {
Engine.log('loading scene: ' + name); Engine.log('loading scene: ' + name);
@@ -88,7 +86,7 @@ var Events = {
for(var k in World.Weapons) { for(var k in World.Weapons) {
var weapon = World.Weapons[k]; var weapon = World.Weapons[k];
if(typeof Path.outfit[k] == 'number' && Path.outfit[k] > 0) { if(typeof Path.outfit[k] == 'number' && Path.outfit[k] > 0) {
if(typeof weapon.damage != 'number' || weapon.damage == 0) { if(typeof weapon.damage != 'number' || weapon.damage === 0) {
// Weapons that deal no damage don't count // Weapons that deal no damage don't count
numWeapons--; numWeapons--;
} else if(weapon.cost){ } else if(weapon.cost){
@@ -104,18 +102,18 @@ var Events = {
Events.createAttackButton(k).appendTo(btns); Events.createAttackButton(k).appendTo(btns);
} }
} }
if(numWeapons == 0) { if(numWeapons === 0) {
// No weapons? You can punch stuff! // No weapons? You can punch stuff!
Events.createAttackButton('fists').prependTo(btns); Events.createAttackButton('fists').prependTo(btns);
} }
Events.createEatMeatButton().appendTo(btns); Events.createEatMeatButton().appendTo(btns);
if((Path.outfit['medicine'] || 0) != 0) { if((Path.outfit['medicine'] || 0) !== 0) {
Events.createUseMedsButton().appendTo(btns); Events.createUseMedsButton().appendTo(btns);
} }
// Set up the enemy attack timer // Set up the enemy attack timer
Events._enemyAttackTimer = setTimeout(Events.enemyAttack, scene.attackDelay * 1000); Events._enemyAttackTimer = Engine.setTimeout(Events.enemyAttack, scene.attackDelay * 1000);
}, },
createEatMeatButton: function(cooldown) { createEatMeatButton: function(cooldown) {
@@ -131,7 +129,7 @@ var Events = {
cost: { 'cured meat': 1 } cost: { 'cured meat': 1 }
}); });
if(Path.outfit['cured meat'] == 0) { if(Path.outfit['cured meat'] === 0) {
Button.setDisabled(btn, true); Button.setDisabled(btn, true);
} }
@@ -151,7 +149,7 @@ var Events = {
cost: { 'medicine': 1 } cost: { 'medicine': 1 }
}); });
if((Path.outfit['medicine'] || 0) == 0) { if((Path.outfit['medicine'] || 0) === 0) {
Button.setDisabled(btn, true); Button.setDisabled(btn, true);
} }
@@ -203,7 +201,7 @@ var Events = {
if(Path.outfit['cured meat'] > 0) { if(Path.outfit['cured meat'] > 0) {
Path.outfit['cured meat']--; Path.outfit['cured meat']--;
World.updateSupplies(); World.updateSupplies();
if(Path.outfit['cured meat'] == 0) { if(Path.outfit['cured meat'] === 0) {
Button.setDisabled($('#eat'), true); Button.setDisabled($('#eat'), true);
} }
@@ -225,7 +223,7 @@ var Events = {
if(Path.outfit['medicine'] > 0) { if(Path.outfit['medicine'] > 0) {
Path.outfit['medicine']--; Path.outfit['medicine']--;
World.updateSupplies(); World.updateSupplies();
if(Path.outfit['medicine'] == 0) { if(Path.outfit['medicine'] === 0) {
Button.setDisabled($('#meds'), true); Button.setDisabled($('#meds'), true);
} }
@@ -286,7 +284,7 @@ var Events = {
if(!validWeapons) { if(!validWeapons) {
// enable or create the punch button // enable or create the punch button
var fists = $('#attack_fists'); var fists = $('#attack_fists');
if(fists.length == 0) { if(fists.length === 0) {
Events.createAttackButton('fists').prependTo('#buttons', Events.eventPanel()); Events.createAttackButton('fists').prependTo('#buttons', Events.eventPanel());
} else { } else {
Button.setDisabled(fists, false); Button.setDisabled(fists, false);
@@ -356,7 +354,7 @@ var Events = {
if(dmg == 'stun') { if(dmg == 'stun') {
msg = _('stunned'); msg = _('stunned');
enemy.data('stunned', true); enemy.data('stunned', true);
setTimeout(function() { Engine.setTimeout(function() {
enemy.data('stunned', false); enemy.data('stunned', false);
}, Events.STUN_DURATION); }, Events.STUN_DURATION);
} }
@@ -401,7 +399,7 @@ var Events = {
if(dmg == 'stun') { if(dmg == 'stun') {
msg = _('stunned'); msg = _('stunned');
enemy.data('stunned', true); enemy.data('stunned', true);
setTimeout(function() { Engine.setTimeout(function() {
enemy.data('stunned', false); enemy.data('stunned', false);
}, Events.STUN_DURATION); }, Events.STUN_DURATION);
} }
@@ -440,14 +438,14 @@ var Events = {
}); });
} }
Events._enemyAttackTimer = setTimeout(Events.enemyAttack, scene.attackDelay * 1000); Events._enemyAttackTimer = Engine.setTimeout(Events.enemyAttack, scene.attackDelay * 1000);
}, },
winFight: function() { winFight: function() {
Events.won = true; Events.won = true;
clearTimeout(Events._enemyAttackTimer); clearTimeout(Events._enemyAttackTimer);
$('#enemy').animate({opacity: 0}, 300, 'linear', function() { $('#enemy').animate({opacity: 0}, 300, 'linear', function() {
setTimeout(function() { Engine.setTimeout(function() {
try { try {
var scene = Events.activeEvent().scenes[Events.activeScene]; var scene = Events.activeEvent().scenes[Events.activeScene];
var desc = $('#description', Events.eventPanel()); var desc = $('#description', Events.eventPanel());
@@ -477,14 +475,14 @@ var Events = {
}).appendTo(btns)); }).appendTo(btns));
Events.createEatMeatButton(0).appendTo(btns); Events.createEatMeatButton(0).appendTo(btns);
if((Path.outfit['medicine'] || 0) != 0) { if((Path.outfit['medicine'] || 0) !== 0) {
Events.createUseMedsButton(0).appendTo(btns); Events.createUseMedsButton(0).appendTo(btns);
} }
} }
} catch(e) { } catch(e) {
// It is possible to die and win if the timing is perfect. Just let it fail. // It is possible to die and win if the timing is perfect. Just let it fail.
} }
}, 1000); }, 1000, true);
}); });
}, },
@@ -542,7 +540,7 @@ var Events = {
var num = btn.data('numLeft'); var num = btn.data('numLeft');
num--; num--;
btn.data('numLeft', num); btn.data('numLeft', num);
if(num == 0) { if(num === 0) {
Button.setDisabled(btn); Button.setDisabled(btn);
btn.animate({'opacity':0}, 300, 'linear', function() { btn.animate({'opacity':0}, 300, 'linear', function() {
$(this).remove(); $(this).remove();
@@ -744,7 +742,7 @@ var Events = {
// every 3 seconds change title to '*** EVENT ***', then 1.5 seconds later, change it back to the original title. // every 3 seconds change title to '*** EVENT ***', then 1.5 seconds later, change it back to the original title.
Events.BLINK_INTERVAL = setInterval(function() { Events.BLINK_INTERVAL = setInterval(function() {
document.title = _('*** EVENT ***'); document.title = _('*** EVENT ***');
setTimeout(function() {document.title = title;}, 1500); Engine.setTimeout(function() {document.title = title;}, 1500, true);
}, 3000); }, 3000);
}, },
@@ -764,7 +762,7 @@ var Events = {
} }
} }
if(possibleEvents.length == 0) { if(possibleEvents.length === 0) {
Events.scheduleNextEvent(0.5); Events.scheduleNextEvent(0.5);
return; return;
} else { } else {
@@ -826,7 +824,7 @@ var Events = {
var nextEvent = Math.floor(Math.random()*(Events._EVENT_TIME_RANGE[1] - Events._EVENT_TIME_RANGE[0])) + Events._EVENT_TIME_RANGE[0]; var nextEvent = Math.floor(Math.random()*(Events._EVENT_TIME_RANGE[1] - Events._EVENT_TIME_RANGE[0])) + Events._EVENT_TIME_RANGE[0];
if(scale > 0) { nextEvent *= scale; } if(scale > 0) { nextEvent *= scale; }
Engine.log('next event scheduled in ' + nextEvent + ' minutes'); Engine.log('next event scheduled in ' + nextEvent + ' minutes');
Events._eventTimeout = setTimeout(Events.triggerEvent, nextEvent * 60 * 1000); Events._eventTimeout = Engine.setTimeout(Events.triggerEvent, nextEvent * 60 * 1000);
}, },
endEvent: function() { endEvent: function() {
+30 -2
View File
@@ -63,7 +63,35 @@ Events.Outside = [
} }
} }
}, },
{
title: _('Fire'),
isAvailable: function() {
return Engine.activeModule == Outside && $SM.get('game.buildings["hut"]', true) > 0 && $SM.get('game.population', true) > 5;
},
scenes: {
'start': {
text: [
_('a fire rampages through one of the huts, destroying it.'),
_('all residents in the hut perished in the fire.')
],
notification: _('a fire has started'),
blink: true,
onLoad: function() {
var population = $SM.get('game.population', true);
var huts = $SM.get('game.buildings["hut"]', true);
$SM.set('game.buildings["hut"]', (huts - 1));
$SM.set('game.population', (population - 4));
},
buttons: {
'mourn': {
text: _('mourn'),
notification: _('some villagers have died'),
nextScene: 'end'
}
}
}
}
},
{ /* Sickness */ { /* Sickness */
title: _('Sickness'), title: _('Sickness'),
isAvailable: function() { isAvailable: function() {
@@ -223,7 +251,7 @@ Events.Outside = [
{ /* Soldier attack */ { /* Soldier attack */
title: _('A Military Raid'), title: _('A Military Raid'),
isAvailable: function() { isAvailable: function() {
return Engine.activeModule == Outside && $SM.get('game.population', true) > 0 && $SM.get('game.cityCleared');; return Engine.activeModule == Outside && $SM.get('game.population', true) > 0 && $SM.get('game.cityCleared');
}, },
scenes: { scenes: {
'start': { 'start': {
+12 -11
View File
@@ -49,7 +49,8 @@ Events.Room = [
} }
} }
} }
}, { /* Noises Outside -- gain wood/fur */ },
{ /* Noises Outside -- gain wood/fur */
title: _('Noises'), title: _('Noises'),
isAvailable: function() { isAvailable: function() {
return Engine.activeModule == Room && $SM.get('stores.wood'); return Engine.activeModule == Room && $SM.get('stores.wood');
@@ -132,9 +133,9 @@ Events.Room = [
onLoad: function() { onLoad: function() {
var numWood = $SM.get('stores.wood', true); var numWood = $SM.get('stores.wood', true);
numWood = Math.floor(numWood * 0.1); numWood = Math.floor(numWood * 0.1);
if(numWood == 0) numWood = 1; if(numWood === 0) numWood = 1;
var numScales = Math.floor(numWood / 5); var numScales = Math.floor(numWood / 5);
if(numScales == 0) numScales = 1; if(numScales === 0) numScales = 1;
$SM.addM('stores', {'wood': -numWood, 'scales': numScales}); $SM.addM('stores', {'wood': -numWood, 'scales': numScales});
}, },
buttons: { buttons: {
@@ -152,9 +153,9 @@ Events.Room = [
onLoad: function() { onLoad: function() {
var numWood = $SM.get('stores.wood', true); var numWood = $SM.get('stores.wood', true);
numWood = Math.floor(numWood * 0.1); numWood = Math.floor(numWood * 0.1);
if(numWood == 0) numWood = 1; if(numWood === 0) numWood = 1;
var numTeeth = Math.floor(numWood / 5); var numTeeth = Math.floor(numWood / 5);
if(numTeeth == 0) numTeeth = 1; if(numTeeth === 0) numTeeth = 1;
$SM.addM('stores', {'wood': -numWood, 'teeth': numTeeth}); $SM.addM('stores', {'wood': -numWood, 'teeth': numTeeth});
}, },
buttons: { buttons: {
@@ -172,9 +173,9 @@ Events.Room = [
onLoad: function() { onLoad: function() {
var numWood = $SM.get('stores.wood', true); var numWood = $SM.get('stores.wood', true);
numWood = Math.floor(numWood * 0.1); numWood = Math.floor(numWood * 0.1);
if(numWood == 0) numWood = 1; if(numWood === 0) numWood = 1;
var numCloth = Math.floor(numWood / 5); var numCloth = Math.floor(numWood / 5);
if(numCloth == 0) numCloth = 1; if(numCloth === 0) numCloth = 1;
$SM.addM('stores', {'wood': -numWood, 'cloth': numCloth}); $SM.addM('stores', {'wood': -numWood, 'cloth': numCloth});
}, },
buttons: { buttons: {
@@ -294,7 +295,7 @@ Events.Room = [
], ],
onLoad: function() { onLoad: function() {
if(Math.random() < 0.5) { if(Math.random() < 0.5) {
setTimeout(function() { Engine.setTimeout(function() {
$SM.add('stores.wood', 300); $SM.add('stores.wood', 300);
Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with wood.')); Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with wood.'));
}, 60 * 1000); }, 60 * 1000);
@@ -313,7 +314,7 @@ Events.Room = [
], ],
onLoad: function() { onLoad: function() {
if(Math.random() < 0.3) { if(Math.random() < 0.3) {
setTimeout(function() { Engine.setTimeout(function() {
$SM.add('stores.wood', 1500); $SM.add('stores.wood', 1500);
Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with wood.')); Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with wood.'));
}, 60 * 1000); }, 60 * 1000);
@@ -365,7 +366,7 @@ Events.Room = [
], ],
onLoad: function() { onLoad: function() {
if(Math.random() < 0.5) { if(Math.random() < 0.5) {
setTimeout(function() { Engine.setTimeout(function() {
$SM.add('stores.fur', 300); $SM.add('stores.fur', 300);
Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with furs.')); Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with furs.'));
}, 60 * 1000); }, 60 * 1000);
@@ -384,7 +385,7 @@ Events.Room = [
], ],
onLoad: function() { onLoad: function() {
if(Math.random() < 0.3) { if(Math.random() < 0.3) {
setTimeout(function() { Engine.setTimeout(function() {
$SM.add('stores.fur', 1500); $SM.add('stores.fur', 1500);
Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with furs.')); Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with furs.'));
}, 60 * 1000); }, 60 * 1000);
+1 -1
View File
@@ -33,7 +33,7 @@ var Notifications = {
if(module != null && Engine.activeModule != module) { if(module != null && Engine.activeModule != module) {
if(!noQueue) { if(!noQueue) {
if(typeof this.notifyQueue[module] == 'undefined') { if(typeof this.notifyQueue[module] == 'undefined') {
this.notifyQueue[module] = new Array(); this.notifyQueue[module] = [];
} }
this.notifyQueue[module].push(text); this.notifyQueue[module].push(text);
} }
+19 -19
View File
@@ -179,7 +179,7 @@ var Outside = {
var space = Outside.getMaxPopulation() - $SM.get('game.population'); var space = Outside.getMaxPopulation() - $SM.get('game.population');
if(space > 0) { if(space > 0) {
var num = Math.floor(Math.random()*(space/2) + space/2); var num = Math.floor(Math.random()*(space/2) + space/2);
if(num == 0) num = 1; if(num === 0) num = 1;
if(num == 1) { if(num == 1) {
Notifications.notify(null, _('a stranger arrives in the night')); Notifications.notify(null, _('a stranger arrives in the night'));
} else if(num < 5) { } else if(num < 5) {
@@ -206,9 +206,9 @@ var Outside = {
if(remaining < 0) { if(remaining < 0) {
var gap = -remaining; var gap = -remaining;
for(var k in $SM.get('game.workers')) { for(var k in $SM.get('game.workers')) {
var num = $SM.get('game.workers["'+k+'"]'); var numWorkers = $SM.get('game.workers["'+k+'"]');
if(num < gap) { if(numWorkers < gap) {
gap -= num; gap -= numWorkers;
$SM.set('game.workers["'+k+'"]', 0); $SM.set('game.workers["'+k+'"]', 0);
} else { } else {
$SM.add('game.workers["'+k+'"]', gap * -1); $SM.add('game.workers["'+k+'"]', gap * -1);
@@ -221,7 +221,7 @@ var Outside = {
schedulePopIncrease: function() { schedulePopIncrease: function() {
var nextIncrease = Math.floor(Math.random()*(Outside._POP_DELAY[1] - Outside._POP_DELAY[0])) + Outside._POP_DELAY[0]; var nextIncrease = Math.floor(Math.random()*(Outside._POP_DELAY[1] - Outside._POP_DELAY[0])) + Outside._POP_DELAY[0];
Engine.log('next population increase scheduled in ' + nextIncrease + ' minutes'); Engine.log('next population increase scheduled in ' + nextIncrease + ' minutes');
Outside._popTimeout = setTimeout(Outside.increasePopulation, nextIncrease * 60 * 1000); Outside._popTimeout = Engine.setTimeout(Outside.increasePopulation, nextIncrease * 60 * 1000);
}, },
updateWorkersView: function() { updateWorkersView: function() {
@@ -229,10 +229,10 @@ var Outside = {
// If our population is 0 and we don't already have a workers view, // If our population is 0 and we don't already have a workers view,
// there's nothing to do here. // there's nothing to do here.
if(!workers.length && $SM.get('game.population') == 0) return; if(!workers.length && $SM.get('game.population') === 0) return;
var needsAppend = false; var needsAppend = false;
if(workers.length == 0) { if(workers.length === 0) {
needsAppend = true; needsAppend = true;
workers = $('<div>').attr('id', 'workers').css('opacity', 0); workers = $('<div>').attr('id', 'workers').css('opacity', 0);
} }
@@ -243,7 +243,7 @@ var Outside = {
for(var k in $SM.get('game.workers')) { for(var k in $SM.get('game.workers')) {
var workerCount = $SM.get('game.workers["'+k+'"]'); var workerCount = $SM.get('game.workers["'+k+'"]');
var row = $('div#workers_row_' + k.replace(' ', '-'), workers); var row = $('div#workers_row_' + k.replace(' ', '-'), workers);
if(row.length == 0) { if(row.length === 0) {
row = Outside.makeWorkerRow(k, workerCount); row = Outside.makeWorkerRow(k, workerCount);
var curPrev = null; var curPrev = null;
@@ -256,7 +256,7 @@ var Outside = {
} }
} }
}); });
if(curPrev == null && gatherer.length == 0) { if(curPrev == null && gatherer.length === 0) {
row.prependTo(workers); row.prependTo(workers);
} }
else if(curPrev == null) else if(curPrev == null)
@@ -272,7 +272,7 @@ var Outside = {
$('div#' + row.attr('id') + ' > div.row_val > span', workers).text(workerCount); $('div#' + row.attr('id') + ' > div.row_val > span', workers).text(workerCount);
} }
numGatherers -= workerCount; numGatherers -= workerCount;
if(workerCount == 0) { if(workerCount === 0) {
$('.dnBtn', row).addClass('disabled'); $('.dnBtn', row).addClass('disabled');
$('.dnManyBtn', row).addClass('disabled'); $('.dnManyBtn', row).addClass('disabled');
} else { } else {
@@ -281,14 +281,14 @@ var Outside = {
} }
} }
if(gatherer.length == 0) { if(gatherer.length === 0) {
gatherer = Outside.makeWorkerRow('gatherer', numGatherers); gatherer = Outside.makeWorkerRow('gatherer', numGatherers);
gatherer.prependTo(workers); gatherer.prependTo(workers);
} else { } else {
$('div#workers_row_gatherer > div.row_val > span', workers).text(numGatherers); $('div#workers_row_gatherer > div.row_val > span', workers).text(numGatherers);
} }
if(numGatherers == 0) { if(numGatherers === 0) {
$('.upBtn', '#workers').addClass('disabled'); $('.upBtn', '#workers').addClass('disabled');
$('.upManyBtn', '#workers').addClass('disabled'); $('.upManyBtn', '#workers').addClass('disabled');
} else { } else {
@@ -364,7 +364,7 @@ var Outside = {
updateVillageRow: function(name, num, village) { updateVillageRow: function(name, num, village) {
var id = 'building_row_' + name.replace(' ', '-'); var id = 'building_row_' + name.replace(' ', '-');
var row = $('div#' + id, village); var row = $('div#' + id, village);
if(row.length == 0 && num > 0) { if(row.length === 0 && num > 0) {
row = $('<div>').attr('id', id).addClass('storeRow'); row = $('<div>').attr('id', id).addClass('storeRow');
$('<div>').addClass('row_key').text(_(name)).appendTo(row); $('<div>').addClass('row_key').text(_(name)).appendTo(row);
$('<div>').addClass('row_val').text(num).appendTo(row); $('<div>').addClass('row_val').text(num).appendTo(row);
@@ -386,7 +386,7 @@ var Outside = {
} }
} else if(num > 0) { } else if(num > 0) {
$('div#' + row.attr('id') + ' > div.row_val', village).text(num); $('div#' + row.attr('id') + ' > div.row_val', village).text(num);
} else if(num == 0) { } else if(num === 0) {
row.remove(); row.remove();
} }
}, },
@@ -395,7 +395,7 @@ var Outside = {
var village = $('div#village'); var village = $('div#village');
var population = $('div#population'); var population = $('div#population');
var needsAppend = false; var needsAppend = false;
if(village.length == 0) { if(village.length === 0) {
needsAppend = true; needsAppend = true;
village = $('<div>').attr('id', 'village').css('opacity', 0); village = $('<div>').attr('id', 'village').css('opacity', 0);
population = $('<div>').attr('id', 'population').appendTo(village); population = $('<div>').attr('id', 'population').appendTo(village);
@@ -420,7 +420,7 @@ var Outside = {
population.text(_('pop ') + $SM.get('game.population') + '/' + this.getMaxPopulation()); population.text(_('pop ') + $SM.get('game.population') + '/' + this.getMaxPopulation());
var hasPeeps; var hasPeeps;
if($SM.get('game.buildings["hut"]', true) == 0) { if($SM.get('game.buildings["hut"]', true) === 0) {
hasPeeps = false; hasPeeps = false;
village.addClass('noHuts'); village.addClass('noHuts');
} else { } else {
@@ -505,7 +505,7 @@ var Outside = {
updateTrapButton: function() { updateTrapButton: function() {
var btn = $('div#trapsButton'); var btn = $('div#trapsButton');
if($SM.get('game.buildings["trap"]', true) > 0) { if($SM.get('game.buildings["trap"]', true) > 0) {
if(btn.length == 0) { if(btn.length === 0) {
new Button.Button({ new Button.Button({
id: 'trapsButton', id: 'trapsButton',
text: _("check traps"), text: _("check traps"),
@@ -526,7 +526,7 @@ var Outside = {
setTitle: function() { setTitle: function() {
var numHuts = $SM.get('game.buildings["hut"]', true); var numHuts = $SM.get('game.buildings["hut"]', true);
var title; var title;
if(numHuts == 0) { if(numHuts === 0) {
title = _("A Silent Forest"); title = _("A Silent Forest");
} else if(numHuts == 1) { } else if(numHuts == 1) {
title = _("A Lonely Hut"); title = _("A Lonely Hut");
@@ -607,7 +607,7 @@ var Outside = {
handleStateUpdates: function(e){ handleStateUpdates: function(e){
if(e.category == 'stores'){ if(e.category == 'stores'){
Outside.updateVillage(); Outside.updateVillage();
} else if(e.stateName.indexOf('game.workers') == 0 || e.stateName.indexOf('game.population') == 0){ } else if(e.stateName.indexOf('game.workers') === 0 || e.stateName.indexOf('game.population') === 0){
Outside.updateVillage(); Outside.updateVillage();
Outside.updateWorkersView(); Outside.updateWorkersView();
Outside.updateVillageIncome(); Outside.updateVillageIncome();
+11 -11
View File
@@ -97,14 +97,14 @@ var Path = {
if($SM.get('character.perks')) { if($SM.get('character.perks')) {
var perks = $('#perks'); var perks = $('#perks');
var needsAppend = false; var needsAppend = false;
if(perks.length == 0) { if(perks.length === 0) {
needsAppend = true; needsAppend = true;
perks = $('<div>').attr('id', 'perks'); perks = $('<div>').attr('id', 'perks');
} }
for(var k in $SM.get('character.perks')) { for(var k in $SM.get('character.perks')) {
var id = 'perk_' + k.replace(' ', '-'); var id = 'perk_' + k.replace(' ', '-');
var r = $('#' + id); var r = $('#' + id);
if($SM.get('character.perks["'+k+'"]') && r.length == 0) { if($SM.get('character.perks["'+k+'"]') && r.length === 0) {
r = $('<div>').attr('id', id).addClass('perkRow').appendTo(perks); r = $('<div>').attr('id', id).addClass('perkRow').appendTo(perks);
$('<div>').addClass('row_key').text(_(k)).appendTo(r); $('<div>').addClass('row_key').text(_(k)).appendTo(r);
$('<div>').addClass('tooltip bottom right').text(Engine.Perks[k].desc).appendTo(r); $('<div>').addClass('tooltip bottom right').text(Engine.Perks[k].desc).appendTo(r);
@@ -137,7 +137,7 @@ var Path = {
else if($SM.get('stores["l armour"]', true) > 0) else if($SM.get('stores["l armour"]', true) > 0)
armour = _("leather"); armour = _("leather");
var aRow = $('#armourRow'); var aRow = $('#armourRow');
if(aRow.length == 0) { if(aRow.length === 0) {
aRow = $('<div>').attr('id', 'armourRow').addClass('outfitRow').prependTo(outfit); aRow = $('<div>').attr('id', 'armourRow').addClass('outfitRow').prependTo(outfit);
$('<div>').addClass('row_key').text(_('armour')).appendTo(aRow); $('<div>').addClass('row_key').text(_('armour')).appendTo(aRow);
$('<div>').addClass('row_val').text(armour).appendTo(aRow); $('<div>').addClass('row_val').text(armour).appendTo(aRow);
@@ -148,7 +148,7 @@ var Path = {
// Add the water row // Add the water row
var wRow = $('#waterRow'); var wRow = $('#waterRow');
if(wRow.length == 0) { if(wRow.length === 0) {
wRow = $('<div>').attr('id', 'waterRow').addClass('outfitRow').insertAfter(aRow); wRow = $('<div>').attr('id', 'waterRow').addClass('outfitRow').insertAfter(aRow);
$('<div>').addClass('row_key').text(_('water')).appendTo(wRow); $('<div>').addClass('row_key').text(_('water')).appendTo(wRow);
$('<div>').addClass('row_val').text(World.getMaxWater()).appendTo(wRow); $('<div>').addClass('row_val').text(World.getMaxWater()).appendTo(wRow);
@@ -183,13 +183,13 @@ var Path = {
var row = $('div#outfit_row_' + k.replace(' ', '-'), outfit); var row = $('div#outfit_row_' + k.replace(' ', '-'), outfit);
if((store.type == 'tool' || store.type == 'weapon') && have > 0) { if((store.type == 'tool' || store.type == 'weapon') && have > 0) {
total += num * Path.getWeight(k); total += num * Path.getWeight(k);
if(row.length == 0) { if(row.length === 0) {
row = Path.createOutfittingRow(k, num, store.name); row = Path.createOutfittingRow(k, num, store.name);
var curPrev = null; var curPrev = null;
outfit.children().each(function(i) { outfit.children().each(function(i) {
var child = $(this); var child = $(this);
if(child.attr('id').indexOf('outfit_row_') == 0) { if(child.attr('id').indexOf('outfit_row_') === 0) {
var cName = child.attr('id').substring(11).replace('-', ' '); var cName = child.attr('id').substring(11).replace('-', ' ');
if(cName < k && (curPrev == null || cName > curPrev)) { if(cName < k && (curPrev == null || cName > curPrev)) {
curPrev = cName; curPrev = cName;
@@ -207,7 +207,7 @@ var Path = {
$('div#' + row.attr('id') + ' > div.row_val > span', outfit).text(num); $('div#' + row.attr('id') + ' > div.row_val > span', outfit).text(num);
$('div#' + row.attr('id') + ' .tooltip .numAvailable', outfit).text(numAvailable - num); $('div#' + row.attr('id') + ' .tooltip .numAvailable', outfit).text(numAvailable - num);
} }
if(num == 0) { if(num === 0) {
$('.dnBtn', row).addClass('disabled'); $('.dnBtn', row).addClass('disabled');
$('.dnManyBtn', row).addClass('disabled'); $('.dnManyBtn', row).addClass('disabled');
} else { } else {
@@ -221,7 +221,7 @@ var Path = {
$('.upBtn', row).removeClass('disabled'); $('.upBtn', row).removeClass('disabled');
$('.upManyBtn', row).removeClass('disabled'); $('.upManyBtn', row).removeClass('disabled');
} }
} else if(have == 0 && row.length > 0) { } else if(have === 0 && row.length > 0) {
row.remove(); row.remove();
} }
} }
@@ -269,7 +269,7 @@ var Path = {
var maxExtraByStore = $SM.get('stores["'+supply+'"]', true) - cur; var maxExtraByStore = $SM.get('stores["'+supply+'"]', true) - cur;
var maxExtraByBtn = btn.data; var maxExtraByBtn = btn.data;
Path.outfit[supply] = cur + Math.min(maxExtraByBtn, Math.min(maxExtraByWeight, maxExtraByStore)); Path.outfit[supply] = cur + Math.min(maxExtraByBtn, Math.min(maxExtraByWeight, maxExtraByStore));
$SM.set('outfit['+supply+']', Path.outfit[supply]) $SM.set('outfit['+supply+']', Path.outfit[supply]);
Path.updateOutfitting(); Path.updateOutfitting();
} }
}, },
@@ -281,7 +281,7 @@ var Path = {
cur = typeof cur == 'number' ? cur : 0; cur = typeof cur == 'number' ? cur : 0;
if(cur > 0) { if(cur > 0) {
Path.outfit[supply] = Math.max(0, cur - btn.data); Path.outfit[supply] = Math.max(0, cur - btn.data);
$SM.set('outfit['+supply+']', Path.outfit[supply]) $SM.set('outfit['+supply+']', Path.outfit[supply]);
Path.updateOutfitting(); Path.updateOutfitting();
} }
}, },
@@ -310,7 +310,7 @@ var Path = {
}, },
handleStateUpdates: function(e){ handleStateUpdates: function(e){
if(e.category == 'character' && e.stateName.indexOf('character.perks') == 0 && Engine.activeModule == Path){ if(e.category == 'character' && e.stateName.indexOf('character.perks') === 0 && Engine.activeModule == Path){
Path.updatePerks(); Path.updatePerks();
}; };
}, },
+24 -24
View File
@@ -476,8 +476,8 @@ var Room = {
// If this is the first time playing, the fire is dead and it's freezing. // If this is the first time playing, the fire is dead and it's freezing.
// Otherwise grab past save state temp and fire level. // Otherwise grab past save state temp and fire level.
$SM.set('game.temperature', $SM.get('game.temperature.value')==undefined?this.TempEnum.Freezing:$SM.get('game.temperature')); $SM.set('game.temperature', $SM.get('game.temperature.value')===undefined?this.TempEnum.Freezing:$SM.get('game.temperature'));
$SM.set('game.fire', $SM.get('game.fire.value')==undefined?this.FireEnum.Dead:$SM.get('game.fire')); $SM.set('game.fire', $SM.get('game.fire.value')===undefined?this.FireEnum.Dead:$SM.get('game.fire'));
// Create the room tab // Create the room tab
this.tab = Header.addLocation(_("A Dark Room"), "room", Room); this.tab = Header.addLocation(_("A Dark Room"), "room", Room);
@@ -521,8 +521,8 @@ var Room = {
Room.updateIncomeView(); Room.updateIncomeView();
Room.updateBuildButtons(); Room.updateBuildButtons();
Room._fireTimer = setTimeout(Room.coolFire, Room._FIRE_COOL_DELAY); Room._fireTimer = Engine.setTimeout(Room.coolFire, Room._FIRE_COOL_DELAY);
Room._tempTimer = setTimeout(Room.adjustTemp, Room._ROOM_WARM_DELAY); Room._tempTimer = Engine.setTimeout(Room.adjustTemp, Room._ROOM_WARM_DELAY);
/* /*
* Builder states: * Builder states:
@@ -533,12 +533,12 @@ var Room = {
* 4 - Helping * 4 - Helping
*/ */
if($SM.get('game.builder.level') >= 0 && $SM.get('game.builder.level') < 3) { if($SM.get('game.builder.level') >= 0 && $SM.get('game.builder.level') < 3) {
Room._builderTimer = setTimeout(Room.updateBuilderState, Room._BUILDER_STATE_DELAY); Room._builderTimer = Engine.setTimeout(Room.updateBuilderState, Room._BUILDER_STATE_DELAY);
} }
if($SM.get('game.builder.level') == 1 && $SM.get('stores.wood', true) < 0) { if($SM.get('game.builder.level') == 1 && $SM.get('stores.wood', true) < 0) {
setTimeout(Room.unlockForest, Room._NEED_WOOD_DELAY); Engine.setTimeout(Room.unlockForest, Room._NEED_WOOD_DELAY);
} }
setTimeout($SM.collectIncome, 1000); Engine.setTimeout($SM.collectIncome, 1000);
Notifications.notify(Room, _("the room is {0}", Room.TempEnum.fromInt($SM.get('game.temperature.value')).text)); Notifications.notify(Room, _("the room is {0}", Room.TempEnum.fromInt($SM.get('game.temperature.value')).text));
Notifications.notify(Room, _("the fire is {0}", Room.FireEnum.fromInt($SM.get('game.fire.value')).text)); Notifications.notify(Room, _("the fire is {0}", Room.FireEnum.fromInt($SM.get('game.fire.value')).text));
@@ -671,10 +671,10 @@ var Room = {
if($SM.get('game.fire.value') > 1 && $SM.get('game.builder.level') < 0) { if($SM.get('game.fire.value') > 1 && $SM.get('game.builder.level') < 0) {
$SM.set('game.builder.level', 0); $SM.set('game.builder.level', 0);
Notifications.notify(Room, _("the light from the fire spills from the windows, out into the dark")); Notifications.notify(Room, _("the light from the fire spills from the windows, out into the dark"));
setTimeout(Room.updateBuilderState, Room._BUILDER_STATE_DELAY); Engine.setTimeout(Room.updateBuilderState, Room._BUILDER_STATE_DELAY);
} }
window.clearTimeout(Room._fireTimer); window.clearTimeout(Room._fireTimer);
Room._fireTimer = setTimeout(Room.coolFire, Room._FIRE_COOL_DELAY); Room._fireTimer = Engine.setTimeout(Room.coolFire, Room._FIRE_COOL_DELAY);
Room.updateButton(); Room.updateButton();
Room.setTitle(); Room.setTitle();
}, },
@@ -689,7 +689,7 @@ var Room = {
} }
if($SM.get('game.fire.value') > 0) { if($SM.get('game.fire.value') > 0) {
$SM.set('game.fire',Room.FireEnum.fromInt($SM.get('game.fire.value') - 1)); $SM.set('game.fire',Room.FireEnum.fromInt($SM.get('game.fire.value') - 1));
Room._fireTimer = setTimeout(Room.coolFire, Room._FIRE_COOL_DELAY); Room._fireTimer = Engine.setTimeout(Room.coolFire, Room._FIRE_COOL_DELAY);
Room.onFireChange(); Room.onFireChange();
} }
}, },
@@ -707,7 +707,7 @@ var Room = {
if($SM.get('game.temperature.value') != old) { if($SM.get('game.temperature.value') != old) {
Room.changed = true; Room.changed = true;
} }
Room._tempTimer = setTimeout(Room.adjustTemp, Room._ROOM_WARM_DELAY); Room._tempTimer = Engine.setTimeout(Room.adjustTemp, Room._ROOM_WARM_DELAY);
}, },
unlockForest: function() { unlockForest: function() {
@@ -720,10 +720,10 @@ var Room = {
updateBuilderState: function() { updateBuilderState: function() {
var lBuilder = $SM.get('game.builder.level'); var lBuilder = $SM.get('game.builder.level');
if(lBuilder == 0) { if(lBuilder === 0) {
Notifications.notify(Room, _("a ragged stranger stumbles through the door and collapses in the corner")); Notifications.notify(Room, _("a ragged stranger stumbles through the door and collapses in the corner"));
lBuilder = $SM.setget('game.builder.level', 1); lBuilder = $SM.setget('game.builder.level', 1);
setTimeout(Room.unlockForest, Room._NEED_WOOD_DELAY); Engine.setTimeout(Room.unlockForest, Room._NEED_WOOD_DELAY);
} }
else if(lBuilder < 3 && $SM.get('game.temperature.value') >= Room.TempEnum.Warm.value) { else if(lBuilder < 3 && $SM.get('game.temperature.value') >= Room.TempEnum.Warm.value) {
var msg = ""; var msg = "";
@@ -741,7 +741,7 @@ var Room = {
} }
} }
if(lBuilder < 3) { if(lBuilder < 3) {
setTimeout(Room.updateBuilderState, Room._BUILDER_STATE_DELAY); Engine.setTimeout(Room.updateBuilderState, Room._BUILDER_STATE_DELAY);
} }
Engine.saveGame(); Engine.saveGame();
}, },
@@ -750,13 +750,13 @@ var Room = {
var stores = $('div#stores'); var stores = $('div#stores');
var weapons = $('div#weapons'); var weapons = $('div#weapons');
var needsAppend = false, wNeedsAppend = false, newRow = false; var needsAppend = false, wNeedsAppend = false, newRow = false;
if(stores.length == 0) { if(stores.length === 0) {
stores = $('<div>').attr({ stores = $('<div>').attr({
id: 'stores' id: 'stores'
}).css('opacity', 0); }).css('opacity', 0);
needsAppend = true; needsAppend = true;
} }
if(weapons.length == 0) { if(weapons.length === 0) {
weapons = $('<div>').attr({ weapons = $('<div>').attr({
id: 'weapons' id: 'weapons'
}).css('opacity', 0); }).css('opacity', 0);
@@ -803,7 +803,7 @@ var Room = {
$SM.startThieves(); $SM.startThieves();
} }
if(row.length == 0 && num > 0) { if(row.length === 0 && num > 0) {
row = $('<div>').attr('id', id).addClass('storeRow'); row = $('<div>').attr('id', id).addClass('storeRow');
$('<div>').addClass('row_key').text(_(k)).appendTo(row); $('<div>').addClass('row_key').text(_(k)).appendTo(row);
$('<div>').addClass('row_val').text(Math.floor(num)).appendTo(row); $('<div>').addClass('row_val').text(Math.floor(num)).appendTo(row);
@@ -848,7 +848,7 @@ var Room = {
updateIncomeView: function() { updateIncomeView: function() {
var stores = $('div#stores'); var stores = $('div#stores');
if(stores.length == 0 || typeof $SM.get('income') == 'undefined') return; if(stores.length === 0 || typeof $SM.get('income') == 'undefined') return;
$('div.storeRow', stores).each(function(index, el) { $('div.storeRow', stores).each(function(index, el) {
el = $(el); el = $(el);
$('div.tooltip', el).remove(); $('div.tooltip', el).remove();
@@ -857,7 +857,7 @@ var Room = {
for(var incomeSource in $SM.get('income')) { for(var incomeSource in $SM.get('income')) {
var income = $SM.get('income["'+incomeSource+'"]'); var income = $SM.get('income["'+incomeSource+'"]');
for(var store in income.stores) { for(var store in income.stores) {
if(store == storeName && income.stores[store] != 0) { if(store == storeName && income.stores[store] !== 0) {
$('<div>').addClass('row_key').text(_(incomeSource)).appendTo(tt); $('<div>').addClass('row_key').text(_(incomeSource)).appendTo(tt);
$('<div>') $('<div>')
.addClass('row_val') .addClass('row_val')
@@ -967,7 +967,7 @@ var Room = {
} }
if($SM.get('game.builder.level') < 4) return false; if($SM.get('game.builder.level') < 4) return false;
var craftable = Room.Craftables[thing]; var craftable = Room.Craftables[thing];
if(Room.needsWorkshop(craftable.type) && $SM.get('game.buildings["'+'workshop'+'"]', true) == 0) return false; if(Room.needsWorkshop(craftable.type) && $SM.get('game.buildings["'+'workshop'+'"]', true) === 0) return false;
var cost = craftable.cost(); var cost = craftable.cost();
//show button if one has already been built //show button if one has already been built
@@ -1008,21 +1008,21 @@ var Room = {
updateBuildButtons: function() { updateBuildButtons: function() {
var buildSection = $('#buildBtns'); var buildSection = $('#buildBtns');
var needsAppend = false; var needsAppend = false;
if(buildSection.length == 0) { if(buildSection.length === 0) {
buildSection = $('<div>').attr('id', 'buildBtns').css('opacity', 0); buildSection = $('<div>').attr('id', 'buildBtns').css('opacity', 0);
needsAppend = true; needsAppend = true;
} }
var craftSection = $('#craftBtns'); var craftSection = $('#craftBtns');
var cNeedsAppend = false; var cNeedsAppend = false;
if(craftSection.length == 0 && $SM.get('game.buildings["workshop"]', true) > 0) { if(craftSection.length === 0 && $SM.get('game.buildings["workshop"]', true) > 0) {
craftSection = $('<div>').attr('id', 'craftBtns').css('opacity', 0); craftSection = $('<div>').attr('id', 'craftBtns').css('opacity', 0);
cNeedsAppend = true; cNeedsAppend = true;
} }
var buySection = $('#buyBtns'); var buySection = $('#buyBtns');
var bNeedsAppend = false; var bNeedsAppend = false;
if(buySection.length == 0 && $SM.get('game.buildings["trading post"]', true) > 0) { if(buySection.length === 0 && $SM.get('game.buildings["trading post"]', true) > 0) {
buySection = $('<div>').attr('id', 'buyBtns').css('opacity', 0); buySection = $('<div>').attr('id', 'buyBtns').css('opacity', 0);
bNeedsAppend = true; bNeedsAppend = true;
} }
@@ -1113,7 +1113,7 @@ var Room = {
} else if(e.category == 'income'){ } else if(e.category == 'income'){
Room.updateStoresView(); Room.updateStoresView();
Room.updateIncomeView(); Room.updateIncomeView();
} else if(e.stateName.indexOf('game.buildings') == 0){ } else if(e.stateName.indexOf('game.buildings') === 0){
Room.updateBuildButtons(); Room.updateBuildButtons();
} }
} }
+20 -16
View File
@@ -136,7 +136,7 @@ var Space = {
t.remove(); t.remove();
Space.hull--; Space.hull--;
Space.updateHull(); Space.updateHull();
if(Space.hull == 0) { if(Space.hull === 0) {
Space.crash(); Space.crash();
} }
} }
@@ -166,7 +166,7 @@ var Space = {
} }
if(!Space.done) { if(!Space.done) {
setTimeout(Space.createAsteroid, 1000 - (Space.altitude * 10)); Engine.setTimeout(Space.createAsteroid, 1000 - (Space.altitude * 10));
} }
} }
}, },
@@ -190,7 +190,7 @@ var Space = {
dx += Space.getSpeed(); dx += Space.getSpeed();
} }
if(dx != 0 && dy != 0) { if(dx !== 0 && dy !== 0) {
dx = dx / Math.sqrt(2); dx = dx / Math.sqrt(2);
dy = dy / Math.sqrt(2); dy = dy / Math.sqrt(2);
} }
@@ -226,13 +226,15 @@ var Space = {
}, },
startAscent: function() { startAscent: function() {
var body_color;
var to_color;
if (Engine.isLightsOff()) { if (Engine.isLightsOff()) {
var body_color = '#272823'; body_color = '#272823';
var to_color = '#EEEEEE'; to_color = '#EEEEEE';
} }
else { else {
var body_color = '#FFFFFF'; body_color = '#FFFFFF';
var to_color = '#000000'; to_color = '#000000';
} }
$('body').addClass('noMask').css({backgroundColor: body_color}).animate({ $('body').addClass('noMask').css({backgroundColor: body_color}).animate({
@@ -251,7 +253,7 @@ var Space = {
Space.drawStars(); Space.drawStars();
Space._timer = setInterval(function() { Space._timer = setInterval(function() {
Space.altitude += 1; Space.altitude += 1;
if(Space.altitude % 10 == 0) { if(Space.altitude % 10 === 0) {
Space.setTitle(); Space.setTitle();
} }
if(Space.altitude > 60) { if(Space.altitude > 60) {
@@ -259,7 +261,7 @@ var Space = {
} }
}, 1000); }, 1000);
Space._panelTimeout = setTimeout(function() { Space._panelTimeout = Engine.setTimeout(function() {
if (Engine.isLightsOff()) if (Engine.isLightsOff())
$('#spacePanel, .menu, select.menuBtn').animate({color: '#272823'}, 500, 'linear'); $('#spacePanel, .menu, select.menuBtn').animate({color: '#272823'}, 500, 'linear');
else else
@@ -313,7 +315,7 @@ var Space = {
left: left left: left
}).appendTo(el2); }).appendTo(el2);
if(num < Space.NUM_STARS) { if(num < Space.NUM_STARS) {
setTimeout(function() { Space.drawStarAsync(el, el2, num + 1); }, 100); Engine.setTimeout(function() { Space.drawStarAsync(el, el2, num + 1); }, 100);
} }
}, },
@@ -324,10 +326,11 @@ var Space = {
clearInterval(Space._timer); clearInterval(Space._timer);
clearInterval(Space._shipTimer); clearInterval(Space._shipTimer);
clearTimeout(Space._panelTimeout); clearTimeout(Space._panelTimeout);
var body_color;
if (Engine.isLightsOff()) if (Engine.isLightsOff())
var body_color = '#272823'; body_color = '#272823';
else else
var body_color = '#FFFFFF'; body_color = '#FFFFFF';
// Craaaaash! // Craaaaash!
$('body').removeClass('noMask').stop().animate({ $('body').removeClass('noMask').stop().animate({
backgroundColor: body_color backgroundColor: body_color
@@ -382,7 +385,7 @@ var Space = {
top: '350px', top: '350px',
left: '240px' left: '240px'
}, 3000, 'linear', function() { }, 3000, 'linear', function() {
setTimeout(function() { Engine.setTimeout(function() {
Space.ship.animate({ Space.ship.animate({
top: '-100px' top: '-100px'
}, 200, 'linear', function() { }, 200, 'linear', function() {
@@ -390,12 +393,13 @@ var Space = {
$('#outerSlider').css({'left': '0px', 'top': '0px'}); $('#outerSlider').css({'left': '0px', 'top': '0px'});
$('#locationSlider, #worldPanel, #spacePanel, #notifications').remove(); $('#locationSlider, #worldPanel, #spacePanel, #notifications').remove();
$('#header').empty(); $('#header').empty();
setTimeout(function() { Engine.setTimeout(function() {
$('body').stop(); $('body').stop();
var container_color;
if (Engine.isLightsOff()) if (Engine.isLightsOff())
var container_color = '#EEE'; container_color = '#EEE';
else else
var container_color = '#000'; container_color = '#000';
$('#starsContainer').animate({ $('#starsContainer').animate({
opacity: 0, opacity: 0,
'background-color': container_color 'background-color': container_color
+21 -21
View File
@@ -41,7 +41,7 @@ var StateManager = {
for(var which in cats) { for(var which in cats) {
if(!$SM.get(cats[which])) $SM.set(cats[which], {}); if(!$SM.get(cats[which])) $SM.set(cats[which], {});
}; }
//subscribe to stateUpdates //subscribe to stateUpdates
$.Dispatch('stateUpdate').subscribe($SM.handleStateUpdates); $.Dispatch('stateUpdate').subscribe($SM.handleStateUpdates);
@@ -52,11 +52,11 @@ var StateManager = {
var words = stateName.split(/[.\[\]'"]+/); var words = stateName.split(/[.\[\]'"]+/);
//for some reason there are sometimes empty strings //for some reason there are sometimes empty strings
for (var i = 0; i < words.length; i++) { for (var i = 0; i < words.length; i++) {
if (words[i] == '') { if (words[i] === '') {
words.splice(i, 1); words.splice(i, 1);
i--; i--;
} }
}; }
var obj = State; var obj = State;
var w = null; var w = null;
for(var i=0, len=words.length-1;i<len;i++){ for(var i=0, len=words.length-1;i<len;i++){
@@ -84,7 +84,7 @@ var StateManager = {
} }
//stores values can not be negative //stores values can not be negative
if(stateName.indexOf('stores') == 0 && $SM.get(stateName, true) < 0) { if(stateName.indexOf('stores') === 0 && $SM.get(stateName, true) < 0) {
eval('('+fullPath+') = 0'); eval('('+fullPath+') = 0');
Engine.log('WARNING: state:' + stateName + ' can not be a negative value. Set to 0 instead.'); Engine.log('WARNING: state:' + stateName + ' can not be a negative value. Set to 0 instead.');
} }
@@ -100,7 +100,7 @@ var StateManager = {
$SM.buildPath(parentName); $SM.buildPath(parentName);
//make sure the state exists to avoid errors, //make sure the state exists to avoid errors,
if($SM.get(parentName) == undefined) $SM.set(parentName, {}, true); if($SM.get(parentName) === undefined) $SM.set(parentName, {}, true);
for(var k in list){ for(var k in list){
$SM.set(parentName+'["'+k+'"]', list[k], true); $SM.set(parentName+'["'+k+'"]', list[k], true);
@@ -140,7 +140,7 @@ var StateManager = {
var err = 0; var err = 0;
//make sure the parent exists to avoid errors //make sure the parent exists to avoid errors
if($SM.get(parentName) == undefined) $SM.set(parentName, {}, true); if($SM.get(parentName) === undefined) $SM.set(parentName, {}, true);
for(var k in list){ for(var k in list){
if($SM.add(parentName+'["'+k+'"]', list[k], true)) err++; if($SM.add(parentName+'["'+k+'"]', list[k], true)) err++;
@@ -188,7 +188,7 @@ var StateManager = {
if(!noEvent){ if(!noEvent){
Engine.saveGame(); Engine.saveGame();
$SM.fireUpdate(stateName); $SM.fireUpdate(stateName);
}; }
}, },
//creates full reference from input //creates full reference from input
@@ -231,7 +231,7 @@ var StateManager = {
$SM.remove('income.hunter', true); $SM.remove('income.hunter', true);
Engine.log('upgraded save to v1.1'); Engine.log('upgraded save to v1.1');
version = 1.1; version = 1.1;
}; }
if(version == 1.1) { if(version == 1.1) {
//v1.2 added the Swamp to the map, so add it to already generated maps //v1.2 added the Swamp to the map, so add it to already generated maps
if($SM.get('world')) { if($SM.get('world')) {
@@ -239,7 +239,7 @@ var StateManager = {
} }
Engine.log('upgraded save to v1.2'); Engine.log('upgraded save to v1.2');
version = 1.2; version = 1.2;
}; }
if(version == 1.2) { if(version == 1.2) {
//StateManager added, so move data to new locations //StateManager added, so move data to new locations
$SM.remove('room.fire'); $SM.remove('room.fire');
@@ -249,7 +249,7 @@ var StateManager = {
$SM.set('features.location.room', true); $SM.set('features.location.room', true);
$SM.set('game.builder.level', $SM.get('room.builder')); $SM.set('game.builder.level', $SM.get('room.builder'));
$SM.remove('room'); $SM.remove('room');
}; }
if($SM.get('outside')){ if($SM.get('outside')){
$SM.set('features.location.outside', true); $SM.set('features.location.outside', true);
$SM.set('game.population', $SM.get('outside.population')); $SM.set('game.population', $SM.get('outside.population'));
@@ -257,7 +257,7 @@ var StateManager = {
$SM.set('game.workers', $SM.get('outside.workers')); $SM.set('game.workers', $SM.get('outside.workers'));
$SM.set('game.outside.seenForest', $SM.get('outside.seenForest')); $SM.set('game.outside.seenForest', $SM.get('outside.seenForest'));
$SM.remove('outside'); $SM.remove('outside');
}; }
if($SM.get('world')){ if($SM.get('world')){
$SM.set('features.location.world', true); $SM.set('features.location.world', true);
$SM.set('game.world.map', $SM.get('world.map')); $SM.set('game.world.map', $SM.get('world.map'));
@@ -267,7 +267,7 @@ var StateManager = {
$SM.remove('world'); $SM.remove('world');
$SM.remove('starved'); $SM.remove('starved');
$SM.remove('dehydrated'); $SM.remove('dehydrated');
}; }
if($SM.get('ship')){ if($SM.get('ship')){
$SM.set('features.location.spaceShip', true); $SM.set('features.location.spaceShip', true);
$SM.set('game.spaceShip.hull', $SM.get('ship.hull', true)); $SM.set('game.spaceShip.hull', $SM.get('ship.hull', true));
@@ -275,29 +275,29 @@ var StateManager = {
$SM.set('game.spaceShip.seenWarning', $SM.get('ship.seenWarning')); $SM.set('game.spaceShip.seenWarning', $SM.get('ship.seenWarning'));
$SM.set('game.spaceShip.seenShip', $SM.get('ship.seenShip')); $SM.set('game.spaceShip.seenShip', $SM.get('ship.seenShip'));
$SM.remove('ship'); $SM.remove('ship');
}; }
if($SM.get('punches')){ if($SM.get('punches')){
$SM.set('character.punches', $SM.get('punches')); $SM.set('character.punches', $SM.get('punches'));
$SM.remove('punches'); $SM.remove('punches');
}; }
if($SM.get('perks')){ if($SM.get('perks')){
$SM.set('character.perks', $SM.get('perks')); $SM.set('character.perks', $SM.get('perks'));
$SM.remove('perks'); $SM.remove('perks');
}; }
if($SM.get('thieves')){ if($SM.get('thieves')){
$SM.set('game.thieves', $SM.get('thieves')); $SM.set('game.thieves', $SM.get('thieves'));
$SM.remove('thieves'); $SM.remove('thieves');
}; }
if($SM.get('stolen')){ if($SM.get('stolen')){
$SM.set('game.stolen', $SM.get('stolen')); $SM.set('game.stolen', $SM.get('stolen'));
$SM.remove('stolen'); $SM.remove('stolen');
}; }
if($SM.get('cityCleared')){ if($SM.get('cityCleared')){
$SM.set('character.cityCleared', $SM.get('cityCleared')); $SM.set('character.cityCleared', $SM.get('cityCleared'));
$SM.remove('cityCleared'); $SM.remove('cityCleared');
}; }
$SM.set('version', 1.3); $SM.set('version', 1.3);
}; }
}, },
/****************************************************************** /******************************************************************
@@ -369,7 +369,7 @@ var StateManager = {
} }
if(changed){ if(changed){
$SM.fireUpdate('income', true); $SM.fireUpdate('income', true);
}; }
Engine._incomeTimeout = setTimeout($SM.collectIncome, 1000); Engine._incomeTimeout = setTimeout($SM.collectIncome, 1000);
}, },
@@ -384,7 +384,7 @@ var StateManager = {
} else { } else {
$SM.add('game.stolen["'+k+'"]', stores[k] * -1); $SM.add('game.stolen["'+k+'"]', stores[k] * -1);
} }
}; }
}, },
startThieves: function() { startThieves: function() {
+15 -15
View File
@@ -243,7 +243,7 @@ var World = {
// Add water // Add water
var water = $('div#supply_water'); var water = $('div#supply_water');
if(World.water > 0 && water.length == 0) { if(World.water > 0 && water.length === 0) {
water = World.createItemDiv('water', World.water); water = World.createItemDiv('water', World.water);
water.prependTo(supplies); water.prependTo(supplies);
} else if(World.water > 0) { } else if(World.water > 0) {
@@ -257,7 +257,7 @@ var World = {
var item = $('div#supply_' + k.replace(' ', '-'), supplies); var item = $('div#supply_' + k.replace(' ', '-'), supplies);
var num = Path.outfit[k]; var num = Path.outfit[k];
total += num * Path.getWeight(k); total += num * Path.getWeight(k);
if(num > 0 && item.length == 0) { if(num > 0 && item.length === 0) {
item = World.createItemDiv(k, num); item = World.createItemDiv(k, num);
if(k == 'cured meat' && World.water > 0) { if(k == 'cured meat' && World.water > 0) {
item.insertAfter(water); item.insertAfter(water);
@@ -410,11 +410,11 @@ var World = {
checkDanger: function() { checkDanger: function() {
World.danger = typeof World.danger == 'undefined' ? false: World.danger; World.danger = typeof World.danger == 'undefined' ? false: World.danger;
if(!World.danger) { if(!World.danger) {
if(!$SM.get('stores["i armour"]', true) > 0 && World.getDistance() >= 8) { if($SM.get('stores["i armour"]', true) === 0 && World.getDistance() >= 8) {
World.danger = true; World.danger = true;
return true; return true;
} }
if(!$SM.get('stores["s armour"]', true) > 0 && World.getDistance() >= 18) { if($SM.get('stores["s armour"]', true) === 0 && World.getDistance() >= 18) {
World.danger = true; World.danger = true;
return true; return true;
} }
@@ -441,7 +441,7 @@ var World = {
World.foodMove = 0; World.foodMove = 0;
var num = Path.outfit['cured meat']; var num = Path.outfit['cured meat'];
num--; num--;
if(num == 0) { if(num === 0) {
Notifications.notify(World, _('the meat has run out')); Notifications.notify(World, _('the meat has run out'));
} else if(num < 0) { } else if(num < 0) {
// Starvation! Hooray! // Starvation! Hooray!
@@ -471,7 +471,7 @@ var World = {
World.waterMove = 0; World.waterMove = 0;
var water = World.water; var water = World.water;
water--; water--;
if(water == 0) { if(water === 0) {
Notifications.notify(World, _('there is no more water')); Notifications.notify(World, _('there is no more water'));
} else if(water < 0) { } else if(water < 0) {
water = 0; water = 0;
@@ -754,7 +754,7 @@ var World = {
drawMap: function() { drawMap: function() {
var map = $('#map'); var map = $('#map');
if(map.length == 0) { if(map.length === 0) {
map = new $('<div>').attr('id', 'map').appendTo('#worldOuter'); map = new $('<div>').attr('id', 'map').appendTo('#worldOuter');
// register click handler // register click handler
map.click(World.click); map.click(World.click);
@@ -818,12 +818,12 @@ var World = {
Engine.activeModule = Room; Engine.activeModule = Room;
$('div.headerButton').removeClass('selected'); $('div.headerButton').removeClass('selected');
Room.tab.addClass('selected'); Room.tab.addClass('selected');
setTimeout(function(){ Engine.setTimeout(function(){
Room.onArrival(); Room.onArrival();
$('#outerSlider').animate({opacity:'1'}, 600, 'linear'); $('#outerSlider').animate({opacity:'1'}, 600, 'linear');
Button.cooldown($('#embarkButton')); Button.cooldown($('#embarkButton'));
Engine.keyLock = false; Engine.keyLock = false;
}, 2000); }, 2000, true);
}); });
} }
}, },
@@ -831,15 +831,15 @@ var World = {
goHome: function() { goHome: function() {
// Home safe! Commit the changes. // Home safe! Commit the changes.
$SM.setM('game.world', World.state); $SM.setM('game.world', World.state);
if(World.state.sulphurmine && $SM.get('game.buildings["sulphur mine"]', true) == 0) { if(World.state.sulphurmine && $SM.get('game.buildings["sulphur mine"]', true) === 0) {
$SM.add('game.buildings["sulphur mine"]', 1); $SM.add('game.buildings["sulphur mine"]', 1);
Engine.event('progress', 'sulphur mine'); Engine.event('progress', 'sulphur mine');
} }
if(World.state.ironmine && $SM.get('game.buildings["iron mine"]', true) == 0) { if(World.state.ironmine && $SM.get('game.buildings["iron mine"]', true) === 0) {
$SM.add('game.buildings["iron mine"]', 1); $SM.add('game.buildings["iron mine"]', 1);
Engine.event('progress', 'iron mine'); Engine.event('progress', 'iron mine');
} }
if(World.state.coalmine && $SM.get('game.buildings["coal mine"]', true) == 0) { if(World.state.coalmine && $SM.get('game.buildings["coal mine"]', true) === 0) {
$SM.add('game.buildings["coal mine"]', 1); $SM.add('game.buildings["coal mine"]', 1);
Engine.event('progress', 'coal mine'); Engine.event('progress', 'coal mine');
} }
@@ -868,8 +868,8 @@ var World = {
}, },
leaveItAtHome: function(thing) { leaveItAtHome: function(thing) {
return thing != 'cured meat' && thing != 'bullets' && thing != 'energy cell' && thing != 'charm' && thing != 'medicine' return thing != 'cured meat' && thing != 'bullets' && thing != 'energy cell' && thing != 'charm' && thing != 'medicine' &&
&& typeof World.Weapons[thing] == 'undefined' && typeof Room.Craftables[thing] == 'undefined'; typeof World.Weapons[thing] == 'undefined' && typeof Room.Craftables[thing] == 'undefined';
}, },
getMaxHealth: function() { getMaxHealth: function() {
@@ -905,7 +905,7 @@ var World = {
x = typeof x == 'number' ? x : World.curPos[0]; x = typeof x == 'number' ? x : World.curPos[0];
y = typeof y == 'number' ? y : World.curPos[1]; y = typeof y == 'number' ? y : World.curPos[1];
var used = World.usedOutposts[x + ',' + y]; var used = World.usedOutposts[x + ',' + y];
return typeof used != 'undefined' && used == true; return typeof used != 'undefined' && used === true;
}, },
useOutpost: function() { useOutpost: function() {