Feature - Rejected Misc patches

A. Nonyme

New member
I attached 2 simple patches

The first one add an id field to the skill proxy
The second one add a have_shield_equipped ash function
 

Attachments

  • have_shield_equipped.patch
    1.2 KB · Views: 43
  • skill-id.patch
    878 bytes · Views: 50

Veracity

Developer
Staff member
> ash to_int( $skill[ thrust-smack ] )

Returned: 1003

Code:
boolean have_shield_equipped()
{
    return item_type( equipped_item( $slot[ off-hand ] ) ) == "shield";
}
 

A. Nonyme

New member
Thanks for the item_type.

For the to_int, isn't the argument true for almost all the information in the proxy? Proxy are a lot easier to use in general...
 

Theraze

Active member
You're not asking for something to be added that isn't already available to you. The proxy fields are there because they add information that isn't available otherwise.
 

Veracity

Developer
Staff member
I don't think that "skill.id" is "a lot" easier than "skill.to_int()", although I agree that I prefer the "style" of the former.

ASH started out with a variety of individual little function to query attributes of complex data types. Jason added proxy records for the complex types and fields in those records for various attributes that were not already covered. Since then, we tend to add new attributes as proxy fields, not standalone functions.

I'm not averse to having some redundancy: going back and adding all attributes as proxy fields, even if there is an existing standalone function to fetch the same info. I'm not enthusiastic about doing it one attribute at a time, though; why skill.id but not effect.id, item.id, and so on? They are ALL currently provided via to_int().
 
Top