The eco(n)system grows
This is a minor update.
If coming from an older version of the plugin, you will need to update tf2.econ_data.txt
.
Fixed
TF2Econ_GetItemDefinitionAddress
correctly returningnull
instead of the address of the special "default" item definition on invalid item definitions. If you specifically want that definition, call it withTF_ITEMDEF_DEFAULT
. (#5)- This also fixes
TF2Econ_IsValidItemDefinition
always returning true.
- This also fixes
Changed
- Natives
TF2Econ_GetItemDefinitionString
andTF2Econ_GetAttributeDefinitionString
now returnbool
instead ofvoid
; the return value is true if the output buffer is not as empty string (if you specify a non-empty default value, this should always be true). This allows authors to inlineif
s instead of having to do abuffer[0]
check each time. - Dropped dependency of
tf2_stocks
from the plugin, and in turn, the TF2 extension. We never really needed those anyways. The plugin still requires SDKTools for calling game functions. However, the include file still pulls intf2_stocks
, asTF2Econ_GetItemSlot
does require aTFClassType
value. TF2Econ_GetItemStaticAttributes
was modified to require new gamedatasizeof(static_attrib_t)
, which is used internally when the function iterates over the attribute list in memory. This is not actually necessary for TF2, but combined with dropping the dependency on the TF2 extension, this allows a semi-unified codebase for other games to build off of.- Many parameter names have been changed from
defindex
to eitheritemdef
orattrdef
, to better contextualize what definition indices are associated with the native. This is a breaking compile-time change if you were using named parameters for those.