From f7f24b6090ffaebc3ffeb5b284fbb00bdbbff2de Mon Sep 17 00:00:00 2001 From: addmix <38119387+addmix@users.noreply.github.com> Date: Sun, 28 Jul 2024 02:52:05 -0600 Subject: [PATCH] Rename AeroPropeller3D `propeller` to `propeller_blade`. --- .../aero_rotator_3d/aero_propeller_3d.gd | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core/aero_influencer_3d/aero_rotator_3d/aero_propeller_3d.gd b/core/aero_influencer_3d/aero_rotator_3d/aero_propeller_3d.gd index 6014b5d..061dbd9 100644 --- a/core/aero_influencer_3d/aero_rotator_3d/aero_propeller_3d.gd +++ b/core/aero_influencer_3d/aero_rotator_3d/aero_propeller_3d.gd @@ -12,13 +12,13 @@ class_name AeroPropeller3D propeller_amount = x update_propeller_amount() ##Propeller blade that will be duplicated and arranged. See `do_propeller_setup` -@export var propeller : AeroInfluencer3D: +@export var propeller_blade : AeroInfluencer3D: set(x): update_configuration_warnings() - if propeller == x: + if propeller_blade == x: return - propeller = x + propeller_blade = x if Engine.is_editor_hint(): return @@ -31,7 +31,7 @@ class_name AeroPropeller3D instance.queue_free() #reinitialize instances array - propeller_instances = [propeller] + propeller_instances = [propeller_blade] update_propeller_amount() var propeller_instances : Array[AeroInfluencer3D] = [] @@ -44,7 +44,7 @@ func _ready(): func _get_configuration_warnings() -> PackedStringArray: var arr : PackedStringArray = super._get_configuration_warnings() - if not propeller: + if not propeller_blade: arr.append("Propeller has not been assigned, or is not a valid instance. Make sure you have assigned an AeroInfluencer3D as a propeller.") return arr @@ -57,7 +57,7 @@ func update_propeller_amount() -> void: return if Engine.is_editor_hint() or not is_node_ready(): return - if not propeller: + if not propeller_blade: push_warning("No propeller defined. Aborting...") var change_in_amount : int = propeller_amount - propeller_instances.size() @@ -69,7 +69,7 @@ func update_propeller_amount() -> void: #instance new propellers elif change_in_amount > 0: for i : int in change_in_amount: - var new_prop : AeroInfluencer3D = propeller.duplicate() + var new_prop : AeroInfluencer3D = propeller_blade.duplicate() add_child(new_prop) propeller_instances.append(new_prop) @@ -81,7 +81,7 @@ func update_propeller_amount() -> void: update_propeller_transforms() func update_propeller_transforms() -> void: - var base_transform : Transform3D = propeller.default_transform + var base_transform : Transform3D = propeller_blade.default_transform for i in propeller_amount - 1: var prop_index = i + 1 #we already have 1 surface, so we add 1