diff --git a/index.html b/index.html index 38b3965..70f58ef 100644 --- a/index.html +++ b/index.html @@ -122,29 +122,36 @@

Your shooting ability

-
-

Course defaults

-
-
-
- -
-
- - -
+
+

Course defaults

+
+
+
+ +
+
+ +
-

Target distance display

-
- -
- -
-

leave blank to accept the course default

+

Target distance display

+
+
+ +
+
+

leave blank to disable delay

+
+
+ +
+ +
+

leave blank to accept the course default

+
diff --git a/script/gamecontrol.js b/script/gamecontrol.js index e203654..c4b3dd9 100644 --- a/script/gamecontrol.js +++ b/script/gamecontrol.js @@ -185,7 +185,7 @@ GameControl.prototype = function(){ target.knockover(); scorecard.markTarget(self.currentTargetNumber,true); scorecard.setScore(++self.score); - },400); + },400+1000*settings.data.KnockDelay); } else if ( pelletStrikeRadius < (self.courseInfo.course[self.currentTargetNumber-1].killzone + 4)/2 ) { scorecard.message("-- SPLIT --"); scorecard.markTarget(self.currentTargetNumber,false); @@ -196,7 +196,7 @@ GameControl.prototype = function(){ setTimeout(function(){ _getNextTarget.call(self); - },2000); + },2000+1000*settings.data.KnockDelay); }; diff --git a/script/settings.js b/script/settings.js index c4f4bf0..25b6911 100644 --- a/script/settings.js +++ b/script/settings.js @@ -14,7 +14,8 @@ var Settings = function() { ScopeErrorAt55 : 2, CrossHair: "mildot", Units: "y", - ScopeMag: 16 + ScopeMag: 16, + KnockDelay: 0 }; self.FixedWind = 0; @@ -99,6 +100,9 @@ Settings.prototype = function () { var txtFixedWind = document.getElementById("txtFixedWind"); txtFixedWind.value = self.FixedWind > 0 ? self.FixedWind : ""; + + var txtKnockDelay = document.getElementById("txtKnockDelay"); + txtKnockDelay.value = self.data.KnockDelay > 0 ? self.data.KnockDelay : ""; if( self.data.Units === "m" ) { document.getElementById("btnMetric").className = "btn btn-info active"; @@ -143,6 +147,9 @@ Settings.prototype = function () { var txtFixedWind = document.getElementById("txtFixedWind"); self.FixedWind = txtFixedWind.value !== ""?parseFloat(txtFixedWind.value):0; + + var txtKnockDelay = document.getElementById("txtKnockDelay"); + self.data.KnockDelay = txtKnockDelay.value !== ""?parseFloat(txtKnockDelay.value):0; self.crossHairData = getCrossHairData(self.data.CrossHair);