Enable assigning an owner to navigation regions and links

This allows users of the server APIs to get back the nodes that created certain regions and links.
This commit is contained in:
Josh Jones 2022-09-30 23:49:39 -06:00
parent 39fe0bfdc3
commit 5769b0e8d8
15 changed files with 140 additions and 0 deletions

View file

@ -167,6 +167,13 @@
Returns the navigation layers for this [code]link[/code].
</description>
</method>
<method name="link_get_owner_id" qualifiers="const">
<return type="int" />
<param index="0" name="link" type="RID" />
<description>
Returns the [code]ObjectID[/code] of the object which manages this link.
</description>
</method>
<method name="link_get_start_location" qualifiers="const">
<return type="Vector2" />
<param index="0" name="link" type="RID" />
@ -228,6 +235,14 @@
Set the links's navigation layers. This allows selecting links from a path request (when using [method NavigationServer2D.map_get_path]).
</description>
</method>
<method name="link_set_owner_id" qualifiers="const">
<return type="void" />
<param index="0" name="link" type="RID" />
<param index="1" name="owner_id" type="int" />
<description>
Set the [code]ObjectID[/code] of the object which manages this link.
</description>
</method>
<method name="link_set_start_location" qualifiers="const">
<return type="void" />
<param index="0" name="link" type="RID" />
@ -426,6 +441,13 @@
Returns the region's navigation layers.
</description>
</method>
<method name="region_get_owner_id" qualifiers="const">
<return type="int" />
<param index="0" name="region" type="RID" />
<description>
Returns the [code]ObjectID[/code] of the object which manages this region.
</description>
</method>
<method name="region_get_travel_cost" qualifiers="const">
<return type="float" />
<param index="0" name="region" type="RID" />
@ -475,6 +497,14 @@
Sets the navigation mesh for the region.
</description>
</method>
<method name="region_set_owner_id" qualifiers="const">
<return type="void" />
<param index="0" name="region" type="RID" />
<param index="1" name="owner_id" type="int" />
<description>
Set the [code]ObjectID[/code] of the object which manages this region.
</description>
</method>
<method name="region_set_transform" qualifiers="const">
<return type="void" />
<param index="0" name="region" type="RID" />