Skip to content

Commit

Permalink
Fix old links (godot::engine -> godot::classes)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bromeon committed Nov 7, 2024
1 parent a3ed438 commit 41cc8d1
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
10 changes: 5 additions & 5 deletions src/godot-api/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ match result {
}
```

[api-acceptdialog-add-button-ex]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.AcceptDialog.html#method.add_button_ex
[api-acceptdialog-add-button]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.AcceptDialog.html#method.add_button
[api-classes]: https://godot-rust.github.io/docs/gdext/master/godot/engine/index.html
[api-acceptdialog-add-button-ex]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.AcceptDialog.html#method.add_button_ex
[api-acceptdialog-add-button]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.AcceptDialog.html#method.add_button
[api-classes]: https://godot-rust.github.io/docs/gdext/master/godot/classes/index.html
[godot-acceptdialog-add-button]: https://docs.godotengine.org/en/stable/classes/class_acceptdialog.html#class-acceptdialog-method-add-button
[issue-singleton-no-receiver]: https://github.com/godot-rust/gdext/issues/127
[godot-object-call]: https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-call
[api-object-call]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.Object.html#method.call
[api-object-trycall]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.Object.html#method.try_call
[api-object-call]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.Object.html#method.call
[api-object-trycall]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.Object.html#method.try_call
18 changes: 9 additions & 9 deletions src/intro/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ Rust does not natively support inheritance, but the gdext API emulates it to a c

### Class declaration

In this example, we declare a class called `Player`, which inherits [`Sprite2D`][api-sprite2d] (a node type):
In this example, we declare a class called `Player`, which inherits [`Sprite2D`][api-class-sprite2d] (a node type):

```rust
use godot::prelude::*;
Expand All @@ -279,7 +279,7 @@ struct Player {

Let's break this down.

1. The gdext prelude contains the most common symbols. Less frequent classes are located in the [`engine`][api-engine] module.
1. The gdext prelude contains the most common symbols. Less frequent classes are located in the [`engine`][api-class-engine] module.

2. The `#[derive]` attribute registers `Player` as a class in the Godot engine.
See [API docs][api-derive-godotclass] for details about `#[derive(GodotClass)]`.
Expand Down Expand Up @@ -375,7 +375,7 @@ the base class methods.
```

This is a point where you can see the result. Compile your code and launch the Godot editor.
Right click on your `Sprite2D` in the scene tree, and choose "Change Type..."
Right-click on your `Sprite2D` in the scene tree, and choose "Change Type..."
Find and choose the `Player` node type, which will be a child of `Sprite2D` in the Change Type dialog that appears.

Now, save your changes, and run the scene. The sprite should rotate at a constant speed.
Expand Down Expand Up @@ -462,23 +462,23 @@ API attributes typically follow the GDScript keyword names: `class`, `func`, `si
That's it for the _Hello World_ tutorial! The following chapters will go into more detail about the various features that gdext provides.


[api-class-engine]: https://godot-rust.github.io/docs/gdext/master/godot/classes/index.html
[api-class-sprite2d]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.Sprite2D.html
[api-derive-godotclass]: https://godot-rust.github.io/docs/gdext/master/godot/register/derive.GodotClass.html
[api-engine]: https://godot-rust.github.io/docs/gdext/master/godot/engine/index.html
[api-extensionlibrary]: https://godot-rust.github.io/docs/gdext/master/godot/prelude/trait.ExtensionLibrary.html
[api-godot]: https://godot-rust.github.io/docs/gdext/master/godot/index.html
[api-prelude]: https://godot-rust.github.io/docs/gdext/master/godot/prelude/index.html
[api-sprite2d]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.Sprite2D.html
[compatibility]: ../toolchain/compatibility.md
[directory-setup]: https://godot-rust.github.io/book/intro/hello-world.html#directory-setup
[gd-ignore]: https://docs.godotengine.org/en/stable/tutorials/best_practices/project_organization.html#ignoring-specific-folders
[gdextension-reloadable]: https://github.com/godotengine/godot/pull/80284
[godot-build-targets]: https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/gdextension_cpp_example.html#using-the-gdextension-module
[godot-command-line]: https://docs.godotengine.org/en/stable/tutorials/editor/command_line_tutorial.html
[godot-resource-paths]: https://docs.godotengine.org/en/stable/tutorials/scripting/resources.html#external-vs-built-in
[img-sprite-moving]: https://docs.godotengine.org/en/stable/_images/scripting_first_script_rotating_godot.gif
[img-sprite-rotating]: https://docs.godotengine.org/en/stable/_images/scripting_first_script_godot_turning_in_place.gif
[issue-no-reload]: https://github.com/godotengine/godot/issues/66231
[tutorial-begin]: https://docs.godotengine.org/en/stable/getting_started/step_by_step/scripting_first_script.html
[tutorial-full-script]: https://docs.godotengine.org/en/stable/getting_started/step_by_step/scripting_first_script.html#complete-script
[gd-ignore]: https://docs.godotengine.org/en/stable/tutorials/best_practices/project_organization.html#ignoring-specific-folders
[directory-setup]: https://godot-rust.github.io/book/intro/hello-world.html#directory-setup
[versioning]: https://godot-rust.github.io/book/toolchain/godot-version.html
[wikipedia-ffi]: https://en.wikipedia.org/wiki/Foreign_function_interface
[gdextension-reloadable]: https://github.com/godotengine/godot/pull/80284
[godot-command-line]: https://docs.godotengine.org/en/stable/tutorials/editor/command_line_tutorial.html
10 changes: 5 additions & 5 deletions src/recipes/engine-singleton.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ users as well.
Read more about criticisms [here][singleton-crit].
```

An engine singleton is registered through [`godot::classes::Engine`][api-engine].
An engine singleton is registered through [`godot::classes::Engine`][api-class-engine].

Custom engine singletons in Godot:

Expand All @@ -28,10 +28,10 @@ Custom engine singletons in Godot:

Godot provides _many_ built-in singletons in its API. You can find a full list [here][godot-singleton-list].

[singleton]: https://en.wikipedia.org/wiki/Singleton_pattern
[singleton-crit]: https://en.wikipedia.org/wiki/Singleton_pattern#Criticism
[api-engine]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.Engine.html
[api-class-engine]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.Engine.html
[godot-singleton-list]: https://docs.godotengine.org/en/stable/classes/[email protected]#properties
[singleton-crit]: https://en.wikipedia.org/wiki/Singleton_pattern#Criticism
[singleton]: https://en.wikipedia.org/wiki/Singleton_pattern


## Table of contents
Expand Down Expand Up @@ -134,7 +134,7 @@ godot::classes::Engine::singleton()

For more information on this method, refer to [the API docs][method-get-singleton].

[method-get-singleton]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.Engine.html#method.get_singleton
[method-get-singleton]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.Engine.html#method.get_singleton


## Singletons and the `SceneTree`
Expand Down
2 changes: 1 addition & 1 deletion src/register/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,5 +178,5 @@ These are just a few use cases, you are very flexible in how you design your int
In the next page, we will look into a special kind of functions: constructors.

[api-godot-api]: https://godot-rust.github.io/docs/gdext/master/godot/register/attr.godot_api.html
[api-inode3d]: https://godot-rust.github.io/docs/gdext/master/godot/engine/trait.INode3D.html
[api-inode3d]: https://godot-rust.github.io/docs/gdext/master/godot/classes/trait.INode3D.html
[godot-gdscript-functions]: https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html#functions
2 changes: 1 addition & 1 deletion src/register/signals.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ As an alternative, you can use Godot's dynamic API to register signals. The [`Ob
See also [GDScript reference for signals][godot-gdscript-signals].


[api-object]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.Object.html
[api-object]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.Object.html
[api-signal]: https://godot-rust.github.io/docs/gdext/master/godot/register/derive.GodotClass.html#signals
[godot-gdscript-signals]: https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html#signals
10 changes: 5 additions & 5 deletions src/register/virtual-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,16 +227,16 @@ you run Godot with the Mono runtime.
The library also provides a dedicated trait [`ScriptInstance`][api-scriptinstance], which allows users to provide Rust-based "scripts".
Consult its docs for detailed information.

You can also configure scripts entirely programmatically, using the [`engine::Script`][api-engine-script] API and its inherited classes, such
as [`engine::GDScript`][api-engine-gdscript]. This typically defeats the purpose of scripting, but is mentioned here for completeness.
You can also configure scripts entirely programmatically, using the [`engine::Script`][api-class-script] API and its inherited classes, such
as [`engine::GDScript`][api-class-gdscript]. This typically defeats the purpose of scripting, but is mentioned here for completeness.


## Conclusion

In this chapter, we have seen how to define virtual functions in Rust, and how to override them in GDScript. This provides an additional
integration layer between the two languages and allows to effortlessly experiment with swappable behaviors from the editor.

[api-engine-gdscript]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.GDScript.html
[api-engine-script]: https://godot-rust.github.io/docs/gdext/master/godot/engine/struct.Script.html
[api-scriptinstance]: https://godot-rust.github.io/docs/gdext/master/godot/engine/trait.ScriptInstance.html
[api-class-gdscript]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.GDScript.html
[api-class-script]: https://godot-rust.github.io/docs/gdext/master/godot/classes/struct.Script.html
[api-scriptinstance]: https://godot-rust.github.io/docs/gdext/master/godot/classes/trait.ScriptInstance.html
[godot-csharp]: https://docs.godotengine.org/en/stable/tutorials/scripting/c_sharp/index.html

0 comments on commit 41cc8d1

Please sign in to comment.