diff --git a/globals/globals.gd b/autoloads/globals.gd similarity index 91% rename from globals/globals.gd rename to autoloads/globals.gd index 277046e..3463167 100644 --- a/globals/globals.gd +++ b/autoloads/globals.gd @@ -13,5 +13,5 @@ func cache_invalidate_load_resource(target: String) -> Resource: ResourceLoader.load(target, "", ResourceLoader.CACHE_MODE_REPLACE_DEEP) # NOTE: Let prior call propigate naturally. (Unsure when...) - # Enforce new script/node from pck called here. + # Enforce new script/node from PCK called here. return ResourceLoader.load(target, "", ResourceLoader.CACHE_MODE_IGNORE_DEEP) diff --git a/globals/globals.gd.uid b/autoloads/globals.gd.uid similarity index 100% rename from globals/globals.gd.uid rename to autoloads/globals.gd.uid diff --git a/globals/message_bus.gd b/autoloads/message_bus.gd similarity index 100% rename from globals/message_bus.gd rename to autoloads/message_bus.gd diff --git a/globals/message_bus.gd.uid b/autoloads/message_bus.gd.uid similarity index 100% rename from globals/message_bus.gd.uid rename to autoloads/message_bus.gd.uid diff --git a/configs/input.cfg b/configs/input.cfg new file mode 100644 index 0000000..45d45b6 --- /dev/null +++ b/configs/input.cfg @@ -0,0 +1,38 @@ +[input] + +aim_pulse={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) +, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":2,"canceled":false,"pressed":false,"double_click":false,"script":null) +] +} +aim_release={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null) +, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":2,"canceled":false,"pressed":false,"double_click":false,"script":null) +] +} +aim_rotate_left={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} +aim_rotate_right={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} +aim_incline={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} +aim_decline={ +"deadzone": 0.2, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} \ No newline at end of file diff --git a/export_presets.cfg b/export_presets.cfg index 37a634b..8804727 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -8,7 +8,7 @@ dedicated_server=false custom_features="" export_filter="exclude" export_files=PackedStringArray("res://import_manager.gd", "res://sounds/music/Lobo Loco - 04 (Mountain Bells22).mp3", "res://sounds/music/Lobo Loco - 02 (Summer Rain).mp3", "res://sounds/music/Blue Dot Sessions - 02 (Lemon and Melon).mp3", "res://sounds/effects/ball-hits.wav", "res://sounds/effects/ball-hits-2.wav", "res://assets/converted/individuals/white_ball/white_ball.gltf", "res://assets/references/pool-vs-snooker-cue-ball-and-weight.png", "res://assets/converted/full_pool_scene_original/textures/billiard_ball_mat_baseColor.png", "res://assets/converted/full_pool_scene_original/textures/billiard_ball_mat_metallicRoughness.png", "res://assets/converted/full_pool_scene_original/textures/cue_mat_baseColor.png", "res://assets/converted/full_pool_scene_original/textures/cue_mat_metallicRoughness.png", "res://assets/converted/full_pool_scene_original/textures/cue_mat_normal.png", "res://assets/converted/full_pool_scene_original/textures/light_mat_baseColor.png", "res://assets/converted/full_pool_scene_original/textures/light_mat_emissive.png", "res://assets/converted/full_pool_scene_original/textures/light_mat_metallicRoughness.png", "res://assets/converted/full_pool_scene_original/textures/pool_table_mat_baseColor.png", "res://assets/converted/full_pool_scene_original/textures/pool_table_mat_metallicRoughness.png", "res://assets/converted/full_pool_scene_original/textures/pool_table_mat_normal.png", "res://assets/converted/full_pool_scene_original/textures/pool_table_mat_transmission.png", "res://assets/converted/full_pool_scene_original/scene.gltf", "res://assets/converted/individuals/balls/balls.gltf", "res://assets/converted/individuals/balls/balls_billiard_ball_mat_baseColor.png", "res://assets/converted/individuals/balls/balls_billiard_ball_mat_metallicRoughness.png", "res://assets/converted/individuals/balls/billiard_ball_mat_baseColor.png", "res://assets/converted/individuals/balls/billiard_ball_mat_metallicRoughness.png", "res://assets/converted/individuals/pool_cue_blue_tip/cue_mat_baseColor.png", "res://assets/converted/individuals/pool_cue_blue_tip/cue_mat_metallicRoughness.png", "res://assets/converted/individuals/pool_cue_blue_tip/cue_mat_normal.png", "res://assets/converted/individuals/pool_cue_blue_tip/pool_cue_blue_tip.gltf", "res://assets/converted/individuals/pool_cue_white_tip/cue_mat_baseColor.png", "res://assets/converted/individuals/pool_cue_white_tip/cue_mat_metallicRoughness.png", "res://assets/converted/individuals/pool_cue_white_tip/cue_mat_normal.png", "res://assets/converted/individuals/pool_cue_white_tip/pool_cue_white_tip.gltf", "res://assets/converted/individuals/pool_table/pooltable.gltf", "res://assets/converted/individuals/pool_table/pool_table_mat_baseColor.png", "res://assets/converted/individuals/pool_table/pool_table_mat_metallicRoughness.png", "res://assets/converted/individuals/pool_table/pool_table_mat_normal.png", "res://assets/converted/individuals/pool_table/pool_table_mat_transmission.png", "res://assets/converted/individuals/white_ball/billiard_ball_mat_baseColor.png", "res://assets/converted/individuals/white_ball/billiard_ball_mat_metallicRoughness.png") -include_filter="" +include_filter="configs/*" exclude_filter=".godot/*" export_path="../../builds/desktop/shell-test/modules/game.x86_64" patches=PackedStringArray() diff --git a/game_core.gd b/game_core.gd index 2eb5a46..3ab8604 100644 --- a/game_core.gd +++ b/game_core.gd @@ -1,4 +1,5 @@ class_name GameCore extends Node +static var instance: GameCore @onready var game_server: GameServer = $game_server @@ -27,7 +28,15 @@ class_name GameCore extends Node # +func _init() -> void: + instance = self + + func _ready() -> void: + instance.run() + + +func run() -> void: _load_scene() _parse_args() @@ -93,7 +102,7 @@ func server_(arg: String) -> void: func host_(arg: String) -> void: var game_mode = arg.split("_")[1] var match_name = OS.get_cmdline_user_args()[-1] - + push_warning(get_path()) while not $scene/lobby_screen.client.lobby_fully_connected: await get_tree().process_frame diff --git a/project.godot b/project.godot index 7cf9d35..9f5dd0d 100644 --- a/project.godot +++ b/project.godot @@ -23,8 +23,8 @@ boot_splash/minimum_display_time=2500 [autoload] -Globals="*res://globals/globals.gd" -MessageBus="*res://globals/message_bus.gd" +Globals="*res://autoloads/globals.gd" +MessageBus="*res://autoloads/message_bus.gd" [editor]