diff --git a/export_presets.cfg b/export_presets.cfg index 1a950ea..47e7306 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -8,7 +8,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="../executables/cosmic/gammacosmicrays ictar1.1 beta.exe" +export_path="../executables/cosmic/gammacosmicrays ictar1.1 beta 2.exe" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false @@ -18,7 +18,7 @@ encrypt_directory=false custom_template/debug="" custom_template/release="" -debug/export_console_wrapper=1 +debug/export_console_wrapper=0 binary_format/embed_pck=true texture_format/bptc=true texture_format/s3tc=true @@ -42,6 +42,7 @@ application/product_name="Gamma Cosmic Rays" application/file_description="" application/copyright="" application/trademarks="" +application/export_angle=0 ssh_remote_deploy/enabled=false ssh_remote_deploy/host="user@host_ip" ssh_remote_deploy/port="22" diff --git a/scenes/debug.tscn b/scenes/debug.tscn new file mode 100644 index 0000000..a3ffc29 --- /dev/null +++ b/scenes/debug.tscn @@ -0,0 +1,104 @@ +[gd_scene load_steps=2 format=3 uid="uid://ckdttdkoo1t0s"] + +[sub_resource type="GDScript" id="GDScript_6w8qb"] +resource_name = "gogo" +script/source = "extends Node2D + +@onready var items = $Items +@onready var verified = $\"Verified Items\" + +# Called when the node enters the scene tree for the first time. +func _ready(): + var dir = DirAccess.open(\"res://items\") + var files = dir.get_files() + var text = \"Items:\\n\" + for file in files: + text += \"{file}\\n\".format({'file': file}) + text += \"Hulls:\\n\" + dir = DirAccess.open(\"res://scenes/hulls\") + files = dir.get_files() + for file in files: + text += \"{file}\\n\".format({'file': file}) + text += \"Engines:\\n\" + dir = DirAccess.open(\"res://scenes/engines\") + files = dir.get_files() + for file in files: + text += \"{file}\\n\".format({'file': file}) + text += \"Shields:\\n\" + dir = DirAccess.open(\"res://scenes/shields\") + files = dir.get_files() + for file in files: + text += \"{file}\\n\".format({'file': file}) + text += \"Weapons:\\n\" + dir = DirAccess.open(\"res://scenes/weapons/presets\") + files = dir.get_files() + for file in files: + text += \"{file}\\n\".format({'file': file}) + items.text = text + fetch_modules() + + +func fetch_modules(): + var dir = DirAccess.open(\"res://items\") + var files = dir.get_files() + var text = \"Items:\\n\" + for file in files: + text += \"{file}\\n\".format({'file': file}) + text += \"Verified Hulls:\\n\" + dir = DirAccess.open(\"res://scenes/hulls\") + var modules = dir.get_files() + files = check_for_item(modules) + for file in files: + text += \"{file}\\n\".format({'file': file}) + text += \"Verified Engines:\\n\" + dir = DirAccess.open(\"res://scenes/engines\") + modules = dir.get_files() + files = check_for_item(modules) + for file in files: + text += \"{file}\\n\".format({'file': file}) + text += \"Verified Shields:\\n\" + dir = DirAccess.open(\"res://scenes/shields\") + modules = dir.get_files() + files = check_for_item(modules) + for file in files: + text += \"{file}\\n\".format({'file': file}) + text += \"Verified Weapons:\\n\" + dir = DirAccess.open(\"res://scenes/weapons/presets\") + modules = dir.get_files() + files = check_for_item(modules) + for file in files: + text += \"{file}\\n\".format({'file': file}) + verified.text = text + +func check_for_item(modules : Array[String]) -> Array[String]: + var returnable : Array[String] = [] + for module in modules: + var itm = module.split('.', true, 1)[0] + if Game.get_item(itm).name != Game.DEFAULT_ITEM.name: + returnable.append(itm) + return returnable + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + if Input.is_action_just_released(\"pause\"): + get_tree().change_scene_to_file(\"res://scenes/MainMenu.tscn\") +" + +[node name="Debug" type="Node2D"] +script = SubResource("GDScript_6w8qb") + +[node name="Items" type="Label" parent="."] +offset_right = 640.0 +offset_bottom = 720.0 +horizontal_alignment = 1 +vertical_alignment = 1 +autowrap_mode = 2 + +[node name="Verified Items" type="Label" parent="."] +offset_left = 640.0 +offset_right = 1280.0 +offset_bottom = 720.0 +horizontal_alignment = 1 +vertical_alignment = 1 +autowrap_mode = 2 diff --git a/scripts/Space.gd b/scripts/Space.gd index 82fb6f3..8b305c8 100644 --- a/scripts/Space.gd +++ b/scripts/Space.gd @@ -91,7 +91,7 @@ func recolor(): color_player = Color.from_hsv(randf(), randf_range(0.8, 1), randf_range(0.8, 1)) color_base = Color.from_hsv(randf(), randf_range(0.8, 1), randf_range(0.8, 1)) color_enemy = Color.from_hsv(randf(), randf_range(0.8, 1), randf_range(0.8, 1)) - color_background = Color.from_hsv(randf(), randf_range(0.1765, 1), randf_range(0.0392, 0.0862)) + color_background = Color.from_hsv(randf(), randf_range(0.1765, 1), randf_range(0.06, 0.08)) ship.modulate = color_player bases.modulate = color_base enemy_faction.modulate = color_enemy diff --git a/scripts/game.gd b/scripts/game.gd index b2d2770..492b9dd 100644 --- a/scripts/game.gd +++ b/scripts/game.gd @@ -112,7 +112,7 @@ static func profile_legit_check(profile_meta : Dictionary) -> Dictionary: static func get_item(id : String) -> Item: var path_name = id.to_lower().replace(" ", "_") var path = "res://items/{name}.tres".format({"name": path_name}) - if FileAccess.file_exists(path): + if ResourceLoader.exists(path): var res = load(path) return res.duplicate() return DEFAULT_ITEM diff --git a/scripts/menu/BaseMenu.gd b/scripts/menu/BaseMenu.gd index e71b719..57f473c 100644 --- a/scripts/menu/BaseMenu.gd +++ b/scripts/menu/BaseMenu.gd @@ -293,7 +293,6 @@ func add_available(avail_list): 'hull': meta['price'] = hulls_prices[avail_list[i]] meta['equipped'] = ship.hull.id == avail_list[i] - print(ship.hull.id, avail_list[i]) 'engine': meta['price'] = engines_prices[avail_list[i]] meta['equipped'] = ship.engine.id == avail_list[i] diff --git a/scripts/menu/MainMenu.gd b/scripts/menu/MainMenu.gd index b1d8a7c..eabbe72 100644 --- a/scripts/menu/MainMenu.gd +++ b/scripts/menu/MainMenu.gd @@ -75,3 +75,7 @@ func change_menu(id): b4.change_name() b5.change_name() menu_id = id + +func _process(_delta): + if Input.is_action_just_released("hide_menu"): + get_tree().change_scene_to_file("res://scenes/debug.tscn") diff --git a/scripts/objects/Base.gd b/scripts/objects/Base.gd index 2fc5db0..25c41cc 100644 --- a/scripts/objects/Base.gd +++ b/scripts/objects/Base.gd @@ -150,7 +150,7 @@ func fetch_modules(): func check_for_item(modules : Array[String]) -> Array[String]: var returnable : Array[String] = [] for module in modules: - var itm = module.trim_suffix(".tscn") + var itm = module.split('.', true, 1)[0] if Game.get_item(itm).name != Game.DEFAULT_ITEM.name: returnable.append(itm) return returnable