philmasterplus
Active member
I've been living with a shattered hippy stone for a while, and occasionally my farming gear is stolen while I'm away. Is there a built-in method that retrieves any missing pieces of an outfit?
Edit: Nevermind. This should probably work:
Edit: Nevermind. This should probably work:
Code:
boolean ensure_outfit(string outfit_name) {
int [item] pieces;
foreach _, it in outfit_pieces(outfit_name) {
pieces[it]++;
}
foreach piece, qty in pieces {
if (!retrieve_item(piece, qty)) {
return false;
}
}
return true;
}
Last edited: