From cf81f21afc6a521c9d0dc323c3bc2859fa81d516 Mon Sep 17 00:00:00 2001 From: ARKANYOTA Date: Fri, 30 Aug 2024 23:29:13 +0200 Subject: [PATCH] remove print, correct spell mistake --- src/scenes/ui/redirect_page_to_our_games.tscn | 32 ++++++++++--------- .../autoload/scene_transition_auto_load.gd | 7 ---- src/scripts/ui/game_gui.gd | 4 +-- 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/src/scenes/ui/redirect_page_to_our_games.tscn b/src/scenes/ui/redirect_page_to_our_games.tscn index 5e6914d2..c8f7ee30 100644 --- a/src/scenes/ui/redirect_page_to_our_games.tscn +++ b/src/scenes/ui/redirect_page_to_our_games.tscn @@ -12,27 +12,29 @@ offset_bottom = 40.0 [node name="Label" type="Label" parent="Control"] layout_mode = 0 -offset_left = 17.0 -offset_top = 26.0 -offset_right = 229.0 -offset_bottom = 63.0 -text = "Hey Bro you are on a unknown url. -If you think this is an error, report to us. -Else: Please go on our url:" +offset_left = 19.0 +offset_top = 23.0 +offset_right = 220.0 +offset_bottom = 80.0 +text = "Hey man, you are on an unknown URL. +And end the demo for an unknown URL. +If you think this is a mistake, +please report it to us. +Otherwise: Please go to our URL:" label_settings = ExtResource("1_voncg") [node name="Yolwoocle" type="LinkButton" parent="Control"] -offset_left = 72.0 -offset_top = 66.0 -offset_right = 150.0 -offset_bottom = 89.0 +offset_left = 77.0 +offset_top = 80.0 +offset_right = 155.0 +offset_bottom = 103.0 text = "Yolwoocle" uri = "https://yolwoocle.itch.io/globs" [node name="Arkanyota" type="LinkButton" parent="Control"] -offset_left = 71.0 -offset_top = 84.0 -offset_right = 152.0 -offset_bottom = 107.0 +offset_left = 77.0 +offset_top = 99.0 +offset_right = 158.0 +offset_bottom = 122.0 text = "ArkanYota" uri = "https://arkanyota.github.io/gmtk2024" diff --git a/src/scripts/autoload/scene_transition_auto_load.gd b/src/scripts/autoload/scene_transition_auto_load.gd index 8403a0e0..499af87c 100644 --- a/src/scripts/autoload/scene_transition_auto_load.gd +++ b/src/scripts/autoload/scene_transition_auto_load.gd @@ -7,7 +7,6 @@ static var is_autorized_url_loaded = false func get_urls(): var http_request = HTTPRequest.new() add_child(http_request) - # print(http_request.request_raw("https://raw.githubusercontent.com/ARKANYOTA/gmtk2024/main/autorized_url.txt")) http_request.request("https://raw.githubusercontent.com/ARKANYOTA/gmtk2024/main/autorized_url.txt") var response = await http_request.request_completed var result = response[0] @@ -22,12 +21,10 @@ func get_urls(): # result, status code, response headers, and body are now in indices 0, 1, 2, and 3 of response func is_url_valid() -> bool: if not OS.has_feature('web'): - print("has not JS") return true var location = JavaScriptBridge.get_interface("location") if not location: return true - print(autorized_url) var hostname = location.hostname return hostname in autorized_url @@ -41,15 +38,12 @@ func _ready() -> void: scene_transition_instance = scene_transition.instantiate() add_child(scene_transition_instance) if not OS.has_feature('web'): - print("has not JS") return if not is_autorized_url_loaded: - print("is now loaded") is_autorized_url_loaded = true var urls = await get_urls() if urls == []: - print("urls cannot be loaded") return autorized_url = urls @@ -90,7 +84,6 @@ func change_scene_with_transition(scene: String, put_confetis = false) -> void: animation_player.play(slides[random_slide_transition], -1, -0.7, true) GameManager.before_scene_change() - print(scene) if is_url_valid() or scene in ["res://scenes/main.tscn", "res://scenes/ui/world_select/world_select.tscn", "res://scenes/levels_zoomed/world_1/level_110.tscn", "res://scenes/levels_zoomed/world_1/level_120.tscn","res://scenes/levels_zoomed/world_1/level_130.tscn", "res://scenes/levels_zoomed/world_1/level_140.tscn"]: get_tree().change_scene_to_file(scene) await get_tree().process_frame diff --git a/src/scripts/ui/game_gui.gd b/src/scripts/ui/game_gui.gd index 3a6f2925..d2822a37 100644 --- a/src/scripts/ui/game_gui.gd +++ b/src/scripts/ui/game_gui.gd @@ -6,9 +6,9 @@ func show_correct_game_gui(): if get_tree().get_current_scene(): var current_scene_name = get_tree().get_current_scene().get_name() # var level_data = LevelData.get_current_level_data() - if current_scene_name == "WorldSelect" or current_scene_name == "YouWinLevel": + if current_scene_name == "WorldSelect" or current_scene_name == "YouWinLevel" or current_scene_name == "RedirectPageToOurGames": PauseMenuAutoload.game_gui.show_level_select() - elif current_scene_name == "Main" or current_scene_name == "RedirectPageToOurGames": + elif current_scene_name == "Main": PauseMenuAutoload.game_gui.hide_gui() else: PauseMenuAutoload.game_gui.show_gui()