Skip to content

COMMIT Summary#143

Open
NotBlackrus wants to merge 5 commits intoPolytoria:mainfrom
NotBlackrus:main
Open

COMMIT Summary#143
NotBlackrus wants to merge 5 commits intoPolytoria:mainfrom
NotBlackrus:main

Conversation

@NotBlackrus
Copy link
Copy Markdown

@NotBlackrus NotBlackrus commented Nov 15, 2025

Changed all C# mentions of arrays to be Lua-friendly site-wide

ex: before, it would mention arrays of instances as Instance[], but now it will mention them as {Instance}. This is so that lua programmers know what they're looking at, and so that we can fit multiple class names as needed.

-Edited Camera.md to change the "Freecam" typo to "FreeCam"
-Added warning about lua's single-thread nature in BaseScript.md, and how to work around it

Environment.md changes:

-Added links to nearly every reference of objects in the entire file
-Added optional parameter markers for CreateExplosion
-Modified CreateExplosion note to be more in depth and specific with wording
-Added optional parameter marker for OverlapBox and OverlapSphere
-Completely rewrote the Raycast and RaycastAll methods to be more comprehensive
-Remade RebuildNavMesh documentation 😭 🙏, please tell me I'm not the only one that laughed when I saw game["Workspace"]
-Added optional parameter marker for GetPointOnNavMesh
-Rewrote AutoGenerateNavMesh documentation to be more comprehensive
-Added more details to PartDestroyHeight's behavior with NPCs and Players

-Added extensive explanation as to how RayResult.Normal works in RayResult.md

-Added warning about GUI.Visible behavior in GUI.md

-Added warning about Tool-descendant scripts and their odd inability to run until the first Tool.Equipped event in Tool.md

merged with the latest pull request (all they did was organize the layout in creator-setup.md 😭)

Changed all C# mentions of arrays to be Lua-friendly **site-wide**
ex: before, it would mention arrays of instances as Instance[], but now it will mention them as {Instance}. This is so that lua programmers know what they're looking at, and so that we can fit multiple class names as needed.

Edited Camera.md to change the "Freecam" typo to "FreeCam"
Added warning about lua's single-thread nature in BaseScript.md, and how to work around it

Environment.md changes:
Added links to nearly every reference of objects in the entire file
Added optional parameter markers for CreateExplosion
Modified CreateExplosion note to be more in depth and specific with wording
Added optional parameter marker for OverlapBox and OverlapSphere
Completely rewrote the Raycast and RaycastAll methods to be more comprehensive
Remade RebuildNavMesh documentation 😭 🙏, please tell me I'm not the only one that laughed when I saw game["Workspace"]
Added optional parameter marker for GetPointOnNavMesh
Rewrote AutoGenerateNavMesh documentation to be more comprehensive
Added more details to PartDestroyHeight's behavior with NPCs and Players

Added extensive explanation as to how RayResult.Normal works in RayResult.md

Added warning about GUI.Visible behavior in GUI.md

Added warning about Tool-descendant scripts and their odd inability to run until the first Tool.Equipped event in Tool.md

merged with the latest pull request (all they did was organize the layout in creator-setup.md 😭)
Comment thread docs/objects/ui/GUI.md
@maji-git
Copy link
Copy Markdown
Collaborator

I feel like mentioning arrays as Instance[] is fine on its own. EmmyLua/LuaLS annotations also do this for arrays.

@NotBlackrus
Copy link
Copy Markdown
Author

NotBlackrus commented Nov 15, 2025

I feel like mentioning arrays as Instance[] is fine on its own. EmmyLua/LuaLS annotations also do this for arrays.

this is true, but for reasons we may or may not all know about, Lua programmers in Polytoria are predominantly familiar with curly bracket arrays, making it the most convenient of the two.
If this change were to impede certain site features I wouldn't mind reverting it, or if my profiling of the common Polytoria developer is wrong

@GoldenretriverYT
Copy link
Copy Markdown
Contributor

I feel like mentioning arrays as Instance[] is fine on its own. EmmyLua/LuaLS annotations also do this for arrays.

this is true, but for reasons we may or may not all know about, Lua programmers in Polytoria are predominantly familiar with curly bracket arrays, making it the most convenient of the two. If this change were to impede certain site features I wouldn't mind reverting it, or if my profiling of the common Polytoria developer is wrong

Ngl i would find {Instance} more confusing than Instance[]

@NotBlackrus
Copy link
Copy Markdown
Author

I feel like mentioning arrays as Instance[] is fine on its own. EmmyLua/LuaLS annotations also do this for arrays.

this is true, but for reasons we may or may not all know about, Lua programmers in Polytoria are predominantly familiar with curly bracket arrays, making it the most convenient of the two. If this change were to impede certain site features I wouldn't mind reverting it, or if my profiling of the common Polytoria developer is wrong

Ngl i would find {Instance} more confusing than Instance[]

How so? From what I understand of luajit and it's syntax, arrays are described with the curly brackets while you retrieve values from indexes with brackets much similarly to it's sibling, lua 5.1. {Instance} visually looks the most practical because of how it's an array {} of objects that inherit Instance.
I think it looks more confusing with Instance[], because as I described before, brackets are commonly used to access array elements. So it simply looks like an incomplete query into an array named Instance.

@Denneisk
Copy link
Copy Markdown

When in Rome, do as the Romans do. If the type system used (or implied) by Polytoria is LuaCATS/EmmyLua style, then keep it that way. When things switch over to Luau, then Luau syntax will take over.

It's already in Luau style ({T}) in the 2.0 docs. I'd recommend simply focusing on documenting what few features aren't in the 1.0 docs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

uhhh you edited the pull request template for everyone 😭

### AutoGenerateNavMesh:bool { property }

Determines whether or not to automatically build a navigation mesh for NPC pathfinding. This property is disabled by default so there are no performance issues with larger maps.
Determines whether or not to automatically build a navigation mesh from :polytoria-Environment: Environment for {{ classLink("NPC") }} pathfinding. This property is disabled by default so there are no performance issues with larger maps.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Environment could be another classLink, instead of just an icon, like NPC

Copy link
Copy Markdown
Contributor

@indexxing indexxing left a comment

Choose a reason for hiding this comment

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

Seems fine, glad a lot more things were changed to be classLinks rather than just basic text

Not sure how to feel about the change from {Instance} to Instance[], I feel like it is less universal, and makes it less readable. Might just be me though

Also I think you edited the PR template instead of including it in your actual PR

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.

5 participants