Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Function to avoid overriding Equipment IDs #1326
changed the title from
Making a method to avoid overriding Equipment IDs
ethod to avoid overriding Equipment IDs
Jan 15, 2017
Do you mean like this?
function AddEquipmentID(name) -- Utility function to register a new ID
And at the start : EQUIP_COUNT = 4
There would be compatibility problems. I would say we're doing it just like with the UniqueID to SteamID conversion. This has also killed some addons and destroyed all bot functions in TTT. However, this affected only a few addons.
I don't like hacking the global table to generate the
If someone wants to make an addon with 3 pieces of equipment and store their ID in a table, that's perfectly fine. It's up to the addon author to check if a player has the equipment and make it do something, and add it in the right UI places, so as long as the ID is somewhere it's fine.
Why not something like this, which is cleaner and more flexible:
Which you would use in an addon like:
I realise the