Skip to content

Commit 6248235

Browse files
committed
content: Add a documentation entry for the align function in L23.P2
close #1087
1 parent 7036b4c commit 6248235

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

course/documentation.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ int,int,,"Returns the argument converted into an [code]int[/code] (whole number)
2424
place_unit,,"cell: Vector2, unit_type: String","Creates a new unit matching the type parameter and places it at the desired cell position on the game grid.",method,
2525
display_item,,"item: String, amount: int","Creates a new item and displays it in the inventory.",method,
2626
add_item,,"item: String, amount: int","Increases the item count by amount.",method,
27+
align,,"track","Realigns the train track with the path. Select a train track in the tracks array by index to pass it as an argument.",method,

course/lesson-24-access-array-indices/lesson.tres

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ cursor_column = 0
260260
hints = PoolStringArray( "The syntax to access an item by index in an array uses square brackets with a number in between right after the array name. For example, write [code]tracks[-1][/code] to access the [i]last[/i] element in the array.", "To align the second chunk, call [code]align(tracks[-3])[/code]. You need to call the same function another two times with the other chunks." )
261261
validator_script_path = "res://course/lesson-24-access-array-indices/align-tracks/TestAlignTracks.gd"
262262
script_slice_path = "res://course/lesson-24-access-array-indices/align-tracks/AlignTracks.live-editor/slices/AlignTracks.fix.slice.tres"
263-
documentation_references = PoolStringArray( )
263+
documentation_references = PoolStringArray( "align" )
264264
documentation_resource = ExtResource( 1 )
265265
description = "Some chunks of our train tracks are misaligned, and the train can't pass. Find the faulty pieces and realign them."
266266

0 commit comments

Comments
 (0)