vineyard effect aren't calculated
|
|
As i saw the newest kChen doesn't calculate the Vineyard effect on its table. I have tevern on 22lvl and Vineyard on 15lvl so the Wine usage in town is -184/hour but in table there is -216/hour (that should be without Wineyard) Cheers. |
|
|
I have no vineyard, so I did not repair.
|
|
|
thx for reply.
if (/view=tavern/.test(document.URL)) {
function storeWineUsage() {
try {
var n = document.getElementById("wineAmount");
var city_id = getNode_value("//form[@id='wineAssignForm']/input[@type='hidden' and @name='id']");
var city = getCity(city_id);
city.wineUsage = tavernWineUsage[n.selectedIndex];
setVar("config", serialize(config));
} catch (e) {
log("Hiba: "+e);
}
}
var n = getNode("//form[@id='wineAssignForm']//*[@type='submit']");
n.addEventListener("click", storeWineUsage, false);
var n = document.getElementById("wineAmount");
wineUsage = tavernWineUsage[n.selectedIndex];
var cellarLevel = getArrValue(res.buildings["vineyard"], "level", "-");
if (cellarLevel >=0) {
wineSave = wineUsage * cellarLevel;
wineSave = wineSave / 100;
wineUsage = wineUsage - wineSave;
res.wineUsage = wineUsage ;
} else {
res.wineUsage = wineUsage ;
}
and i don't know but maybe it should to be done not only in Vineyard but also with other new buildings with lowers usage of resources. Cheers :) Ps. I've corrected all spell-kind mistakes in Polish translation and translated new strings so if u mind to add this to your ~d96030/kchenoverview/lang.js i'll be glad. |