Skip to content

Commit

Permalink
Fix env designation pt 2 (#186)
Browse files Browse the repository at this point in the history
* Fix env designation pt 2

* fix method
  • Loading branch information
Kluskey authored May 23, 2024
1 parent 387be12 commit e30e030
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 5 additions & 1 deletion mirror-godot-app/scripts/autoload/analytics/analytics_v2.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions mirror-godot-app/scripts/autoload/util_funcs.gd
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ static func current_platform_is_windows() -> bool:
return get_current_platform_name() == WIN_NAME


static func get_release_name() -> 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)
Expand Down
6 changes: 2 additions & 4 deletions mirror-godot-app/ui/global_version_label/version_label.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ 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")
]
])
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"

0 comments on commit e30e030

Please sign in to comment.