From 4ea5cbeaf42d84bcdd61836c94eeac43bd06de15 Mon Sep 17 00:00:00 2001 From: Lili Zoey Zyli Date: Sun, 26 Nov 2023 05:33:09 +0100 Subject: [PATCH 1/7] Make access to base field go through trait. --- examples/dodge-the-creeps/rust/src/hud.rs | 20 +++++------ .../dodge-the-creeps/rust/src/main_scene.rs | 30 ++++++++-------- examples/dodge-the-creeps/rust/src/mob.rs | 6 ++-- examples/dodge-the-creeps/rust/src/player.rs | 22 ++++++------ godot-core/src/obj/base.rs | 35 +++++++++---------- godot-core/src/obj/guards.rs | 35 +++++++++++++++++++ godot-core/src/obj/traits.rs | 23 ++++++++++++ godot-core/src/storage.rs | 4 +-- godot-macros/src/class/derive_godot_class.rs | 4 +++ .../builtin_tests/containers/signal_test.rs | 4 +-- itest/rust/src/object_tests/base_test.rs | 12 +++---- itest/rust/src/register_tests/func_test.rs | 2 +- 12 files changed, 129 insertions(+), 68 deletions(-) diff --git a/examples/dodge-the-creeps/rust/src/hud.rs b/examples/dodge-the-creeps/rust/src/hud.rs index 326ed141a..ebcc87324 100644 --- a/examples/dodge-the-creeps/rust/src/hud.rs +++ b/examples/dodge-the-creeps/rust/src/hud.rs @@ -15,53 +15,53 @@ impl Hud { #[func] pub fn show_message(&self, text: GString) { - let mut message_label = self.base.get_node_as::