Remove training speedup hack. Add time discount for batches.
This was SVN commit r7928.
This commit is contained in:
parent
2e4be5f781
commit
a2b2acb522
@ -58,9 +58,12 @@ TrainingQueue.prototype.AddBatch = function(player, templateName, count)
|
||||
if (!template)
|
||||
return;
|
||||
|
||||
var timeMult = count; // TODO: we want some kind of discount for larger batches
|
||||
var costMult = count;
|
||||
|
||||
// Apply a time discount to larger batches.
|
||||
// TODO: work out what equation we should use here.
|
||||
var timeMult = Math.pow(count, 0.7);
|
||||
|
||||
var time = timeMult * (template.Cost.BuildTime || 1);
|
||||
var costs = {};
|
||||
for each (var r in ["food", "wood", "stone", "metal"])
|
||||
@ -203,8 +206,6 @@ TrainingQueue.prototype.ProgressTimeout = function(data)
|
||||
// with items that take fractions of a second)
|
||||
var time = g_ProgressInterval;
|
||||
|
||||
time *= 10; // XXX: this is a hack to make testing easier
|
||||
|
||||
while (time > 0 && this.queue.length)
|
||||
{
|
||||
var item = this.queue[0];
|
||||
|
Loading…
Reference in New Issue
Block a user