mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 08:11:54 +08:00
Merge remote-tracking branch 'upstream/master'
Conflicts: script/engine.js script/localization.js
This commit is contained in:
+59
-35
@@ -112,17 +112,21 @@
|
||||
.addClass('menu')
|
||||
.appendTo('body');
|
||||
|
||||
var selectWrap = $('<span>')
|
||||
.addClass('select-wrap')
|
||||
.appendTo(menu);
|
||||
$('<select>')
|
||||
.addClass('menuBtn')
|
||||
.append($('<option>').text("language."))
|
||||
.append($('<option>').text("english").val("en"))
|
||||
.append($('<option>').text("français").val("fr"))
|
||||
.change(Engine.switchLanguage)
|
||||
.appendTo(selectWrap);
|
||||
if(typeof langs != 'undefined'){
|
||||
var selectWrap = $('<span>')
|
||||
.addClass('select-wrap')
|
||||
.appendTo(menu);
|
||||
var select = $('<select>')
|
||||
.addClass('menuBtn')
|
||||
.append($('<option>').text("language."))
|
||||
.change(Engine.switchLanguage)
|
||||
.appendTo(selectWrap);
|
||||
|
||||
$.each(langs, function(name,display){
|
||||
$('<option>').text(display).val(name).appendTo(select)
|
||||
})
|
||||
}
|
||||
|
||||
$('<span>')
|
||||
.addClass('lightsOff menuBtn')
|
||||
.text(_('lights off.'))
|
||||
@@ -226,27 +230,26 @@
|
||||
},
|
||||
|
||||
exportImport: function() {
|
||||
Events.startEvent({
|
||||
title: 'Export / Import',
|
||||
scenes: {
|
||||
start: {
|
||||
text: [_('export or import save data, for backing up'),
|
||||
_('or migrating computers')],
|
||||
buttons: {
|
||||
'export': {
|
||||
text: _('export'),
|
||||
onChoose: Engine.export64
|
||||
},
|
||||
'import': {
|
||||
text: _('import'),
|
||||
nextScene: {
|
||||
1: 'confirm'
|
||||
},
|
||||
},
|
||||
'cancel': {
|
||||
text: _('cancel'),
|
||||
nextScene: 'end'
|
||||
}
|
||||
Events.startEvent({
|
||||
title: _('Export / Import'),
|
||||
scenes: {
|
||||
start: {
|
||||
text: [
|
||||
_('export or import save data, for backing up'),
|
||||
_('or migrating computers')
|
||||
],
|
||||
buttons: {
|
||||
'export': {
|
||||
text: _('export'),
|
||||
onChoose: Engine.export64
|
||||
},
|
||||
'import': {
|
||||
text: _('import'),
|
||||
nextScene: {1: 'confirm'},
|
||||
},
|
||||
'cancel': {
|
||||
text: _('cancel'),
|
||||
nextScene: 'end'
|
||||
}
|
||||
},
|
||||
'confirm': {
|
||||
@@ -263,6 +266,7 @@
|
||||
},
|
||||
'no': {
|
||||
text: _('no'),
|
||||
|
||||
nextScene: 'end'
|
||||
}
|
||||
}
|
||||
@@ -284,6 +288,21 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'inputImport': {
|
||||
text: [_('put the save code here.')],
|
||||
textarea: '',
|
||||
buttons: {
|
||||
'okay': {
|
||||
text: _('import'),
|
||||
nextScene: 'end',
|
||||
onChoose: Engine.import64
|
||||
},
|
||||
'cancel': {
|
||||
text: _('cancel'),
|
||||
nextScene: 'end'
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -311,8 +330,9 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
Engine.autoSelect('#description textarea')
|
||||
},
|
||||
|
||||
|
||||
import64: function(string64) {
|
||||
Engine.disableSelection();
|
||||
string64 = string64.replace(/\s/g, '');
|
||||
@@ -322,7 +342,7 @@
|
||||
localStorage.gameState = decodedSave;
|
||||
location.reload();
|
||||
},
|
||||
|
||||
|
||||
event: function(cat, act) {
|
||||
if(typeof ga === 'function') {
|
||||
ga('send', 'event', cat, act);
|
||||
@@ -428,7 +448,7 @@
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
|
||||
turnLightsOff: function() {
|
||||
var darkCss = Engine.findStylesheet('darkenLights');
|
||||
if (darkCss == null) {
|
||||
@@ -550,7 +570,7 @@
|
||||
Engine.activeModule.keyDown(e);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return !(jQuery.inArray(window.event.keycode, [37,38,39,40]));
|
||||
},
|
||||
|
||||
keyUp: function(e) {
|
||||
@@ -629,6 +649,10 @@
|
||||
document.onmousedown = eventPassthrough;
|
||||
},
|
||||
|
||||
autoSelect: function(selector) {
|
||||
$(selector).focus().select();
|
||||
},
|
||||
|
||||
handleStateUpdates: function(e){
|
||||
|
||||
},
|
||||
|
||||
@@ -20,11 +20,12 @@
|
||||
_('hunter'),
|
||||
_('trapper'),
|
||||
_('tanner'),
|
||||
_('grenade'),
|
||||
_('bolas'),
|
||||
_("charcutier"),
|
||||
_('iron miner'),
|
||||
_('coal miner'),
|
||||
_('sulphur miner'),
|
||||
_('armourer'),
|
||||
_('sulphur miner'), _('armourer'),
|
||||
_('steelworker'),
|
||||
_('bait'),
|
||||
_('cured meat'),
|
||||
@@ -43,7 +44,7 @@
|
||||
_('not enough steel'),
|
||||
_('baited trap'),
|
||||
_('not enough scales'),
|
||||
_('not enough teeth'),
|
||||
_('not enough cloth'), _('not enough teeth'),
|
||||
_('not enough leather'),
|
||||
_('the compass points east.'),
|
||||
_('the compass points west.'),
|
||||
@@ -54,6 +55,7 @@
|
||||
_('the compass points southeast.'),
|
||||
_('the compass points southwest.')
|
||||
];
|
||||
|
||||
delete keywords;
|
||||
|
||||
//translate text in css by overriding attributes
|
||||
@@ -66,6 +68,8 @@
|
||||
div#outfitting:before{ content: \''+ _("supplies:") + '\'}\
|
||||
div#perks:before{ content: \''+ _("perks:") + '\'}\
|
||||
div#lootButtons:before { content: \''+ _("take:") + '\'}\
|
||||
div#village:before{ content: \''+_('forest')+'\'}\
|
||||
div#dropMenu:before { content: \''+ _("drop:") + '\'}\
|
||||
div#village.noHuts:before { content: \'' + _("forest") + '\'}\
|
||||
div#village:before { content: \'' + _("village") + '\'}\
|
||||
').appendTo($('head'));
|
||||
})();
|
||||
|
||||
+1
-1
@@ -416,7 +416,7 @@ var Outside = {
|
||||
}
|
||||
}
|
||||
|
||||
population.text('pop ' + $SM.get('game.population') + '/' + this.getMaxPopulation());
|
||||
population.text(_('pop ') + $SM.get('game.population') + '/' + this.getMaxPopulation());
|
||||
|
||||
var hasPeeps;
|
||||
if($SM.get('game.buildings["hut"]', true) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user