mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 00:01:54 +08:00
Merge pull request #102 from anubisthejackle/whitespace-fixes
Covert whitespace to tabs as per coding standard
This commit is contained in:
+53
-32
@@ -128,7 +128,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$('<span>')
|
||||
.addClass('lightsOff menuBtn')
|
||||
.text(_('lights off.'))
|
||||
@@ -204,14 +203,11 @@
|
||||
},
|
||||
|
||||
browserValid: function() {
|
||||
return location.search.indexOf('ignorebrowser=true') >= 0 || (
|
||||
typeof Storage != 'undefined' &&
|
||||
!oldIE);
|
||||
return ( location.search.indexOf( 'ignorebrowser=true' ) >= 0 || ( typeof Storage != 'undefined' && !oldIE ) );
|
||||
},
|
||||
|
||||
isMobile: function() {
|
||||
return location.search.indexOf('ignorebrowser=true') < 0 &&
|
||||
/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent);
|
||||
return ( location.search.indexOf( 'ignorebrowser=true' ) < 0 && /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test( navigator.userAgent ) );
|
||||
},
|
||||
|
||||
saveGame: function() {
|
||||
@@ -247,8 +243,10 @@
|
||||
title: _('Export / Import'),
|
||||
scenes: {
|
||||
start: {
|
||||
text: [_('export or import save data, for backing up'),
|
||||
_('or migrating computers')],
|
||||
text: [
|
||||
_('export or import save data, for backing up'),
|
||||
_('or migrating computers')
|
||||
],
|
||||
buttons: {
|
||||
'export': {
|
||||
text: _('export'),
|
||||
@@ -262,12 +260,13 @@
|
||||
text: _('cancel'),
|
||||
nextScene: 'end'
|
||||
}
|
||||
}
|
||||
},
|
||||
'confirm': {
|
||||
text: [_('are you sure?'),
|
||||
text: [
|
||||
_('are you sure?'),
|
||||
_('if the code is invalid, all data will be lost.'),
|
||||
_('this is irreversible.')],
|
||||
_('this is irreversible.')
|
||||
],
|
||||
buttons: {
|
||||
'yes': {
|
||||
text: _('yes'),
|
||||
@@ -276,10 +275,29 @@
|
||||
},
|
||||
'no': {
|
||||
text: _('no'),
|
||||
|
||||
nextScene: 'end'
|
||||
}
|
||||
}
|
||||
},
|
||||
'inputImport': {
|
||||
text: [
|
||||
_('put the save code here.')
|
||||
],
|
||||
textarea: '',
|
||||
buttons: {
|
||||
'okay': {
|
||||
text: _('import'),
|
||||
nextScene: 'end',
|
||||
onChoose: Engine.import64
|
||||
},
|
||||
'cancel': {
|
||||
text: _('cancel'),
|
||||
nextScene: 'end'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'inputImport': {
|
||||
text: [_('put the save code here.')],
|
||||
textarea: '',
|
||||
@@ -404,17 +422,17 @@
|
||||
},
|
||||
'twitter': {
|
||||
text: _('twitter'),
|
||||
nextScene: 'end',
|
||||
onChoose: function() {
|
||||
window.open('https://twitter.com/intent/tweet?text=A%20Dark%20Room&url=' + Engine.SITE_URL, 'sharer', 'width=660,height=260,location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no');
|
||||
},
|
||||
nextScene: 'end'
|
||||
}
|
||||
},
|
||||
'reddit': {
|
||||
text: _('reddit'),
|
||||
nextScene: 'end',
|
||||
onChoose: function() {
|
||||
window.open('http://www.reddit.com/submit?url=' + Engine.SITE_URL, 'sharer', 'width=960,height=700,location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no');
|
||||
},
|
||||
nextScene: 'end'
|
||||
}
|
||||
},
|
||||
'close': {
|
||||
text: _('close'),
|
||||
@@ -423,7 +441,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {width: '400px'});
|
||||
},
|
||||
{
|
||||
width: '400px'
|
||||
});
|
||||
},
|
||||
|
||||
findStylesheet: function(title) {
|
||||
@@ -438,9 +459,7 @@
|
||||
|
||||
isLightsOff: function() {
|
||||
var darkCss = Engine.findStylesheet('darkenLights');
|
||||
if (darkCss != null) {
|
||||
if (darkCss.disabled)
|
||||
return false;
|
||||
if ( darkCss != null && !darkCss.disabled ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -452,12 +471,10 @@
|
||||
$('head').append('<link rel="stylesheet" href="css/dark.css" type="text/css" title="darkenLights" />');
|
||||
Engine.turnLightsOff;
|
||||
$('.lightsOff').text(_('lights on.'));
|
||||
}
|
||||
else if (darkCss.disabled) {
|
||||
} else if (darkCss.disabled) {
|
||||
darkCss.disabled = false;
|
||||
$('.lightsOff').text(_('lights on.'));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$("#darkenLights").attr("disabled", "disabled");
|
||||
darkCss.disabled = true;
|
||||
$('.lightsOff').text(_('lights off.'));
|
||||
@@ -507,15 +524,15 @@
|
||||
$('div#weapons').animate({opacity: 1}, 300);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Notifications.printQueue(module);
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
// Move the stores panel beneath top_container (or to top: 0px if top_container
|
||||
// either hasn't been filled in or is null) using transition_diff to sync with
|
||||
// the animation in Engine.travelTo().
|
||||
/* Move the stores panel beneath top_container (or to top: 0px if top_container
|
||||
* either hasn't been filled in or is null) using transition_diff to sync with
|
||||
* the animation in Engine.travelTo().
|
||||
*/
|
||||
moveStoresView: function(top_container, transition_diff) {
|
||||
var stores = $('#storesContainer');
|
||||
|
||||
@@ -531,8 +548,13 @@
|
||||
stores.animate({top: '0px'}, {queue: false, duration: 300 * transition_diff});
|
||||
}
|
||||
else {
|
||||
stores.animate({top: top_container.height() + 26 + 'px'},
|
||||
{queue: false, duration: 300 * transition_diff});
|
||||
stores.animate({
|
||||
top: top_container.height() + 26 + 'px'
|
||||
},
|
||||
{
|
||||
queue: false,
|
||||
duration: 300 * transition_diff
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -680,8 +702,7 @@
|
||||
|
||||
//create jQuery Callbacks() to handle object events
|
||||
$.Dispatch = function( id ) {
|
||||
var callbacks,
|
||||
topic = id && Engine.topics[ id ];
|
||||
var callbacks, topic = id && Engine.topics[ id ];
|
||||
if ( !topic ) {
|
||||
callbacks = jQuery.Callbacks();
|
||||
topic = {
|
||||
|
||||
+1
-2
@@ -438,8 +438,7 @@ var Events = {
|
||||
});
|
||||
}
|
||||
|
||||
Events._enemyAttackTimer =
|
||||
setTimeout(Events.enemyAttack, scene.attackDelay * 1000);
|
||||
Events._enemyAttackTimer = setTimeout(Events.enemyAttack, scene.attackDelay * 1000);
|
||||
},
|
||||
|
||||
winFight: function() {
|
||||
|
||||
@@ -66,10 +66,7 @@ Events.Outside = [
|
||||
{ /* Sickness */
|
||||
title: _('Sickness'),
|
||||
isAvailable: function() {
|
||||
return Engine.activeModule == Outside &&
|
||||
$SM.get('game.population', true) > 10 &&
|
||||
$SM.get('game.population', true) < 50 &&
|
||||
$SM.get('stores.medicine', true) > 0;
|
||||
return Engine.activeModule == Outside && $SM.get('game.population', true) > 10 && $SM.get('game.population', true) < 50 && $SM.get('stores.medicine', true) > 0;
|
||||
},
|
||||
scenes: {
|
||||
'start': {
|
||||
@@ -241,4 +238,3 @@ Events.Outside = [
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
@@ -2345,7 +2345,6 @@ Events.Setpieces = {
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
'end4': {
|
||||
text: [
|
||||
_('the small military outpost is well supplied.'),
|
||||
@@ -2456,7 +2455,6 @@ Events.Setpieces = {
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
'end7': {
|
||||
text: [
|
||||
_('the remaining settlers flee from the violence, their belongings forgotten.'),
|
||||
|
||||
+56
-10
@@ -1,15 +1,61 @@
|
||||
(function(){
|
||||
//only used for poedit to find translatable strings
|
||||
var keywords = [ _('saved.'), _('wood'),_('builder'),_('teeth'),_('meat'),_('fur'), _('alien alloy'), _('bullets'),
|
||||
_('charm'),_('leather'),_('iron'), _('steel'), _('coal'), _('enegy cell'),
|
||||
_('torch'),_('medicine'),_('hunter'),_('trapper'),_('tanner'), _('grenade'), _('bolas'),
|
||||
_("charcutier"),_('iron miner'),_('coal miner'), _('sulphur miner'), _('armourer'),
|
||||
_('steelworker'),_('bait'),_('cured meat'), _('scales'), _('compass'), _('laser rifle'),
|
||||
_('gatherer'),_('cloth'), _('scales'), _('cured meat'), _('thieves'),
|
||||
_('not enough fur'), _('not enough wood'), _('not enough coal'), _('not enough iron'), _('not enough steel'), _('baited trap'),
|
||||
_('not enough scales'),_('not enough cloth'), _('not enough teeth'), _('not enough leather'),
|
||||
_('the compass points east.'), _('the compass points west.'), _('the compass points north.'), _('the compass points south.'),
|
||||
_('the compass points northeast.'), _('the compass points northwest.'), _('the compass points southeast.'), _('the compass points southwest.')];
|
||||
var keywords = [
|
||||
_('saved.'),
|
||||
_('wood'),
|
||||
_('builder'),
|
||||
_('teeth'),
|
||||
_('meat'),
|
||||
_('fur'),
|
||||
_('alien alloy'),
|
||||
_('bullets'),
|
||||
_('charm'),
|
||||
_('leather'),
|
||||
_('iron'),
|
||||
_('steel'),
|
||||
_('coal'),
|
||||
_('enegy cell'),
|
||||
_('torch'),
|
||||
_('medicine'),
|
||||
_('hunter'),
|
||||
_('trapper'),
|
||||
_('tanner'),
|
||||
_('grenade'),
|
||||
_('bolas'),
|
||||
_("charcutier"),
|
||||
_('iron miner'),
|
||||
_('coal miner'),
|
||||
_('sulphur miner'), _('armourer'),
|
||||
_('steelworker'),
|
||||
_('bait'),
|
||||
_('cured meat'),
|
||||
_('scales'),
|
||||
_('compass'),
|
||||
_('laser rifle'),
|
||||
_('gatherer'),
|
||||
_('cloth'),
|
||||
_('scales'),
|
||||
_('cured meat'),
|
||||
_('thieves'),
|
||||
_('not enough fur'),
|
||||
_('not enough wood'),
|
||||
_('not enough coal'),
|
||||
_('not enough iron'),
|
||||
_('not enough steel'),
|
||||
_('baited trap'),
|
||||
_('not enough scales'),
|
||||
_('not enough cloth'), _('not enough teeth'),
|
||||
_('not enough leather'),
|
||||
_('the compass points east.'),
|
||||
_('the compass points west.'),
|
||||
_('the compass points north.'),
|
||||
_('the compass points south.'),
|
||||
_('the compass points northeast.'),
|
||||
_('the compass points northwest.'),
|
||||
_('the compass points southeast.'),
|
||||
_('the compass points southwest.')
|
||||
];
|
||||
|
||||
delete keywords;
|
||||
|
||||
//translate text in css by overriding attributes
|
||||
|
||||
+1
-2
@@ -604,8 +604,7 @@ var Outside = {
|
||||
handleStateUpdates: function(e){
|
||||
if(e.category == 'stores'){
|
||||
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.updateWorkersView();
|
||||
Outside.updateVillageIncome();
|
||||
|
||||
@@ -409,7 +409,6 @@ var Space = {
|
||||
},
|
||||
complete: function() {
|
||||
Engine.GAME_OVER = true;
|
||||
|
||||
Score.save();
|
||||
Prestige.save();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user