代码拉取完成,页面将自动刷新
同步操作将从 锅巴汉化/猫国建设者(Kittens Game) 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
setTimeout(()=>{initKGP()},201+Math.max(-Date.now()+game.timer.timestampStart,-200));function initKGP(){if(localStorage["zh.kgp.enable"]!=="disable"&&!window.KGPInterval){if(game.resPool){window.KGPInterval=setInterval(()=>initKGPLeftColumn(),200);$('<style type="text/css" id="KGPBorder">.res-table { border-spacing: 0px 3px; }</style>').appendTo("head")}else{setTimeout(()=>initKGP(),500)}}else{if(KGPInterval){clearInterval(KGPInterval);window.KGPInterval=undefined;initKGPLeftColumn(false);document.getElementById("KGPBorder").remove()}}}function initKGPLeftColumn(r=true){const e=$("#leftColumnViewport > div > div:nth-child(1) > div:nth-child(2) > div").find(".res-row");const l=KGP.resMap;e.each(function(e,t){if(!r){return t.removeAttribute("style")}let n=t.className.split(" ")[1].substring(9);if(n==="kittens"||n==="zebras"){return}let i=$(t);let a=l[n];if(a){let e=a.maxValue;let t=a.value;KGP.changeCSS(t,e,i)}});KGP.updateTooltip()}window.KGP={resMap:game.resPool.resourceMap,resRow:undefined,tool:undefined,updateTooltip:function(){let c=this.resMap;if(game.tooltipUpdateFunc){let t=game.tooltipUpdateFunc;let e=$("#tooltip").find(".price-block");if(!t.length){game.tooltipUpdateFunc=e=>{t();KGP.updateTooltip()}}e.each((e,a)=>{let t=a.textContent;let s=t.replace("/","");if(s!==t){let t=$(a);s=s.replace("*"," ");s=s.replace("+"," ");let e=s.trim().split(" ");let n=e[0];let i=n.length;let r,l;for(let e=0;e<i;e++){if(parseFloat(n[e])+1){l=n.substring(0,e);r=n.substring(e,i);break}}let o=KGP.getAmountFromFormatted(e[2]);r=KGP.getAmountFromFormatted(r);if(e.length<4){let e,i,a;switch(l){case"眼泪":e=t.find(".noRes");e.text((e,t)=>{let n=Math.ceil((o-r)/game.bld.getBuildingExt("ziggurat").meta.on)*2500;let i=c["unicorns"].perTickCached;if(n-c["unicorns"].value>0&&i){n=(n-c["unicorns"].value)/(game.getTicksPerSecondUI()*i);return t+" ("+game.toDisplaySeconds(n)+")"}});break;case"反物质":i=game.getEffect("antimatterProduction");if(o<=c["antimatter"].maxValue&&i){e=t.find(".noRes");e.text((e,t)=>{let n=Math.ceil((o-r)/i);return t+" ("+n+"游戏年)"})}break;case"遗物":a=game.getEffect("relicPerDay");if(a){e=t.find(".noRes");e.text((e,t)=>{let n=game.time.isAccelerated?1.33:2;let i=Math.ceil((o-r)/a)*n;return t+" ("+game.toDisplaySeconds(i)+")"})}break}}KGP.changeCSS(r,o,t)}})}},changeCSS:function(t,n,i){if(n>0&&t>0){let e=100*t/n;i.css("background-repeat","no-repeat");i.css("background-position","bottom left");i.css("background-size",Math.min(200,e)+"% 1px");if(e>95){i.css("background-image","linear-gradient(0, red, red)")}else if(e>75){i.css("background-image","linear-gradient(0, orange, orange)")}else{i.css("background-image","linear-gradient(0, green, green)")}}},getAmountFromFormatted:function(e){if(!e){return 0}const t=e.slice(-1);const n=!isNaN(Number(t));const i=n?Number(e):Number(e.substring(0,e.length-1));if(n){return i}switch(t){case"K":return i*1e3;case"M":return i*1e6;case"G":return i*1e9;case"T":return i*1e12;case"P":return i*1e15;default:return 0}}};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。