Skip to content

0.9.0: Basic attribute support

Pre-release
Pre-release
Compare
Choose a tag to compare
@nosoop nosoop released this 04 Apr 13:38
· 52 commits to master since this release

This update adds basic support for reading attribute definitions, as well as support for reading raw static attribute data from items (similar to how TF2Attributes does it with TF2Attrib_GetStaticAttribs).

Added

  • Native TF2Econ_GetItemStaticAttributes, which returns an ArrayList containing attribute definition / value pairs for a given item.
  • Native TF2Econ_IsValidAttributeDefinition, which returns true if an attribute definition index corresponds to a valid attribute.
  • Native TF2Econ_IsAttributeHidden, which returns true if a given attribute is marked as hidden.
  • Native TF2Econ_IsAttributeStoredAsInteger, which returns true if a given attribute is stored as an integer.
  • Native TF2Econ_GetAttributeName, which stores the name of an attribute into a given buffer.
  • Native TF2Econ_GetAttributeClassName, which stores the attribute_class of an attribute into a given buffer.
  • Native TF2Econ_GetAttributeDefinitionString, which retrieves an arbitrary string from an attribute definition's KeyValues structure.
  • Native TF2Econ_GetAttributeDefinitionAddress, which returns the address of a given CEconItemAttributeDefinition.

Changed

  • Split off code into separate .sp files based on functionality.