Difference between revisions of "Talk:Wine"
From A Wiki in the Desert
(Created page with "Malard in discord: so just to clarify the vineyard technically has no concept here, when a grape is harvested, the grape is stamped with its x/y location the grape's origi...") |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 2: | Line 2: | ||
so just to clarify the vineyard technically has no concept here, when a grape is harvested, the grape is stamped with its x/y location | so just to clarify the vineyard technically has no concept here, when a grape is harvested, the grape is stamped with its x/y location | ||
the grape's original x/y location affects its Aroma | the grape's original x/y location affects its Aroma | ||
| + | |||
| + | Example code used to find areas of flavor on the map: | ||
| + | secret FlavorSearch(fl) of Player { | ||
| + | fl=GetObject(fl); | ||
| + | if (!IsA(fl,WineAroma)) fail("Not a flavor."); | ||
| + | print("FlavorSearch for ",fl); | ||
| + | for i=(1,100000) { | ||
| + | var WX=RandomPX(World.MainPlane)/16; | ||
| + | var WY=RandomPY(World.MainPlane)/16; | ||
| + | var lis=WineAroma(World.MainPlane,WX,WY); | ||
| + | if (contains(lis,fl)) print("FlavorSearch ",fl," at ",WX," ",WY); | ||
| + | } | ||
| + | } | ||
Latest revision as of 22:18, 16 May 2021
Malard in discord:
so just to clarify the vineyard technically has no concept here, when a grape is harvested, the grape is stamped with its x/y location the grape's original x/y location affects its Aroma
Example code used to find areas of flavor on the map:
secret FlavorSearch(fl) of Player {
fl=GetObject(fl);
if (!IsA(fl,WineAroma)) fail("Not a flavor.");
print("FlavorSearch for ",fl);
for i=(1,100000) {
var WX=RandomPX(World.MainPlane)/16;
var WY=RandomPY(World.MainPlane)/16;
var lis=WineAroma(World.MainPlane,WX,WY);
if (contains(lis,fl)) print("FlavorSearch ",fl," at ",WX," ",WY);
}
}