Skip to content

Commit a508c30

Browse files
authored
update gdext to v0.1.3 (#43)
1 parent 783d798 commit a508c30

18 files changed

+92
-115
lines changed

Cargo.lock

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ version = "0.1.0"
1010
edition = "2021"
1111

1212
[workspace.dependencies]
13-
godot = { git = "https://github.com/godot-rust/gdext", rev = "4c8ea83fc3452485f7b33f2411c136a248457334", features = ["experimental-threads"] }
14-
godot-cell = { git = "https://github.com/godot-rust/gdext", rev = "4c8ea83fc3452485f7b33f2411c136a248457334" }
13+
godot = { git = "https://github.com/godot-rust/gdext", tag = "v0.1.3", features = ["experimental-threads"] }
14+
godot-cell = { git = "https://github.com/godot-rust/gdext", tag = "v0.1.3" }
1515
itertools = "0.10.3"
1616
rand = "0.8.5"
1717
darling = { version = "0.20.3" }

derive/src/attribute_ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub struct FieldExportOps {
3535
impl FieldExportOps {
3636
pub fn hint(&self, span: Span) -> Result<(TokenStream, String), TokenStream> {
3737
let godot_types = godot_types();
38-
let property_hints = quote!(#godot_types::engine::global::PropertyHint);
38+
let property_hints = quote!(#godot_types::global::PropertyHint);
3939
let mut result: Option<(&str, TokenStream, String)> = None;
4040

4141
if self.color_no_alpha {

derive/src/impl_attribute.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub fn godot_script_impl(
8181
#godot_types::prelude::FromGodot::try_from_variant(
8282
args.get(#index).ok_or(#godot_types::sys::GDEXTENSION_CALL_ERROR_TOO_FEW_ARGUMENTS)?
8383
).map_err(|err| {
84-
#godot_types::log::godot_error!("failed to convert variant for argument {} of {}: {}", stringify!(#arg_name), #fn_name_str, err);
84+
#godot_types::global::godot_error!("failed to convert variant for argument {} of {}: {}", stringify!(#arg_name), #fn_name_str, err);
8585
#godot_types::sys::GDEXTENSION_CALL_ERROR_INVALID_ARGUMENT
8686
})?,
8787
}
@@ -107,9 +107,9 @@ pub fn godot_script_impl(
107107
};
108108

109109
let method_flag = if is_static {
110-
quote!(#godot_types::engine::global::MethodFlags::STATIC)
110+
quote!(#godot_types::global::MethodFlags::STATIC)
111111
} else {
112-
quote!(#godot_types::engine::global::MethodFlags::NORMAL)
112+
quote!(#godot_types::global::MethodFlags::NORMAL)
113113
};
114114

115115
let description = fnc.attrs.iter()

derive/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ fn rust_to_variant_type(ty: &syn::Type) -> Result<TokenStream, TokenStream> {
172172
ty.span() => {
173173
use #godot_types::sys::GodotFfi;
174174

175-
<#path as #godot_types::builtin::meta::GodotType>::Ffi::variant_type()
175+
<#path as #godot_types::meta::GodotType>::Ffi::variant_type()
176176
}
177177
}),
178178
T::Verbatim(_) => Err(syn::Error::new(
@@ -193,7 +193,7 @@ fn rust_to_variant_type(ty: &syn::Type) -> Result<TokenStream, TokenStream> {
193193
tuple.span() => {
194194
use #godot_types::sys::GodotFfi;
195195

196-
<#tuple as #godot_types::builtin::meta::GodotType>::Ffi::variant_type()
196+
<#tuple as #godot_types::meta::GodotType>::Ffi::variant_type()
197197
}
198198
})
199199
}

derive/src/type_paths.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub fn godot_types() -> TokenStream {
1414
pub fn property_hints() -> TokenStream {
1515
let godot_types = godot_types();
1616

17-
quote!(#godot_types::engine::global::PropertyHint)
17+
quote!(#godot_types::global::PropertyHint)
1818
}
1919

2020
pub fn variant_ty() -> TokenStream {

rust-script/src/library.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
use std::collections::BTreeMap;
88

9+
use godot::global::{MethodFlags, PropertyHint, PropertyUsageFlags};
910
use godot::{
10-
engine::global::{MethodFlags, PropertyHint, PropertyUsageFlags},
1111
obj::{EngineBitfield, EngineEnum},
1212
prelude::{Gd, Object},
1313
sys::VariantType,

rust-script/src/library/signals.rs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,15 @@
66

77
use std::marker::PhantomData;
88

9-
use super::RustScriptPropDesc;
10-
use godot::{
11-
builtin::{
12-
meta::{GodotConvert, GodotType, ToGodot},
13-
Callable, Dictionary, GString, NodePath, StringName, Variant, Vector2, Vector3,
14-
},
15-
engine::{
16-
global::{Error, PropertyHint},
17-
Object,
18-
},
19-
obj::Gd,
9+
use godot::builtin::{
10+
Callable, Dictionary, GString, NodePath, StringName, Variant, Vector2, Vector3,
2011
};
12+
use godot::classes::Object;
13+
use godot::global::{Error, PropertyHint};
14+
use godot::meta::{GodotConvert, GodotType, ToGodot};
15+
use godot::obj::Gd;
16+
17+
use super::RustScriptPropDesc;
2118

2219
pub trait ScriptSignal {
2320
type Args: SignalArguments;

rust-script/src/runtime/downgrade_self.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
55
*/
66

7-
use godot::{
8-
builtin::meta::ToGodot,
9-
obj::{Gd, GodotClass, Inherits, WithBaseField},
10-
};
7+
use godot::meta::ToGodot;
8+
use godot::obj::{Gd, GodotClass, Inherits, WithBaseField};
119

1210
pub trait DowngradeSelf: GodotClass {
1311
fn downgrade_gd<F: FnOnce(Gd<Self>) -> R, R>(&mut self, closure: F) -> R;

rust-script/src/runtime/metadata.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@
66

77
use std::ops::Deref;
88

9-
use godot::{
10-
builtin::meta::{MethodInfo, PropertyInfo},
11-
obj::{EngineBitfield, EngineEnum},
12-
prelude::{Array, Dictionary},
13-
sys::VariantType,
14-
};
9+
use godot::meta::{MethodInfo, PropertyInfo};
10+
use godot::obj::{EngineBitfield, EngineEnum};
11+
use godot::prelude::{Array, Dictionary};
12+
use godot::sys::VariantType;
1513

1614
use crate::apply::Apply;
1715

0 commit comments

Comments
 (0)