mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-07-03 09:42:13 +08:00
@@ -9,26 +9,27 @@ a minimalist text adventure game for your browser
|
||||
<table>
|
||||
<tr><th colspan=4>Available Languages</tr>
|
||||
<tr>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=zh_cn">Chinese</a></td>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=zh_cn">Chinese (Simplified)</a></td>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=zh_cn">Chinese (Traditional)</a></td>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=en">English</a></td>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=fr">French</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=de">German</a></td>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=el">Greek</a></td>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=id">Indonesian</a></td>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=it">Italian</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=ja">Japanese</a></td>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=ko">Korean</a></td>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=nb">Norwegian</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=pl">Polish</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=pt">Portuguese</a></td>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=pt_br">Portuguese (Brazil)</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=ru">Russian</a></td>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=es">Spanish</a></td>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=sv">Swedish</a></td>
|
||||
</tr><tr>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=sv">Swedish</a></td>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=tr">Turkish</a></td>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=uk">Ukrainian</a></td>
|
||||
<td><a href="http://adarkroom.doublespeakgames.com/?lang=vi">Vietnamese</a></td>
|
||||
|
||||
@@ -182,6 +182,10 @@ div.row_val {
|
||||
float: right;
|
||||
}
|
||||
|
||||
div.total {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Notifications */
|
||||
|
||||
div#notifications {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1689
-1576
File diff suppressed because it is too large
Load Diff
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+2699
-1838
File diff suppressed because it is too large
Load Diff
+1
-1
File diff suppressed because one or more lines are too long
+2
-2
@@ -137,7 +137,7 @@ msgstr "Un village bruyant"
|
||||
|
||||
#: ../../script/outside.js:551
|
||||
msgid "the sky is grey and the wind blows relentlessly"
|
||||
msgstr "le ciel est gris et le vents souffle implacablement"
|
||||
msgstr "le ciel est gris et le vent souffle implacablement"
|
||||
|
||||
#: ../../script/outside.js:561
|
||||
msgid "dry brush and dead branches litter the forest floor"
|
||||
@@ -516,7 +516,7 @@ msgstr "aciérie"
|
||||
#: ../../script/room.js:134
|
||||
msgid "builder says the villagers could make steel, given the tools"
|
||||
msgstr ""
|
||||
"l'ouvrière dit qu'avec les bon outils, les villageois pourraient fabriquer "
|
||||
"l'ouvrière dit qu'avec les bons outils, les villageois pourraient fabriquer "
|
||||
"de l'acier"
|
||||
|
||||
#: ../../script/room.js:135
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
.button{width: 100px !important;}
|
||||
#outsidePanel .button{width: 115px !important;}
|
||||
.eventPanel .button {width: 122px !important;}
|
||||
File diff suppressed because one or more lines are too long
+3468
File diff suppressed because it is too large
Load Diff
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+3
-1
@@ -4,6 +4,7 @@ var langs = {
|
||||
'en':'english',
|
||||
'es':'español',
|
||||
'fr':'français',
|
||||
'id':'bahasa indonesia',
|
||||
'it':'italiano',
|
||||
'ja':'日本語',
|
||||
'ko':'한국어',
|
||||
@@ -16,5 +17,6 @@ var langs = {
|
||||
'tr':'türkçe',
|
||||
'uk':'українська',
|
||||
'vi':'tiếng việt',
|
||||
'zh_cn':'简体中文'
|
||||
'zh_cn':'简体中文',
|
||||
'zh_tw':'繁體中文'
|
||||
};
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+928
-880
File diff suppressed because it is too large
Load Diff
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -50,7 +50,7 @@ msgstr "добыватель угля"
|
||||
|
||||
#: ../../script/outside.js:69 ../../script/localization.js:32
|
||||
msgid "sulphur miner"
|
||||
msgstr "добыватель серы"
|
||||
msgstr "спелеолог"
|
||||
|
||||
#: ../../script/outside.js:77 ../../script/localization.js:35
|
||||
msgid "steelworker"
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,3 @@
|
||||
.button{width: 100px !important;}
|
||||
#outsidePanel .button{width: 115px !important;}
|
||||
.eventPanel .button {width: 122px !important;}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
+46
-13
@@ -24,6 +24,9 @@ var Button = {
|
||||
|
||||
el.append($("<div>").addClass('cooldown'));
|
||||
|
||||
// waiting for expiry of residual cooldown detected in state
|
||||
Button.cooldown(el, 'state');
|
||||
|
||||
if(options.cost) {
|
||||
var ttPos = options.ttPos ? options.ttPos : "bottom right";
|
||||
var costTooltip = $('<div>').addClass('tooltip ' + ttPos);
|
||||
@@ -43,6 +46,8 @@ var Button = {
|
||||
return el;
|
||||
},
|
||||
|
||||
saveCooldown: true,
|
||||
|
||||
setDisabled: function(btn, disabled) {
|
||||
if(btn) {
|
||||
if(!disabled && !btn.data('onCooldown')) {
|
||||
@@ -61,29 +66,57 @@ var Button = {
|
||||
return false;
|
||||
},
|
||||
|
||||
cooldown: function(btn) {
|
||||
cooldown: function(btn, option) {
|
||||
var cd = btn.data("cooldown");
|
||||
var id = 'cooldown.'+ btn.attr('id');
|
||||
if(cd > 0) {
|
||||
milliseconds = cd * 1000;
|
||||
if (Engine.options.doubleTime){
|
||||
milliseconds /= 2;
|
||||
// param "start" takes value from cooldown time if not specified
|
||||
var start, left;
|
||||
switch(option){
|
||||
// a switch will allow for several uses of cooldown function
|
||||
case 'state':
|
||||
if(!$SM.get(id)){
|
||||
return;
|
||||
}
|
||||
start = Math.min($SM.get(id), cd);
|
||||
left = (start / cd).toFixed(4);
|
||||
break;
|
||||
default:
|
||||
start = cd;
|
||||
left = 1;
|
||||
}
|
||||
|
||||
$('div.cooldown', btn).stop(true, true).width("100%").animate({width: '0%'}, milliseconds, 'linear', function() {
|
||||
var b = $(this).closest('.button');
|
||||
b.data('onCooldown', false);
|
||||
if(!b.data('disabled')) {
|
||||
b.removeClass('disabled');
|
||||
}
|
||||
Button.clearCooldown(btn);
|
||||
if(Button.saveCooldown){
|
||||
$SM.set(id,start);
|
||||
// residual value is measured in seconds
|
||||
// saves program performance
|
||||
btn.data('countdown', Engine.setInterval(function(){
|
||||
$SM.set(id, $SM.get(id, true) - 0.5, true);
|
||||
},500));
|
||||
}
|
||||
var time = start;
|
||||
if (Engine.options.doubleTime){
|
||||
time /= 2;
|
||||
}
|
||||
$('div.cooldown', btn).width(left * 100 +"%").animate({width: '0%'}, time * 1000, 'linear', function() {
|
||||
Button.clearCooldown(btn, true);
|
||||
});
|
||||
btn.addClass('disabled');
|
||||
btn.data('onCooldown', true);
|
||||
}
|
||||
},
|
||||
|
||||
clearCooldown: function(btn) {
|
||||
$('div.cooldown', btn).stop(true, true);
|
||||
clearCooldown: function(btn, ended) {
|
||||
var ended = ended || false;
|
||||
if(!ended){
|
||||
$('div.cooldown', btn).stop(true, true);
|
||||
}
|
||||
btn.data('onCooldown', false);
|
||||
if(btn.data('countdown')){
|
||||
window.clearInterval(btn.data('countdown'));
|
||||
$SM.remove('cooldown.'+ btn.attr('id'));
|
||||
btn.removeData('countdown');
|
||||
}
|
||||
if(!btn.data('disabled')) {
|
||||
btn.removeClass('disabled');
|
||||
}
|
||||
|
||||
@@ -955,6 +955,7 @@ var Events = {
|
||||
Engine.event('game event', 'event');
|
||||
Engine.keyLock = true;
|
||||
Engine.tabNavigation = false;
|
||||
Button.saveCooldown = false;
|
||||
Events.eventStack.unshift(event);
|
||||
event.eventPanel = $('<div>').attr('id', 'event').addClass('eventPanel').css('opacity', '0');
|
||||
if(options != null && options.width != null) {
|
||||
@@ -988,6 +989,7 @@ var Events = {
|
||||
Engine.log(Events.eventStack.length + ' events remaining');
|
||||
Engine.keyLock = false;
|
||||
Engine.tabNavigation = true;
|
||||
Button.saveCooldown = true;
|
||||
if (Events.BLINK_INTERVAL) {
|
||||
Events.stopTitleBlink();
|
||||
}
|
||||
|
||||
@@ -171,6 +171,8 @@ var Outside = {
|
||||
cooldown: Outside._GATHER_DELAY,
|
||||
width: '80px'
|
||||
}).appendTo('div#outsidePanel');
|
||||
|
||||
Outside.updateTrapButton();
|
||||
},
|
||||
|
||||
getMaxPopulation: function() {
|
||||
|
||||
@@ -885,6 +885,7 @@ var Room = {
|
||||
|
||||
updateIncomeView: function() {
|
||||
var stores = $('div#resources');
|
||||
var totalIncome = {};
|
||||
if(stores.length === 0 || typeof $SM.get('income') == 'undefined') return;
|
||||
$('div.storeRow', stores).each(function(index, el) {
|
||||
el = $(el);
|
||||
@@ -900,10 +901,18 @@ var Room = {
|
||||
.addClass('row_val')
|
||||
.text(Engine.getIncomeMsg(income.stores[store], income.delay))
|
||||
.appendTo(tt);
|
||||
if (!totalIncome[store] || totalIncome[store].income === undefined) {
|
||||
totalIncome[store] = { income: 0 };
|
||||
}
|
||||
totalIncome[store].income += Number(income.stores[store]);
|
||||
totalIncome[store].delay = income.delay;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(tt.children().length > 0) {
|
||||
var total = totalIncome[storeName].income;
|
||||
$('<div>').addClass('total row_key').text(_('total')).appendTo(tt);
|
||||
$('<div>').addClass('total row_val').text(Engine.getIncomeMsg(total, totalIncome[storeName].delay)).appendTo(tt);
|
||||
tt.appendTo(el);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -28,17 +28,18 @@ var StateManager = {
|
||||
|
||||
//create categories
|
||||
var cats = [
|
||||
'features', //big features like buildings, location availability, unlocks, etc
|
||||
'stores', //little stuff, items, weapons, etc
|
||||
'character', //this is for player's character stats such as perks
|
||||
'features', // big features like buildings, location availability, unlocks, etc
|
||||
'stores', // little stuff, items, weapons, etc
|
||||
'character', // this is for player's character stats such as perks
|
||||
'income',
|
||||
'timers',
|
||||
'game', //mostly location related: fire temp, workers, population, world map, etc
|
||||
'playStats', //anything play related: play time, loads, etc
|
||||
'game', // mostly location related: fire temp, workers, population, world map, etc
|
||||
'playStats', // anything play related: play time, loads, etc
|
||||
'previous', // prestige, score, trophies (in future), achievements (again, not yet), etc
|
||||
'outfit', // used to temporarily store the items to be taken on the path
|
||||
'outfit', // used to temporarily store the items to be taken on the path
|
||||
'config',
|
||||
'wait' // mysterious wanderers are coming back
|
||||
'wait', // mysterious wanderers are coming back
|
||||
'cooldown' // residual values for cooldown buttons
|
||||
];
|
||||
|
||||
for(var which in cats) {
|
||||
@@ -193,7 +194,7 @@ var StateManager = {
|
||||
}
|
||||
},
|
||||
|
||||
removeBranch(stateName, noEvent) {
|
||||
removeBranch: function(stateName, noEvent) {
|
||||
for(var i in $SM.get(stateName)){
|
||||
if(typeof $SM.get(stateName)[i] == 'object'){
|
||||
$SM.removeBranch(stateName +'["'+ i +'"]');
|
||||
|
||||
+3
-3
@@ -890,10 +890,8 @@ var World = {
|
||||
}
|
||||
World.state = null;
|
||||
|
||||
// Clear the embark cooldown
|
||||
var btn = Button.clearCooldown($('#embarkButton'));
|
||||
if(Path.outfit['cured meat'] > 0) {
|
||||
Button.setDisabled(btn, false);
|
||||
Button.setDisabled($('#embarkButton'), false);
|
||||
}
|
||||
|
||||
for(var k in Path.outfit) {
|
||||
@@ -959,6 +957,8 @@ var World = {
|
||||
|
||||
onArrival: function() {
|
||||
Engine.tabNavigation = false;
|
||||
// Clear the embark cooldown
|
||||
Button.clearCooldown($('#embarkButton'));
|
||||
Engine.keyLock = false;
|
||||
// Explore in a temporary world-state. We'll commit the changes if you return home safe.
|
||||
World.state = $.extend(true, {}, $SM.get('game.world'));
|
||||
|
||||
Reference in New Issue
Block a user