Free javascript Hosting


autokittens-min.js

Uploaded on Sep 26 2021 22:51 by josemiguel

function buildUI(){var t=document.createElement("div");t.id="timerTableContainer",t.style.width="115%",t.style.height="50px",t.style.bottom="-90px",t.style.position="absolute",t.innerHTML='<table id="timerTable" style="width: 100%; table-layout: fixed; background: #eee; border-top: 1px solid #666; padding: 5px 0;"></table>',document.body.appendChild(t),adjustColumns(),adjustTimerBar(),$(resetGameLogHeight),document.getElementById("footerLinks").style.display="none",$(".tabsContainer").append(' | <a onclick="rebuildOptionsUI();$(\'#autoOptions\').toggle();" href="#" class="tab">AutoKittens</a>');var e=document.createElement("div");e.id="autoOptions",e.style.display="none",e.style.backgroundColor="#ececec",e.style.position="relative",e.style.padding="40px",e.style.overflowY="scroll",e.style.lineHeight="2em",e.style.height="300px",e.style.width="600px",e.style.margin="0px",$("#gamePageContainer").append(e);var a=document.createElement("div");a.className="help",a.id="kittenCalcs",a.style.display="none",a.style.overflowY="scroll",$("#gamePageContainer").append(a)}function adjustColumns(){document.getElementById("midColumn").style.width=autoOptions.widenUI?"1000px":"",document.getElementById("leftColumn").style.maxWidth=autoOptions.widenUI?"25%":""}function adjustTimerBar(){autoOptions.showTimerDisplays?(document.getElementById("timerTableContainer").style.display="",document.body.style.backgroundPosition="center bottom 30px"):(document.getElementById("timerTableContainer").style.display="none",document.getElementById("game").style.marginBottom="",document.body.style.backgroundPosition="")}function addCheckbox(t,e,a,n){addNamedCheckbox(t,e,a,a,n)}function addTriggerCheckbox(t,e,a,n,o){addTriggerNamedCheckbox(t,e,a,a,n,o)}function addNamedCheckbox(t,e,a,n,o){addTriggerNamedCheckbox(t,e,a,n,o,"")}function addTriggerNamedCheckbox(t,e,a,n,o,i){t.append('<label><input id="autoKittens_'+n+'" onclick="'+e+"."+a+" = $('#autoKittens_"+n+"')[0].checked;saveAutoOptions();"+i+'" type="checkbox">'+o+"</label><br>")}function addHeading(t,e){t.append("<h3>"+e+"</h3>")}function addOptionMenu(t,e,a,n,o,i){addTriggerOptionMenu(t,e,a,n,o,i,"")}function addTriggerOptionMenu(t,e,a,n,o,i,r){s=n+' <select id="autoKittens_'+a+'" onchange="'+e+"."+a+" = $('#autoKittens_"+a+"')[0].value;saveAutoOptions();"+r+'">';for(var u=o.length,d=0;d<u;d++)s+="<option value="+o[d][1]+">"+o[d][0]+"</option>";s+="</select> "+i+"<br>",t.append(s)}function addTriggerButton(t,e,a){t.append('<input type="button" value="'+e+'"+ onclick="'+a+'"></input><br>')}function addIndent(t){t.append('<span style="width:20px; display:inline-block;"></span>')}function addInputField(t,e,a,n,o){t.append(n+' <input id="autoKittens_'+a+'" size="6" oninput="tryNumericSet('+e+", '"+a+"', $('#autoKittens_"+a+"')[0].value);saveAutoOptions();\"> "+o+"<br>")}function tryNumericParse(t){return newVal=parseFloat(t),!isNaN(newVal)&&isFinite(newVal)&&newVal>0?newVal:0}function tryNumericSet(t,e,a){newVal=parseFloat(a),!isNaN(newVal)&&isFinite(newVal)&&newVal>0&&(t[e]=newVal)}function prepareContainer(t){var e=$("#"+t);return e.html('<a style="top: 10px; right: 45px; position: absolute;" onclick="$(\'#'+t+'\').hide();" href="#"><div style="position: fixed;">close</div></a>'),e}function rebuildOptionsUI(){var t=[["1%",.01],["5%",.05],["10%",.1],["25%",.25],["50%",.5],["75%",.75],["80%",.8],["90%",.9],["95%",.95],["98%",.98],["99%",.99],["99.5%",.995],["99.9%",.999],["100%",1]],e=[["0%",0],["0.1%",.001]].concat(t),a=prepareContainer("autoOptions");addCheckbox(a,"autoOptions","warnOnLeave","Warn before leaving the page"),addTriggerCheckbox(a,"autoOptions","widenUI","Make the game use more horizontal space (particularly useful for Grassy theme)","adjustColumns();"),addCheckbox(a,"autoOptions","autoStar","Automatically witness astronomical events"),addCheckbox(a,"autoOptions","autoCraft","Craft materials when storage is near limit"),addCheckbox(a,"autoOptions","autoHunt","Hunt when catpower is near limit"),addCheckbox(a,"autoOptions","autoPray","Praise the sun when faith is near limit"),addIndent(a),addOptionMenu(a,"autoOptions","prayLimit","Pray when faith is",e,"full"),addCheckbox(a,"autoOptions","autoTrade","Trade when gold is near limit"),addTriggerOptionMenu(a,"autoOptions","timeDisplay","Format for time displays",[["default","standard"],["short","short"],["seconds","seconds"]],"","changeTimeFormat()"),addCheckbox(a,"autoOptions","autoFestival","Automatically try to hold festivals"),addHeading(a,"Auto-trading"),races=[["No one",""]],gamePage.diplomacy.races.forEach(function(t){t.unlocked&&races.push([t.title||t.name,t.name])}),addOptionMenu(a,"autoOptions.tradeOptions","tradePartner","Trade with",races,"by default"),addCheckbox(a,"autoOptions.tradeOptions","suppressTradeLog","Hide log messages when auto-trading"),races[0][0]="Default selection",addOptionMenu(a,"autoOptions.tradeOptions","tradeLimit","Trade when gold is",t,"full"),addIndent(a),addInputField(a,"autoOptions.tradeOptions","tradeCount","Send","caravans at a time"),addCheckbox(a,"autoOptions.tradeOptions","tradeSpring","Allow trading in spring"),addIndent(a),addOptionMenu(a,"autoOptions.tradeOptions","tradePartnerSpring","Trade with",races," in spring"),addCheckbox(a,"autoOptions.tradeOptions","tradeSummer","Allow trading in summer"),addIndent(a),addOptionMenu(a,"autoOptions.tradeOptions","tradePartnerSummer","Trade with",races," in summer"),addCheckbox(a,"autoOptions.tradeOptions","tradeAutumn","Allow trading in autumn"),addIndent(a),addOptionMenu(a,"autoOptions.tradeOptions","tradePartnerAutumn","Trade with",races," in autumn"),addCheckbox(a,"autoOptions.tradeOptions","tradeWinter","Allow trading in winter"),addIndent(a),addOptionMenu(a,"autoOptions.tradeOptions","tradePartnerWinter","Trade with",races," in winter"),addHeading(a,"Auto-crafting"),addTriggerButton(a,"Calculate craft amounts","calculateCraftAmounts()"),addOptionMenu(a,"autoOptions.craftOptions","craftLimit","Craft when storage is",t,"full"),addCheckbox(a,"autoOptions.craftOptions","craftWood","Automatically convert catnip to wood"),addIndent(a),addInputField(a,"autoOptions.craftOptions","woodAmount","Craft","wood at a time"),addCheckbox(a,"autoOptions.craftOptions","craftBeam","Automatically convert wood to beams"),addIndent(a),addInputField(a,"autoOptions.craftOptions","beamAmount","Craft","beam(s) at a time"),addCheckbox(a,"autoOptions.craftOptions","craftSlab","Automatically convert minerals to slabs"),addIndent(a),addInputField(a,"autoOptions.craftOptions","slabAmount","Craft","slab(s) at a time"),addCheckbox(a,"autoOptions.craftOptions","craftSteel","Automatically convert coal to steel"),addIndent(a),addInputField(a,"autoOptions.craftOptions","steelAmount","Craft","steel at a time"),addCheckbox(a,"autoOptions.craftOptions","craftPlate","Automatically convert iron to plates"),addIndent(a),addInputField(a,"autoOptions.craftOptions","plateAmount","Craft","plate(s) at a time"),addCheckbox(a,"autoOptions.craftOptions","craftAlloy","Automatically convert titanium to alloy"),addIndent(a),addInputField(a,"autoOptions.craftOptions","alloyAmount","Craft","alloy at a time"),addCheckbox(a,"autoOptions.craftOptions","craftKerosene","Automatically convert oil to kerosene"),addIndent(a),addInputField(a,"autoOptions.craftOptions","keroseneAmount","Craft","kerosene at a time"),addHeading(a,"Fur product crafting"),addTriggerOptionMenu(a,"autoOptions.furOptions","parchmentMode","Auto-craft parchment",[["never",0],["all, before hunting",1],["on full culture storage",2],["both",3]],"","changeFurCrafts()"),addIndent(a),addInputField(a,"autoOptions.craftOptions","parchmentAmount","When storage full, craft","parchment at a time"),addTriggerOptionMenu(a,"autoOptions.furOptions","manuscriptMode","Auto-craft manuscripts",[["never",0],["all, before hunting",1],["on full culture storage",2],["both",3]],"","changeFurCrafts()"),addIndent(a),addInputField(a,"autoOptions.craftOptions","manuscriptAmount","When storage full, craft","manuscript(s) at a time"),addIndent(a),addCheckbox(a,"autoOptions.craftOptions","festivalBuffer","When crafting from full storage, preserve enough parchment to hold a festival"),addTriggerOptionMenu(a,"autoOptions.furOptions","compendiumMode","Auto-craft compendiums",[["never",0],["all, before hunting",1],["on full science storage",2],["both",3]],"","changeFurCrafts()"),addIndent(a),addInputField(a,"autoOptions.craftOptions","compediumAmount","When storage full, craft","compendium(s) at a time"),addTriggerOptionMenu(a,"autoOptions.furOptions","blueprintMode","Auto-craft blueprints",[["never",0],["all, before hunting",1],["on full science storage",2],["both",3]],"","changeFurCrafts()"),addIndent(a),addInputField(a,"autoOptions.craftOptions","blueprintAmount","When storage full, craft","blueprints(s) at a time"),addCheckbox(a,"autoOptions.craftOptions","blueprintPriority","When crafting both from full storage, check blueprints before compendiums"),addHeading(a,"Auto-hunting"),addOptionMenu(a,"autoOptions.huntOptions","huntLimit","Hunt when catpower is",t,"full"),addCheckbox(a,"autoOptions.huntOptions","suppressHuntLog","Hide log messages when auto-hunting (includes hunt-triggered crafts)"),addCheckbox(a,"autoOptions.huntOptions","singleHunts","Only send one hunt at a time"),addCheckbox(a,"autoOptions.huntOptions","huntEarly","Hunt as soon as the maximum number of hunts is reached (relative to the limit)"),addHeading(a,"Timer displays"),addTriggerCheckbox(a,"autoOptions","showTimerDisplays","Show timer displays below","adjustTimerBar()"),a.append("Note: Ordering by time may cause elements near cap to frequently switch places.<br>"),addOptionMenu(a,"autoOptions","displayOrder","Order time displays by",[["default order","standard"],["shortest first","short"],["longest first","long"]],""),gamePage.resPool.resources.forEach(function(t){void 0!==autoOptions.displayOptions[t.name]&&addNamedCheckbox(a,"autoOptions.displayOptions",t.name,"show"+t.name,"Show "+(t.title||t.name))}),addHeading(a,"Reset options"),a.append('<a onclick="autoOptions = defaultOptions;saveAutoOptions();updateOptionsUI();" href="#">Reset options</a>'),updateOptionsUI()}function changeFurCrafts(){for(var t=[["parchmentMode","craftParchment"],["manuscriptMode","craftManuscript"],["compendiumMode","craftCompendium"],["blueprintMode","craftBlueprint"]],e=0;e<t.length;e++)autoOptions.huntOptions[t[e][1]]=!!(1&autoOptions.furOptions[t[e][0]]),autoOptions.craftOptions[t[e][1]]=!!(2&autoOptions.furOptions[t[e][0]]);saveAutoOptions()}function saveAutoOptions(){LCstorage["kittensgame.autoOptions"]=JSON.stringify(autoOptions)}function changeTimeFormat(){var t={standard:defaultTimeFormat,short:shortTimeFormat,seconds:rawSecondsFormat};gamePage.toDisplaySeconds=t[autoOptions.timeDisplay]}var defaultTimeFormat=gamePage.toDisplaySeconds;function shortTimeFormat(t){var e=parseInt(t,10),a=Math.floor(e/3600),n=Math.floor((e-3600*a)/60),o=e-3600*a-60*n,i="";return a&&(i=a+":"),i+=(n<10?"0":"")+n+":"+(o<10?"0":"")+o}function rawSecondsFormat(t){return parseInt(t,10)+"s"}var defaultOptions={warnOnLeave:!0,autoStar:!0,autoCraft:!1,autoHunt:!1,autoPray:!1,autoTrade:!1,autoFestival:!1,craftOptions:{craftLimit:.99,craftWood:!1,woodAmount:10,craftBeam:!1,beamAmount:1,craftSlab:!1,slabAmount:1,craftSteel:!1,steelAmount:1,craftPlate:!1,plateAmount:1,craftAlloy:!1,alloyAmount:1,festivalBuffer:!1,craftParchment:!1,parchmentAmount:1,craftManuscript:!1,manuscriptAmount:1,craftCompendium:!1,compediumAmount:1,craftBlueprint:!1,blueprintAmount:1,blueprintPriority:!1,craftKerosene:!1,keroseneAmount:1},furOptions:{parchmentMode:0,manuscriptMode:0,compendiumMode:0,blueprintMode:0},huntOptions:{huntLimit:.99,suppressHuntLog:!1,huntEarly:!0,singleHunts:!1,craftParchment:!1,craftManuscript:!1,craftCompendium:!1,craftBlueprint:!1},prayLimit:.99,widenUI:!1,displayOptions:{},displayOrder:"standard",timeDisplay:"standard",tradeOptions:{tradeCount:1,tradeLimit:.99,suppressTradeLog:!1,tradePartner:"",tradeSpring:!1,tradePartnerSpring:"",tradeSummer:!1,tradePartnerSummer:"",tradeAutumn:!1,tradePartnerAutumn:"",tradeWinter:!1,tradePartnerWinter:""},showTimerDisplays:!0};function copyObject(t,e){for(var a in t)"object"==typeof t[a]?(void 0===e[a]&&(e[a]={}),copyObject(t[a],e[a])):"supressHuntLog"==a?e.suppressHuntLog=t[a]:e[a]=t[a]}function updateOptionsUI(){for(var t=[["manuscriptMode","craftManuscript"],["compendiumMode","craftCompendium"],["blueprintMode","craftBlueprint"]],e=0;e<t.length;e++)autoOptions.furOptions[t[e][0]]=1*autoOptions.huntOptions[t[e][1]]+2*autoOptions.craftOptions[t[e][1]];traverseObject(autoOptions),changeTimeFormat()}function traverseObject(t){for(o in t)"displayOptions"===o?handleDisplayOptions(t[o]):"object"==typeof t[o]?traverseObject(t[o]):"boolean"==typeof t[o]?(elms=$("#autoKittens_"+o),elms&&elms[0]&&(elms[0].checked=t[o])):(elms=$("#autoKittens_"+o),elms&&elms[0]&&(elms[0].value=t[o]))}function handleDisplayOptions(t){for(o in t)$("#autoKittens_show"+o)[0].checked=t[o]}function formatTableRow(t,e,a){return void 0===autoOptions.displayOptions[t]&&(autoOptions.displayOptions[t]=!0),autoOptions.displayOptions[t]?'<td style="text-align:center">'+e+"<br>"+a+"</td>":""}autoOptions=defaultOptions,LCstorage["kittensgame.autoOptions"]&&copyObject(JSON.parse(LCstorage["kittensgame.autoOptions"]),autoOptions),fillTable=function(){var t="<tr>",e=[];gamePage.resPool.resources.forEach(function(t){var a={};a.name=t.name,a.title=t.title||t.name,a.perTickUI=t.perTickUI,a.value=t.value,a.maxValue=t.maxValue,0!==t.perTickUI&&(t.maxValue>0?t.value<=0?a.time=0:t.value>=t.maxValue?a.time=0:t.perTickUI>0?a.time=(t.maxValue-t.value)/(5*t.perTickUI):t.perTickUI<0&&(a.time=-t.value/(5*t.perTickUI)):t.value>0&&t.perTickUI<0&&(a.time=-t.value/(5*t.perTickUI))),e.push(a)}),"short"==autoOptions.displayOrder?e.sort(function(t,e){return t.time-e.time}):"long"==autoOptions.displayOrder&&e.sort(function(t,e){return e.time-t.time});for(var a=0;a<e.length;a++){r=e[a];var n=r.name,o=r.title;0!==r.perTickUI&&(r.maxValue>0?r.value<=0?t+=formatTableRow(n,o,"Empty"):r.value>=r.maxValue?t+=formatTableRow(n,o,"Full"):r.perTickUI>0?t+=formatTableRow(n,o,"Full: "+gamePage.toDisplaySeconds((r.maxValue-r.value)/(5*r.perTickUI))):r.perTickUI<0&&(t+=formatTableRow(n,o,"Left: "+gamePage.toDisplaySeconds(-r.value/(5*r.perTickUI)))):r.value>0&&r.perTickUI<0&&(t+=formatTableRow(n,o,"Left: "+gamePage.toDisplaySeconds(-r.value/(5*r.perTickUI)))))}t+="</tr>",document.getElementById("timerTable").innerHTML=t},processAutoKittens=function(){starClick(),autoHunt(),autoCraft(),autoTrade(),autoPray(),autoFestival(),fillTable()};var gameTickFunc=gamePage.tick;gamePage.worker?gamePage.tick=function(){dojo.hitch(gamePage,gameTickFunc)(),processAutoKittens()}:autoKittensTimer=setInterval(processAutoKittens,200),document.getElementById("timerTable")||buildUI();var checkInterval=200;starClick=function(){autoOptions.autoStar&&$("#observeBtn").click()},autoHunt=function(){if(autoOptions.autoHunt){var t=gamePage.msg;autoOptions.huntOptions.suppressHuntLog&&(gamePage.msg=function(){});var e=gamePage.resPool.get("manpower"),a=(1-autoOptions.huntOptions.huntLimit)*e.maxValue;if(e.value/e.maxValue>=autoOptions.huntOptions.huntLimit||autoOptions.huntOptions.huntEarly&&e.value>=e.maxValue-a-(e.maxValue-a)%100)if(autoOptions.huntOptions.craftParchment&&gamePage.workshop.getCraft("parchment").unlocked&&gamePage.craftAll("parchment"),autoOptions.huntOptions.craftManuscript&&gamePage.workshop.getCraft("manuscript").unlocked&&gamePage.craftAll("manuscript"),autoOptions.huntOptions.craftCompendium&&gamePage.workshop.getCraft("compedium").unlocked&&gamePage.craftAll("compedium"),autoOptions.huntOptions.craftBlueprint&&gamePage.workshop.getCraft("blueprint").unlocked&&gamePage.craftAll("blueprint"),autoOptions.huntOptions.singleHunts){var n=gamePage.activeTabId;gamePage.villageTab.huntBtn&&gamePage.villageTab.huntBtn.onClick||(gamePage.activeTabId=gamePage.villageTab.tabId,gamePage.render()),gamePage.villageTab.huntBtn.onClick(),n!=gamePage.activeTabId&&(gamePage.activeTabId=n,gamePage.render())}else gamePage.village.huntAll();autoOptions.huntOptions.suppressHuntLog&&(gamePage.msg=t)}},tryCraft=function(t,e){craft=gamePage.workshop.getCraft(t),prices=craft.prices;for(var a=0;a<prices.length;a++)if(res=gamePage.resPool.get(prices[a].name),res.value<prices[a].val*e)return;gamePage.craft(t,e)},calculateCraftAmounts=function(){for(var t=["wood","beam","slab","steel","plate","alloy","parchment","manuscript","blueprint","compedium","kerosene"],e=0;e<t.length;e++){for(var a=gamePage.workshop.getCraft(t[e]).prices,n=1,o=0;o<a.length;o++){var i=gamePage.resPool.get(a[o].name),r=Math.min(i.perTickUI,0!=i.maxValue?i.maxValue:i.perTickUI);r>a[o].val&&(n=Math.max(n,Math.floor(r/a[o].val)))}autoOptions.craftOptions[t[e]+"Amount"]=n}saveAutoOptions(),updateOptionsUI()},autoCraft=function(){if(autoOptions.autoCraft)for(var t=[["catnip","wood","craftWood",!0],["wood","beam","craftBeam",gamePage.science.get("construction").researched],["minerals","slab","craftSlab",gamePage.science.get("construction").researched],["coal","steel","craftSteel",gamePage.science.get("construction").researched],["iron","plate","craftPlate",gamePage.science.get("construction").researched],["titanium","alloy","craftAlloy",gamePage.science.get("construction").researched],["oil","kerosene","craftKerosene",gamePage.science.get("construction").researched],["culture","parchment","craftParchment",gamePage.science.get("construction").researched],["culture","manuscript","craftManuscript",gamePage.science.get("construction").researched&&(!autoOptions.craftOptions.festivalBuffer||gamePage.resPool.get("parchment").value>2500+25*autoOptions.craftOptions.manuscriptAmount)],["science","blueprint","craftBlueprint",gamePage.science.get("construction").researched&&autoOptions.craftOptions.blueprintPriority],["science","compedium","craftCompendium",gamePage.science.get("construction").researched],["science","blueprint","craftBlueprint",gamePage.science.get("construction").researched&&!autoOptions.craftOptions.blueprintPriority]],e=0;e<t.length;e++){var a=gamePage.resPool.get(t[e][0]);0!=a.maxValue&&(t[e][3]&&autoOptions.craftOptions[t[e][2]]&&a.value/a.maxValue>=autoOptions.craftOptions.craftLimit&&gamePage.workshop.getCraft(t[e][1]).unlocked&&tryCraft(t[e][1],autoOptions.craftOptions[t[e][1]+"Amount"]))}},window.onbeforeunload=function(){if(autoOptions.warnOnLeave)return"Are you sure you want to leave?"},autoPray=function(){if(autoOptions.autoPray){var t=gamePage.resPool.get("faith");t.value/t.maxValue>=autoOptions.prayLimit&&t.value>.01&&gamePage.religion.praise()}},autoTrade=function(){if(autoOptions.autoTrade&&""!==autoOptions.tradeOptions.tradePartner){var t,e=["Spring","Summer","Autumn","Winter"][gamePage.calendar.season];if(""!==autoOptions.tradeOptions["tradePartner"+e]?(t=gamePage.diplomacy.get(autoOptions.tradeOptions["tradePartner"+e])).unlocked||(autoOptions.tradeOptions["tradePartner"+e]=""):(t=gamePage.diplomacy.get(autoOptions.tradeOptions.tradePartner)).unlocked||(autoOptions.tradeOptions.tradePartner=""),t.unlocked){var a=gamePage.resPool.get("gold");if(!(gamePage.resPool.get(t.buys[0].name).value<t.buys[0].val||gamePage.resPool.get("manpower").value<50||a.value/a.maxValue<autoOptions.tradeOptions.tradeLimit)){var n=gamePage.msg;if(autoOptions.tradeOptions.suppressTradeLog&&(gamePage.msg=function(){}),autoOptions.tradeOptions["trade"+e]){var o=gamePage.activeTabId;0==gamePage.diplomacyTab.racePanels.length&&(gamePage.activeTabId="Trade",gamePage.render());for(var i=0;i<gamePage.diplomacyTab.racePanels.length;i++)if(gamePage.diplomacyTab.racePanels[i].race.name==t.name){gamePage.diplomacyTab.racePanels[i].tradeBtn.enabled||(gamePage.activeTabId="Trade",gamePage.render()),autoOptions.tradeOptions.tradeCount<=1?gamePage.diplomacyTab.racePanels[i].tradeBtn.onClick():gamePage.diplomacyTab.racePanels[i].tradeBtn.tradeMultiple(autoOptions.tradeOptions.tradeCount);break}gamePage.activeTabId!=o&&(gamePage.activeTabId=o,gamePage.render())}autoOptions.tradeOptions.suppressTradeLog&&(gamePage.msg=n)}}else saveAutoOptions()}},autoFestival=function(){if(!gamePage.calendar.festivalDays&&autoOptions.autoFestival&&gamePage.science.get("drama").researched){var t=gamePage.activeTabId;gamePage.villageTab.festivalBtn&&gamePage.villageTab.festivalBtn.onClick&&gamePage.villageTab.festivalBtn.visible||(gamePage.activeTabId=gamePage.villageTab.tabId,gamePage.render()),gamePage.villageTab.festivalBtn.hasResources()&&gamePage.villageTab.festivalBtn.onClick(),t!=gamePage.activeTabId&&(gamePage.activeTabId=t,gamePage.render())}};

Back to list