From ccd7f9ff12e25da1f7e6da8799b81385fd861f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Tue, 13 Sep 2016 12:10:39 +0200 Subject: [PATCH 01/18] preparing event-handler support needed for copiing --- src/libs/matches-selector-polyfill.js | 18 ++++++++++++++++++ src/mods/core.js | 24 ++++++++++++++++++++++++ src/mods/ui.js | 8 ++++++++ 3 files changed, 50 insertions(+) create mode 100644 src/libs/matches-selector-polyfill.js diff --git a/src/libs/matches-selector-polyfill.js b/src/libs/matches-selector-polyfill.js new file mode 100644 index 0000000..3661e3f --- /dev/null +++ b/src/libs/matches-selector-polyfill.js @@ -0,0 +1,18 @@ +/** + * from https://developer.mozilla.org/de/docs/Web/API/Element/matches + */ +if ( !Element.prototype.matches ) { + Element.prototype.matches = + Element.prototype.matchesSelector || + Element.prototype.mozMatchesSelector || + Element.prototype.msMatchesSelector || + Element.prototype.oMatchesSelector || + Element.prototype.webkitMatchesSelector || + function ( s ) { + var matches = ( this.document || this.ownerDocument ).querySelectorAll ( s ), + i = matches.length; + while ( --i >= 0 && matches.item ( i ) !== this ) { + } + return i > -1; + }; +} \ No newline at end of file diff --git a/src/mods/core.js b/src/mods/core.js index 166596f..e25bea3 100644 --- a/src/mods/core.js +++ b/src/mods/core.js @@ -99,5 +99,29 @@ idrinth.core = { }, confirm: function ( text, callback ) { idrinth.ui.buildModal ( 'Do you?', text, callback ); + }, + multibind: { + events: { }, + add: function ( event, selector, method ) { + idrinth.core.multibind.events[event] = idrinth.core.multibind.events[event] ? idrinth.core.multibind.events[event] : { }; + idrinth.core.multibind.events[event][selector] = idrinth.core.multibind.events[event][selector] ? idrinth.core.multibind.events[event][selector] : [ ]; + idrinth.core.multibind.events[event][selector].push ( method ); + }, + triggered: function ( element, event ) { + if ( idrinth.core.multibind.events[event] ) { + for (var selector in idrinth.core.multibind.events[event]) { + var el = idrinth.ui.matchesCss ( element, selector ); + if ( el ) { + for (var pos = 0; pos < idrinth.core.multibind.events[event][selector].length; pos++) { + try { + idrinth.core.multibind.events[event][selector][pos] ( element, el, event ); + } catch ( exception ) { + idrinth.core.log ( exception.getMessage () ); + } + } + } + } + } + } } }; \ No newline at end of file diff --git a/src/mods/ui.js b/src/mods/ui.js index 00a4817..a0ab044 100644 --- a/src/mods/ui.js +++ b/src/mods/ui.js @@ -311,6 +311,14 @@ idrinth.ui = { idrinth.ui.setTooltipTimeout (); } }, + matchesCss: function ( element, selector ) { + while ( element && element !== document ) { + if ( typeof element.matches === 'function' && element.matches ( selector ) ) { + return element; + } + element = element.parentNode + } + }, setTooltipTimeout: function () { idrinth.ui.tooltipTO = window.setTimeout ( idrinth.ui.hideTooltip, idrinth.settings.timeout ? idrinth.settings.timeout : 5000 ); }, From 85a658b667f90700d5d9d34ce5da670f3f2ccfdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Tue, 13 Sep 2016 12:28:44 +0200 Subject: [PATCH 02/18] some handling for existing eventhandler & attributes --- src/mods/core.js | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/mods/core.js b/src/mods/core.js index e25bea3..2d098a2 100644 --- a/src/mods/core.js +++ b/src/mods/core.js @@ -103,9 +103,22 @@ idrinth.core = { multibind: { events: { }, add: function ( event, selector, method ) { - idrinth.core.multibind.events[event] = idrinth.core.multibind.events[event] ? idrinth.core.multibind.events[event] : { }; - idrinth.core.multibind.events[event][selector] = idrinth.core.multibind.events[event][selector] ? idrinth.core.multibind.events[event][selector] : [ ]; - idrinth.core.multibind.events[event][selector].push ( method ); + var bind = function ( event, selector, method ) { + idrinth.core.multibind.events[event] = idrinth.core.multibind.events[event] ? idrinth.core.multibind.events[event] : { }; + idrinth.core.multibind.events[event][selector] = idrinth.core.multibind.events[event][selector] ? idrinth.core.multibind.events[event][selector] : [ ]; + idrinth.core.multibind.events[event][selector].push ( method ); + }; + if ( idrinth.core.multibind.events[event] ) { + //trying not to break all old code there + if ( idrinth.ui.body.getAttribute ( 'on' + event ) ) { + var tmp = new Function ( idrinth.ui.body.getAttribute ( 'on' + event ) ); + bind ( event, 'body', tmp ); + } + if ( idrinth.ui.body['on' + event] && typeof idrinth.ui.body['on' + event] === 'function' ) { + bind ( event, 'body', idrinth.ui.body['on' + event] ); + } + } + bind ( event, selector, method ); }, triggered: function ( element, event ) { if ( idrinth.core.multibind.events[event] ) { @@ -114,7 +127,7 @@ idrinth.core = { if ( el ) { for (var pos = 0; pos < idrinth.core.multibind.events[event][selector].length; pos++) { try { - idrinth.core.multibind.events[event][selector][pos] ( element, el, event ); + idrinth.core.multibind.events[event][selector][pos].bind ( el, event ); } catch ( exception ) { idrinth.core.log ( exception.getMessage () ); } From 4396bcd495a8313e28ceb3903af9b585c1aa5c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Tue, 13 Sep 2016 12:38:05 +0200 Subject: [PATCH 03/18] slight cleanup of the triggered function adding events to body --- src/mods/core.js | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/mods/core.js b/src/mods/core.js index 2d098a2..822b0a4 100644 --- a/src/mods/core.js +++ b/src/mods/core.js @@ -117,21 +117,27 @@ idrinth.core = { if ( idrinth.ui.body['on' + event] && typeof idrinth.ui.body['on' + event] === 'function' ) { bind ( event, 'body', idrinth.ui.body['on' + event] ); } + idrinth.ui.body.setAttribute ( 'on' + event, 'idrinth.core.triggered(this,\'' + event + '\');' ); } bind ( event, selector, method ); }, triggered: function ( element, event ) { + var handleElement = function ( el, event, selector ) { + if ( !el ) { + return; + } + for (var pos = 0; pos < idrinth.core.multibind.events[event][selector].length; pos++) { + try { + idrinth.core.multibind.events[event][selector][pos].bind ( el, event ); + } catch ( exception ) { + idrinth.core.log ( exception.getMessage () ); + } + } + }; if ( idrinth.core.multibind.events[event] ) { for (var selector in idrinth.core.multibind.events[event]) { - var el = idrinth.ui.matchesCss ( element, selector ); - if ( el ) { - for (var pos = 0; pos < idrinth.core.multibind.events[event][selector].length; pos++) { - try { - idrinth.core.multibind.events[event][selector][pos].bind ( el, event ); - } catch ( exception ) { - idrinth.core.log ( exception.getMessage () ); - } - } + if ( idrinth.core.multibind.events[event].hasOwnProperty ( selector ) ) { + handleElement ( idrinth.ui.matchesCss ( element, selector ), event, selector ); } } } From caf0f5eec5ed92b794f8536179b5e90e36d16d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Tue, 13 Sep 2016 15:37:05 +0200 Subject: [PATCH 04/18] fixes #91 correct version for reloading now --- src/stable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stable.js b/src/stable.js index 5c0e529..247b698 100644 --- a/src/stable.js +++ b/src/stable.js @@ -93,7 +93,7 @@ var idrinth = { idrinth.ui.removeElement ( 'idrinth-chat' ); idrinth.ui.removeElement ( 'idrinth-war' ); var sc = document.createElement ( 'script' ); - sc.setAttribute ( 'src', 'https://dotd.idrinth.de/static/userscript/' + Math.random () + '/' ); + sc.setAttribute ( 'src', 'https://dotd.idrinth.de/static/userscript/###RELOAD-VERSION###/' + Math.random () + '/' ); document.getElementsByTagName ( 'body' )[0].appendChild ( sc ); window.setTimeout ( function () { idrinth = { }; From a7ae54a3069a128ab437af742f1ae72481d919f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Tue, 13 Sep 2016 15:57:05 +0200 Subject: [PATCH 05/18] making the fallback slightly better readable --- src/libs/matches-selector-polyfill.js | 30 ++++++++++++++------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/libs/matches-selector-polyfill.js b/src/libs/matches-selector-polyfill.js index 3661e3f..d731ca9 100644 --- a/src/libs/matches-selector-polyfill.js +++ b/src/libs/matches-selector-polyfill.js @@ -1,18 +1,20 @@ /** * from https://developer.mozilla.org/de/docs/Web/API/Element/matches */ -if ( !Element.prototype.matches ) { - Element.prototype.matches = - Element.prototype.matchesSelector || - Element.prototype.mozMatchesSelector || - Element.prototype.msMatchesSelector || - Element.prototype.oMatchesSelector || - Element.prototype.webkitMatchesSelector || - function ( s ) { - var matches = ( this.document || this.ownerDocument ).querySelectorAll ( s ), - i = matches.length; - while ( --i >= 0 && matches.item ( i ) !== this ) { +Element.prototype.matches = + Element.prototype.matches || + Element.prototype.matchesSelector || + Element.prototype.mozMatchesSelector || + Element.prototype.msMatchesSelector || + Element.prototype.oMatchesSelector || + Element.prototype.webkitMatchesSelector || + function ( s ) { + var matches = ( this.document || this.ownerDocument ).querySelectorAll ( s ); + var i = matches.length; + while ( --i >= 0 ) { + if ( matches.item ( i ) === this ) { + true; } - return i > -1; - }; -} \ No newline at end of file + } + return false; + }; \ No newline at end of file From 3dccec0d3e76153acc557b03b5e66ef9d4dc1d02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Tue, 13 Sep 2016 16:11:18 +0200 Subject: [PATCH 06/18] actually returning something --- src/libs/matches-selector-polyfill.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/matches-selector-polyfill.js b/src/libs/matches-selector-polyfill.js index d731ca9..bac5b8b 100644 --- a/src/libs/matches-selector-polyfill.js +++ b/src/libs/matches-selector-polyfill.js @@ -13,7 +13,7 @@ Element.prototype.matches = var i = matches.length; while ( --i >= 0 ) { if ( matches.item ( i ) === this ) { - true; + return true; } } return false; From f896a98ff702f737e4ea1962042a0821cc92e4c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Tue, 13 Sep 2016 17:11:42 +0200 Subject: [PATCH 07/18] removing function creation with a hopefully stable alternative --- src/mods/core.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mods/core.js b/src/mods/core.js index 822b0a4..ea50034 100644 --- a/src/mods/core.js +++ b/src/mods/core.js @@ -109,15 +109,15 @@ idrinth.core = { idrinth.core.multibind.events[event][selector].push ( method ); }; if ( idrinth.core.multibind.events[event] ) { + var attribute = 'idrinth.core.triggered(this,\'' + event + '\');'; //trying not to break all old code there if ( idrinth.ui.body.getAttribute ( 'on' + event ) ) { - var tmp = new Function ( idrinth.ui.body.getAttribute ( 'on' + event ) ); - bind ( event, 'body', tmp ); + attribute += idrinth.ui.body.getAttribute ( 'on' + event ); } if ( idrinth.ui.body['on' + event] && typeof idrinth.ui.body['on' + event] === 'function' ) { bind ( event, 'body', idrinth.ui.body['on' + event] ); } - idrinth.ui.body.setAttribute ( 'on' + event, 'idrinth.core.triggered(this,\'' + event + '\');' ); + idrinth.ui.body.setAttribute ( 'on' + event, attribute ); } bind ( event, selector, method ); }, From 5159bfdadc21955d3c786370f7aa87a4bc7e3b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Wed, 14 Sep 2016 11:26:36 +0200 Subject: [PATCH 08/18] fixes #127 --- src/mods/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mods/ui.js b/src/mods/ui.js index 23d0f57..0b1970d 100644 --- a/src/mods/ui.js +++ b/src/mods/ui.js @@ -368,7 +368,7 @@ idrinth.ui = { try { if ( idrinth.platform === 'kongregate' ) { window.activateGame ( ); - } else if ( idrinth.platform === 'dawnofthedragons' ) { + } else if ( idrinth.platform === 'facebook'/*'dawnofthedragons'*/ ) { handleFrame ( document ); } else if ( idrinth.platform === 'newgrounds' ) { handleFrame ( document.getElementById ( 'iframe_embed' ) ); From a7f5ba2f5d74680ebb9ed557afcecced199df80e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Wed, 14 Sep 2016 11:30:54 +0200 Subject: [PATCH 09/18] handling cases of no get params in frame --- src/mods/ui.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mods/ui.js b/src/mods/ui.js index 0b1970d..20f9858 100644 --- a/src/mods/ui.js +++ b/src/mods/ui.js @@ -363,7 +363,8 @@ idrinth.ui = { 'use strict'; var handleFrame = function ( parent ) { var frame = parent.getElementsByTagName ( 'iframe' )[0]; - frame.setAttribute ( 'src', ( frame.getAttribute ( 'src' ) ).replace ( /&ir=.*/, '' ) + '&ir=' + Math.random () ); + var src = ( frame.getAttribute ( 'src' ) ).replace ( /&ir=.*/, '' ); + frame.setAttribute ( 'src', src + ( src.indexOf ( '?' ) > -1 ? '&' : '?' ) + 'ir=' + Math.random () ); }; try { if ( idrinth.platform === 'kongregate' ) { From 5efbc28a920a97a16601f0dc73943f2f361595bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Wed, 14 Sep 2016 15:09:05 +0200 Subject: [PATCH 10/18] fixes #131 a forgotten case of the platform/realPlatform change --- src/mods/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mods/ui.js b/src/mods/ui.js index 20f9858..ad3dadf 100644 --- a/src/mods/ui.js +++ b/src/mods/ui.js @@ -577,7 +577,7 @@ idrinth.ui = { name: 'windows', rType: '#input', type: 'number', - platforms: [ 'dawnofthedragons' ], + platforms: [ 'dawnofthedragons', 'facebook' ], label: 'Maximum Popups/Frames for joining raids' }, { name: 'alarmTime', From b039d4a9496ccd093d1d056cfeef1597c29cce80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Wed, 14 Sep 2016 16:30:57 +0200 Subject: [PATCH 11/18] making sure only to use actual buildings fixes #130 --- src/mods/land.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mods/land.js b/src/mods/land.js index 5fbfb40..4bd5a2f 100644 --- a/src/mods/land.js +++ b/src/mods/land.js @@ -23,7 +23,9 @@ idrinth.land = { min: null }; for (var building in idrinth.land.data) { - res = check ( checkElementFunc, building, factor, res, nextPrice ); + if ( building && idrinth.land.data[building] && idrinth.land.data.hasOwnProperty ( building ) ) { + res = check ( checkElementFunc, building, factor, res, nextPrice ); + } } if ( res.key === null ) { return results; From b320e87d38a42a9dc40fa9baf1599eb1456d0ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Wed, 14 Sep 2016 16:45:33 +0200 Subject: [PATCH 12/18] actually passing the building every time fixes #130 --- src/mods/land.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mods/land.js b/src/mods/land.js index 4bd5a2f..5978100 100644 --- a/src/mods/land.js +++ b/src/mods/land.js @@ -38,7 +38,7 @@ idrinth.land = { }; var getRequirements = function () { var bestPrice = function ( building, factor, res, nextPrice ) { - return res.min === null || nextPrice () / idrinth.land.data[building].perHour < res.min; + return res.min === null || nextPrice ( building ) / idrinth.land.data[building].perHour < res.min; }; var useUp = function ( building, factor, res, nextPrice ) { return nextPrice ( building ) * factor / 10 <= idrinth.settings.land.gold; From df5493442beac7582dc849ea6751a0e7b82864cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Wed, 14 Sep 2016 16:59:52 +0200 Subject: [PATCH 13/18] saving land-values again --- src/mods/land.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mods/land.js b/src/mods/land.js index 5978100..68cd811 100644 --- a/src/mods/land.js +++ b/src/mods/land.js @@ -58,7 +58,7 @@ idrinth.land = { idrinth.settings.save (); }; for (var key in idrinth.settings.land) { - idrinth.settings.land[key] = parseInt ( document.getElementById ( 'idrinth-land-' + key ).value, 10 ); + idrinth.settings.change ( 'land-' + key, parseInt ( document.getElementById ( 'idrinth-land-' + key ).value, 10 ) ); } var results = baseCalculator ( getRequirements () ); if ( Object.keys ( results ).length === 0 ) { From 455ef35f4658fb1bb8c679120131225a2c0c7898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Wed, 14 Sep 2016 17:03:08 +0200 Subject: [PATCH 14/18] 2nd tier values may again be saved --- src/mods/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mods/settings.js b/src/mods/settings.js index 7c8f8a1..eb9585f 100644 --- a/src/mods/settings.js +++ b/src/mods/settings.js @@ -42,7 +42,7 @@ idrinth.settings = { if ( list.hasOwnProperty ( key ) && typeof list[key] !== 'object' && typeof list[key] !== 'function' ) { window.localStorage.setItem ( prefix + key, idrinth.settings[key] ); } else if ( list.hasOwnProperty ( key ) && typeof list[key] === 'object' ) { - save ( prefix + key + '-', list[key], store ); + store ( prefix + key + '-', list[key], store ); } } }; From 1f02ccfe33f2702de550741d48f725cc5f174000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Wed, 14 Sep 2016 17:08:08 +0200 Subject: [PATCH 15/18] another fix to storing setting changes --- src/mods/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mods/settings.js b/src/mods/settings.js index eb9585f..8e99120 100644 --- a/src/mods/settings.js +++ b/src/mods/settings.js @@ -40,7 +40,7 @@ idrinth.settings = { var store = function ( prefix, list, store ) { for (var key in list) { if ( list.hasOwnProperty ( key ) && typeof list[key] !== 'object' && typeof list[key] !== 'function' ) { - window.localStorage.setItem ( prefix + key, idrinth.settings[key] ); + window.localStorage.setItem ( prefix + key, list[key] ); } else if ( list.hasOwnProperty ( key ) && typeof list[key] === 'object' ) { store ( prefix + key + '-', list[key], store ); } From a0a023835e2d612e931538f7f3fabe1fa8e36d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Wed, 14 Sep 2016 17:20:21 +0200 Subject: [PATCH 16/18] cleanups --- src/mods/land.js | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/src/mods/land.js b/src/mods/land.js index 68cd811..2b02772 100644 --- a/src/mods/land.js +++ b/src/mods/land.js @@ -6,18 +6,23 @@ idrinth.land = { return ( 10 + idrinth.settings.land[building] ) * idrinth.land.data[building].base; }; var results = { }; - var check = function ( checkElementFunc, building, factor, res, nextPrice ) { - for (var count = 0; count < checkElementFunc.length; count++) { - if ( !checkElementFunc[count] ( building, factor, res, nextPrice ) ) { - return res; + var applyResult = function ( res, factor, nextPrice ) { + idrinth.settings.land.gold = idrinth.settings.land.gold - nextPrice () * factor / 10; + results[res.key] = ( results[res.key] === undefined ? 0 : results[res.key] ) + factor; + idrinth.settings.land[res.key] = idrinth.settings.land[res.key] + factor; + }; + var processBuildings = function ( checkElementFunc, factor, res, nextPrice ) { + var check = function ( checkElementFunc, building, factor, res, nextPrice ) { + for (var count = 0; count < checkElementFunc.length; count++) { + if ( !checkElementFunc[count] ( building, factor, res, nextPrice ) ) { + return res; + } } - } - return { - min: nextPrice ( building ) / idrinth.land.data[building].perHour, - key: building + return { + min: nextPrice ( building ) / idrinth.land.data[building].perHour, + key: building + }; }; - }; - while ( idrinth.settings.land.gold >= 0 ) { var res = { key: null, min: null @@ -27,13 +32,16 @@ idrinth.land = { res = check ( checkElementFunc, building, factor, res, nextPrice ); } } + return res; + }; + while ( idrinth.settings.land.gold >= 0 ) { + var res = processBuildings ( checkElementFunc, factor, nextPrice ); if ( res.key === null ) { return results; } - idrinth.settings.land.gold = idrinth.settings.land.gold - ( 10 + idrinth.settings.land[res.key] ) * factor * idrinth.land.data[res.key].base / 10; - results[res.key] = ( results[res.key] === undefined ? 0 : results[res.key] ) + factor; - idrinth.settings.land[res.key] = idrinth.settings.land[res.key] + factor; + applyResult ( res, factor, nextPrice ); } + idrinth.settings.save (); return results; }; var getRequirements = function () { From d54d0c9c242a6ca29b8bd3bfb7b7bfdae2efb0ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Wed, 14 Sep 2016 17:33:40 +0200 Subject: [PATCH 17/18] correcting parameter --- src/mods/land.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mods/land.js b/src/mods/land.js index 2b02772..08cc75b 100644 --- a/src/mods/land.js +++ b/src/mods/land.js @@ -11,7 +11,7 @@ idrinth.land = { results[res.key] = ( results[res.key] === undefined ? 0 : results[res.key] ) + factor; idrinth.settings.land[res.key] = idrinth.settings.land[res.key] + factor; }; - var processBuildings = function ( checkElementFunc, factor, res, nextPrice ) { + var processBuildings = function ( checkElementFunc, factor, nextPrice ) { var check = function ( checkElementFunc, building, factor, res, nextPrice ) { for (var count = 0; count < checkElementFunc.length; count++) { if ( !checkElementFunc[count] ( building, factor, res, nextPrice ) ) { From 63c07d0283f8006c0bf3b367874f115f93c3948f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=BCttner?= Date: Wed, 14 Sep 2016 18:22:14 +0200 Subject: [PATCH 18/18] correcting username due to https://github.com/lgtmco/lgtm/issues/19 --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 32f7e22..f05f8cb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1,2 +1,2 @@ -idrinth +Idrinth w20k \ No newline at end of file