2.0.0-beta52

This commit is contained in:
maji
2026-01-29 15:27:19 +07:00
parent ca19c86476
commit 29f7d06b2f
28 changed files with 280 additions and 47 deletions

View File

@@ -8,6 +8,28 @@ const iconDataPath = path.join(__dirname, "../", "docs/theme/.icons", "polytoria
const yamlEnumPath = path.join(__dirname, "../", "yaml", "enums")
const mdEnumPath = path.join(__dirname, "../", "docs/api", "enums")
// Cleanup md (excluding index.md files)
if (fs.existsSync(mdAPIPath)) {
const files = fs.readdirSync(mdAPIPath)
for (const file of files) {
if (file !== 'index.md') {
const filePath = path.join(mdAPIPath, file)
fs.rmSync(filePath, { recursive: true, force: true })
}
}
}
if (fs.existsSync(mdEnumPath)) {
const files = fs.readdirSync(mdEnumPath)
for (const file of files) {
if (file !== 'index.md') {
const filePath = path.join(mdEnumPath, file)
fs.rmSync(filePath, { recursive: true, force: true })
}
}
}
// Create directories
if (!fs.existsSync(mdAPIPath)) {
fs.mkdirSync(mdAPIPath, { recursive: true })
}

View File

@@ -15,6 +15,40 @@ if (!fs.existsSync(yamlEnumPath)) {
const data = JSON.parse(fs.readFileSync("def.json", "utf-8"))
// Track current classes and enums
const currentClasses = new Set(data.Classes.map(c => c.Name))
const currentEnums = new Set(data.Enums.map(e => e.Name))
// Clean up removed classes
if (fs.existsSync(yamlAPIPath)) {
const existingFiles = fs.readdirSync(yamlAPIPath)
for (const file of existingFiles) {
if (file.endsWith('.yaml')) {
const className = path.basename(file, '.yaml')
if (!currentClasses.has(className)) {
const filePath = path.join(yamlAPIPath, file)
fs.unlinkSync(filePath)
console.log(`Removed obsolete class: ${className}`)
}
}
}
}
// Clean up removed enums
if (fs.existsSync(yamlEnumPath)) {
const existingFiles = fs.readdirSync(yamlEnumPath)
for (const file of existingFiles) {
if (file.endsWith('.yaml')) {
const enumName = path.basename(file, '.yaml')
if (!currentEnums.has(enumName)) {
const filePath = path.join(yamlEnumPath, file)
fs.unlinkSync(filePath)
console.log(`Removed obsolete enum: ${enumName}`)
}
}
}
}
// Process Classes
for (const c of data.Classes) {
let yamlPath = path.join(yamlAPIPath, c.Name + ".yaml")

View File

@@ -0,0 +1,10 @@
Name: GradientImageFill
InternalName: GradientImageFillEnum
Options:
- Name: Linear
Description: ""
- Name: Radial
Description: ""
- Name: Square
Description: ""
Description: ""

View File

@@ -44,7 +44,7 @@ Methods:
Type: number
IsOptional: false
DefaultValue: ""
IsAsync: false
IsAsync: true
IsObsolete: false
IsStatic: false
Description: Check if player of ID has the achievement, asynchronously.

View File

@@ -34,7 +34,10 @@ Methods:
IsObsolete: false
IsStatic: false
Description: Missing Documentation
Events: []
Events:
- Name: CleanupReceived
Arguments: ""
Description: Missing Documentation
IsStatic: false
IsAbstract: false
IsInstantiatable: false

View File

@@ -46,6 +46,28 @@ Methods:
IsObsolete: false
IsStatic: false
Description: Create new mesh from Polytoria with the target ID
- Name: GetFileLinkByPath
ReturnType: FileLinkAsset
Parameters:
- Name: path
Type: string
IsOptional: false
DefaultValue: ""
IsAsync: false
IsObsolete: false
IsStatic: false
Description: Missing Documentation
- Name: GetFileLinkByID
ReturnType: FileLinkAsset
Parameters:
- Name: id
Type: string
IsOptional: false
DefaultValue: ""
IsAsync: false
IsObsolete: false
IsStatic: false
Description: Missing Documentation
Events: []
IsStatic: true
IsAbstract: false

View File

@@ -173,7 +173,7 @@ Methods:
IsOptional: false
DefaultValue: ""
- Name: ignoreList
Type: table
Type: "{ Instance }"
IsOptional: true
DefaultValue: null
- Name: maxDistance
@@ -194,7 +194,7 @@ Methods:
IsOptional: false
DefaultValue: ""
- Name: ignoreList
Type: table
Type: "{ Instance }"
IsOptional: true
DefaultValue: null
- Name: maxDistance

View File

@@ -65,14 +65,14 @@ Methods:
IsStatic: false
Description: Removes the point at the specified index from the color series.
- Name: GetOffsets
ReturnType: table
ReturnType: "{ number }"
Parameters: []
IsAsync: false
IsObsolete: false
IsStatic: false
Description: Missing Documentation
- Name: GetColors
ReturnType: table
ReturnType: "{ Color }"
Parameters: []
IsAsync: false
IsObsolete: false

View File

@@ -24,6 +24,13 @@ Methods:
IsObsolete: false
IsStatic: false
Description: Select all children of the instance
- Name: GetSelected
ReturnType: "{ Instance }"
Parameters: []
IsAsync: false
IsObsolete: false
IsStatic: false
Description: Missing Documentation
- Name: Deselect
ReturnType: nil
Parameters:

View File

@@ -16,7 +16,7 @@ Methods:
Type: string
IsOptional: false
DefaultValue: ""
IsAsync: false
IsAsync: true
IsObsolete: false
IsStatic: false
Description: Retrieves a value from the datastore asynchronously using the
@@ -32,7 +32,7 @@ Methods:
Type: any
IsOptional: false
DefaultValue: ""
IsAsync: false
IsAsync: true
IsObsolete: false
IsStatic: false
Description: Stores a value in the datastore asynchronously using the specified key.
@@ -43,14 +43,18 @@ Methods:
Type: string
IsOptional: false
DefaultValue: ""
IsAsync: false
IsAsync: true
IsObsolete: false
IsStatic: false
Description: Removes a value from the datastore asynchronously using the specified key.
Events:
- Name: Loaded
Arguments: ""
Description: Fires when this datastore has been loaded
- Name: Disconnect
ReturnType: nil
Parameters: []
IsAsync: false
IsObsolete: false
IsStatic: false
Description: Missing Documentation
Events: []
IsStatic: false
IsAbstract: false
IsInstantiatable: false

View File

@@ -48,7 +48,7 @@ Methods:
IsOptional: true
DefaultValue: "10000"
- Name: ignoreList
Type: table
Type: "{ Instance }"
IsOptional: true
DefaultValue: null
IsAsync: false
@@ -57,7 +57,7 @@ Methods:
Description: Casts a ray from origin with a specified direction and returns a
RayResult for the first hit object.
- Name: RaycastAll
ReturnType: table
ReturnType: "{ RayResult }"
Parameters:
- Name: origin
Type: Vector3
@@ -72,7 +72,7 @@ Methods:
IsOptional: true
DefaultValue: "1000"
- Name: ignoreList
Type: table
Type: "{ Instance }"
IsOptional: true
DefaultValue: null
IsAsync: false
@@ -81,7 +81,7 @@ Methods:
Description: Casts a ray from origin with a specified direction and returns a
RayResult array for all hit objects.
- Name: OverlapSphere
ReturnType: table
ReturnType: "{ Instance }"
Parameters:
- Name: origin
Type: Vector3
@@ -92,7 +92,7 @@ Methods:
IsOptional: false
DefaultValue: ""
- Name: ignoreList
Type: table
Type: "{ Instance }"
IsOptional: true
DefaultValue: null
IsAsync: false
@@ -101,7 +101,7 @@ Methods:
Description: Returns a list of instances intersecting with the sphere in the
given position and radius.
- Name: OverlapBox
ReturnType: table
ReturnType: "{ Instance }"
Parameters:
- Name: pos
Type: Vector3
@@ -116,7 +116,7 @@ Methods:
IsOptional: false
DefaultValue: ""
- Name: ignoreList
Type: table
Type: "{ Instance }"
IsOptional: true
DefaultValue: null
IsAsync: false

View File

@@ -0,0 +1,52 @@
Name: GradientImageAsset
BaseType: ImageAsset
Properties:
- Name: Series
Type: ColorSeries
IsAccessibleByScripts: true
IsReadOnly: false
IsObsolete: false
IsStatic: false
Description: Missing Documentation
- Name: Width
Type: number
IsAccessibleByScripts: true
IsReadOnly: false
IsObsolete: false
IsStatic: false
Description: Missing Documentation
- Name: Height
Type: number
IsAccessibleByScripts: true
IsReadOnly: false
IsObsolete: false
IsStatic: false
Description: Missing Documentation
- Name: Fill
Type: GradientImageFillEnum
IsAccessibleByScripts: true
IsReadOnly: false
IsObsolete: false
IsStatic: false
Description: Missing Documentation
- Name: FillFrom
Type: Vector2
IsAccessibleByScripts: true
IsReadOnly: false
IsObsolete: false
IsStatic: false
Description: Missing Documentation
- Name: FillTo
Type: Vector2
IsAccessibleByScripts: true
IsReadOnly: false
IsObsolete: false
IsStatic: false
Description: Missing Documentation
Methods: []
Events: []
IsStatic: false
IsAbstract: false
IsInstantiatable: true
StaticAlias: null
Description: Missing Documentation

View File

@@ -1,10 +1,10 @@
Name: Hidden
BaseType: Instance
BaseType: HiddenBase
Properties: []
Methods: []
Events: []
IsStatic: false
IsStatic: true
IsAbstract: false
IsInstantiatable: false
StaticAlias: null
StaticAlias: Hidden
Description: Hidden is a object used for hiding instances.

View File

@@ -0,0 +1,10 @@
Name: HiddenBase
BaseType: Instance
Properties: []
Methods: []
Events: []
IsStatic: false
IsAbstract: true
IsInstantiatable: false
StaticAlias: null
Description: Missing Documentation

View File

@@ -13,6 +13,17 @@ Methods:
IsObsolete: false
IsStatic: false
Description: Read the file data from path
- Name: ReadTextFromPath
ReturnType: string
Parameters:
- Name: path
Type: string
IsOptional: false
DefaultValue: ""
IsAsync: false
IsObsolete: false
IsStatic: false
Description: Missing Documentation
- Name: WriteBytesToPath
ReturnType: nil
Parameters:
@@ -24,12 +35,27 @@ Methods:
Type: buffer
IsOptional: false
DefaultValue: ""
IsAsync: true
IsAsync: false
IsObsolete: false
IsStatic: false
Description: Write data to file in the project
- Name: WriteTextToPath
ReturnType: nil
Parameters:
- Name: path
Type: string
IsOptional: false
DefaultValue: ""
- Name: txt
Type: string
IsOptional: false
DefaultValue: ""
IsAsync: false
IsObsolete: false
IsStatic: false
Description: Missing Documentation
- Name: ListProjectFiles
ReturnType: table
ReturnType: "{ string }"
Parameters: []
IsAsync: false
IsObsolete: false

View File

@@ -83,7 +83,7 @@ Methods:
ReturnType: Vector3
Parameters:
- Name: ignoreList
Type: table
Type: "{ Instance }"
IsOptional: true
DefaultValue: null
IsAsync: false
@@ -172,13 +172,17 @@ Events:
Description: Fires when gamepad has been disconnected
- Name: KeyDown
Arguments:
Name: keycode
Type: KeyCodeEnum
- Name: keycode
Type: KeyCodeEnum
- Name: gameFocused
Type: boolean
Description: Fires when key has been pressed
- Name: KeyUp
Arguments:
Name: keycode
Type: KeyCodeEnum
- Name: keycode
Type: KeyCodeEnum
- Name: gameFocused
Type: boolean
Description: Fires when key has been released
- Name: AxisValueChanged
Arguments:

View File

@@ -17,15 +17,22 @@ Properties:
Description: Determine if children is editable, this is to be used if this
instance is a Linked model. Only used in creator.
- Name: Tags
Type: table
Type: "{ string }"
IsAccessibleByScripts: true
IsReadOnly: false
IsObsolete: false
IsStatic: false
Description: Tags associated with this instance.
- Name: Archivable
Type: boolean
IsAccessibleByScripts: true
IsReadOnly: false
IsObsolete: false
IsStatic: false
Description: Missing Documentation
Methods:
- Name: GetDescendants
ReturnType: table
ReturnType: "{ Instance }"
Parameters: []
IsAsync: false
IsObsolete: false
@@ -80,7 +87,7 @@ Methods:
IsStatic: false
Description: Missing Documentation
- Name: GetChildrenWithTag
ReturnType: table
ReturnType: "{ Instance }"
Parameters:
- Name: tag
Type: string
@@ -128,14 +135,14 @@ Methods:
IsStatic: false
Description: Move children to specified index
- Name: GetChildren
ReturnType: table
ReturnType: "{ Instance }"
Parameters: []
IsAsync: false
IsObsolete: false
IsStatic: false
Description: Gets all children of this instance.
- Name: GetChildrenOfClass
ReturnType: table
ReturnType: "{ Instance }"
Parameters:
- Name: className
Type: string

View File

@@ -1,5 +1,5 @@
Name: Inventory
BaseType: Hidden
BaseType: HiddenBase
Properties: []
Methods: []
Events: []

View File

@@ -64,6 +64,13 @@ Properties:
IsObsolete: false
IsStatic: false
Description: Indicates whether an animation is currently playing on the mesh.
- Name: Loading
Type: boolean
IsAccessibleByScripts: true
IsReadOnly: true
IsObsolete: false
IsStatic: false
Description: Missing Documentation
Methods:
- Name: PlayAnimation
ReturnType: nil
@@ -96,20 +103,23 @@ Methods:
IsStatic: false
Description: Stops the specified animation on the mesh.
- Name: GetAnimations
ReturnType: table
ReturnType: "{ string }"
Parameters: []
IsAsync: false
IsObsolete: false
IsStatic: false
Description: Gets a list of all animations available on the mesh.
- Name: GetAnimationInfo
ReturnType: table
ReturnType: "{ MeshAnimationInfo }"
Parameters: []
IsAsync: false
IsObsolete: false
IsStatic: false
Description: Missing Documentation
Events: []
Events:
- Name: Loaded
Arguments: ""
Description: Missing Documentation
IsStatic: false
IsAbstract: false
IsInstantiatable: true

View File

@@ -27,7 +27,7 @@ Methods:
- Name: __tostring
ReturnType: string
Parameters:
- Name: signal
- Name: _
Type: PTSignal
IsOptional: false
DefaultValue: ""

View File

@@ -42,7 +42,7 @@ Methods:
IsStatic: false
Description: Sets the network authority of this object to the specified player.
- Name: GetTouching
ReturnType: table
ReturnType: "{ Physical }"
Parameters: []
IsAsync: false
IsObsolete: false

View File

@@ -43,7 +43,7 @@ Methods:
ReturnType: nil
Parameters:
- Name: plrs
Type: table
Type: "{ Player }"
IsOptional: false
DefaultValue: ""
- Name: to
@@ -73,7 +73,7 @@ Methods:
ReturnType: nil
Parameters:
- Name: players
Type: table
Type: "{ Player }"
IsOptional: false
DefaultValue: ""
- Name: accessID

View File

@@ -1,5 +1,5 @@
Name: PlayerDefaults
BaseType: Hidden
BaseType: HiddenBase
Properties:
- Name: MaxHealth
Type: number

View File

@@ -24,7 +24,7 @@ Properties:
Description: The number of players currently in the game.
Methods:
- Name: GetPlayers
ReturnType: table
ReturnType: "{ Player }"
Parameters: []
IsAsync: false
IsObsolete: false

View File

@@ -161,6 +161,17 @@ Methods:
IsObsolete: false
IsStatic: false
Description: Missing Documentation
- Name: SetAnimationOverrideTo
ReturnType: nil
Parameters:
- Name: to
Type: boolean
IsOptional: false
DefaultValue: ""
IsAsync: false
IsObsolete: false
IsStatic: false
Description: Missing Documentation
- Name: SetBoneOverridePosition
ReturnType: nil
Parameters:

View File

@@ -60,6 +60,17 @@ Methods:
IsObsolete: false
IsStatic: false
Description: Calls a function in the script asynchronously with the given arguments.
- Name: LinkWithScriptFile
ReturnType: nil
Parameters:
- Name: scriptPath
Type: string
IsOptional: false
DefaultValue: ""
IsAsync: false
IsObsolete: false
IsStatic: false
Description: Missing Documentation
Events: []
IsStatic: false
IsAbstract: true

View File

@@ -1,5 +1,5 @@
Name: ServerHidden
BaseType: Hidden
BaseType: HiddenBase
Properties: []
Methods: []
Events: []

View File

@@ -1,5 +1,5 @@
Name: Temporary
BaseType: Hidden
BaseType: ServerHidden
Properties: []
Methods: []
Events: []