From f1831a4f20ec910bf0c4dd4aea26d37c6a236790 Mon Sep 17 00:00:00 2001 From: Kluskey Date: Wed, 22 May 2024 09:52:08 -0700 Subject: [PATCH 1/2] Fix env designation pt 2 --- mirror-godot-app/scripts/autoload/analytics/analytics_v2.gd | 6 +++++- mirror-godot-app/scripts/autoload/util_funcs.gd | 4 ++++ mirror-godot-app/ui/global_version_label/version_label.gd | 6 ++---- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/mirror-godot-app/scripts/autoload/analytics/analytics_v2.gd b/mirror-godot-app/scripts/autoload/analytics/analytics_v2.gd index 972c2b85..8450fef8 100644 --- a/mirror-godot-app/scripts/autoload/analytics/analytics_v2.gd +++ b/mirror-godot-app/scripts/autoload/analytics/analytics_v2.gd @@ -36,10 +36,14 @@ func track_event(event_type: String, properties:={}) -> void: ## Send a single event to the Mixpanel Analytics service func _send_track_event(event: AnalyticsEvent, properties := {}) -> void: + var version := Util.get_version_string() + var release := Util.get_release_name() var standard_properties = { "token": api_token, "distinct_id": event.user_id, - "env": "open-source-v2" + "env": "open-source-v2", + "version": version, + "release": release } if not properties.is_empty(): standard_properties.merge(properties) diff --git a/mirror-godot-app/scripts/autoload/util_funcs.gd b/mirror-godot-app/scripts/autoload/util_funcs.gd index cea173fb..96a5d4e3 100644 --- a/mirror-godot-app/scripts/autoload/util_funcs.gd +++ b/mirror-godot-app/scripts/autoload/util_funcs.gd @@ -105,6 +105,10 @@ static func current_platform_is_windows() -> bool: return get_current_platform_name() == WIN_NAME +static func get_release_name(version) -> String: + return "Horizon" + + static func get_simple_platform_name(os_name:String) -> String: var lower_os_name = os_name.to_lower() return PLATFORMS.get(lower_os_name, lower_os_name) diff --git a/mirror-godot-app/ui/global_version_label/version_label.gd b/mirror-godot-app/ui/global_version_label/version_label.gd index a2f58c34..34a65109 100644 --- a/mirror-godot-app/ui/global_version_label/version_label.gd +++ b/mirror-godot-app/ui/global_version_label/version_label.gd @@ -10,9 +10,10 @@ func _ready(): ## Sets the version label to the parsed version string. func _set_version_label() -> void: var version := Util.get_version_string() + var release := Util.get_release_name() text = ' '.join([ text, - _release_name(version), + release, "v%s-%s" % [ version, ProjectSettings.get_setting("mirror/env_name") @@ -20,6 +21,3 @@ func _set_version_label() -> void: ]) if ProjectSettings.get_setting("feature_flags/large_text_size", false): add_theme_font_size_override(&"font_size", 22) - -func _release_name(version) -> String: - return "Gravity" From 81956f612c3e56455fb2e5593980433784bc11eb Mon Sep 17 00:00:00 2001 From: Jared McCluskey Date: Wed, 22 May 2024 16:15:27 -0700 Subject: [PATCH 2/2] fix method --- mirror-godot-app/scripts/autoload/util_funcs.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirror-godot-app/scripts/autoload/util_funcs.gd b/mirror-godot-app/scripts/autoload/util_funcs.gd index 96a5d4e3..83e2bc75 100644 --- a/mirror-godot-app/scripts/autoload/util_funcs.gd +++ b/mirror-godot-app/scripts/autoload/util_funcs.gd @@ -105,7 +105,7 @@ static func current_platform_is_windows() -> bool: return get_current_platform_name() == WIN_NAME -static func get_release_name(version) -> String: +static func get_release_name() -> String: return "Horizon"