mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-06-11 15:07:12 +08:00
Merge pull request #157 from Continuities/language-init-bug
Change temp and fire to take from value not text for i18n
This commit is contained in:
+7
-7
@@ -540,8 +540,8 @@ var Room = {
|
|||||||
}
|
}
|
||||||
setTimeout($SM.collectIncome, 1000);
|
setTimeout($SM.collectIncome, 1000);
|
||||||
|
|
||||||
Notifications.notify(Room, _("the room is {0}", $SM.get('game.temperature.text')));
|
Notifications.notify(Room, _("the room is {0}", Room.TempEnum.fromInt($SM.get('game.temperature.value')).text));
|
||||||
Notifications.notify(Room, _("the fire is {0}", $SM.get('game.fire.text')));
|
Notifications.notify(Room, _("the fire is {0}", Room.FireEnum.fromInt($SM.get('game.fire.value')).text));
|
||||||
},
|
},
|
||||||
|
|
||||||
options: {}, // Nothing for now
|
options: {}, // Nothing for now
|
||||||
@@ -549,8 +549,8 @@ var Room = {
|
|||||||
onArrival: function(transition_diff) {
|
onArrival: function(transition_diff) {
|
||||||
Room.setTitle();
|
Room.setTitle();
|
||||||
if(Room.changed) {
|
if(Room.changed) {
|
||||||
Notifications.notify(Room, _("the fire is {0}", $SM.get('game.fire.text')));
|
Notifications.notify(Room, _("the fire is {0}", Room.FireEnum.fromInt($SM.get('game.fire.value')).text));
|
||||||
Notifications.notify(Room, _("the room is {0}", $SM.get('game.temperature.text')));
|
Notifications.notify(Room, _("the room is {0}", Room.TempEnum.fromInt($SM.get('game.temperature.value')).text));
|
||||||
Room.changed = false;
|
Room.changed = false;
|
||||||
}
|
}
|
||||||
if($SM.get('game.builder.level') == 3) {
|
if($SM.get('game.builder.level') == 3) {
|
||||||
@@ -667,7 +667,7 @@ var Room = {
|
|||||||
if(Engine.activeModule != Room) {
|
if(Engine.activeModule != Room) {
|
||||||
Room.changed = true;
|
Room.changed = true;
|
||||||
}
|
}
|
||||||
Notifications.notify(Room, _("the fire is {0}", $SM.get('game.fire.text')), true);
|
Notifications.notify(Room, _("the fire is {0}", Room.FireEnum.fromInt($SM.get('game.fire.value')).text), true);
|
||||||
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"));
|
||||||
@@ -698,11 +698,11 @@ var Room = {
|
|||||||
var old = $SM.get('game.temperature.value');
|
var old = $SM.get('game.temperature.value');
|
||||||
if($SM.get('game.temperature.value') > 0 && $SM.get('game.temperature.value') > $SM.get('game.fire.value')) {
|
if($SM.get('game.temperature.value') > 0 && $SM.get('game.temperature.value') > $SM.get('game.fire.value')) {
|
||||||
$SM.set('game.temperature',Room.TempEnum.fromInt($SM.get('game.temperature.value') - 1));
|
$SM.set('game.temperature',Room.TempEnum.fromInt($SM.get('game.temperature.value') - 1));
|
||||||
Notifications.notify(Room, _("the room is {0}" , $SM.get('game.temperature.text')), true);
|
Notifications.notify(Room, _("the room is {0}" , Room.TempEnum.fromInt($SM.get('game.temperature.value')).text), true);
|
||||||
}
|
}
|
||||||
if($SM.get('game.temperature.value') < 4 && $SM.get('game.temperature.value') < $SM.get('game.fire.value')) {
|
if($SM.get('game.temperature.value') < 4 && $SM.get('game.temperature.value') < $SM.get('game.fire.value')) {
|
||||||
$SM.set('game.temperature', Room.TempEnum.fromInt($SM.get('game.temperature.value') + 1));
|
$SM.set('game.temperature', Room.TempEnum.fromInt($SM.get('game.temperature.value') + 1));
|
||||||
Notifications.notify(Room, _("the room is {0}" , $SM.get('game.temperature.text')), true);
|
Notifications.notify(Room, _("the room is {0}" , Room.TempEnum.fromInt($SM.get('game.temperature.value')).text), true);
|
||||||
}
|
}
|
||||||
if($SM.get('game.temperature.value') != old) {
|
if($SM.get('game.temperature.value') != old) {
|
||||||
Room.changed = true;
|
Room.changed = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user