Skip to content

Commit 9345010

Browse files
committed
Move all ScriptInstance related functionality to godot::obj::script
1 parent a5cf411 commit 9345010

File tree

8 files changed

+1088
-1073
lines changed

8 files changed

+1088
-1073
lines changed

godot-codegen/src/special_cases/special_cases.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ pub fn get_class_extra_docs(class_name: &TyName) -> Option<&'static str> {
315315
Some("The gdext library provides a higher-level abstraction, which should be preferred: [`GFile`][crate::tools::GFile].")
316316
}
317317
"ScriptExtension" => {
318-
Some("Use this in combination with [`ScriptInstance`][crate::tools::ScriptInstance].")
318+
Some("Use this in combination with the [`obj::script` module][crate::obj::script].")
319319
}
320320

321321
_ => None,
@@ -325,7 +325,7 @@ pub fn get_class_extra_docs(class_name: &TyName) -> Option<&'static str> {
325325
pub fn get_interface_extra_docs(trait_name: &str) -> Option<&'static str> {
326326
match trait_name {
327327
"IScriptExtension" => {
328-
Some("Use this in combination with [`ScriptInstance`][crate::tools::ScriptInstance].")
328+
Some("Use this in combination with the [`obj::script` module][crate::obj::script].")
329329
}
330330

331331
_ => None,

godot-core/src/engine/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ pub mod translate {
3131
pub use crate::tools::{tr, tr_n};
3232
}
3333

34-
#[deprecated = "`create_script_instance` has been moved to `godot::tools`."]
35-
pub use crate::tools::create_script_instance;
34+
#[deprecated = "`create_script_instance` has been moved to `godot::obj::script`."]
35+
pub use crate::obj::script::create_script_instance;
3636

37-
#[deprecated = "`ScriptInstance` has been moved to `godot::tools`."]
38-
pub use crate::tools::ScriptInstance;
37+
#[deprecated = "`ScriptInstance` has been moved to `godot::obj::script`."]
38+
pub use crate::obj::script::ScriptInstance;
3939

40-
#[deprecated = "`SiMut` has been moved to `godot::tools`."]
41-
pub use crate::tools::SiMut;
40+
#[deprecated = "`SiMut` has been moved to `godot::obj::script`."]
41+
pub use crate::obj::script::SiMut;
4242

4343
#[deprecated = "`GFile` has been moved to `godot::tools`."]
4444
pub use crate::tools::GFile;

godot-core/src/obj/guards.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ use godot_ffi::out;
1111
use std::fmt::Debug;
1212
use std::ops::{Deref, DerefMut};
1313

14+
use crate::obj::script::ScriptInstance;
1415
use crate::obj::{Gd, GodotClass};
15-
use crate::tools::ScriptInstance;
1616

1717
/// Immutably/shared bound reference guard for a [`Gd`][crate::obj::Gd] smart pointer.
1818
///
@@ -173,13 +173,13 @@ make_base_ref!(
173173
ScriptBaseRef,
174174
ScriptInstance,
175175
SiMut,
176-
crate::extras::SiMut,
176+
crate::obj::script::SiMut,
177177
"[`ScriptInstance`]"
178178
);
179179
make_base_mut!(
180180
ScriptBaseMut,
181181
ScriptInstance,
182182
SiMut,
183-
crate::extras::SiMut,
183+
crate::obj::script::SiMut,
184184
"['ScriptInstance']"
185185
);

godot-core/src/obj/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ pub(crate) mod rtti;
2323

2424
pub use base::*;
2525
pub use gd::*;
26-
pub use guards::*;
26+
pub use guards::{BaseMut, BaseRef, GdMut, GdRef};
2727
pub use instance_id::*;
2828
pub use onready::*;
2929
pub use raw::*;
3030
pub use traits::*;
3131

3232
pub mod bounds;
33+
pub mod script;
3334
pub use bounds::private::Bounds;
3435

3536
// Do not re-export rtti here.

0 commit comments

Comments
 (0)