Renamed the statebag property from itemNameOverride to itemName
This is a potential breaking change for any scripts that were relying on this naming, as such bumped to v1.1.0
Removes the need for shouldUseItemNameState. This was previously being used to optionally use a itemNameOverride statebag property on the entity. The primary purpose for doing this was that you can re-use the same prop model for several different items and when you pick up the prop, you need a way to know which item to give back to the player.
Instead of optionally using the statebag, we now use it for all the props. The pickup event will now try to get the itemName from the statebag first and if its not defined then it falls back to getting the itemName from the targetOptions data (this should only happen on world spawned props, any placed props should have the statebags)
Fixed issue with ox target options being duplicated for any model that was used more than once.
If you define the same model twice with AddTargetModel:
-- In qb-target, it will override the options, and the last one defined is used
-- In ox_target, it will append the options, resulting in N duplicate options
To fix this we only allow creating the targetOptions once per model
Renamed the statebag property from
itemNameOverride
toitemName
Removes the need for
shouldUseItemNameState
. This was previously being used to optionally use a itemNameOverride statebag property on the entity. The primary purpose for doing this was that you can re-use the same prop model for several different items and when you pick up the prop, you need a way to know which item to give back to the player.Fixed issue with ox target options being duplicated for any model that was used more than once.