Skip to content

Adding documentation and smoothing out formatting for non-UI code.#10

Open
BeowulfDragon wants to merge 17 commits into
EmilyV99:mainfrom
BeowulfDragon:main
Open

Adding documentation and smoothing out formatting for non-UI code.#10
BeowulfDragon wants to merge 17 commits into
EmilyV99:mainfrom
BeowulfDragon:main

Conversation

@BeowulfDragon
Copy link
Copy Markdown

I was fiddling around with something and wanted to use this library, but found it hard to understand and read, so I have added a bunch of documentation and made the formatting more consistent and readable. I mainly followed the recommended GDScript style guide, except where an alternative style was consistently used and readable. I also broke up as many lines that went over 100 characters as I could, excluding some long strings.

This PR doesn't include documentation for the main UI and app code, only for the files in the ap_files, autoloads, and managers directories, and save_file.gd. Any non-documentation changes should have no functional differences, only changes to formatting.

No AI was used in the work done here, I'm just like this.

Tweaking the documentation of archipelago.gd and adding/changing spacing
and indentation (per the GDScript style guide suggested in the Godot
docs) to make it less of a wall of code.
ap_location.gd also has a super broken call, but I'm exclusively doing
documentation and formatting currently.
Finished writing documentation for all the classes in ap_files. Also
fixed some stuff in archipelago.gd. Finished the documentation of
command_manager.gd too.

Also I was wrong in a previous commit message about an error in
APLocation, I just didn't notice the conn member ~300 lines deep into
the source for AP.
With an asterisk, since there's a lot of UI in the domain code, so there
has been documentation of UI code.
Still need to do one last big read through before submitting a PR.
Making continuation lines more consistent, enforcing spacing around
operators, and more spacing in single-line dictionaries.
Also added documentation to SaveFile, as the docs for APSaveManager
wouldn't generate without that having documentation to generate.
Copy link
Copy Markdown
Owner

@EmilyV99 EmilyV99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did not review archipelago.gd, command_manager.gd, console_command.gd, or connection_info.gd yet (my brain is not prepared for those files atm).

Also didn't actually look at the generated docs in Godot from this yet.

Gonna drop this with the review comments I have so far though, will need to look deeper later (and probably remove the trackerpack stuff from config.gd on my end, which you noticed wasn't being used at all, as it was entirely outdated 😅)

Feel free to bump this in the discord thread if I don't look at it further soon and you have everything I've commented on here cleaned up

Comment thread godot_ap/ap_files/network_item.gd Outdated
Comment thread godot_ap/ap_files/network_hint.gd
Comment thread godot_ap/ap_files/network_slot.gd Outdated
Comment thread godot_ap/managers/configs.gd Outdated
Comment thread godot_ap/managers/saves.gd
Comment thread godot_ap/managers/saves.gd Outdated
Comment thread godot_ap/managers/saves.gd Outdated
Comment thread godot_ap/save_file.gd Outdated
BeowulfDragon and others added 4 commits May 12, 2026 14:39
Co-authored-by: Emily <35015090+EmilyV99@users.noreply.github.com>
For Network[Thing]s, Create -> Deserialize. While it's maybe technically
demarshalling rather than deserialization, deserialization gets the
point across enough. Also not using "create" makes it clear that nothing
is happening on the server or other clients.
Copy link
Copy Markdown
Owner

@EmilyV99 EmilyV99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looked through the command code, still gotta check the two big main files.

Comment thread godot_ap/managers/command_manager.gd
Comment thread godot_ap/managers/command_manager.gd Outdated


## Get the autofilled parameters for a command message, up to the number of arguments specified in
## [param capacity].
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## [param capacity].
## [param capacity]. A capacity of 0 is unlimited.

Comment thread godot_ap/managers/command_manager.gd Outdated
Comment thread godot_ap/managers/command_manager.gd Outdated
Comment thread godot_ap/ap_files/console_command.gd Outdated
Copy link
Copy Markdown
Owner

@EmilyV99 EmilyV99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finally done reviewing 😅 lmk if you have any follow-up questions on anything I commented on

Comment thread godot_ap/ap_files/connection_info.gd Outdated
Comment thread godot_ap/ap_files/connection_info.gd Outdated
Comment thread godot_ap/ap_files/connection_info.gd Outdated
Comment thread godot_ap/ap_files/connection_info.gd
Comment thread godot_ap/ap_files/connection_info.gd Outdated
Comment thread godot_ap/autoloads/archipelago.gd Outdated
Comment thread godot_ap/autoloads/archipelago.gd Outdated
Comment thread godot_ap/autoloads/archipelago.gd Outdated
Comment thread godot_ap/autoloads/archipelago.gd Outdated

## Set the current Archipelago status.
## Set to 'CLIENT_GOAL' when the player has 'won'.
## Set to [code]CLIENT_GOAL[/code] when the player has won.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this reference ClientStatus.CLIENT_GOAL with some syntax, rather than a generic code tag?

Copy link
Copy Markdown
Author

@BeowulfDragon BeowulfDragon Jun 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is surprisingly not possible. The GDScript documentation syntax can only link to enums as a whole, with no way to refer to a specific member of an enum. Anything before the final dot in a name is treated as a class name, so if a link going to ClientStatus.CLIENT_GOAL is followed, it goes to a blank page because Godot can't find a class named ClientStatus.

It's possible to link to the CLientStatus enum, but the type specifier in the parameters generates a link for that anyway.

BeowulfDragon and others added 5 commits June 2, 2026 12:16
Co-authored-by: Emily <35015090+EmilyV99@users.noreply.github.com>
Since seed_name and slot_data are literal values from the protocol, they
should go in code blocks.
debug_disabled() wasn't being called on the passed object, causing a
crash for static method reasons.
Co-authored-by: Emily <35015090+EmilyV99@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants