').attr('id', 'bagspace').appendTo(outfitting);
// Add the embark button
new Button.Button({
@@ -114,10 +114,10 @@ var Path = {
if(needsAppend && perks.children().length > 0) {
perks.appendTo(Path.panel);
}
- }
-
- if(Engine.activeModule === Path) {
- $('#storesContainer').css({top: perks.height() + 26 + 'px'});
+
+ if(Engine.activeModule === Path) {
+ $('#storesContainer').css({top: perks.height() + 26 + 'px'});
+ }
}
},
diff --git a/script/room.js b/script/room.js
index 29b311d..bac3bdf 100644
--- a/script/room.js
+++ b/script/room.js
@@ -65,7 +65,7 @@ var Room = {
wood: 200,
fur: 10,
meat: 5
- }
+ };
}
},
'trading post': {
@@ -261,7 +261,7 @@ var Room = {
return {
'leather': 200,
'iron': 100
- }
+ };
}
},
's armour': {
@@ -272,7 +272,7 @@ var Room = {
return {
'leather': 200,
'steel': 100
- }
+ };
}
},
'iron sword': {
@@ -307,7 +307,7 @@ var Room = {
'wood': 200,
'steel': 50,
'sulphur': 50
- }
+ };
}
}
},
@@ -331,7 +331,7 @@ var Room = {
return {
'fur': 150,
'scales': 50
- }
+ };
}
},
'coal': {
@@ -340,7 +340,7 @@ var Room = {
return {
'fur': 200,
'teeth': 50
- }
+ };
}
},
'steel': {
@@ -350,7 +350,7 @@ var Room = {
'fur': 300,
'scales': 50,
'teeth': 50
- }
+ };
}
},
'medicine': {
@@ -358,7 +358,7 @@ var Room = {
cost: function() {
return {
'scales': 50, 'teeth': 30
- }
+ };
}
},
'bullets': {
@@ -366,7 +366,7 @@ var Room = {
cost: function() {
return {
'scales': 10
- }
+ };
}
},
'energy cell': {
@@ -375,7 +375,7 @@ var Room = {
return {
'scales': 10,
'teeth': 10
- }
+ };
}
},
'bolas': {
@@ -383,7 +383,7 @@ var Room = {
cost: function() {
return {
'teeth': 10
- }
+ };
}
},
'grenade': {
@@ -392,7 +392,7 @@ var Room = {
return {
'scales': 100,
'teeth': 50
- }
+ };
}
},
'bayonet': {
@@ -401,7 +401,7 @@ var Room = {
return {
'scales': 500,
'teeth': 250
- }
+ };
}
},
'alien alloy': {
@@ -411,7 +411,7 @@ var Room = {
'fur': 1500,
'scales': 750,
'teeth': 300
- }
+ };
}
},
'compass': {
@@ -468,7 +468,7 @@ var Room = {
Engine.updateSlider();
// Create the light button
- var lbtn = new Button.Button({
+ new Button.Button({
id: 'lightButton',
text: 'light fire',
click: Room.lightFire,
@@ -478,7 +478,7 @@ var Room = {
}).appendTo('div#roomPanel');
// Create the stoke button
- var btn = new Button.Button({
+ new Button.Button({
id: 'stokeButton',
text: "stoke fire",
click: Room.stokeFire,
@@ -537,7 +537,7 @@ var Room = {
stores: {'wood' : 2 }
});
Room.updateIncomeView();
- Notifications.notify(Room, "the stranger is standing by the fire. she says she can help. says she builds things.")
+ Notifications.notify(Room, "the stranger is standing by the fire. she says she can help. says she builds things.");
}
Engine.moveStoresView(null, transition_diff);
@@ -703,7 +703,7 @@ var Room = {
setTimeout(Room.unlockForest, Room._NEED_WOOD_DELAY);
}
else if(lBuilder < 3 && Room.temperature.value >= Room.TempEnum.Warm.value) {
- var msg;
+ var msg = "";
switch(lBuilder) {
case 1:
msg = "the stranger shivers, and mumbles quietly. her words are unintelligible.";
@@ -781,7 +781,7 @@ var Room = {
}
if(row.length == 0 && num > 0) {
- var row = $('
').attr('id', id).addClass('storeRow');
+ row = $('
').attr('id', id).addClass('storeRow');
$('
').addClass('row_key').text(k).appendTo(row);
$('
').addClass('row_val').text(Math.floor(num)).appendTo(row);
$('
').addClass('clear').appendTo(row);
diff --git a/script/ship.js b/script/ship.js
index 3a1885f..f184737 100644
--- a/script/ship.js
+++ b/script/ship.js
@@ -120,7 +120,7 @@ var Ship = {
return false;
}
$SM.add('stores["alien alloy"]', -Ship.ALLOY_PER_THRUSTER);
- $SM.add('game.spaceShip.thrusters', 1)
+ $SM.add('game.spaceShip.thrusters', 1);
$('#engineRow .row_val', Ship.panel).text($SM.get('game.spaceShip.thrusters'));
},
diff --git a/script/space.js b/script/space.js
index cf8df77..247acdb 100644
--- a/script/space.js
+++ b/script/space.js
@@ -103,7 +103,7 @@ var Space = {
if(r < 0.2)
c = '#';
else if(r < 0.4)
- c = '$'
+ c = '$';
else if(r < 0.6)
c = '%';
else if(r < 0.8)
@@ -112,7 +112,7 @@ var Space = {
c = 'H';
var x = Math.floor(Math.random() * 700);
- var a = $('
').addClass('asteroid').text(c).appendTo('#spacePanel').css('left', x + 'px')
+ var a = $('
').addClass('asteroid').text(c).appendTo('#spacePanel').css('left', x + 'px');
a.data({
xMin: x,
xMax: x + a.width(),
diff --git a/script/state_manager.js b/script/state_manager.js
index 0495e19..3b0e9ea 100644
--- a/script/state_manager.js
+++ b/script/state_manager.js
@@ -83,8 +83,8 @@ var StateManager = {
//stores values can not be negative
if(stateName.indexOf('stores') == 0 && $SM.get(stateName, true) < 0) {
- eval('('+fullPath+') = 0');;
- Engine.log('WARNING: state:' + stateName + ' can not be a negative value. Set to 0 instead.')
+ eval('('+fullPath+') = 0');
+ Engine.log('WARNING: state:' + stateName + ' can not be a negative value. Set to 0 instead.');
}
if(!noEvent) {
@@ -95,7 +95,7 @@ var StateManager = {
//sets a list of states
setM: function(parentName, list, noEvent) {
- var whichParent = $SM.buildPath(parentName);
+ $SM.buildPath(parentName);
//make sure the state exists to avoid errors,
if($SM.get(parentName) == undefined) $SM.set(parentName, {}, true);
@@ -125,7 +125,7 @@ var StateManager = {
$SM.set(stateName, old + value, noEvent);
} else if(typeof old != 'number' || typeof value != 'number'){
Engine.log('WARNING: Can not do math with state:'+stateName+' or value:'+value+' because at least one is not a number.');
- err = 1
+ err = 1;
} else {
$SM.set(stateName, old + value, noEvent); //setState handles event and save
}
@@ -199,7 +199,7 @@ var StateManager = {
fireUpdate: function(stateName, save){
var category = $SM.getCategory(stateName);
if(stateName == undefined) stateName = category = 'all'; //best if this doesn't happen as it will trigger more stuff
- $.Dispatch('stateUpdate').publish({'category': category, 'stateName':stateName})
+ $.Dispatch('stateUpdate').publish({'category': category, 'stateName':stateName});
if(save) Engine.saveGame();
},
diff --git a/script/world.js b/script/world.js
index 6c95f6e..65aff70 100644
--- a/script/world.js
+++ b/script/world.js
@@ -334,7 +334,7 @@ var World = {
World.doSpace();
if(World.checkDanger()) {
if(World.danger) {
- Notifications.notify(World, 'dangerous to be this far from the village without proper protection')
+ Notifications.notify(World, 'dangerous to be this far from the village without proper protection');
} else {
Notifications.notify(World, 'safer here');
}
@@ -441,7 +441,7 @@ var World = {
// Starvation! Hooray!
num = 0;
if(!World.starvation) {
- Notifications.notify(World, 'starvation sets in')
+ Notifications.notify(World, 'starvation sets in');
World.starvation = true;
} else {
$SM.set('character.starved', $SM.get('character.starved', true));
@@ -620,7 +620,7 @@ var World = {
// Spiral out from there
map[World.RADIUS][World.RADIUS] = World.TILE.VILLAGE;
for(var r = 1; r <= World.RADIUS; r++) {
- for(t = 0; t < r * 8; t++) {
+ for(var t = 0; t < r * 8; t++) {
var x, y;
if(t < 2 * r) {
x = World.RADIUS - r + t;
@@ -689,8 +689,6 @@ var World = {
chooseTile: function(x, y, map) {
- var log = x == World.RADIUS + 1 && y == World.RADIUS + 1;
-
var adjacent = [
y > 0 ? map[x][y-1] : null,
y < World.RADIUS * 2 ? map[x][y+1] : null,