I haven't had much time to work on this. As is I don't think digging works (or it only works when already at the florist... not sure)
Not sure if there's been much else changed.
Code:
string toPlant(int i) {
foreach s in plantData if (i == plantData[s].no) return s;
return "";
}
void pickerFlorist(string[int] planted){
int plantsPlanted;
string terrain = last_location.environment;
boolean marked = false;
foreach i,s in planted {
if (s!="") plantsPlanted+=1;
if (plantData[s].territorial) marked = true;
}
string plantsUsed = get_property("_floristPlantsUsed");
boolean[int] plantable;
foreach s in plantData if ((plantData[s].terrain == terrain) && (!plantsUsed.contains_text(s)) && (s != ""))
plantable[plantData[s].no]= ((planted[0] != s) && (planted[1] != s) && (planted[2] != s));
buffer picker;
picker.append('<div id="chit_pickerflorist" class="chit_skeleton" style="display:none">');
picker.append('<table class="chit_picker">');
string color;
if (plantsPlanted == 3) {
picker.append('<tr><th colspan="2">Pull a Plant</th></tr>');
foreach i,s in planted {
color = (plantsUsed.contains_text(s)?(plantData[s].territorial?'lightyellow':'lightgray'):(plantData[s].territorial?'lightgreen':'lightblue'));
picker.append('<tr style="background-color:' + color + '"><td><img src="http://images.kingdomofloathing.com/itemimages/shovel.gif"></td>');
picker.append('<td><a href="/KoLmafia/sideCommand?pwd=' + my_hash() + '&cmd=text+' + url_encode('choice.php?option=2&whichchoice=720&pwd=' + my_hash() + '&plnti=' + i) +'">'+ s +'<br>(' + plantData[s].desc + ')</a></td></tr>');
}
if (count(plantable)>0) {
picker.append('<tr><th colspan="2">Remaining Plants</th></tr>');
foreach i in plantable {
if (!plantable[i]) continue;
color = (plantable[i]?(plantData[i.toPlant()].territorial?(marked?"lightyellow":"lightgreen"):"lightblue"):"lightgray");
picker.append('<tr style="background-color:' + color + '"><td><img width="21" height="40" src="http://images.kingdomofloathing.com/otherimages/friarplants/plant' + i + '.gif" title="' + i.toPlant() + ' (' + plantData[i.toPlant()].desc + ')"></td>');
picker.append('<td>' + i.toPlant() + '<br>(' + plantData[i.toPlant()].desc + ')</td></tr>');
}
} else picker.append('<tr><th colspan="2">No plants in stock for this area.</th></tr>');
} else {
picker.append('<tr><th colspan="2">Plant an ' + terrain + ' Herb</th></tr>');
if (count(plantable)>0) foreach i in plantable {
color = (plantable[i]?(plantData[i.toPlant()].territorial?(marked?"lightyellow":"lightgreen"):"lightblue"):"lightgray");
picker.append('<tr style="background-color:' + color + '"><td><img width="21" height="40" src="http://images.kingdomofloathing.com/otherimages/friarplants/plant' + i + '.gif" title="' + i.toPlant() + ' (' + plantData[i.toPlant()].desc + ')"></td>');
picker.append('<td><a href="/KoLmafia/sideCommand?cmd=florist+plant+' + url_encode(i.toPlant()) + '&pwd=' + my_hash() + '">' + i.toPlant() + '<br>(' + plantData[i.toPlant()].desc + ')</a></td></tr>');
} else picker.append('<tr><td colspan="2">No more plants available to plant here</td></tr>');
}
picker.append('</table></div>');
chitPickers["florist"] = picker;
}
void bakeFlorist() {
buffer result;
if ((last_location.environment != "none") && florist_available()) {
result.append('<table id="chit_florist" class="chit_brick nospace">');
result.append('<tr><th><a class="visit" target="mainpane" href="forestvillage.php?action=floristfriar">Florist Friar</a></th></tr>');
string[int] plants=get_florist_plants()[last_location];
result.append('<tr><td><a class="chit_launcher" rel="chit_pickerflorist" href="#">');
foreach i,s in plants if (plantData[s].no>0) result.append('<img style="vertical-align:middle" width="21" height="40" src="http://images.kingdomofloathing.com/otherimages/friarplants/plant'+plantData[s].no+'.gif" title="'+s+' ('+plantData[s].desc+')">');
else {
result.append('<img style="vertical-align:middle" width="21" height="40" src="http://images.kingdomofloathing.com/otherimages/friarplants/noplant.gif" title="No Plant">');
break;
}
result.append('</a></td></tr></table>');
pickerFlorist(plants);
}
chitBricks["florist"] = result;
}
EDIT to add: I also have some super old code from pre-Bale CHIT that I submitted and never got included. I'd have to refactor some of the code (all of it...) to work with the myriad of structural changes that you've implemented, and I was wondering if anybody would be interested in some of the ideas.
One is a severe reduction to the character brick by including only pertinent info as 2 lines in the stat brick. This may fail your inspection for intuition, but may not. I have no problems deciphering the info.
Another is inclusion of familiar (by species name or image) to the stat brick.
And, my favorite in its simplicity, the option to combine counters onto one line of effects instead of being spread out (currently only SR counters, but it could be adapted to work with any mafia "window"). Example would be "SR window 13-53" or, "Fortune cookie 52, 87, 91"
Pictures of any of this in action are available on request.
I was drawn to CHIT because it allowed me to fit more information into the narrow charpane without having to scroll as much to see it. As you can see, my own additions are all ways to reduce the amount of real estate any particular datum requires, in an attempt to maximize what information is available at-a-glance.