Skip to content

Commit

Permalink
Made events/room.js and state_manager.js jshinthint compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasloisp committed Oct 2, 2016
1 parent 36b01a7 commit 6926704
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions script/events/room.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ Events.Room = [
text: [
_('the wanderer leaves, cart loaded with wood')
],
action: function(delay) {
var delay = delay || false;
action: function(inputDelay) {
var delay = inputDelay || false;
Events.saveDelay(function() {
$SM.add('stores.wood', 300);
Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with wood.'));
Expand All @@ -315,8 +315,8 @@ Events.Room = [
text: [
_('the wanderer leaves, cart loaded with wood')
],
action: function(delay) {
var delay = delay || false;
action: function(inputDelay) {
var delay = inputDelay || false;
Events.saveDelay(function() {
$SM.add('stores.wood', 1500);
Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with wood.'));
Expand Down Expand Up @@ -371,8 +371,8 @@ Events.Room = [
text: [
_('the wanderer leaves, cart loaded with furs')
],
action: function(delay) {
var delay = delay || false;
action: function(inputDelay) {
var delay = inputDelay || false;
Events.saveDelay(function() {
$SM.add('stores.fur', 300);
Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with furs.'));
Expand All @@ -394,8 +394,8 @@ Events.Room = [
text: [
_('the wanderer leaves, cart loaded with furs')
],
action: function(delay) {
var delay = delay || false;
action: function(inputDelay) {
var delay = inputDelay || false;
Events.saveDelay(function() {
$SM.add('stores.fur', 1500);
Notifications.notify(Room, _('the mysterious wanderer returns, cart piled high with furs.'));
Expand Down
10 changes: 5 additions & 5 deletions script/state_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ var StateManager = {
createState: function(stateName, value) {
var words = stateName.split(/[.\[\]'"]+/);
//for some reason there are sometimes empty strings
for (var i = 0; i < words.length; i++) {
if (words[i] === '') {
words.splice(i, 1);
i--;
for (var j = 0; j < words.length; j++) {
if (words[j] === '') {
words.splice(j, 1);
j--;
}
}
var obj = State;
Expand Down Expand Up @@ -218,7 +218,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
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});
if(save) Engine.saveGame();
},
Expand Down

0 comments on commit 6926704

Please sign in to comment.