Feature - Implemented Equip All Familiars should not add pulled items to session tally

Veracity

Developer
Staff member
Normally, when you "pull" items from storage, they appear on the session tally as newly-acquired items. I believe that is correct.

When you use "empty storage", we don't do that: all the items go into inventory (or the closet), but do not appear on the tally. Even though I never use "empty storage" any more, I like that too and believe it is correct.

On the Familiar Trainer, there is a button to "Equip All Familiars". This will attempt to put the "correct" accessory on every one of your familiars, pulling from storage as necessary. I have a LOT of familiars, so, 11 at a time, this takes something like 18 pull requests, followed by 190 or so equip requests. That is what it is, but there are two issues:

- The "pulled" items are all added to inventory - whether or not some of them might have gone in to the closet
- They all appear on the session tally.

Perhaps I am the only one who uses this button, but I commonly use it when I am about to spend a day or more in aftercore, so I'd like some love given to those deficiencies:

- For all familiar items which go from storage to the closet, remove them from the closet before trying to equip them.
- They really do not need to clutter up my session tally as if they are "acquisitions".
 
I don't suppose you would be using all 190+ familiars in an aftercore period - ? Maybe all that's needed is an "equip this familiar" button, or maybe an "auto-equip familiar" check-box / setting / preference / what-have-you somewhere that just (auto)pulls the selected familiar's specific equipment, and all non-specific familiar equipment not already pulled? Auto-equip for aftercore only. It would need to respect locked equipment, but could still pull (not equip) as needed.
 

Bale

Minion
On the Familiar Trainer, there is a button to "Equip All Familiars". This will attempt to put the "correct" accessory on every one of your familiars, pulling from storage as necessary. I have a LOT of familiars, so, 11 at a time, this takes something like 18 pull requests, followed by 190 or so equip requests.

I had no idea that there was a button to do that. I've got a function that serves that purpose in my kingLiberatedScript. Can mafia do that for me with an ash or cli command so I can use the native functionality from a script?
 

Veracity

Developer
Staff member
Revision 15354 moves the function out of the FamiliarTrainingFrame into a new module: FamiliarManager. It also makes it available to ASH via boolean equip_all_familiars().

I still want a "move from storage" and "move from closet" facility that does not add the items to the session tally.

Question: When you empty storage all at once, if some went into the closet, it tells you "(And store X items in your closet.)". If you pull items (up to 11 at a time), do they always end up in inventory? Considering that the message says something like "star hat (1) moved from storage to inventory", it seems like they COULD say "moved from storage to closet". Does it ever do that?

If so, we don't currently parse that; we always add the items to inventory.
 

Bale

Minion
Revision 15354 moves the function out of the FamiliarTrainingFrame into a new module: FamiliarManager. It also makes it available to ASH via boolean equip_all_familiars().

Thank you. Just for historical curiosity, here's the code that is replacing in my kingLiberatedScript. :)

Code:
void equip_familiars() {
	item it;
	foreach f in $familiars[]
		if(have_familiar(f) && familiar_equipped_equipment(f) == $item[none]) {
			it = familiar_equipment(f);
			if(it != $item[none] && item_amount(it) > 0) {
				print('Equipping your '+f+', "'+f.name+'," with '+it);
				visit_url("familiar.php?action=equip&pwd&whichfam="+ to_int(f) +"&whichitem="+ to_int(it));
			}
		}
}
 

Veracity

Developer
Staff member
Revision 15616 exposes the "bulk transfer" facility of StorageRequest - formerly used when emptying storage - and uses it for this.
 

Veracity

Developer
Staff member
When I tried my fix with the "equip all familiars", I discovered I had missed something. I added that and temporarily modified the "pull" command to test it. It worked and I submitted it, and I expect the "equip all familiars" will work, but I'd like to try it out.

Tomorrow.
 
Top