Cookie Clicker: Ich hab’ da gerade was gefunden:
All this code is copyright Orteil, 2013. -with some help, advice and fixes by Debugbro and Opti -also includes a bunch of snippets found on stackoverflow.com Spoilers ahead. http://orteil.dashnet.org */```
Zeile 2027 ff.:
BUILDINGS
=======================================================================================*/```
Zeile 2203 ff.:
``` Game.RebuildStore=function()//redraw the store from scratch
{
var str='';
for (var i in Game.Objects)
{
var me=Game.Objects**;
str+='<div class="product" '+Game.getTooltip(
'<div style="min-width:300px;"><div style="float:right;"><span class="price">'+Beautify(Math.round(me.price))+'</span></div><div class="name">'+me.name+'</div>'+'<small>[owned : '+me.amount+'</small>]<div class="description">'+me.desc+'</div></div>'
,0,0,'left')+' onclick="Game.ObjectsById['+me.id+'].buy();" id="product'+me.id+'"><div class="icon" style="background-image:url(img/'+me.icon+'.png);"></div><div class="content"><div class="title">'+me.displayName+'</div><span class="price">'+Beautify(Math.round(me.price))+'</span>'+(me.amount>0?('<div class="title owned">'+me.amount+'</div>'):'')+'</div></div>';
}
l('products').innerHTML=str;
Game.storeToRebuild=0;
}```
Je nachdem, wie Game.Objects** "gezeichnet" wird, muss an dieser Stelle ja klar sein (Game.getTooltip(....) oder me.amount>0?.... ) ob das BUILDING im store verfügbar ist oder net.
Und wie kann ich jetzt ein oder mehrere Zeilen zur "Laufzeit" verändern? Website komplett speichern funktioniert ja nicht. Ihr Zauberkünstler habt doch etwas von Webbrowserkonsole erzählt/gesagt! Das BUILDING soll sofort gekauft werden, wenn es verfügbar ist.
Sry, daß ich [ JAVA]-**BBCode**-**Tags** für js "zweckentfremdet" habe, aber außer, dass alles erlaubt ist (jede Variable ist einfach irgendwas), und das Kompilieren entfällt, ist es ja jenau jleich.
Viele Grüße
Unbekannter333222111111222333 (Quaternärzahl[!])
PS. Wenn mir doch jemand mit gOogle suchen helfen kann, hätte ich natürlich auch nets dagegen.