diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/JSON.xml | 14 | ||||
-rw-r--r-- | doc/classes/ResourceFormatLoader.xml | 7 | ||||
-rw-r--r-- | doc/classes/Shader.xml | 10 | ||||
-rw-r--r-- | doc/classes/TileMap.xml | 14 | ||||
-rw-r--r-- | doc/classes/VisualInstance3D.xml | 2 |
5 files changed, 36 insertions, 11 deletions
diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml index 93731cf553..6fe53dfaac 100644 --- a/doc/classes/JSON.xml +++ b/doc/classes/JSON.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="JSON" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="JSON" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Helper class for creating and parsing JSON data. </brief_description> @@ -49,13 +49,21 @@ Returns an empty string if the last call to [method parse] was successful, or the error message if it failed. </description> </method> + <method name="get_parsed_text" qualifiers="const"> + <return type="String" /> + <description> + Return the text parsed by [method parse] as long as the function is instructed to keep it. + </description> + </method> <method name="parse"> <return type="int" enum="Error" /> - <param index="0" name="json_string" type="String" /> + <param index="0" name="json_text" type="String" /> + <param index="1" name="keep_text" type="bool" default="false" /> <description> - Attempts to parse the [param json_string] provided. + Attempts to parse the [param json_text] provided. Returns an [enum Error]. If the parse was successful, it returns [constant OK] and the result can be retrieved using [member data]. If unsuccessful, use [method get_error_line] and [method get_error_message] for identifying the source of the failure. Non-static variant of [method parse_string], if you want custom error handling. + The optional [param keep_text] argument instructs the parser to keep a copy of the original text. This text can be obtained later by using the [method get_parsed_text] function and is used when saving the resource (instead of generating new text from [member data]). </description> </method> <method name="parse_string" qualifiers="static"> diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml index 2b6376f2cd..bb55123b37 100644 --- a/doc/classes/ResourceFormatLoader.xml +++ b/doc/classes/ResourceFormatLoader.xml @@ -38,6 +38,13 @@ Gets the list of extensions for files this loader is able to read. </description> </method> + <method name="_get_resource_script_class" qualifiers="virtual const"> + <return type="String" /> + <param index="0" name="path" type="String" /> + <description> + Returns the script class name associated with the [Resource] under the given [param path]. If the resource has no script or the script isn't a named class, it should return [code]""[/code]. + </description> + </method> <method name="_get_resource_type" qualifiers="virtual const"> <return type="String" /> <param index="0" name="path" type="String" /> diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml index 75f835260a..c472ab647e 100644 --- a/doc/classes/Shader.xml +++ b/doc/classes/Shader.xml @@ -26,12 +26,12 @@ Returns the shader mode for the shader, either [constant MODE_CANVAS_ITEM], [constant MODE_SPATIAL] or [constant MODE_PARTICLES]. </description> </method> - <method name="has_parameter" qualifiers="const"> - <return type="bool" /> - <param index="0" name="name" type="StringName" /> + <method name="get_shader_uniform_list"> + <return type="Array" /> + <param index="0" name="get_groups" type="bool" default="false" /> <description> - Returns [code]true[/code] if the shader has this param defined as a uniform in its code. - [b]Note:[/b] [param name] must match the name of the uniform in the code exactly. + Get the list of shader uniforms that can be assigned to a [ShaderMaterial], for use with [method ShaderMaterial.set_shader_parameter] and [method ShaderMaterial.get_shader_parameter]. The parameters returned are contained in dictionaries in a similar format to the ones returned by [method Object.get_property_list]. + If argument [param get_groups] is true, parameter grouping hints will be provided. </description> </method> <method name="set_default_texture_parameter"> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index f67b84f96f..2fd42666b4 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -104,7 +104,8 @@ <param index="1" name="coords" type="Vector2i" /> <param index="2" name="use_proxies" type="bool" default="false" /> <description> - Returns the tile source ID of the cell on layer [param layer] at coordinates [param coords]. If [param use_proxies] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy]. + Returns the tile source ID of the cell on layer [param layer] at coordinates [param coords]. Returns [code]-1[/code] if the cell does not exist. + If [param use_proxies] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy]. </description> </method> <method name="get_cell_tile_data" qualifiers="const"> @@ -113,8 +114,17 @@ <param index="1" name="coords" type="Vector2i" /> <param index="2" name="use_proxies" type="bool" default="false" /> <description> - Returns the [TileData] object associated with the given cell, or [code]null[/code] if the cell is not a [TileSetAtlasSource]. + Returns the [TileData] object associated with the given cell, or [code]null[/code] if the cell does not exist or is not a [TileSetAtlasSource]. If [param use_proxies] is [code]false[/code], ignores the [TileSet]'s tile proxies, returning the raw alternative identifier. See [method TileSet.map_tile_proxy]. + [codeblock] + func get_clicked_tile_power(): + var clicked_cell = tile_map.local_to_map(tile_map.get_local_mouse_position()) + var data = tile_map.get_cell_tile_data(0, clicked_cell) + if data: + return data.get_custom_data("power") + else: + return 0 + [/codeblock] </description> </method> <method name="get_coords_for_body_rid"> diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml index e069642e50..3781045c02 100644 --- a/doc/classes/VisualInstance3D.xml +++ b/doc/classes/VisualInstance3D.xml @@ -64,7 +64,7 @@ <member name="sorting_offset" type="float" setter="set_sorting_offset" getter="get_sorting_offset" default="0.0"> The sorting offset used by this [VisualInstance3D]. Adjusting it to a higher value will make the [VisualInstance3D] reliably draw on top of other [VisualInstance3D]s that are otherwise positioned at the same spot. </member> - <member name="sorting_use_aabb_center" type="bool" setter="set_sorting_use_aabb_center" getter="is_sorting_use_aabb_center" default="true"> + <member name="sorting_use_aabb_center" type="bool" setter="set_sorting_use_aabb_center" getter="is_sorting_use_aabb_center"> If [code]true[/code], the object is sorted based on the [AABB] center. The object will be sorted based on the global position otherwise. The [AABB] center based sorting is generally more accurate for 3D models. The position based sorting instead allows to better control the drawing order when working with [GPUParticles3D] and [CPUParticles3D]. </member> |