You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Add ability to bind typed arrays to script API
Note: Only replaced 2 instances to test, Node.get_children and TileMap.get_used_cells Note: Will do a mass replace on later PRs of whathever I can find, but probably need a tool to grep through doc. Warning: Mono will break, needs to be fixed (and so do TypeScript and NativeScript, need to ask respective maintainers)
This commit is contained in:
@@ -895,6 +895,24 @@ Ref<GDScript> GDScript::get_base() const {
|
||||
return base;
|
||||
}
|
||||
|
||||
bool GDScript::inherits_script(const Ref<Script> &p_script) const {
|
||||
Ref<GDScript> gd = p_script;
|
||||
if (gd.is_null()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const GDScript *s = this;
|
||||
|
||||
while (s) {
|
||||
if (s == p_script.ptr()) {
|
||||
return true;
|
||||
}
|
||||
s = s->_base;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GDScript::has_script_signal(const StringName &p_signal) const {
|
||||
if (_signals.has(p_signal))
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user