Bug - Fixed CSA all-purpose soap isn't multiusable

livercat

Member
If you have more than 1000 max MP (with 0 current MP) and try to multi-use 2+ CSA all-purpose soaps, it silently fails.
From the debug log (attached): "That item isn't usable in quantity".
It would be quite convenient to be able to "multi-use" it (Mafia would need to use them one by one), so it would behave like all other common restorers. Is that possible to implement?

Thank you.
 

Attachments

  • DEBUG_20121129.txt
    15.9 KB · Views: 51

guyy

Member
CSA soap not multi-usable

CSA All-Purpose Soap is not multi-usable for some reason, but Mafia doesn't seem to know this; so, typing "use 2 CSA soap" produces:

Using 2 CSA all-purpose soap...
Finished using 2 CSA all-purpose soap.

But they aren't actually used (I get no MP and still have the soaps). "use 1 CSA soap" works as it should:

Using 1 CSA all-purpose soap...
You gain 1,000 Muscularity Points
Finished using 1 CSA all-purpose soap.
 

Fluxxdog

Active member
Just for my own curiosity, why hasn't this been fixed? I remember similar situations have come up before, and they were quickly fixed.
 

slyz

Developer
It's not a trivial fix.

Usable items are marked as either "usable" (single-use) or "multiple" (multi-use) in the data file. Whenever we need to change it, it's a simple change in items.txt.

However, MP/HP restore items are simply marked "hp" or "mp" and the code assumes that all restorers would be multi-usable.

This is the first single-use MP restorer.
 

lostcalpolydude

Developer
Staff member
This is marked as an MP restorer rather than single or multiuse, so the fix isn't so trivial. I don't actually know what's gained by it being marked that way, but the quick fix would lose that functionality. Maybe no one would notice?
 

Veracity

Developer
Staff member
Doesn't it work to mark it "mp, usable"?

I.e., the primary usage is "mp" - so it shows up on the Restore tab, and secondary usage is "usable", which says you can't multi-use it, even though an "mp" thing is usually multi-usable.
 

lostcalpolydude

Developer
Staff member
I see that there are a few other items marked that way as well. Spleen items, so no one ever uses them. I can't actually figure out the code for that, but I wouldn't see anything wrong with trying it even if the suggestion came from a random person.

12111
 
Top