mirror of
https://github.com/ArnoldSmith86/virtualtabletop.git
synced 2026-03-02 22:57:02 -05:00
Docs for Predefined Variables are confusing due to unclear 'active' term #928
Labels
No labels
PCIO compatibility
Validator
automated testing
bug
documentation
duplicate
editor
enhancement
enhancement
library
library
maintenance
needs legacy server
pile related
reported client crash
routine operations
user interface
widget properties
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/virtualtabletop#928
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gitran on GitHub (Jan 13, 2026).
This is just a request to clarify some docs.
See the Predefined Variables section of the Functions docs. The word "active" is not well defined. I have finally figured out that "active" does not mean the seat that has
turn=trueand by extension the player who occupies that seat (which was my naive assumption based on the real world and common term "active player").seatID,seatIndex, andplayerSeats(collection) are confusing because they refer to "the" active player. Do they mean "player clicking the widget" likemouseCoords,playerName, andplayerColor?activeSeats(array and collection) is confusing because while its description seems correct, its name invites the incorrect idea that only the players in those seats are active.Here is a suggested rewrite based on what I think is the intent. It defines (at the top) a "Context Player" shorthand for "clicker of the widget." Maybe wrongly, I've also clarified "first seat" to mean lowest index value and changed "contains the routine" to "is running the routine."
@gitran commented on GitHub (Jan 13, 2026):
Hmm. I suppose "first seat" might actually mean "next in the (forward) turn cycle, starting with the one currently assigned
turn=true"? Either way, "first seat" is not a particularly clear way of describing what the code is doing.@96LawDawg commented on GitHub (Jan 13, 2026):
Thanks for the feedback. Those are all good points. We know what we meant, but that isn't helpful to newcomers. I made most of your changes. I did not like defining something by referencing something else, but I did include a "see ..." comment.
Your initial take on first seat was mostly correct, but I think my changes made it even more clear. When you get a chance, please take a look at the revisions live on the wiki page now and let us know what you think.
Also, are you in our Discord channel. If so, what username?
@gitran commented on GitHub (Jan 13, 2026):
I'm satisfied. I like Invoking Player better than Context Player. My ideal but impossible fix is to rename a bunch of these variables.
I'm not on Discord.
@96LawDawg commented on GitHub (Jan 13, 2026):
No worries about Discord. We just have a category for wiki contributor and I was going to add you there. And your fix will not happen. Not worth the squeeze. But thank you for making the wiki better. If you find anything else, let us know.
@96LawDawg commented on GitHub (Jan 13, 2026):
Oh yeah. If you need any help working on a game, join the Discord.