From 6ed83dd882435eeb602f65a9cc457fecf4a62024 Mon Sep 17 00:00:00 2001 From: NotBlackrus Date: Fri, 14 Nov 2025 19:19:12 -0800 Subject: [PATCH 1/4] COMMIT Summary 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 :sob: :pray:, 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 :sob:) --- .github/pull_request_template.md | 28 +++++-- docs/objects/game/Camera.md | 2 +- docs/objects/game/Environment.md | 83 ++++++++++++------- docs/objects/scripting/BaseScript.md | 6 +- docs/objects/system/Instance.md | 4 +- docs/objects/types/RayResult.md | 4 + docs/objects/ui/GUI.md | 2 + docs/objects/world/MeshPart.md | 4 +- docs/objects/world/Tool.md | 4 + .../getting-started/creator-setup.md | 8 +- 10 files changed, 98 insertions(+), 47 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 9cb3c51..4b00b06 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,10 +1,26 @@ ## PR Summary -[ REPLACE this with a DETAILED SUMMARY of your changes ] +## 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. -Thanks for taking the time to contribute to the Polytoria documentation project! -Please ensure that this PR meets the following criteria before submitting (you may delete this section after reading): +## 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 -- [ ] The changes you've made are accurate and correct -- [ ] Distinct changes for separate issues are in separate PRs (do not combine multiple issues into one PR) -- [ ] Any additions or modifications to the example code were tested in the latest version of Polytoria Creator and work as intended +## 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 :sob: :pray:, 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 :sob:) \ No newline at end of file diff --git a/docs/objects/game/Camera.md b/docs/objects/game/Camera.md index 0ee305d..5865f5c 100644 --- a/docs/objects/game/Camera.md +++ b/docs/objects/game/Camera.md @@ -133,7 +133,7 @@ Camera.MinDistance = 5 ### Mode:CameraMode { property } -Determines or returns the camera's current mode `(Scripted, FollowPlayer, Freecam)`. +Determines or returns the camera's current mode `(Scripted, FollowPlayer, FreeCam)`. **Example** diff --git a/docs/objects/game/Environment.md b/docs/objects/game/Environment.md index e229b89..ae93615 100644 --- a/docs/objects/game/Environment.md +++ b/docs/objects/game/Environment.md @@ -17,9 +17,9 @@ weight: 2 ## Methods -### CreateExplosion(Position;Vector3,Radius;float=10,Force;float=5000,affectAnchored;bool=true,callback;function=nil,damage;float=10000) { method } +### CreateExplosion(Position;Vector3,?Radius;float=10,?Force;float=5000,?affectAnchored;bool=true,?callback;function=DynamicInstance,?damage;float=10000) { method } -Creates a deadly explosion killing players and applying force to parts at the given position. +Creates a deadly explosion killing {{ classLink("Players") }} and applying force to {{ classLink("DynamicInstance") }}s at the given position. **Example** @@ -28,16 +28,16 @@ game["Environment"]:CreateExplosion(Vector3.New(0, 0, 0), 30, 5000, false, nil, ```
-!!! note "When set to true, AffectAnchored will unanchor parts within the explosion radius." +!!! note "When set to true, AffectAnchored will disable the Anchor property for {{ classLink("DynamicInstance") }}s within the explosion radius."
-!!! note "Callback gets called for each part within explosion radius." +!!! note "Callback gets called for each {{ classLink("DynamicInstance") }} within explosion radius."
-### OverlapBox(position;Vector3,size;Vector3,rotation;Vector3,ignoreList;array=Instance[]):Instance[] { method } +### OverlapBox(position;Vector3,size;Vector3,rotation;Vector3,?ignoreList;array={Instance}):{Instance} { method } -Returns a list of instances intersecting with the box in the given position, size and rotation. +Returns a list of {{ classLink("DynamicInstance") }}s intersecting with the box in the given position, size and rotation. A demo of this method is available [here](https://polytoria.com/places/9269). @@ -51,61 +51,77 @@ for i,v in ipairs(intersections) do end ``` -### OverlapSphere(position;Vector3,radius;float,ignoreList;array=Instance[]):Instance[] { method } +### OverlapSphere(position;Vector3,radius;float,?ignoreList;array={Instance}):{Instance} { method } -Returns a list of instances intersecting with the sphere in the given position and radius. +Returns a list of {{ classLink("DynamicInstance") }}s intersecting with the sphere in the given position and radius. **Example** ```lua -local intersections = game["Environment"]:OverlapSphere(Vector3.New(100,0,45), 25) +local intersections = game["Environment"]:OverlapSphere(Vector3.New(100,0,45), 25, {game["Environment"]["TheIgnored"]}) for i,v in ipairs(intersections) do print(v.Name .." is intersecting the sphere!") end ``` -### Raycast(origin;Vector3,direction;Vector3,maxDistance;float=infinite,ignoreList;array=Instance[]):RayResult { method } +### Raycast(origin;Vector3,direction;Vector3,?maxDistance;float=infinite,?ignoreList;array={Instance}):RayResult { method } -Casts a ray from origin with a specified direction and returns a RayResult for the first hit object. +Casts a ray from origin, shooting in the direction of the second argument until it reaches the distance threshold, only stopping upon reaching a {{ classLink("DynamicInstance") }} that isn't nested in ignoreList. **Example** ```lua -local hit = game["Environment"]:Raycast(barrel.Position, barrel.Forward) - -if hit and hit.Instance:IsA("Player") then - hit.Instance.Health = 0 +local Ray = game["Environment"]:Raycast(barrel.Position, barrel.Forward, 25, {game["Environment"]["IgnoredInstances"], game["Environment"]["OtherIgnoredInstances"]}) + +if Ray ~= nil then + local Hit = Ray.Instance -- Player + if Hit:IsA("Player") then + print("Hit",Hit,"at",Ray.Position,"!") -- [Hit Player at (3.24, 1.2, 5.93) !] + Hit.Health = math.max(Hit.Health - 12 * (1.5-(1- Ray.Distance / 25)), 0) + --Point blank deals 18 damage while max distance deals 6 damage + end end ``` -### RaycastAll(origin;Vector3,direction;Vector3,maxDistance;float=infinite,ignoreList;array=Instance[]):RayResult[] { method } +
+!!! note "The descendants of an {{ classLink("Instance") }} in ignoreList are ignored too." +!!! warning "If the Raycast fails to hit a {{ classLink("DynamicInstance") }}, it is returned as nil." +
+ +### RaycastAll(origin;Vector3,direction;Vector3,?maxDistance;float=infinite,?ignoreList;array={Instance}):{RayResult} { method } -Casts a ray from origin with a specified direction and returns a RayResult array for all hit objects. +Casts a ray from origin, shooting in the given direction until it reaches the distance threshold, only returning a table of {{ classLink("DynamicInstance") }}s that aren't nested within the ignoreList. **Example** ```lua -local hits = game["Environment"]:RaycastAll(Vector3.New(0, 10, 0), Vector3.New(0, -1, 0), 100) - -for i, hit in pairs(hits) do - print("Hit at " .. hit.Position .. "!") +local Ray = game["Environment"]:RaycastAll(Vector3.New(0, 10, 0), Vector3.New(0, -1, 0), 100, game["Environment"]["Map"]) + +--We call this the Railgun. +for i, hit in pairs(Ray) do + if hit.Instance:IsA("NPC") then + if hit.Position.y - hit.Instance.Position.y >= hit.Instance.Size.y then + hit.Instance.Health = 0 --An accurate headshot detection, no matter the size of the NPC + --(hit.Instance.Position.y + hit.instance.Size.y == where the NPC's neck is on the y scale) + else + hit.Instance.Health = math.max(0, hit.Instance.Health - 50) --Body shot + end + end end ``` -### RebuildNavMesh(root;Instance=nil) { method } +### RebuildNavMesh(?root;Instance) { method } -Rebuilds the navigation mesh which determines the empty space where NPCs can pathfind in. +Rebuilds the navigation mesh which determines the empty space where {{ classLink("NPC") }}s can pathfind in. **Example** ```lua -game["Environment"]:RebuildNavMesh() -# or -game["Environment"]:RebuildNavMesh(game["Workspace"]["Map"]) +game["Environment"]:RebuildNavMesh(game["Environment"]["Map"]) ``` -### GetPointOnNavMesh(position;Vector3,maxDistance;float=infinite):Vector3 { method } +### GetPointOnNavMesh(position;Vector3,?maxDistance;float=infinite):Vector3 { method } Returns a point on the navigation mesh at the given position. @@ -113,10 +129,10 @@ Returns a point on the navigation mesh at the given position. ### 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.
-!!! note "When updating the map, even if the property is set to true, you will still have to manually call the `Environment:BuildNavMesh()` method." +!!! warning "AutoGenerateNavMesh only runs once upon being set to true. Changing the map will still require you to run RebuildNavMesh."
### FogColor:Color { property } @@ -137,11 +153,11 @@ Whether or not fog is enabled. ### FogStartDistance:float { property } -The distance from the camera at which fog starts to appear +The distance from the {{ classLink("Camera") }} at which fog starts to appear ### FogEndDistance:float { property } -The distance from the camera at which fog is fully opaque +The distance from the {{ classLink("Camera") }} at which fog is fully opaque ### Gravity:Vector3=Vector3.New(0, -75, 0) { property } @@ -157,6 +173,11 @@ The height at which unanchored parts are destroyed when they fall below it. game["Environment"].PartDestroyHeight = -2000 ``` +
+!!! note "PartDestroyHeight only kills {{ classLink("Players") }}, and destroys {{ classLink("DynamicInstance") }}s with Anchor set to false." +!!! warning "PartDestroyHeight may kill {{ classLink("Players") }}, but it does not kill {{ classLink("NPC") }}s." +
+ ### Skybox:SkyboxPreset { property } The default skybox preset to use for the world, if no ImageSky is present. diff --git a/docs/objects/scripting/BaseScript.md b/docs/objects/scripting/BaseScript.md index 0173290..3fdfb4e 100644 --- a/docs/objects/scripting/BaseScript.md +++ b/docs/objects/scripting/BaseScript.md @@ -29,5 +29,9 @@ game["ScriptService"]["Script"]:Call("Foo", "Bar") ```
-!!! failure "Local Functions cannot be ran using the Call function." +!!! warning "Scripts are naturally single-threaded, but can run multiple threads at once through Signals and :Call."
+ +
+!!! failure "Local Functions cannot be ran using the Call function." +
\ No newline at end of file diff --git a/docs/objects/system/Instance.md b/docs/objects/system/Instance.md index 783f30e..b2965b4 100644 --- a/docs/objects/system/Instance.md +++ b/docs/objects/system/Instance.md @@ -165,11 +165,11 @@ Attempts to find the first child instance with the specified name (`nil` if not Attempts to find the first child instance with the specified class (`nil` if not found). -### GetChildren:Instance[] { method } +### GetChildren:{Instance} { method } Returns an array of all the children instances parented to the instance. -### GetChildrenOfClass(className;string):Instance[] { method } +### GetChildrenOfClass(className;string):{Instance} { method } Returns an array of all the children instances with the specified class. diff --git a/docs/objects/types/RayResult.md b/docs/objects/types/RayResult.md index a31d018..eb0bcef 100644 --- a/docs/objects/types/RayResult.md +++ b/docs/objects/types/RayResult.md @@ -16,3 +16,7 @@ icon: polytoria/RayResult | `Vector3` Position | The position the ray made contact at. | | `float` Distance | The distance between the hit and origin. | | `Vector3` Normal | The normal of the surface the ray hit. | + +
+Normal is a naturally complicated property to describe. In a simple case of a cube, Normal describes the exact side the RayResult hit, with x being left/right, y being top/bottom, and z being front/back. For a more complicated hitbox like a Sphere, the values can blend together. It's important to remember that the Instance's Rotation should be considered when making calculations with Normal. +
\ No newline at end of file diff --git a/docs/objects/ui/GUI.md b/docs/objects/ui/GUI.md index a39c54d..4810509 100644 --- a/docs/objects/ui/GUI.md +++ b/docs/objects/ui/GUI.md @@ -19,3 +19,5 @@ Determines whether the GUI is visible or not. ```lua gui.Visible = true ``` + +!!! warning "The Visible property will be automatically set to true when launching the game, it's recommended to only use this property in-studio." \ No newline at end of file diff --git a/docs/objects/world/MeshPart.md b/docs/objects/world/MeshPart.md index df5474b..d2c30b7 100644 --- a/docs/objects/world/MeshPart.md +++ b/docs/objects/world/MeshPart.md @@ -34,9 +34,9 @@ Stops playing the current animation. Returns the names of the animations associated with the mesh. -### GetAnimationSources:string[] { method } +### GetAnimationSources:{string} { method } -### GetAnimationInfo:AnimationInfo[] { method } +### GetAnimationInfo:{AnimationInfo} { method } ## Properties diff --git a/docs/objects/world/Tool.md b/docs/objects/world/Tool.md index 49a4037..94592e0 100644 --- a/docs/objects/world/Tool.md +++ b/docs/objects/world/Tool.md @@ -12,6 +12,10 @@ weight: 7 {{ inherits("DynamicInstance") }} +
+!!! warning "{{ classLink("BaseScript") }}s that are descendants of Tools won't run until after the Tool's first Equipped Event." +
+ ## Events ### Activated { event } diff --git a/docs/tutorials/getting-started/creator-setup.md b/docs/tutorials/getting-started/creator-setup.md index f28f79c..ef7d1d8 100644 --- a/docs/tutorials/getting-started/creator-setup.md +++ b/docs/tutorials/getting-started/creator-setup.md @@ -10,10 +10,10 @@ Polytoria Creator is a 3D editing software used to create your own places. ## System Requirements -| Operating System | Processor | Graphics Card | Memory | Additional | -| --------------------------- | --------------------------------------------------------------------------------- | -------------- | ------ | ------------------------------------------------------------ | -| Windows 10 22H2+ | Intel or AMD
x64 architecture
SSE4.2 instruction set | Vulkan capable | 4 GB+ | Latest offical drivers from hardware vendor
Dedicated GPU recommended | -| macOS Ventura 13+ | Intel or Apple M1
x64 or ARM64 architecture
SSE4.2 or ARMv8 instruction set | Metal capable | 4 GB+ | Rosetta 2 is required for Apple Silicon devices
Latest version of macOS recommended | +| Operating System | Processor | Graphics Card | Memory | Additional | +| --------------------------- | --------------------------------------------------------------------------------- | -------------- | ------ | ----------------------------------------------------------------------------------------- | +| Windows 10 22H2+ | Intel or AMD
x64 architecture
SSE4.2 instruction set | Vulkan capable | 4 GB+ | Latest offical drivers from hardware vendor
Dedicated GPU recommended | +| macOS Ventura 13+ | Intel or Apple M1
x64 or ARM64 architecture
SSE4.2 or ARMv8 instruction set | Metal capable | 4 GB+ | Rosetta 2 is required for Apple Silicon devices
Latest version of macOS recommended | | Ubuntu 22.04+
Fedora 42+ | Intel or AMD
x64 architecture
SSE4.2 instruction set | Vulkan capable | 4 GB+ | NVIDIA Proprietary or AMD Mesa drivers
Wayland compositor
Dedicated GPU recommended | A stable internet connection is required to update Polytoria Creator and connect to its services. From b56ed28552b93b10aa89b2d3f60a3aae16ef46c9 Mon Sep 17 00:00:00 2001 From: NotBlackrus Date: Sat, 15 Nov 2025 00:53:35 -0800 Subject: [PATCH 2/4] Removed personal recommendation --- docs/objects/ui/GUI.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/objects/ui/GUI.md b/docs/objects/ui/GUI.md index 4810509..b1fa873 100644 --- a/docs/objects/ui/GUI.md +++ b/docs/objects/ui/GUI.md @@ -20,4 +20,4 @@ Determines whether the GUI is visible or not. gui.Visible = true ``` -!!! warning "The Visible property will be automatically set to true when launching the game, it's recommended to only use this property in-studio." \ No newline at end of file +!!! warning "The Visible property will be automatically set to true when launching the client." \ No newline at end of file From a805e7968b9ea0e2b7b4847b8f5b23d8fda94ee4 Mon Sep 17 00:00:00 2001 From: NotBlackrus Date: Sat, 15 Nov 2025 01:08:42 -0800 Subject: [PATCH 3/4] Changing some warnings into tips, and resolving search exclude issue before it's claimed. --- docs/objects/game/Environment.md | 4 +--- docs/objects/scripting/BaseScript.md | 4 +--- docs/objects/types/RayResult.md | 5 ++++- docs/objects/ui/GUI.md | 4 +++- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/objects/game/Environment.md b/docs/objects/game/Environment.md index ae93615..ada91de 100644 --- a/docs/objects/game/Environment.md +++ b/docs/objects/game/Environment.md @@ -29,9 +29,7 @@ game["Environment"]:CreateExplosion(Vector3.New(0, 0, 0), 30, 5000, false, nil,
!!! note "When set to true, AffectAnchored will disable the Anchor property for {{ classLink("DynamicInstance") }}s within the explosion radius." -
-
!!! note "Callback gets called for each {{ classLink("DynamicInstance") }} within explosion radius."
@@ -85,7 +83,7 @@ end ```
-!!! note "The descendants of an {{ classLink("Instance") }} in ignoreList are ignored too." +!!! tip "The descendants of an {{ classLink("Instance") }} in ignoreList are ignored too." !!! warning "If the Raycast fails to hit a {{ classLink("DynamicInstance") }}, it is returned as nil."
diff --git a/docs/objects/scripting/BaseScript.md b/docs/objects/scripting/BaseScript.md index 3fdfb4e..fbb5a6a 100644 --- a/docs/objects/scripting/BaseScript.md +++ b/docs/objects/scripting/BaseScript.md @@ -29,9 +29,7 @@ game["ScriptService"]["Script"]:Call("Foo", "Bar") ```
-!!! warning "Scripts are naturally single-threaded, but can run multiple threads at once through Signals and :Call." -
+!!! tip "Scripts are naturally single-threaded, but can run multiple threads at once through Signals and :Call." -
!!! failure "Local Functions cannot be ran using the Call function."
\ No newline at end of file diff --git a/docs/objects/types/RayResult.md b/docs/objects/types/RayResult.md index eb0bcef..28924ec 100644 --- a/docs/objects/types/RayResult.md +++ b/docs/objects/types/RayResult.md @@ -18,5 +18,8 @@ icon: polytoria/RayResult | `Vector3` Normal | The normal of the surface the ray hit. |
-Normal is a naturally complicated property to describe. In a simple case of a cube, Normal describes the exact side the RayResult hit, with x being left/right, y being top/bottom, and z being front/back. For a more complicated hitbox like a Sphere, the values can blend together. It's important to remember that the Instance's Rotation should be considered when making calculations with Normal. +!!! tip "Don't understand Normal?" + + Normal is a naturally complicated property to describe. In a simple case of a cube, Normal describes the exact side the RayResult hit, with x being left/right, y being top/bottom, and z being front/back. + For a more complicated hitbox like a Sphere, the values can blend together. It's important to remember that the Instance's Rotation should be considered when making calculations with Normal.
\ No newline at end of file diff --git a/docs/objects/ui/GUI.md b/docs/objects/ui/GUI.md index b1fa873..83da586 100644 --- a/docs/objects/ui/GUI.md +++ b/docs/objects/ui/GUI.md @@ -20,4 +20,6 @@ Determines whether the GUI is visible or not. gui.Visible = true ``` -!!! warning "The Visible property will be automatically set to true when launching the client." \ No newline at end of file +
+!!! warning "The Visible property will be automatically set to true when launching the client." +
\ No newline at end of file From bede8760827a3fd04fc5b71bf1219f5ed84d12ef Mon Sep 17 00:00:00 2001 From: NotBlackrus Date: Sun, 8 Feb 2026 18:03:58 -0800 Subject: [PATCH 4/4] Added Purchases API --- docs/assets/tree/Purchases.png | Bin 0 -> 3301 bytes docs/objects/static-classes/Purchases.md | 40 ++++++++++++++++++++++ docs/theme/.icons/polytoria/Purchases.svg | 6 ++++ 3 files changed, 46 insertions(+) create mode 100644 docs/assets/tree/Purchases.png create mode 100644 docs/objects/static-classes/Purchases.md create mode 100644 docs/theme/.icons/polytoria/Purchases.svg diff --git a/docs/assets/tree/Purchases.png b/docs/assets/tree/Purchases.png new file mode 100644 index 0000000000000000000000000000000000000000..962a4d4b4e8c2da4773548fc5b31c929b0b36c53 GIT binary patch literal 3301 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 literal 0 HcmV?d00001 diff --git a/docs/objects/static-classes/Purchases.md b/docs/objects/static-classes/Purchases.md new file mode 100644 index 0000000..4c8294b --- /dev/null +++ b/docs/objects/static-classes/Purchases.md @@ -0,0 +1,40 @@ +--- +title: Purchases +description: Purchases is a static class, that is used to prompt purchases to a player. +icon: polytoria/Purchases +--- + +# Purchases + +{{ staticclass("Purchases") }} + +{{ serverexclusive() }} + +:polytoria-Purchases: Purchases is a static class, that is used to prompt purchases to a player. + +
+!!! note "Purchases is not fully documented yet, and may receive changes." +
+ +## Methods + +### Prompt(player;Player,itemID;int,callback;function):callback { method } + +Prompts the specified player the specified item. + +**Example** + +```lua +game["Players"].PlayerAdded:Connect(function(plr) + wait(2) + Purchases:Prompt(plr, 86803, function(success, error) + if success then + print("Thank you for your purchase!") + else + print("Something went wrong with your purchase: " .. error) + end + end) +end) +``` + +The callback function has the parameter "success", indicating if the prompt was purchased, declined, or an error occurred. The callback function's "error" parameter contains the error message if the prompt failed. \ No newline at end of file diff --git a/docs/theme/.icons/polytoria/Purchases.svg b/docs/theme/.icons/polytoria/Purchases.svg new file mode 100644 index 0000000..edb9280 --- /dev/null +++ b/docs/theme/.icons/polytoria/Purchases.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file