-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[WIP] Improve MessageID Documentation #4128
base: 1.4.4
Are you sure you want to change the base?
[WIP] Improve MessageID Documentation #4128
Conversation
Also would like feedback if this would be an opportunity to move the MessageID's that are in the patch file to the TML file or not. |
I think all the tModLoader added messages are already in the MessageID.TML.cs file. This is all good, at the very least making them all XML comments is already a big win. We'll want to decide on the final approach via discussion before doing all the work. Documenting each of the parameters in the Document on the MessageID itself:
Stub method approach:
Just an option. This would allow modders to get rid of all the parameters that are unused, and the required arguments will hint to the modder which parameters are needed so they don't accidentally forget any. It would require a lot of work to make sure they are correct. Some of them would probably require separate methods for client and server. |
I was actually thinking to do similar approach in my Net Packets pr except structs instead of methods, so e.g.: new SyncNPCPacket(slot).SendToAllPlayers(); (docs on the struct) |
This pull request is to facilitate improvements to the documentation of
MessageID
. All contributions and help are welcomed.The Problem
The current "documentation" of MessageID consists of simple comments that can't be picked up by editors when typing and glancing over them, they also state that they may have outdated information.
It is also not very concise or clear to modders if or what exact parameters they should be setting when using one of these MessageID's in the context of
NetMessage.SendData()
This PR will aim to fix these issues (Targeting
MessageID.cs.patch
andMessageID.TML.cs
).Checklist
Convert all simple comments to XML summaries
Provide updated info about what each of these MessageIDs mean when possible
Provide a clear and easily understandable format for modders to follow if a MessageID needs extra info to be passed into
NetMessage.SendData()
to behave as intended