diff options
Diffstat (limited to 'core')
| -rw-r--r-- | core/bind/core_bind.cpp | 6 | ||||
| -rw-r--r-- | core/bind/core_bind.h | 2 | ||||
| -rw-r--r-- | core/callable.cpp | 6 | ||||
| -rw-r--r-- | core/callable.h | 1 | ||||
| -rw-r--r-- | core/type_info.h | 2 |
5 files changed, 12 insertions, 5 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index e7a1f8b2ee..62d83b2e04 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -2344,10 +2344,10 @@ Error _Directory::change_dir(String p_dir) { ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory must be opened before use."); return d->change_dir(p_dir); } -String _Directory::get_current_dir(bool p_include_drive) { +String _Directory::get_current_dir() { ERR_FAIL_COND_V_MSG(!d, "", "Directory must be opened before use."); - return d->get_current_dir(p_include_drive); + return d->get_current_dir(); } Error _Directory::make_dir(String p_dir) { @@ -2444,7 +2444,7 @@ void _Directory::_bind_methods() { ClassDB::bind_method(D_METHOD("get_drive", "idx"), &_Directory::get_drive); ClassDB::bind_method(D_METHOD("get_current_drive"), &_Directory::get_current_drive); ClassDB::bind_method(D_METHOD("change_dir", "todir"), &_Directory::change_dir); - ClassDB::bind_method(D_METHOD("get_current_dir", "include_drive"), &_Directory::get_current_dir, DEFVAL(true)); + ClassDB::bind_method(D_METHOD("get_current_dir"), &_Directory::get_current_dir); ClassDB::bind_method(D_METHOD("make_dir", "path"), &_Directory::make_dir); ClassDB::bind_method(D_METHOD("make_dir_recursive", "path"), &_Directory::make_dir_recursive); ClassDB::bind_method(D_METHOD("file_exists", "path"), &_Directory::file_exists); diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index fc6419b7d8..3a5bd28ce8 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -572,7 +572,7 @@ public: int get_current_drive(); Error change_dir(String p_dir); // Can be relative or absolute, return false on success. - String get_current_dir(bool p_include_drive = true); // Return current dir location. + String get_current_dir(); // Return current dir location. Error make_dir(String p_dir); Error make_dir_recursive(String p_dir); diff --git a/core/callable.cpp b/core/callable.cpp index 4a5ae3a248..2bb9ab167b 100644 --- a/core/callable.cpp +++ b/core/callable.cpp @@ -78,6 +78,12 @@ StringName Callable::get_method() const { return method; } +CallableCustom *Callable::get_custom() const { + ERR_FAIL_COND_V_MSG(!is_custom(), NULL, + vformat("Can't get custom on non-CallableCustom \"%s\".", operator String())); + return custom; +} + uint32_t Callable::hash() const { if (is_custom()) { return custom->hash(); diff --git a/core/callable.h b/core/callable.h index cecf2264a3..7fa024dccd 100644 --- a/core/callable.h +++ b/core/callable.h @@ -84,6 +84,7 @@ public: Object *get_object() const; ObjectID get_object_id() const; StringName get_method() const; + CallableCustom *get_custom() const; uint32_t hash() const; diff --git a/core/type_info.h b/core/type_info.h index 618419a323..3b08ff3cae 100644 --- a/core/type_info.h +++ b/core/type_info.h @@ -174,7 +174,7 @@ MAKE_TYPE_INFO(IP_Address, Variant::STRING) template <> struct GetTypeInfo<ObjectID> { static const Variant::Type VARIANT_TYPE = Variant::INT; - static const GodotTypeInfo::Metadata METADATA = GodotTypeInfo::METADATA_NONE; + static const GodotTypeInfo::Metadata METADATA = GodotTypeInfo::METADATA_INT_IS_UINT64; static inline PropertyInfo get_class_info() { return PropertyInfo(Variant::INT, String(), PROPERTY_HINT_INT_IS_OBJECTID); } |