Merged
Conversation
We were accidentally overriding the functions even when you didn't have arguments passed in. Now only add them if set, and don't make extra unneeded globals.
Endaris
reviewed
Nov 14, 2025
Comment on lines
78
to
85
| function developerTools.wrapUserIDRead(customUserID) | ||
| assert(customUserID) | ||
|
|
||
| local readId = save.read_user_id_file | ||
| save.read_user_id_file = function(serverIP) | ||
| realId = readId(serverIP) | ||
| return CUSTOM_USER_ID or realId | ||
| end | ||
| logger.debug("Overwriting userID with command line argument") | ||
|
|
||
| local writeId = save.write_user_id_file | ||
| save.write_user_id_file = function(userID, serverIP) | ||
| if userID == CUSTOM_USER_ID then | ||
| userID = realId | ||
| end | ||
| writeId(userID, serverIP) | ||
| local save = require("client.src.save") | ||
| save.read_user_id_file = function(serverIP) | ||
| return customUserID |
Collaborator
There was a problem hiding this comment.
There used to be a function here that handled the write and ensured that the write function for the user id would only ever write the real user id. I'm aware that we currently have no scenario that will randomly cause a write for regular users but I think it is better to have that safeguard rather than losing your ID.
Endaris
approved these changes
Nov 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We were accidentally overriding the functions even when you didn't have arguments passed in.
Now only add them if set, and don't make extra unneeded globals.