-
Notifications
You must be signed in to change notification settings - Fork 789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TTT: Replace most UniqueID usage with SteamID #1182
Conversation
I can see quite a few of these changes not being compatible with certain addons |
Fix 'em |
I'll find out what changes break what and reply here. |
but the big one:
Now so far this breakage are fairly minor as I doubt any servers use those addons (with the exception of the last one, which should no longer be used anyway). However there are some extremely major addons that this change breaks: However, these addons only rely on this field in one or two places each. Simple changes can be made to fix them. But there is one more broken addon that will definitely cause grief:
This addon is found on many servers and all of them must use this feature to operate successfully. The two versions that are on GitHub (@willox' and another one) are both broken by this, for example. I believe this is enough for me to revert that one change. Any additional thoughts? |
Revert it, submit pull requests to all of the addons changing that one thing, warn people of deprecation. We can tell people how to fix it if they ask on Facepunch. I can help contact the authors on Steam if you wish for the workshop versions. |
Reverted. |
How about, for backwards compatibility, just simply defining both a field for UniqueID and Steam ID (with a note telling developers to use the Steam ID one) and using the Steam ID one throughout TTT? rag.uqid = ply:UniqueID() -- Backwards compatibility: use the SteamID field below instead.
rag.sid = ply:SteamID() That should get the best of both worlds. |
@Bo98 Good idea. Done. |
rag.uqid = ply:UniqueID() | ||
rag.sid = ply:SteamID() | ||
|
||
rag.uqid == ply:UniqueID() -- backwards compatibility; use rag.sid instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've got an =
too many there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How embarrassing. Fixed.
This killed every usage with bots and every equipment menu reskin and every custom score event. :( |
Should've used SteamID64 tbh |
This would also break things. SteamID64 returns no value for bots on client state. |
What can be used to identify players and bots on client and server? |
There isn't any default solution for unique IDs that handle bots included, unfortunately. It would be fine if the SteamID function had a separate numerical universe for bots or something that would solve conflicts, but I doubt it'd ever be changed. |
Replaces lots of UniqueID usage with SteamID, preserving all necessary functionality.