Fixed whitespace conformity in room.js

This commit is contained in:
Travis Weston
2014-07-13 11:52:19 -04:00
parent 991bf7e764
commit 2d0fccaf1c
+275 -275
View File
@@ -106,8 +106,8 @@ Events.Room = [
scenes: {
start: {
text: [
_('scratching noises can be heard from the store room.'),
_('something\'s in there.')
_('scratching noises can be heard from the store room.'),
_('something\'s in there.')
],
notification: _('something\'s in the store room'),
buttons: {
@@ -123,63 +123,63 @@ Events.Room = [
},
scales: {
text: [
_('some wood is missing.'),
_('the ground is littered with small scales')
],
onLoad: function() {
var numWood = $SM.get('stores.wood', true);
numWood = Math.floor(numWood * 0.1);
if(numWood == 0) numWood = 1;
var numScales = Math.floor(numWood / 5);
if(numScales == 0) numScales = 1;
$SM.addM('stores', {'wood': -numWood, 'scales': numScales});
},
buttons: {
'leave': {
text: _('leave'),
nextScene: 'end'
}
}
_('some wood is missing.'),
_('the ground is littered with small scales')
],
onLoad: function() {
var numWood = $SM.get('stores.wood', true);
numWood = Math.floor(numWood * 0.1);
if(numWood == 0) numWood = 1;
var numScales = Math.floor(numWood / 5);
if(numScales == 0) numScales = 1;
$SM.addM('stores', {'wood': -numWood, 'scales': numScales});
},
buttons: {
'leave': {
text: _('leave'),
nextScene: 'end'
}
}
},
teeth: {
text: [
_('some wood is missing.'),
_('the ground is littered with small teeth')
],
onLoad: function() {
var numWood = $SM.get('stores.wood', true);
numWood = Math.floor(numWood * 0.1);
if(numWood == 0) numWood = 1;
var numTeeth = Math.floor(numWood / 5);
if(numTeeth == 0) numTeeth = 1;
$SM.addM('stores', {'wood': -numWood, 'teeth': numTeeth});
},
buttons: {
'leave': {
text: _('leave'),
nextScene: 'end'
}
}
_('some wood is missing.'),
_('the ground is littered with small teeth')
],
onLoad: function() {
var numWood = $SM.get('stores.wood', true);
numWood = Math.floor(numWood * 0.1);
if(numWood == 0) numWood = 1;
var numTeeth = Math.floor(numWood / 5);
if(numTeeth == 0) numTeeth = 1;
$SM.addM('stores', {'wood': -numWood, 'teeth': numTeeth});
},
buttons: {
'leave': {
text: _('leave'),
nextScene: 'end'
}
}
},
cloth: {
text: [
_('some wood is missing.'),
_('the ground is littered with scraps of cloth')
],
onLoad: function() {
var numWood = $SM.get('stores.wood', true);
numWood = Math.floor(numWood * 0.1);
if(numWood == 0) numWood = 1;
var numCloth = Math.floor(numWood / 5);
if(numCloth == 0) numCloth = 1;
$SM.addM('stores', {'wood': -numWood, 'cloth': numCloth});
},
buttons: {
'leave': {
text: _('leave'),
nextScene: 'end'
}
}
_('some wood is missing.'),
_('the ground is littered with scraps of cloth')
],
onLoad: function() {
var numWood = $SM.get('stores.wood', true);
numWood = Math.floor(numWood * 0.1);
if(numWood == 0) numWood = 1;
var numCloth = Math.floor(numWood / 5);
if(numCloth == 0) numCloth = 1;
$SM.addM('stores', {'wood': -numWood, 'cloth': numCloth});
},
buttons: {
'leave': {
text: _('leave'),
nextScene: 'end'
}
}
}
}
},
@@ -191,8 +191,8 @@ Events.Room = [
scenes: {
start: {
text: [
_('a beggar arrives.'),
_('asks for any spare furs to keep him warm at night.')
_('a beggar arrives.'),
_('asks for any spare furs to keep him warm at night.')
],
notification: _('a beggar arrives'),
buttons: {
@@ -215,41 +215,41 @@ Events.Room = [
scales: {
reward: { scales: 20 },
text: [
_('the beggar expresses his thanks.'),
_('leaves a pile of small scales behind.')
],
buttons: {
'leave': {
text: _('say goodbye'),
nextScene: 'end'
}
}
_('the beggar expresses his thanks.'),
_('leaves a pile of small scales behind.')
],
buttons: {
'leave': {
text: _('say goodbye'),
nextScene: 'end'
}
}
},
teeth: {
reward: { teeth: 20 },
text: [
_('the beggar expresses his thanks.'),
_('leaves a pile of small teeth behind.')
],
buttons: {
'leave': {
text: _('say goodbye'),
nextScene: 'end'
}
}
_('the beggar expresses his thanks.'),
_('leaves a pile of small teeth behind.')
],
buttons: {
'leave': {
text: _('say goodbye'),
nextScene: 'end'
}
}
},
cloth: {
reward: { cloth: 20 },
text: [
_('the beggar expresses his thanks.'),
_('leaves some scraps of cloth behind.')
],
buttons: {
'leave': {
text: _('say goodbye'),
nextScene: 'end'
}
}
_('the beggar expresses his thanks.'),
_('leaves some scraps of cloth behind.')
],
buttons: {
'leave': {
text: _('say goodbye'),
nextScene: 'end'
}
}
}
}
},
@@ -262,8 +262,8 @@ Events.Room = [
scenes: {
start: {
text: [
_('a wanderer arrives with an empty cart. says if he leaves with wood, he\'ll be back with more.'),
_("builder's not sure he's to be trusted.")
_('a wanderer arrives with an empty cart. says if he leaves with wood, he\'ll be back with more.'),
_("builder's not sure he's to be trusted.")
],
notification: _('a mysterious wanderer arrives'),
buttons: {
@@ -285,41 +285,41 @@ Events.Room = [
},
'100wood': {
text: [
_('the wanderer leaves, cart loaded with wood')
],
onLoad: function() {
if(Math.random() < 0.5) {
setTimeout(function() {
$SM.add('stores.wood', 300);
Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with wood.'));
}, 60 * 1000);
}
},
buttons: {
'leave': {
text: _('say goodbye'),
nextScene: 'end'
}
}
_('the wanderer leaves, cart loaded with wood')
],
onLoad: function() {
if(Math.random() < 0.5) {
setTimeout(function() {
$SM.add('stores.wood', 300);
Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with wood.'));
}, 60 * 1000);
}
},
buttons: {
'leave': {
text: _('say goodbye'),
nextScene: 'end'
}
}
},
'500wood': {
text: [
_('the wanderer leaves, cart loaded with wood')
],
onLoad: function() {
if(Math.random() < 0.3) {
setTimeout(function() {
$SM.add('stores.wood', 1500);
Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with wood.'));
}, 60 * 1000);
}
},
buttons: {
'leave': {
text: _('say goodbye'),
nextScene: 'end'
}
}
_('the wanderer leaves, cart loaded with wood')
],
onLoad: function() {
if(Math.random() < 0.3) {
setTimeout(function() {
$SM.add('stores.wood', 1500);
Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with wood.'));
}, 60 * 1000);
}
},
buttons: {
'leave': {
text: _('say goodbye'),
nextScene: 'end'
}
}
}
}
},
@@ -332,8 +332,8 @@ Events.Room = [
scenes: {
start: {
text: [
_('a wanderer arrives with an empty cart. says if she leaves with furs, she\'ll be back with more.'),
_("builder's not sure she's to be trusted.")
_('a wanderer arrives with an empty cart. says if she leaves with furs, she\'ll be back with more.'),
_("builder's not sure she's to be trusted.")
],
notification: _('a mysterious wanderer arrives'),
buttons: {
@@ -355,41 +355,41 @@ Events.Room = [
},
'100fur': {
text: [
_('the wanderer leaves, cart loaded with furs')
],
onLoad: function() {
if(Math.random() < 0.5) {
setTimeout(function() {
$SM.add('stores.fur', 300);
Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with furs.'));
}, 60 * 1000);
}
},
buttons: {
'leave': {
text: _('say goodbye'),
nextScene: 'end'
}
}
_('the wanderer leaves, cart loaded with furs')
],
onLoad: function() {
if(Math.random() < 0.5) {
setTimeout(function() {
$SM.add('stores.fur', 300);
Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with furs.'));
}, 60 * 1000);
}
},
buttons: {
'leave': {
text: _('say goodbye'),
nextScene: 'end'
}
}
},
'500fur': {
text: [
_('the wanderer leaves, cart loaded with furs')
],
onLoad: function() {
if(Math.random() < 0.3) {
setTimeout(function() {
$SM.add('stores.fur', 1500);
Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with furs.'));
}, 60 * 1000);
}
},
buttons: {
'leave': {
text: _('say goodbye'),
nextScene: 'end'
}
}
_('the wanderer leaves, cart loaded with furs')
],
onLoad: function() {
if(Math.random() < 0.3) {
setTimeout(function() {
$SM.add('stores.fur', 1500);
Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with furs.'));
}, 60 * 1000);
}
},
buttons: {
'leave': {
text: _('say goodbye'),
nextScene: 'end'
}
}
}
}
},
@@ -424,9 +424,9 @@ Events.Room = [
}
},
'leave': {
text: _('say goodbye'),
nextScene: 'end'
}
text: _('say goodbye'),
nextScene: 'end'
}
}
}
}
@@ -462,132 +462,132 @@ Events.Room = [
},
'agree': {
text: [
_('in exchange, the wanderer offers his wisdom.')
],
buttons: {
'evasion': {
text: _('evasion'),
available: function() {
return !$SM.hasPerk('evasive');
},
onChoose: function() {
$SM.addPerk('evasive');
},
nextScene: 'end'
},
'precision': {
text: _('precision'),
available: function() {
return !$SM.hasPerk('precise');
},
onChoose: function() {
$SM.addPerk('precise');
},
nextScene: 'end'
},
'force': {
text: _('force'),
available: function() {
return !$SM.hasPerk('barbarian');
},
onChoose: function() {
$SM.addPerk('barbarian');
},
nextScene: 'end'
},
'nothing': {
text: _('nothing'),
nextScene: 'end'
}
}
_('in exchange, the wanderer offers his wisdom.')
],
buttons: {
'evasion': {
text: _('evasion'),
available: function() {
return !$SM.hasPerk('evasive');
},
onChoose: function() {
$SM.addPerk('evasive');
},
nextScene: 'end'
},
'precision': {
text: _('precision'),
available: function() {
return !$SM.hasPerk('precise');
},
onChoose: function() {
$SM.addPerk('precise');
},
nextScene: 'end'
},
'force': {
text: _('force'),
available: function() {
return !$SM.hasPerk('barbarian');
},
onChoose: function() {
$SM.addPerk('barbarian');
},
nextScene: 'end'
},
'nothing': {
text: _('nothing'),
nextScene: 'end'
}
}
}
}
},
{ /* The Sick Man */
title: _('The Sick Man'),
isAvailable: function() {
return Engine.activeModule == Room && $SM.get('stores.medicine', true) > 0;
},
scenes: {
'start': {
text: [
_("a man hobbles up, coughing."),
_("he begs for medicine.")
],
notification: _('a sick man hobbles up'),
buttons: {
'help': {
text: _('give 1 medicine'),
cost: { 'medicine': 1 },
notification: _('the man swallows the medicine eagerly'),
nextScene: { 0.1: 'alloy', 0.3: 'cells', 0.5: 'scales', 1.0: 'nothing' }
},
'ignore': {
text: _('tell him to leave'),
nextScene: 'end'
}
}
},
'alloy': {
text: [
_("the man is thankful."),
_('he leaves a reward.'),
_('some weird metal he picked up on his travels.')
],
onLoad: function() {
$SM.add('stores["alien alloy"]', 1);
},
buttons: {
'bye': {
text: _('say goodbye'),
nextScene: 'end'
}
}
},
'cells': {
text: [
_("the man is thankful."),
_('he leaves a reward.'),
_('some weird glowing boxes he picked up on his travels.')
],
onLoad: function() {
$SM.add('stores["energy cell"]', 3);
},
buttons: {
'bye': {
text: _('say goodbye'),
nextScene: 'end'
}
}
},
'scales': {
text: [
_("the man is thankful."),
_('he leaves a reward.'),
_('all he has are some scales.')
],
onLoad: function() {
$SM.add('stores.scales', 5);
},
buttons: {
'bye': {
text: _('say goodbye'),
nextScene: 'end'
}
}
},
'nothing': {
text: [
_("the man expresses his thanks and hobbles off.")
],
buttons: {
'bye': {
text: _('say goodbye'),
nextScene: 'end'
}
}
}
}
title: _('The Sick Man'),
isAvailable: function() {
return Engine.activeModule == Room && $SM.get('stores.medicine', true) > 0;
},
scenes: {
'start': {
text: [
_("a man hobbles up, coughing."),
_("he begs for medicine.")
],
notification: _('a sick man hobbles up'),
buttons: {
'help': {
text: _('give 1 medicine'),
cost: { 'medicine': 1 },
notification: _('the man swallows the medicine eagerly'),
nextScene: { 0.1: 'alloy', 0.3: 'cells', 0.5: 'scales', 1.0: 'nothing' }
},
'ignore': {
text: _('tell him to leave'),
nextScene: 'end'
}
}
},
'alloy': {
text: [
_("the man is thankful."),
_('he leaves a reward.'),
_('some weird metal he picked up on his travels.')
],
onLoad: function() {
$SM.add('stores["alien alloy"]', 1);
},
buttons: {
'bye': {
text: _('say goodbye'),
nextScene: 'end'
}
}
},
'cells': {
text: [
_("the man is thankful."),
_('he leaves a reward.'),
_('some weird glowing boxes he picked up on his travels.')
],
onLoad: function() {
$SM.add('stores["energy cell"]', 3);
},
buttons: {
'bye': {
text: _('say goodbye'),
nextScene: 'end'
}
}
},
'scales': {
text: [
_("the man is thankful."),
_('he leaves a reward.'),
_('all he has are some scales.')
],
onLoad: function() {
$SM.add('stores.scales', 5);
},
buttons: {
'bye': {
text: _('say goodbye'),
nextScene: 'end'
}
}
},
'nothing': {
text: [
_("the man expresses his thanks and hobbles off.")
],
buttons: {
'bye': {
text: _('say goodbye'),
nextScene: 'end'
}
}
}
}
}
];