Feature Make can_equip also check for required skills, if needed

Theraze

Active member
Chefstaves and shirts both require skills before being usable, but EquipmentManager.canEquip only checks for path (Fistcore, as well as hardcore/softcore) and stat requirements. Could it be made to also check for skill requirements, since these are also a feature of whether or not you're able to equip them?
 

slyz

Developer
This is a great idea. With a Torsoless multi:
Code:
> ash have_skill( $skill[ torso awaregness ] )

Returned: false

> inv barskin cloak

barskin cloak

> equip barskin cloak

Putting on barskin cloak...
[color=red]You can't wear shirts.[/color]

> inv barskin cloak

> ashq equipped_item( $slot[shirt] ).print()

barskin cloak

EquipmentManager.canEquip() is the perfect place to check for this kind of thing.

Checking for shirts is fairly easy. I'll look into Chefstaves. The Maximizer probably has some code I can borrow.
 

slyz

Developer
For chefstaves, EquipmentManager.canEquip() should always return true if you have Spirit of Rigatoni, and always return false if you don't have the skill and aren't a Sauceror (Saucerors can buy the special sauce glove accessory and benefit from it).

For Saucerors without Spirit of Rigatoni, should EquipmentManager.canEquip() only return true if the special sauce glove is already equipped, or should it also return true if you have a special sauce glove in your inventory (or 5k meat and guild access)?

Doing the former means that chefstaves will be filtered out of the Gear Changer frame until you equip the glove. Doing the latter means that Mafia will waste a server hit if you do "equip staff of the black kettle" without equipping the glove beforehand.
 
Last edited:

roippi

Developer
Saucerors can buy the special sauce glove accessory and equip it. For Saucerors without Spirit of Rigatoni, should EquipmentManager.canEquip() only return true if the special sauce glove is equipped, or should it also return true if you have a special sauce glove in your inventory (or 5k meat and guild access)?

I'd say only if it's equipped. I could imagine a scenario where all my accessory slots are spoken for and I want to see what my remaining weapon options are.
 
Top