From acd814dd738828607e3c090577eb21dd0b26cc78 Mon Sep 17 00:00:00 2001 From: "Ian (Ivy) Sly" <43023911+uzkbwza@users.noreply.github.com> Date: Thu, 1 Dec 2022 23:32:20 -0800 Subject: [PATCH] more custom stuff --- Custom.gd | 48 ++++- Global.gd | 17 +- Main.tscn | 28 +-- Network.gd | 15 ++ SteamLobby.gd | 162 ++++++++++---- SteamY.gd | 19 +- characters/BaseChar.gd | 39 ++-- characters/BaseChar.gdshader | 16 +- characters/BaseChar.tscn | 3 +- characters/swordandgun/SwordGuy.tscn | 50 +++-- .../projectiles/1000cuts/1000Cuts.tscn | 14 +- .../projectiles/states/1000CutsDefault.gd | 2 +- fx/CustomTrailParticle.gd | 37 +++- fx/TriDown.png | Bin 0 -> 105 bytes fx/TriDown.png.import | 35 +++ fx/TriUp.png | Bin 0 -> 104 bytes fx/TriUp.png.import | 35 +++ fx/heart.png | Bin 0 -> 111 bytes fx/heart.png.import | 35 +++ fx/hit_alt.ase | Bin 1325 -> 1324 bytes fx/hit_alt2.png | Bin 575 -> 562 bytes fx/hit_alt3.png | Bin 315 -> 318 bytes fx/hit_alt4.png | Bin 175 -> 175 bytes fx/star.png | Bin 0 -> 101 bytes fx/star.png.import | 35 +++ game.gd | 14 +- main.gd | 1 + mechanics/Hitbox.gd | 2 +- obj/BaseObj.gd | 5 + project.godot | 9 +- supporter/SupporterPack.gd | 16 ++ supporter/SupporterPack.tscn | 6 + ui/CSS/CharacterDisplay.gd | 20 +- ui/CSS/CharacterSelect.gd | 8 +- ui/CSS/CharacterSelect.tscn | 2 + ui/ColorPicker/CustomColorPicker.gd | 27 ++- ui/CustomizationScreen/CustomizationScreen.gd | 45 +++- .../CustomizationScreen.tscn | 104 +++++---- ui/CustomizationScreen/LoadStyleButton.gd | 8 +- ui/CustomizationScreen/SettingsSlider.gd | 4 + ui/CustomizationScreen/TrailSettings.gd | 25 ++- ui/CustomizationScreen/TrailSettings.tscn | 203 +++++++++--------- ui/GameSettingsPanelContainer.tscn | 4 +- ui/NagWindow.tscn | 8 +- ui/NagWindow2.gd | 5 +- ui/NagWindow2.tscn | 2 +- ui/SteamLobby/SteamLobby.tscn | 6 +- ui/SteamLobby/SteamLobbyList.tscn | 2 +- ui/UILayer.gd | 1 + ui/XYPlot/XYPlot.gd | 5 + 50 files changed, 819 insertions(+), 303 deletions(-) create mode 100644 fx/TriDown.png create mode 100644 fx/TriDown.png.import create mode 100644 fx/TriUp.png create mode 100644 fx/TriUp.png.import create mode 100644 fx/heart.png create mode 100644 fx/heart.png.import create mode 100644 fx/star.png create mode 100644 fx/star.png.import create mode 100644 supporter/SupporterPack.gd create mode 100644 supporter/SupporterPack.tscn diff --git a/Custom.gd b/Custom.gd index d88f1e4e..6305c610 100644 --- a/Custom.gd +++ b/Custom.gd @@ -1,5 +1,7 @@ extends Node +const SUPPORTER_PACK = 2232850 + var hitsparks = { "bash": "res://fx/HitEffect1.tscn", "bash2": "res://fx/hitsparks/HitEffect1Alt.tscn", @@ -17,6 +19,9 @@ var simple_colors = ["94e4ff", "ffc1a1", "ecffa4", "fec2ff", "6e8696", "ffea5d", var simple_outlines = ["04579a", "85001f", "008561", "9f42ba", "343537", "ff9444", "94e4ff", "ffc1a1", "ecffa4", "fec2ff", "6e8696", "ffea5d"] func _ready(): + for i in range(simple_colors.size()): + simple_colors[i] = Color(simple_colors[i]) + simple_outlines[i] = Color(simple_outlines[i]) make_custom_folder() func make_custom_folder(): @@ -25,9 +30,11 @@ func make_custom_folder(): dir.make_dir("user://custom") func apply_style_to_material(style, material: ShaderMaterial): - material.set_shader_param("color", style.character_color) + if style.character_color != null: + material.set_shader_param("color", style.character_color) material.set_shader_param("use_outline", style.use_outline) - material.set_shader_param("outline_color", style.outline_color) + if style.outline_color != null: + material.set_shader_param("outline_color", style.outline_color) pass @@ -35,21 +42,46 @@ func is_combo_simple(color, outline): return simple_colors.find(color) == simple_outlines.find(outline) func is_color_dlc(color): - if color is Color: - return color.to_html(false) in simple_colors - return color in simple_colors + if color == null: + return false + if !(color is Color): + return !(Color(color) in simple_colors) + return !(color in simple_colors) func is_outline_dlc(color): - if color is Color: - return color.to_html(false) in simple_outlines - return color in simple_outlines + if color == null: + return false + if !(color is Color): + return !(Color(color) in simple_outlines) + return !(color in simple_outlines) func hitspark_to_dlc(spark_name): if spark_name in hitspark_dlc: return hitspark_dlc[spark_name] return 0 +func can_use_style(player_id, style): + if !requires_dlc(style): + return true + if !Network.multiplayer_active: +# return Global.has_supporter_pack() + return true + elif SteamYomi.STARTED: + if player_id == SteamLobby.PLAYER_SIDE: + var has_supporter_pack = SteamYomi.has_supporter_pack(SteamYomi.STEAM_ID) + if has_supporter_pack: + print("You have the supporter pack.") + return has_supporter_pack + elif SteamLobby.OPPONENT_ID != 0: + var has_supporter_pack = SteamYomi.has_supporter_pack(SteamLobby.OPPONENT_ID) + if has_supporter_pack: + print("Your opponent has the supporter pack.") + return has_supporter_pack + return false + func requires_dlc(data): + if data == null: + return false if data.show_aura: return true if is_color_dlc(data.character_color): diff --git a/Global.gd b/Global.gd index b39d3bc9..7942ce37 100644 --- a/Global.gd +++ b/Global.gd @@ -16,6 +16,8 @@ var show_playback_controls = false var playback_speed_mod = 1 var default_dojo = 0 var current_game = null +var css_open = false +var has_supporter_pack_file = false var name_paths = { "Ninja": "res://characters/stickman/NinjaGuy.tscn", @@ -43,11 +45,21 @@ func _enter_tree(): # show_hitboxes = data.options.show_hitboxes set_music_enabled(music_enabled) set_fullscreen(fullscreen) + load_supporter_pack() + +func load_supporter_pack(): + var success = ProjectSettings.load_resource_pack(OS.get_executable_path().get_base_dir() + "/Supporter.pck") + if success: + has_supporter_pack_file = true + print(has_supporter_pack_file) func _ready(): + yield(get_tree(), "idle_frame") + yield(get_tree(), "idle_frame") + yield(get_tree(), "idle_frame") yield(get_tree(), "idle_frame") randomize() - if randi() % 20 == 0 and SteamYomi.IS_ONLINE: + if randi() % 1 == 0 and SteamYomi.IS_ONLINE and !SteamYomi.has_supporter_pack(SteamYomi.STEAM_ID): emit_signal("nag_window") func set_music_enabled(on): @@ -59,6 +71,9 @@ func set_music_enabled(on): audio_player.stop() pass +func has_supporter_pack(): + return has_supporter_pack_file + func set_playback_controls(on): show_playback_controls = on save_options() diff --git a/Main.tscn b/Main.tscn index ff7cf082..2fb9f938 100644 --- a/Main.tscn +++ b/Main.tscn @@ -905,20 +905,6 @@ margin_bottom = 11.0 text = "E: Edit replay - ESC: Open menu - F1: Toggle HUD" align = 1 -[node name="AdvantageLabel" type="Label" parent="UILayer/GameUI"] -unique_name_in_owner = true -anchor_top = 0.5 -anchor_right = 1.0 -anchor_bottom = 0.5 -margin_top = 71.0 -margin_bottom = 85.0 -theme = ExtResource( 4 ) -custom_colors/font_color = Color( 1, 0.2, 0.239216, 1 ) -align = 1 -__meta__ = { -"_edit_lock_": true -} - [node name="BottomBar" type="VBoxContainer" parent="UILayer/GameUI"] unique_name_in_owner = true anchor_left = 0.5 @@ -1438,6 +1424,20 @@ zoom" align = 1 clip_text = true +[node name="AdvantageLabel" type="Label" parent="UILayer/GameUI"] +unique_name_in_owner = true +anchor_top = 0.5 +anchor_right = 1.0 +anchor_bottom = 0.5 +margin_top = 71.0 +margin_bottom = 85.0 +theme = ExtResource( 4 ) +custom_colors/font_color = Color( 1, 0.2, 0.239216, 1 ) +align = 1 +__meta__ = { +"_edit_lock_": true +} + [node name="ChatWindow" parent="UILayer" instance=ExtResource( 30 )] unique_name_in_owner = true visible = false diff --git a/Network.gd b/Network.gd index b017281e..b591bdd6 100644 --- a/Network.gd +++ b/Network.gd @@ -47,6 +47,11 @@ var ticks = { 2: null } +var styles = { + 1: null, + 2: null +} + var auto = false # Names for remote players in id:name format. @@ -290,6 +295,11 @@ func _reset(): 2: false } + styles = { + 1: null, + 2: null + } + action_inputs = { 1: { "action": null, @@ -374,6 +384,10 @@ remote func player_disconnected(id): # multiplayer_active = false if !(id in players): return + if Global.css_open: + get_tree().reload_current_scene() + if steam: + SteamLobby.quit_match() emit_signal("player_disconnected") if is_host(): if players.has(id): @@ -741,6 +755,7 @@ remotesync func send_rematch_request(player_id): remotesync func sync_character_selection(player_id, character, style=null): print("player %s selected character" % [str(player_id)]) + styles[player_id] = style emit_signal("character_selected", player_id, character, style) remotesync func open_chara_select(): diff --git a/SteamLobby.gd b/SteamLobby.gd index 4992cb29..5dbd933c 100644 --- a/SteamLobby.gd +++ b/SteamLobby.gd @@ -17,6 +17,9 @@ signal received_challenge() signal challenge_declined() signal challenger_cancelled() signal received_spectator_match_data(data) +signal client_validation_success() +signal client_validation_failure(message) +signal authentication_started() signal user_joined(user_id) signal user_left(user_id) @@ -37,6 +40,9 @@ var LOBBY_MAX_MEMBERS: int = 64 var SPECTATORS = [] +var TICKET: Dictionary +var CLIENT_TICKET: Dictionary + var OPPONENT_ID: int = 0 var PLAYER_SIDE = 1 var LOBBY_OWNER = 0 @@ -64,6 +70,8 @@ func _ready() -> void: Steam.connect("persona_state_change", self, "_on_Persona_Change") Steam.connect("p2p_session_request", self, "_on_P2P_Session_Request") Steam.connect("p2p_session_connect_fail", self, "_on_P2P_Session_Connect_Fail") + Steam.connect("get_auth_session_ticket_response", self, "_get_Auth_Session_Ticket_Response") + Steam.connect("validate_auth_ticket_response", self, "_validate_Auth_Ticket_Response") spectator_update_timer = Timer.new() spectator_update_timer.connect("timeout", self, "_on_spectator_update_timer_timeout") add_child(spectator_update_timer) @@ -122,6 +130,8 @@ func challenge_user(user): _send_P2P_Packet(user.steam_id, data) SETTINGS_LOCKED = true CHALLENGING_STEAM_ID = user.steam_id + OPPONENT_ID = user.steam_id + PLAYER_SIDE = 1 func accept_challenge(): var steam_id = CHALLENGER_STEAM_ID @@ -132,16 +142,22 @@ func accept_challenge(): Steam.setLobbyMemberData(SteamLobby.LOBBY_ID, "player_id", "2") SETTINGS_LOCKED = true MATCH_SETTINGS = match_settings - _setup_game_vs(steam_id) +# _setup_game_vs(steam_id) _send_P2P_Packet(steam_id, { "challenge_accepted": SteamYomi.STEAM_ID }) + authenticate_with(OPPONENT_ID) + +func authenticate_with(steam_id): + TICKET = Steam.getAuthSessionTicket() + emit_signal("authentication_started") + _send_P2P_Packet(steam_id, {"validate_auth_session": TICKET}) func decline_challenge(): var steam_id = CHALLENGER_STEAM_ID - CHALLENGER_STEAM_ID = 0 _send_P2P_Packet(steam_id, {"challenge_declined": SteamYomi.STEAM_ID}) Steam.setLobbyMemberData(LOBBY_ID, "status", "idle") + CHALLENGER_STEAM_ID = 0 func quit_match(): if !SPECTATING: @@ -153,6 +169,9 @@ func quit_match(): Steam.setLobbyMemberData(LOBBY_ID, "opponent_id", "") Steam.setLobbyMemberData(LOBBY_ID, "character", "") Steam.setLobbyMemberData(LOBBY_ID, "player_id", "") + if TICKET: + Steam.cancelAuthTicket(TICKET['id']) + Steam.endAuthSession(CLIENT_TICKET['id']) func leave_Lobby() -> void: # If in a lobby, leave it @@ -313,65 +332,122 @@ func _read_P2P_Packet() -> void: # Make the packet data readable var PACKET_CODE: PoolByteArray = PACKET['data'] - var READABLE: Dictionary = bytes2var(PACKET_CODE) + var readable: Dictionary = bytes2var(PACKET_CODE) # Print the packet to output -# print("Packet: "+str(READABLE)) +# print("Packet: "+str(readable)) - if READABLE.has("rpc_data"): + if readable.has("rpc_data"): print("received rpc") - _receive_rpc(READABLE) - if READABLE.has("challenge_from"): - _receive_challenge(READABLE.challenge_from, READABLE.match_settings) - if READABLE.has("challenge_accepted"): + _receive_rpc(readable) + if readable.has("challenge_from"): + _receive_challenge(readable.challenge_from, readable.match_settings) + if readable.has("challenge_accepted"): PLAYER_SIDE = 1 Steam.setLobbyMemberData(SteamLobby.LOBBY_ID, "player_id", "1") - _setup_game_vs(READABLE.challenge_accepted) - if READABLE.has("match_quit"): + authenticate_with(readable.challenge_accepted) + + if readable.has("match_quit"): if Network.rematch_menu: emit_signal("quit_on_rematch") Steam.setLobbyMemberData(LOBBY_ID, "status", "busy") Steam.setLobbyMemberData(LOBBY_ID, "opponent_id", "") Steam.setLobbyMemberData(LOBBY_ID, "character", "") Steam.setLobbyMemberData(LOBBY_ID, "player_id", "") - if READABLE.has("match_settings_updated"): + if readable.has("match_settings_updated"): if SETTINGS_LOCKED: - NEW_MATCH_SETTINGS = READABLE.match_settings_updated + NEW_MATCH_SETTINGS = readable.match_settings_updated else: - MATCH_SETTINGS = READABLE.match_settings_updated - emit_signal("received_match_settings", READABLE.match_settings_updated) - if READABLE.has("player_busy"): + MATCH_SETTINGS = readable.match_settings_updated + emit_signal("received_match_settings", readable.match_settings_updated) + if readable.has("player_busy"): # TODO: show "player is busy" message pass - if READABLE.has("request_match_settings"): - _send_P2P_Packet(READABLE.request_match_settings, {"match_settings_updated": MATCH_SETTINGS}) - if READABLE.has("message"): - if READABLE.message == "handshake": + if readable.has("request_match_settings"): + _send_P2P_Packet(readable.request_match_settings, {"match_settings_updated": MATCH_SETTINGS}) + if readable.has("message"): + if readable.message == "handshake": emit_signal("handshake_made") # Append logic here to deal with packet data - if READABLE.has("challenge_cancelled"): + if readable.has("challenge_cancelled"): emit_signal("challenger_cancelled") Steam.setLobbyMemberData(LOBBY_ID, "status", "idle") - if READABLE.has("challenge_declined"): - _on_challenge_declined(READABLE.challenge_declined) - if READABLE.has("spectate_accept"): - _on_spectate_request_accepted(READABLE) - if READABLE.has("spectator_replay_update"): - _on_received_spectator_replay(READABLE.spectator_replay_update) - if READABLE.has("request_spectate"): - _on_received_spectate_request(READABLE.request_spectate) - if READABLE.has("spectate_ended"): - _remove_spectator(READABLE.spectate_ended) - if READABLE.has("spectate_declined"): + if readable.has("challenge_declined"): + _on_challenge_declined(readable.challenge_declined) + if readable.has("spectate_accept"): + _on_spectate_request_accepted(readable) + if readable.has("spectator_replay_update"): + _on_received_spectator_replay(readable.spectator_replay_update) + if readable.has("request_spectate"): + _on_received_spectate_request(readable.request_spectate) + if readable.has("spectate_ended"): + _remove_spectator(readable.spectate_ended) + if readable.has("spectate_declined"): _on_spectate_declined() - if READABLE.has("spectator_sync_timers"): - _on_spectate_sync_timers(READABLE.spectator_sync_timers) - if READABLE.has("spectator_turn_ready"): - _on_spectate_turn_ready(READABLE.spectator_turn_ready) - if READABLE.has("spectator_tick_update"): - _on_spectate_tick_update(READABLE.spectator_tick_update) - if READABLE.has("spectator_player_forfeit"): - Network.player_forfeit(READABLE.spectator_player_forfeit) + if readable.has("spectator_sync_timers"): + _on_spectate_sync_timers(readable.spectator_sync_timers) + if readable.has("spectator_turn_ready"): + _on_spectate_turn_ready(readable.spectator_turn_ready) + if readable.has("spectator_tick_update"): + _on_spectate_tick_update(readable.spectator_tick_update) + if readable.has("spectator_player_forfeit"): + Network.player_forfeit(readable.spectator_player_forfeit) + if readable.has("validate_auth_session"): + _validate_Auth_Session(readable.validate_auth_session, PACKET_SENDER) + +# Callback from getting the auth ticket from Steam +func _get_Auth_Session_Ticket_Response(auth_ticket: int, result: int) -> void: + print("Auth session result: "+str(result)) + print("Auth session ticket handle: "+str(auth_ticket)) + +# Callback from attempting to validate the auth ticket +func _validate_Auth_Ticket_Response(authID: int, response: int, ownerID: int) -> void: + print("Ticket Owner: "+str(authID)) + + # Make the response more verbose, highly unnecessary but good for this example + var VERBOSE_RESPONSE: String + match response: + 0: VERBOSE_RESPONSE = "Steam has verified the user is online, the ticket is valid and ticket has not been reused." + 1: VERBOSE_RESPONSE = "The user in question is not connected to Steam." + 2: VERBOSE_RESPONSE = "The user doesn't have a license for this App ID or the ticket has expired." + 3: VERBOSE_RESPONSE = "The user is VAC banned for this game." + 4: VERBOSE_RESPONSE = "The user account has logged in elsewhere and the session containing the game instance has been disconnected." + 5: VERBOSE_RESPONSE = "VAC has been unable to perform anti-cheat checks on this user." + 6: VERBOSE_RESPONSE = "The ticket has been canceled by the issuer." + 7: VERBOSE_RESPONSE = "This ticket has already been used, it is not valid." + 8: VERBOSE_RESPONSE = "This ticket is not from a user instance currently connected to steam." + 9: VERBOSE_RESPONSE = "The user is banned for this game. The ban came via the web api and not VAC." + print("Auth response: "+str(VERBOSE_RESPONSE)) + print("Game owner ID: "+str(ownerID)) + + if response == 0: + emit_signal("client_validation_success") + _setup_game_vs(OPPONENT_ID) + else: + emit_signal("client_validation_failure", VERBOSE_RESPONSE) + print(VERBOSE_RESPONSE) + +func _validate_Auth_Session(ticket: Dictionary, steam_id: int) -> void: + var RESPONSE: int = Steam.beginAuthSession(ticket['buffer'], ticket['size'], steam_id) + + # Get a verbose response; unnecessary but useful in this example + var VERBOSE_RESPONSE: String + match RESPONSE: + 0: VERBOSE_RESPONSE = "Ticket is valid for this game and this Steam ID." + 1: VERBOSE_RESPONSE = "The ticket is invalid." + 2: VERBOSE_RESPONSE = "A ticket has already been submitted for this Steam ID." + 3: VERBOSE_RESPONSE = "Ticket is from an incompatible interface version." + 4: VERBOSE_RESPONSE = "Ticket is not for this game." + 5: VERBOSE_RESPONSE = "Ticket has expired." + print("Auth verifcation response: "+str(VERBOSE_RESPONSE)) + + if RESPONSE == 0: + print("Validation successful, adding user to CLIENT_TICKETS") + CLIENT_TICKET = {"id": steam_id, "ticket": ticket['id']} + else: + emit_signal("client_validation_failure", VERBOSE_RESPONSE) + quit_match() + get_tree().reload_current_scene() func _on_received_spectate_request(steam_id): if Steam.getLobbyMemberData(LOBBY_ID, SteamYomi.STEAM_ID, "status") == "fighting" and is_instance_valid(Network.game): @@ -429,13 +505,13 @@ func _setup_game_vs(steam_id): print("registering players") REMATCHING_ID = 0 OPPONENT_ID = steam_id -# var match_ = Network.register_player_steam(steam_id) Network.register_player_steam(SteamYomi.STEAM_ID) Network.assign_players() Steam.setLobbyMemberData(LOBBY_ID, "status", "fighting") Steam.setLobbyMemberData(LOBBY_ID, "opponent_id", str(OPPONENT_ID)) + func _get_default_lobby_member_data(): return { "status": "idle", # idle, fighting, busy, spectating @@ -494,7 +570,9 @@ func _on_Lobby_Joined(lobby_id: int, _permissions: int, _locked: bool, response: LOBBY_OWNER = Steam.getLobbyOwner(LOBBY_ID) if LOBBY_OWNER != SteamYomi.STEAM_ID: - _send_P2P_Packet(LOBBY_OWNER, {"request_match_settings": SteamYomi.STEAM_ID}) + request_match_settings() + + emit_signal("join_lobby_success") diff --git a/SteamY.gd b/SteamY.gd index 72f375d5..66037e1a 100644 --- a/SteamY.gd +++ b/SteamY.gd @@ -9,11 +9,11 @@ var STEAM_NAME: String = "" var STARTED = false func _enter_tree(): -# _initialize_steam() + _initialize_steam() pass func _initialize_steam(): - var STARTED = true + STARTED = true var INIT: Dictionary = Steam.steamInit() print("Did steam initialize?: " + str(INIT)) @@ -29,5 +29,16 @@ func _process(_delta): if STARTED: Steam.run_callbacks() -func has_supporter_pack(_steam_id): - return true +func has_supporter_pack(steam_id): + if !STARTED: + print("steam not started, assuming true") + return true + if SteamLobby.OPPONENT_ID == steam_id: + if SteamLobby.CLIENT_TICKET: + print("checking if your opponent has the supporter pack...") + return Steam.userHasLicenseForApp(steam_id, Custom.SUPPORTER_PACK) == 0 + elif steam_id == SteamYomi.STEAM_ID: + print("checking if you have the supporter pack...") + return Steam.isDLCInstalled(Custom.SUPPORTER_PACK) + print("this ID does not have the supporter pack.") + return false diff --git a/characters/BaseChar.gd b/characters/BaseChar.gd index 1a4d1f67..3dceaa33 100644 --- a/characters/BaseChar.gd +++ b/characters/BaseChar.gd @@ -216,17 +216,26 @@ func init(pos=null): super_meter = MAX_SUPER_METER func apply_style(style): - if style == null: - return - if style.has("character_color"): - set_color(style.character_color) - Custom.apply_style_to_material(style, sprite.get_material()) - if !is_ghost and style.has("show_aura") and style.has("aura_settings"): - aura_particle = preload("res://fx/CustomTrailParticle.tscn").instance() - particles.add_child(aura_particle) - aura_particle.load_settings(style.aura_settings) - aura_particle.position = hurtbox_pos_float() - aura_particle.start_emitting() + if style != null and !is_ghost: + if style.has("character_color") and style.character_color != null: + set_color(style.character_color) + Custom.apply_style_to_material(style, sprite.get_material()) + if !is_ghost and style.show_aura and style.has("aura_settings"): + aura_particle = preload("res://fx/CustomTrailParticle.tscn").instance() + particles.add_child(aura_particle) + aura_particle.load_settings(style.aura_settings) + aura_particle.position = hurtbox_pos_float() + aura_particle.start_emitting() + if aura_particle.show_behind_parent: + aura_particle.z_index = -1 + if style.has("hitspark"): + custom_hitspark = load(Custom.hitsparks[style.hitspark]) + for hitbox in hitboxes: + hitbox.HIT_PARTICLE = custom_hitspark + if style != null and is_ghost: + sprite.get_material().set_shader_param("color", Color.white) + sprite.get_material().set_shader_param("use_outline", true) +# sprite.get_material().set_shader_param("outline_color", Color.white) func start_super(): emit_signal("super_started") @@ -246,7 +255,7 @@ func is_you(): func _ready(): sprite.animation = "Wait" state_variables.append_array( - ["current_di", "current_nudge", "lowest_tick", "state_changed", "nudge_amount", "yomi_effect", "reverse_state", "combo_moves_used", "parried_last_state", "read_advantage", "last_vel", "last_aerial_vel", "trail_hp", "always_perfect_parry", "parried", "got_parried", "parried_this_frame", "grounded_hits_taken", "on_the_ground", "hitlag_applied", "combo_damage", "burst_enabled", "di_enabled", "turbo_mode", "infinite_resources", "one_hit_ko", "dummy_interruptable", "air_movements_left", "super_meter", "supers_available", "parried", "parried_hitboxes", "burst_meter", "bursts_available"] + ["current_di", "current_nudge", "lowest_tick", "state_changed","nudge_amount", "yomi_effect", "reverse_state", "combo_moves_used", "parried_last_state", "read_advantage", "last_vel", "last_aerial_vel", "trail_hp", "always_perfect_parry", "parried", "got_parried", "parried_this_frame", "grounded_hits_taken", "on_the_ground", "hitlag_applied", "combo_damage", "burst_enabled", "di_enabled", "turbo_mode", "infinite_resources", "one_hit_ko", "dummy_interruptable", "air_movements_left", "super_meter", "supers_available", "parried", "parried_hitboxes", "burst_meter", "bursts_available"] ) add_to_group("Fighter") connect("got_hit", self, "on_got_hit") @@ -391,6 +400,7 @@ func _process(_delta): self_modulate.a = 1.0 if is_instance_valid(aura_particle): aura_particle.position = hurtbox_pos_float() + aura_particle.facing = get_facing_int() func debug_text(): .debug_text() @@ -555,8 +565,9 @@ func can_parry_hitbox(hitbox): func set_color(color: Color): - sprite.get_material().set_shader_param("color", color) - self.color = color + if color != null: + sprite.get_material().set_shader_param("color", color) + self.color = color func release_opponent(): if opponent.current_state().state_name == "Grabbed": diff --git a/characters/BaseChar.gdshader b/characters/BaseChar.gdshader index bebc98f7..40210700 100644 --- a/characters/BaseChar.gdshader +++ b/characters/BaseChar.gdshader @@ -31,16 +31,16 @@ void fragment() { float size_y = 1.0/float(textureSize(TEXTURE, 0).y); vec4 sprite_color = texture(TEXTURE, UV); float alpha = -8.0 * sprite_color.a; - alpha += texture(TEXTURE, UV + vec2(size_x, 0)).a; - alpha += texture(TEXTURE, UV + vec2(-size_x, 0)).a; - alpha += texture(TEXTURE, UV + vec2(0, size_y)).a; - alpha += texture(TEXTURE, UV + vec2(0, -size_y)).a; + alpha += texture(TEXTURE, UV + vec2(size_x, 0)).a * float(same_color(texture(TEXTURE, UV + vec2(size_x, 0)).rgb, replacement_color.rgb)); + alpha += texture(TEXTURE, UV + vec2(-size_x, 0)).a * float(same_color(texture(TEXTURE, UV + vec2(-size_x, 0)).rgb, replacement_color.rgb)); + alpha += texture(TEXTURE, UV + vec2(0, size_y)).a * float(same_color(texture(TEXTURE, UV + vec2(0, size_y)).rgb, replacement_color.rgb)); + alpha += texture(TEXTURE, UV + vec2(0, -size_y)).a * float(same_color(texture(TEXTURE, UV + vec2(0, -size_y)).rgb, replacement_color.rgb)); //For outlining corners //Change the -4.0 to -8.0 in alpa if adding these lines - alpha += texture(TEXTURE, UV + vec2(size_x, size_y)).a; - alpha += texture(TEXTURE, UV + vec2(-size_x, size_y)).a; - alpha += texture(TEXTURE, UV + vec2(-size_x, -size_y)).a; - alpha += texture(TEXTURE, UV + vec2(size_x, -size_y)).a; + alpha += texture(TEXTURE, UV + vec2(size_x, size_y)).a * float(same_color(texture(TEXTURE, UV + vec2(size_x, size_y)).rgb, replacement_color.rgb)); + alpha += texture(TEXTURE, UV + vec2(-size_x, size_y)).a * float(same_color(texture(TEXTURE, UV + vec2(-size_x, size_y)).rgb, replacement_color.rgb)); + alpha += texture(TEXTURE, UV + vec2(-size_x, -size_y)).a * float(same_color(texture(TEXTURE, UV + vec2(-size_x, -size_y)).rgb, replacement_color.rgb)); + alpha += texture(TEXTURE, UV + vec2(size_x, -size_y)).a * float(same_color(texture(TEXTURE, UV + vec2(size_x, -size_y)).rgb, replacement_color.rgb)); vec4 final_color = mix(sprite_color, outline_color, clamp(alpha, 0.0, 1.0)); COLOR = vec4(final_color.rgb, clamp(abs(alpha) + sprite_color.a, 0.0, 1.0)); } diff --git a/characters/BaseChar.tscn b/characters/BaseChar.tscn index bc4e5284..0a7af518 100644 --- a/characters/BaseChar.tscn +++ b/characters/BaseChar.tscn @@ -383,7 +383,8 @@ damage_taken_modifier = "1.0" [node name="Sprite" parent="Flip" index="0"] material = ExtResource( 134 ) frames = SubResource( 3 ) -animation = "Wait" +animation = "NunChukHeavy" +frame = 8 offset = Vector2( 0, -18 ) __meta__ = { "_edit_group_": true, diff --git a/characters/swordandgun/SwordGuy.tscn b/characters/swordandgun/SwordGuy.tscn index 37dc7116..025ad931 100644 --- a/characters/swordandgun/SwordGuy.tscn +++ b/characters/swordandgun/SwordGuy.tscn @@ -1003,7 +1003,7 @@ height = 30 damage = 90 hitstun_ticks = 16 hitlag_ticks = 2 -victim_hitlag = 10 +victim_hitlag = 4 screenshake_amount = 2 whiff_sound = ExtResource( 152 ) hit_sound = ExtResource( 179 ) @@ -1044,7 +1044,7 @@ y = -16 damage = 40 hitstun_ticks = 16 hitlag_ticks = 2 -victim_hitlag = 10 +victim_hitlag = 4 screenshake_amount = 2 whiff_sound = ExtResource( 152 ) hit_sound = ExtResource( 179 ) @@ -1451,7 +1451,7 @@ Aerial" [node name="Pommel" type="Node2D" parent="StateMachine" index="20"] script = ExtResource( 79 ) -anim_length = 11 +anim_length = 15 enter_force_dir_x = "1.0" enter_force_speed = "2.0" type = 1 @@ -1496,6 +1496,7 @@ GroundedSpecial Aerial AerialSpecial" interrupt_into_string = "Gun +SlowHolster AerialSuper GroundedSuper" @@ -1506,11 +1507,22 @@ anim_length = 4 type = 2 button_texture = ExtResource( 160 ) air_type = 2 -interrupt_from_string = "Gun" +interrupt_from_string = "FastHolster" interrupt_into_string = "Grounded Aerial" -[node name="Shoot" type="Node2D" parent="StateMachine" index="23"] +[node name="SlowHolster" type="Node2D" parent="StateMachine" index="23"] +script = ExtResource( 79 ) +sprite_animation = "Holster" +anim_length = 8 +type = 2 +button_texture = ExtResource( 160 ) +air_type = 2 +interrupt_from_string = "SlowHolster" +interrupt_into_string = "Grounded +Aerial" + +[node name="Shoot" type="Node2D" parent="StateMachine" index="24"] script = ExtResource( 111 ) fallback_state = "Holster" sprite_animation = "GunShoot" @@ -1520,14 +1532,14 @@ button_texture = ExtResource( 161 ) air_type = 2 iasa_at = 7 interrupt_from_string = "Gun -LassoThrow -" +LassoThrow" interrupt_into_string = "Gun +FastHolster GroundedSuper AerialSuper" release_opponent_on_startup = true -[node name="LassoHold" type="Node2D" parent="StateMachine" index="24"] +[node name="LassoHold" type="Node2D" parent="StateMachine" index="25"] script = ExtResource( 168 ) apply_forces = true apply_fric = true @@ -1540,7 +1552,7 @@ interrupt_into_string = "LassoThrow " start_throw_pos_x = 16 -[node name="IzunaDrop" type="Node2D" parent="StateMachine" index="25"] +[node name="IzunaDrop" type="Node2D" parent="StateMachine" index="26"] script = ExtResource( 169 ) endless = true reset_momentum = true @@ -1579,7 +1591,7 @@ grounded_hit_state = "HurtAerial" knockdown = true knockdown_extends_hitstun = false -[node name="AnkleCutter" type="Node2D" parent="StateMachine" index="26"] +[node name="AnkleCutter" type="Node2D" parent="StateMachine" index="27"] script = ExtResource( 167 ) apply_forces = true apply_fric = true @@ -1618,7 +1630,7 @@ knockdown_extends_hitstun = false start_tick = 7 active_ticks = 2 -[node name="BackSlash" type="Node2D" parent="StateMachine" index="27"] +[node name="BackSlash" type="Node2D" parent="StateMachine" index="28"] script = ExtResource( 209 ) apply_forces = true apply_fric = true @@ -1696,19 +1708,19 @@ knockback = "12.0" start_tick = 9 active_ticks = 1 -[node name="DashStartup" parent="StateMachine" index="38"] +[node name="DashStartup" parent="StateMachine" index="39"] title = "Walk" interrupt_from_string = "GroundedMovement Grounded Dash" -[node name="DashForward" parent="StateMachine" index="39"] +[node name="DashForward" parent="StateMachine" index="40"] spawn_particle_on_enter = false dash_speed = 4 fric = "0.02" spawn_particle = false -[node name="DashBackward" parent="StateMachine" index="40"] +[node name="DashBackward" parent="StateMachine" index="41"] spawn_particle_on_enter = false interrupt_frames = [ 9 ] dash_speed = 3 @@ -1716,19 +1728,19 @@ fric = "0.02" spawn_particle = false startup_lag = 1 -[node name="Jump" parent="StateMachine" index="42"] +[node name="Jump" parent="StateMachine" index="43"] speed = "8.5" -[node name="DoubleJump" parent="StateMachine" index="44"] +[node name="DoubleJump" parent="StateMachine" index="45"] speed = "7" -[node name="AirDash" parent="StateMachine" index="45"] +[node name="AirDash" parent="StateMachine" index="46"] interrupt_from_string = "" interrupt_into_string = "" -[node name="AirGrab" parent="StateMachine" index="54"] +[node name="AirGrab" parent="StateMachine" index="55"] land_cancel = true -[node name="AirDownThrow" parent="StateMachine" index="59"] +[node name="AirDownThrow" parent="StateMachine" index="60"] dir_x = "1.0" dir_y = "1.00" diff --git a/characters/swordandgun/projectiles/1000cuts/1000Cuts.tscn b/characters/swordandgun/projectiles/1000cuts/1000Cuts.tscn index 7b070e1c..4e1753af 100644 --- a/characters/swordandgun/projectiles/1000cuts/1000Cuts.tscn +++ b/characters/swordandgun/projectiles/1000cuts/1000Cuts.tscn @@ -26,6 +26,8 @@ shader = ExtResource( 19 ) shader_param/color = Color( 1, 1, 1, 1 ) shader_param/max_color_distance = 0.01 shader_param/super_dim = false +shader_param/use_outline = false +shader_param/outline_color = Color( 0, 0, 0, 1 ) [sub_resource type="SpriteFrames" id=1] animations = [ { @@ -47,6 +49,12 @@ immunity_susceptible = false frames = SubResource( 1 ) animation = "Slash" +[node name="CollisionBox" parent="." index="2"] +z_index = 1000 + +[node name="Hurtbox" parent="." index="3"] +z_index = 1000 + [node name="Default" parent="StateMachine" index="0"] script = ExtResource( 2 ) sprite_animation = "Slash" @@ -66,7 +74,7 @@ minimum_damage = 20 hitstun_ticks = 14 hitlag_ticks = 3 victim_hitlag = 3 -sdi_modifier = "0.2" +sdi_modifier = "0.4" hit_height = 2 hit_sound = ExtResource( 17 ) knockback = "2" @@ -86,7 +94,7 @@ minimum_damage = 15 hitstun_ticks = 14 hitlag_ticks = 3 victim_hitlag = 3 -sdi_modifier = "0.2" +sdi_modifier = "0.4" hit_height = 0 group = 1 hit_sound = ExtResource( 17 ) @@ -107,7 +115,7 @@ minimum_damage = 20 hitstun_ticks = 14 hitlag_ticks = 3 victim_hitlag = 3 -sdi_modifier = "0.2" +sdi_modifier = "0.4" group = 2 hit_sound = ExtResource( 18 ) knockback = "2" diff --git a/characters/swordandgun/projectiles/states/1000CutsDefault.gd b/characters/swordandgun/projectiles/states/1000CutsDefault.gd index fe07cf03..1e1856ac 100644 --- a/characters/swordandgun/projectiles/states/1000CutsDefault.gd +++ b/characters/swordandgun/projectiles/states/1000CutsDefault.gd @@ -1,6 +1,6 @@ extends ObjectState -const LIFETIME = 240 +const LIFETIME = 150 func _tick(): var creator_pos = host.creator.get_hurtbox_center() diff --git a/fx/CustomTrailParticle.gd b/fx/CustomTrailParticle.gd index 2bbc3c7f..e7b3e287 100644 --- a/fx/CustomTrailParticle.gd +++ b/fx/CustomTrailParticle.gd @@ -11,6 +11,10 @@ var end_alpha = 1.0 var start_scale = 1.0 var end_scale = 1.0 +var default_gravity_x = 0 +var facing = 1 +var default_angle = 0 + onready var particles = $CPUParticles2D var custom_set = { @@ -29,6 +33,7 @@ var custom_set = { "x_offset": "set_x_offset", "y_offset": "set_y_offset", "lifetime": "set_lifetime", + "angle": "set_angle", } static func get_shapes(): @@ -36,6 +41,9 @@ static func get_shapes(): preload("res://fx/particle_round_4x4.png"), preload("res://fx/particle_round_hollow_4x4.png"), preload("res://fx/particle_square_4x4.png"), + preload("res://fx/TriUp.png"), + preload("res://fx/star.png"), + preload("res://fx/heart.png"), ] static func get_default(): @@ -70,7 +78,9 @@ static func get_default(): "end_scale": 1.0, "x_offset": 0.0, "y_offset": 0.0, - "scale_amount_random": 0.0 + "scale_amount_random": 0.0, + "angle": 0.0, + "angle_random": 0.0, } static func get_setting_min(setting): @@ -100,6 +110,8 @@ static func get_setting_min(setting): "scale_amount_random": 0.0, "x_offset": -24.0, "y_offset": -24.0, + "angle": -360.0, + "angle_random": 0.0, } return minimums[setting] if minimums.has(setting) else null @@ -130,6 +142,8 @@ static func get_setting_max(setting): "x_offset": 24.0, "y_offset": 24.0, "scale_amount_random": 1.0, + "angle": 360.0, + "angle_random": 1.0, } return maximums[setting] if maximums.has(setting) else null @@ -150,9 +164,11 @@ func set_shape(shape_num): func set_in_front(on): if on: - particles.z_index = 1 + show_behind_parent = false +# particles.z_index = 1 else: - particles.z_index = -1 + show_behind_parent = true +# particles.z_index = -1 func set_start_color(color): start_color = color @@ -172,6 +188,11 @@ func _physics_process(_delta): if enabled: set_enabled(false) +func tick(): + .tick() + particles.gravity.x = default_gravity_x * facing + particles.angle = TAU - default_angle if facing == -1 else default_angle + func set_start_alpha(a): # particles.self_modulate.a = a start_color.a = a @@ -216,6 +237,7 @@ func set_rect_size_y(y): particles.set_emission_rect_extents(Vector2(particles.get_emission_rect_extents().x, y)) func set_gravity_x(x): + default_gravity_x = x particles.gravity.x = x func set_gravity_y(y): @@ -231,6 +253,10 @@ func set_lifetime(lifetime): particles.lifetime = lifetime particles.preprocess = lifetime +func set_angle(angle): + default_angle = angle + particles.angle = angle + func set_parameter(param, value): var max_value = get_setting_max(param) var min_value = get_setting_min(param) @@ -247,5 +273,6 @@ func load_defaults(): load_settings(get_default()) func load_settings(settings): - for setting in settings: - set_parameter(setting, settings[setting]) + if settings: + for setting in settings: + set_parameter(setting, settings[setting]) diff --git a/fx/TriDown.png b/fx/TriDown.png new file mode 100644 index 0000000000000000000000000000000000000000..1fd5b6f2587991ebe4f9ed06d0b89758899a8c88 GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^tRT$61|)m))t&+=#^NA%Cx&(BWL^R}%APKcAsjPv zPi+)rVBlzWDEL1&dG)+4dpr+$HduzdUUl`#`W)ZQ-2cD*`Z^t`oWax8&t;ucLK6U5 C_94*# literal 0 HcmV?d00001 diff --git a/fx/TriDown.png.import b/fx/TriDown.png.import new file mode 100644 index 00000000..622ea33a --- /dev/null +++ b/fx/TriDown.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/TriDown.png-b5ace9ef37bfab285f3043b24c2a76f6.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://fx/TriDown.png" +dest_files=[ "res://.import/TriDown.png-b5ace9ef37bfab285f3043b24c2a76f6.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/fx/TriUp.png b/fx/TriUp.png new file mode 100644 index 0000000000000000000000000000000000000000..893862f10bac78b3d73d3297ae5f2848e1a58b2d GIT binary patch literal 104 zcmeAS@N?(olHy`uVBq!ia0vp^tRT$61|)m))t&+=#^NA%Cx&(BWL^R}N}eu`AsjQ4 x6B?TS13~-7nGzcq+)6@wfZ#@`(&{EghNX|W|2KT(>ISN2@O1TaS?83{1OQwnAW{GT literal 0 HcmV?d00001 diff --git a/fx/TriUp.png.import b/fx/TriUp.png.import new file mode 100644 index 00000000..0ac6f82f --- /dev/null +++ b/fx/TriUp.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/TriUp.png-373cc554e29f9ce91935882576863dd9.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://fx/TriUp.png" +dest_files=[ "res://.import/TriUp.png-373cc554e29f9ce91935882576863dd9.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/fx/heart.png b/fx/heart.png new file mode 100644 index 0000000000000000000000000000000000000000..2049482e9306369a79790651a6992c225adf0182 GIT binary patch literal 111 zcmeAS@N?(olHy`uVBq!ia0vp^tRT$61|)m))t&+=#^NA%Cx&(BWL^R}nw~C>AsjPf zPjBQsV8Fn1Q2F=!9&Ps%CJX8rZ=j;=A_{Qe>>9#2QdtTwM-_z_(ftnaRUHx3v IIVCg!0PDLT@c;k- literal 0 HcmV?d00001 diff --git a/fx/heart.png.import b/fx/heart.png.import new file mode 100644 index 00000000..e8de63aa --- /dev/null +++ b/fx/heart.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/heart.png-9c11f9344741915da985da166f612c20.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://fx/heart.png" +dest_files=[ "res://.import/heart.png-9c11f9344741915da985da166f612c20.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/fx/hit_alt.ase b/fx/hit_alt.ase index 4d23b81c6df479c67e3ca7ee9ce5ddc2b4f6d98a..8eee649b0c18f041fcfa0dbc8365eda6294204f4 100644 GIT binary patch delta 346 zcmV-g0j2(}3aknNEU^K@0)I#W008>&0RUtG00031001}v000Fb000{RDFFWh00000 z00000NdPVYc%1E%TMok@3{$(DD@7QK$XD%x7e4!t})6fhMdjnH+W606G(qXTjJ3>3``Y%d5+=%M3)W z&lyJxTpM)zhw@r@1zh z4)kq!@r2Gpd$IyOyGqng6i3JoI~fr?v39(Z;n~sH0pVtrEzR=k=?l`&EEADu39CyM sN6a1>9I-oO@uTq$`wa$~`;F*Gd*+Cav?)hxtQ@@nPpX*8vke3w0Ra@8^8f$< delta 347 zcmV-h0i^z{3attOEwKT^0)I&X008>&0RUtG000310021w000Fb000{RDFFWh00000 z00000NdPVYc%1E(K@P(p3DLZO>J+X3l&MOn9C-xqA!pf4#QRA8im47LNqdo)Dlcm;b%F)8dxL_t(|obBAva-%Q|1yHfG|NqPEOPR@J+Y}5o5My+pT zV@M;BVH1AED`fe&Irrh z1+;h#z!r)g?UW=AH8K0_df2YF`lqlEL-^Iw;&vuoS%Qj`fiNgcOs*dE&SDY6L)4(jQU@!O)Jz-%P0Ug7#5@d|n8(41c_E}- znnKR)5VS>E!QS+2n3|+yOkL zz3(yfY2ejnny6k%E&&lH|0*Q|FlzDzE1?`w{|KV;#_otx9pDMKT{If~iJYYa@Pkyo}&ZCmA=Wi@CTdG!n;L%3IbiZanHQ$pAE?>A0UY*M8aOArH$DuM+ z<_#vlfhIq%t;*+!`d9n(!BpEPYkn@>F7s&K_1dk+MESZ?x#Rzcw&})Ft70bw^y81PcFH#7Q$TdL*3Qw>SN6dbGXz@VOLo@4KE^!uI z%e|)@x}vbR-qwE2C+Epxy7u|+FWg{ayI#t)#`k-unro}BLTzK@Uarj6WBNIa>MKkR zo>DOtHg95k7WUzQ4Ug1};|Dt{6_>=$a{BhkD`Iy2rK9?LL~gAs`6w92eSdY%!+!=( zBvjwC{QLU$H!#rTd?W3aUz)o=J$3SKi^p6Kv>w;?uJdQ^Hw#*PE~tpRzmvv4FO#tsB^z#4! diff --git a/fx/hit_alt3.png b/fx/hit_alt3.png index 55cb4f0a144590d82eb2b6ef8344ad89b7d24757..4e41647d272554efadcae442b2456b133886e219 100644 GIT binary patch delta 278 zcmdnZw2x_mVf_zJ7srr_Id5+tjhrf3B26f)T9LM{#Y(&O3^za zu!4yJ0UGY{JT}>G*S7a=v^+yDr@|bDLr4SzgGFo0^Y=9hOfC%^E9#V9JT3pg{FvRi z&HzT(eUN{rwy>>mR(-GhsSgWdz8>V^2bzB1UEW&$hVR?#WNU2Y<8xnsE&y5C;9Q|8 zvc7e*5aT}bTkMtsxo=8%>GjJsp_X}d(ovPN&6WenK+> kFp`77?gJSG2kSBzqw;dD?B-8&tON;qy85}Sb4q9e0A;CViU0rr delta 275 zcmdnTw3}&yVf|N67srr_Id5+tFLAPgfgBd^R9T8Z; z#DD+|7teTS@9lq>(|?cMA)bjty`cb!U|{&?bm()rSqFol0#nu;4!57OH3xqj?2$hM zBl!Qc?e<(znR)id!g?P0Q=#%_K7b6LllQ8Yp{DH1%LlJ5-`=|R{2|!J=^uhL;<(dQ zneOmLbTYg<7TV1rz^KaP#WID1Px9%L-cQzgPnWP7*BLx!H@0KA5Pj&s;QaP>VFwGw i79;}Ucp&S}Md^LweN&$H#8mTuBs^XHT-G@yGywpAWoG{X diff --git a/fx/hit_alt4.png b/fx/hit_alt4.png index 781937646781186eb61ab2aa71ba64500af283b0..37073e2c73713d70e41cc7e53126a1531d6049ad 100644 GIT binary patch delta 66 zcmZ3_xSnx>oiGQ3<0HAAGdr$WG;Z8%Q2y3jo^fKJJlCC+uPI;W{Hn5K2J*z_-{PFd VYR}K{*Pa0gJYD@<);T3K0RVct85{rr delta 66 zcmZ3_xSnx>oiGo}#*V+IduG_q;}no(-E=#99oNJ_dCna#J*y@K$Lps9IpPn3rMC#M Uz2}iiUd;dmp00i_>zopr080cH$^ZZW diff --git a/fx/star.png b/fx/star.png new file mode 100644 index 0000000000000000000000000000000000000000..1d7948b44bec23a839e9b081bfab0a73fe21b4bd GIT binary patch literal 101 zcmeAS@N?(olHy`uVBq!ia0vp^tU%1d!3HGVjK4YnDaPU;cPEB*=VV?2Ir5$^jv*W~ wlM@=6{sTe#M#+hm1&%zSJv}`IQ%~eDaMTL_IJbLRFHk9ir>mdKI;Vst0L}0oP5=M^ literal 0 HcmV?d00001 diff --git a/fx/star.png.import b/fx/star.png.import new file mode 100644 index 00000000..c166b440 --- /dev/null +++ b/fx/star.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/star.png-f96e0897837d977e03ebb788646e8d2b.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://fx/star.png" +dest_files=[ "res://.import/star.png-f96e0897837d977e03ebb788646e8d2b.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/game.gd b/game.gd index 8fbba99d..fcd69883 100644 --- a/game.gd +++ b/game.gd @@ -280,13 +280,23 @@ func start_game(singleplayer: bool, match_data: Dictionary): p2.init() if match_data.has("selected_styles"): - p1.apply_style(match_data.selected_styles[1]) - p2.apply_style(match_data.selected_styles[2]) + var style1 = match_data.selected_styles[1] + var style2 = match_data.selected_styles[2] +# if Custom.can_use_style(1, style1): + if is_ghost or Custom.can_use_style(1, style1): + p1.apply_style(style1) + +# if Custom.can_use_style(2, style1): + if is_ghost or Custom.can_use_style(2, style1): + p2.apply_style(style2) if match_data.has("gravity_enabled"): gravity_enabled = match_data.gravity_enabled p1.gravity_enabled = match_data.gravity_enabled p2.gravity_enabled = match_data.gravity_enabled + + + p1.connect("undo", self, "set", ["undoing", true]) p2.connect("undo", self, "set", ["undoing", true]) p1.connect("super_started", self, "_on_super_started", [p1]) diff --git a/main.gd b/main.gd index ac398e40..a890f067 100644 --- a/main.gd +++ b/main.gd @@ -57,6 +57,7 @@ func _ready(): $"%NagWindow".rect_position = Vector2(randi() % 640, randi() % 360) Global.connect("nag_window", $"%NagWindow", "show") SteamLobby._stop_spectating() + SteamLobby.quit_match() func _on_player_disconnected(): $"%OpponentDisconnectedLabel".show() diff --git a/mechanics/Hitbox.gd b/mechanics/Hitbox.gd index 9af7bcb9..5e165f6a 100644 --- a/mechanics/Hitbox.gd +++ b/mechanics/Hitbox.gd @@ -10,7 +10,7 @@ const COMBO_SAME_MOVE_KNOCKBACK_INCREASE_AMOUNT_AERIAL = "1.05" const COMBO_SAME_MOVE_HITSTUN_DECREASE_AMOUNT = 0 -const HIT_PARTICLE = preload("res://fx/HitEffect1.tscn") +var HIT_PARTICLE = preload("res://fx/HitEffect1.tscn") #const DAMAGE_SUPER_GAIN_DIVISOR = 1 diff --git a/obj/BaseObj.gd b/obj/BaseObj.gd index 3a18d126..0c163d71 100644 --- a/obj/BaseObj.gd +++ b/obj/BaseObj.gd @@ -41,6 +41,8 @@ var stage_width = 0 var obj_name: String +var custom_hitspark + var data var obj_data var current_tick = 0 @@ -148,6 +150,9 @@ func init(pos=null): update_data() initialized = true emit_signal("initialized") + if creator and creator.custom_hitspark: + for hitbox in hitboxes: + hitbox.HIT_PARTICLE = creator.custom_hitspark func reset_hurtbox(): hurtbox.x = default_hurtbox.x diff --git a/project.godot b/project.godot index e6a869ed..9b07cc39 100644 --- a/project.godot +++ b/project.godot @@ -243,6 +243,11 @@ _global_script_classes=[ { "class": "XYPlot", "language": "GDScript", "path": "res://ui/XYPlot/XYPlot.gd" +}, { +"base": "Panel", +"class": "YomiColorPicker", +"language": "GDScript", +"path": "res://ui/ColorPicker/CustomColorPicker.gd" } ] _global_script_class_icons={ "ActionButton": "", @@ -291,7 +296,8 @@ _global_script_class_icons={ "VariableSound2D": "", "Window": "", "WizardState": "", -"XYPlot": "" +"XYPlot": "", +"YomiColorPicker": "" } [application] @@ -314,6 +320,7 @@ Custom="*res://Custom.gd" [debug] +settings/fps/force_fps=60 gdscript/warnings/enable=false multirun/number_of_windows=2 multirun/window_distance=1270 diff --git a/supporter/SupporterPack.gd b/supporter/SupporterPack.gd new file mode 100644 index 00000000..1eccaec1 --- /dev/null +++ b/supporter/SupporterPack.gd @@ -0,0 +1,16 @@ +extends Node + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/supporter/SupporterPack.tscn b/supporter/SupporterPack.tscn new file mode 100644 index 00000000..f17c25db --- /dev/null +++ b/supporter/SupporterPack.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://supporter/SupporterPack.gd" type="Script" id=1] + +[node name="Node" type="Node"] +script = ExtResource( 1 ) diff --git a/ui/CSS/CharacterDisplay.gd b/ui/CSS/CharacterDisplay.gd index 6550e2bc..9cadb581 100644 --- a/ui/CSS/CharacterDisplay.gd +++ b/ui/CSS/CharacterDisplay.gd @@ -15,6 +15,12 @@ func _ready(): func _on_style_selected(style): emit_signal("style_selected", style) selected_style = style + if aura_particle: + aura_particle.queue_free() + aura_particle = null + var material = $"%CharacterPortrait".get_material() + material.set_shader_param("color", Color.white) + material.set_shader_param("use_outline", false) if style: Custom.apply_style_to_material(style, $"%CharacterPortrait".get_material()) if style.show_aura: @@ -23,23 +29,19 @@ func _on_style_selected(style): particle.load_settings(style.aura_settings) particle.position = $"%CharacterPortrait".rect_size / 2 particle.scale.x = -1 if player_id == 2 else 1 + particle.facing = -1 if player_id == 2 else 1 + aura_particle = particle pass - else: - var material = $"%CharacterPortrait".get_material() - material.set_shader_param("color", Color.white) - material.set_shader_param("use_outline", false) - aura_particle.queue_free() - aura_particle = null - -# material.set_shader_param("outline_color", ) + func init(): + $"%LoadStyleButton".player_id = player_id $"%CharacterLabel".text = "" # $"%CharacterPortrait".texture = null set_enabled(true) $"%LoadStyleButton".update_styles() $"%LoadStyleButton".hide() - if !Network.multiplayer_active or player_id == Network.player_id: + if SteamYomi.STARTED and (!Network.multiplayer_active or player_id == Network.player_id): $"%LoadStyleButton".show() func load_character_data(data): diff --git a/ui/CSS/CharacterSelect.gd b/ui/CSS/CharacterSelect.gd index 949bc90e..c714a17c 100644 --- a/ui/CSS/CharacterSelect.gd +++ b/ui/CSS/CharacterSelect.gd @@ -21,7 +21,7 @@ func _ready(): $"%QuitButton".connect("pressed", self, "quit") Network.connect("character_selected", self, "_on_network_character_selected") Network.connect("match_locked_in", self, "_on_network_match_locked_in") - init() +# init() func _on_network_character_selected(player_id, character, style=null): selected_characters[player_id] = character @@ -172,3 +172,9 @@ func go(): else: emit_signal("match_ready", get_match_data()) hide() + +func _process(delta): + Global.css_open = visible + +func _on_CharacterSelect_visibility_changed(): + pass # Replace with function body. diff --git a/ui/CSS/CharacterSelect.tscn b/ui/CSS/CharacterSelect.tscn index c0a84a9f..021214ab 100644 --- a/ui/CSS/CharacterSelect.tscn +++ b/ui/CSS/CharacterSelect.tscn @@ -138,3 +138,5 @@ text = "quit" [node name="ButtonSoundPlayer" parent="." instance=ExtResource( 7 )] button_containers = [ NodePath("../CharacterButtonContainer") ] + +[connection signal="visibility_changed" from="." to="." method="_on_CharacterSelect_visibility_changed"] diff --git a/ui/ColorPicker/CustomColorPicker.gd b/ui/ColorPicker/CustomColorPicker.gd index 27bf7c17..e6dc7471 100644 --- a/ui/ColorPicker/CustomColorPicker.gd +++ b/ui/ColorPicker/CustomColorPicker.gd @@ -1,5 +1,7 @@ extends Panel +class_name YomiColorPicker + signal color_changed(color) var current_color = Color.white @@ -12,23 +14,26 @@ onready var picker_rect = $"%PickerRect" onready var hex_edit = $"%HexEdit" func _process(_delta): - if !visible: - return color_display.color = color_spectrum.col - if color_spectrum.mouse_entered and color_spectrum.mouse_pressed: - picker_rect.show() - picker_rect.rect_position = color_spectrum.rect_position + color_spectrum.mouse_pos - Vector2(2, 2) - hex_edit.text = color_spectrum.col.to_html(false) - if value_rect.mouse_entered and value_rect.mouse_pressed: - color_spectrum.get_material().set_shader_param("value", value_rect.value) - color_spectrum.value = value_rect.value - color_spectrum.update_color() - hex_edit.text = color_spectrum.col.to_html(false) + if visible: + if color_spectrum.mouse_entered and color_spectrum.mouse_pressed: + picker_rect.show() + picker_rect.rect_position = color_spectrum.rect_position + color_spectrum.mouse_pos - Vector2(2, 2) + hex_edit.text = color_spectrum.col.to_html(false) + if value_rect.mouse_entered and value_rect.mouse_pressed: + color_spectrum.get_material().set_shader_param("value", value_rect.value) + color_spectrum.value = value_rect.value + color_spectrum.update_color() + hex_edit.text = color_spectrum.col.to_html(false) color_display.color = color_spectrum.col if color_display.color != current_color: current_color = color_display.color emit_signal("color_changed", current_color) +func set_color(col): + color_spectrum.col = col + color_spectrum.col.a = 1.0 + func _on_LineEdit_text_changed(new_text): picker_rect.hide() color_spectrum.col = Color(new_text) diff --git a/ui/CustomizationScreen/CustomizationScreen.gd b/ui/CustomizationScreen/CustomizationScreen.gd index 3d219724..d72575a2 100644 --- a/ui/CustomizationScreen/CustomizationScreen.gd +++ b/ui/CustomizationScreen/CustomizationScreen.gd @@ -46,8 +46,8 @@ func _ready(): var outline = Custom.simple_outlines[i] simple_color_button.init(color, outline) $"%SimpleColorButtonContainer".add_child(simple_color_button) - simple_color_button.connect("pressed", self, "_on_character_color_changed", [Color(color)]) - simple_color_button.connect("pressed", self, "_on_outline_color_changed", [Color(outline)]) + simple_color_button.connect("pressed", self, "_on_character_color_changed", [color]) + simple_color_button.connect("pressed", self, "_on_outline_color_changed", [outline]) $"%ResetColorButton".connect("pressed", self, "_on_reset_color_pressed") # select_hitspark("default") for hitspark in Custom.hitsparks: @@ -61,9 +61,13 @@ func _ready(): # $"%ShowAura".connect("toggled", $"%TrailSettings", "_show_aura_toggled") $"%SaveButton".connect("pressed", self, "save_style") $"%LoadStyleButton".connect("style_selected", self, "load_style") - $"%LoadStyleButton".update_styles() + $"%DLCWarning".visible = false + update_warning() func show(): + $"%LoadStyleButton".update_styles() + $"%DLCWarning".visible = false + update_warning() .show() _on_reset_color_pressed() @@ -72,16 +76,34 @@ func save_style(): Custom.save_style(data) $"%LoadStyleButton".update_styles() $"%StyleName".clear() - $"%SavedLabel".text = "saved to " + data.style_name + ".style" + $"%SavedLabel".text = "saved as " + data.style_name + ".style" $"%SavedLabel".show() - + +func update_warning(): + if !Global.has_supporter_pack(): + $"%DLCWarning".visible = Custom.requires_dlc(get_style_data()) + func load_style(style): if style: - pass - + if style.show_aura: + $"%TrailSettings".load_settings(style.aura_settings) + $"%StyleName".text = style.style_name + $"%ShowOutline".pressed = style.use_outline + if style.use_outline: + $"%Outline".set_color(style.outline_color) + $"%ShowAura".pressed = style.show_aura + call_deferred("create_aura", style.aura_settings) + if style.character_color: + $"%Character".set_color(style.character_color) + for child in $"%HitsparkButtonContainer".get_children(): + if child.text == style.hitspark.strip_edges(): + child.pressed = true + select_hitspark(style.hitspark) + func select_hitspark(hitspark_name): selected_hitspark = hitspark_name spawn_hitspark() + update_warning() func spawn_hitspark(): if Custom.hitsparks.has(selected_hitspark): @@ -102,6 +124,7 @@ func _physics_process(delta): func _on_trail_settings_changed(settings): call_deferred("create_aura", settings) + update_warning() func create_aura(trail_settings): for particle in custom_particles: @@ -123,11 +146,13 @@ func _on_reset_color_pressed(): character_color = null $"%StaticSprite".get_material().set_shader_param("color", Color.white) _on_show_outline_toggled(false) + update_warning() func _on_character_color_changed(color): $"%StaticSprite".get_material().set_shader_param("color", color) # $"%MovingSprite".get_material().set_shader_param("color", color) character_color = color + update_warning() func _on_outline_color_changed(color): $"%ShowOutline".set_pressed_no_signal(true) @@ -135,10 +160,12 @@ func _on_outline_color_changed(color): $"%StaticSprite".get_material().set_shader_param("use_outline", true) # $"%MovingSprite".get_material().set_shader_param("color", color) outline_color = color + update_warning() func _on_show_outline_toggled(on): $"%StaticSprite".get_material().set_shader_param("use_outline", on) $"%ShowOutline".set_pressed_no_signal(on) + update_warning() func _on_character_button_pressed(button): for button in buttons: @@ -164,3 +191,7 @@ func _on_StyleName_text_entered(new_text): func _on_OpenFolderButton_pressed(): OS.shell_open(ProjectSettings.globalize_path("user://custom")) pass # Replace with function body. + + +func _on_DLCWarning_meta_clicked(meta): + pass # Replace with function body. diff --git a/ui/CustomizationScreen/CustomizationScreen.tscn b/ui/CustomizationScreen/CustomizationScreen.tscn index e63f9ef8..011efcb1 100644 --- a/ui/CustomizationScreen/CustomizationScreen.tscn +++ b/ui/CustomizationScreen/CustomizationScreen.tscn @@ -26,14 +26,18 @@ __meta__ = { } [node name="HBoxContainer" type="HBoxContainer" parent="."] -margin_left = 115.0 -margin_top = 15.0 -margin_right = 393.0 -margin_bottom = 28.0 +margin_left = 7.0 +margin_top = 8.0 +margin_right = 632.0 +margin_bottom = 21.0 + +[node name="LoadStyleButton" parent="HBoxContainer" instance=ExtResource( 7 )] +text = "load" [node name="StyleName" type="LineEdit" parent="HBoxContainer"] unique_name_in_owner = true -margin_right = 100.0 +margin_left = 92.0 +margin_right = 192.0 margin_bottom = 13.0 rect_min_size = Vector2( 100, 0 ) max_length = 64 @@ -41,53 +45,58 @@ placeholder_text = "style name" [node name="SaveButton" type="Button" parent="HBoxContainer"] unique_name_in_owner = true -margin_left = 101.0 -margin_right = 127.0 +margin_left = 193.0 +margin_right = 219.0 margin_bottom = 13.0 text = "save" -[node name="LoadStyleButton" parent="HBoxContainer" instance=ExtResource( 7 )] -margin_left = 128.0 -margin_right = 219.0 -text = "load" +[node name="SavedLabel" type="Label" parent="HBoxContainer"] +unique_name_in_owner = true +margin_left = 220.0 +margin_top = 1.0 +margin_right = 566.0 +margin_bottom = 12.0 +size_flags_horizontal = 3 +align = 1 [node name="OpenFolderButton" type="Button" parent="HBoxContainer"] unique_name_in_owner = true -margin_left = 220.0 -margin_right = 278.0 +margin_left = 567.0 +margin_right = 625.0 margin_bottom = 13.0 text = "open folder" [node name="SeeOn" type="Label" parent="."] -margin_left = 8.0 -margin_top = 8.0 -margin_right = 75.0 -margin_bottom = 33.0 +margin_left = 218.0 +margin_top = 266.0 +margin_right = 285.0 +margin_bottom = 291.0 text = "view style on character:" [node name="ScrollContainer" type="ScrollContainer" parent="."] anchor_top = 0.5 anchor_bottom = 0.5 -margin_left = 8.0 -margin_top = -140.0 -margin_right = 79.0 -margin_bottom = 155.0 +margin_left = 218.0 +margin_top = 114.0 +margin_right = 583.0 +margin_bottom = 175.0 -[node name="CharacterButtonContainer" type="VBoxContainer" parent="ScrollContainer"] +[node name="CharacterButtonContainer" type="HBoxContainer" parent="ScrollContainer"] unique_name_in_owner = true +margin_right = 365.0 +margin_bottom = 61.0 grow_horizontal = 2 size_flags_horizontal = 3 size_flags_vertical = 3 -alignment = 1 [node name="Panel" type="Panel" parent="."] anchor_left = 1.0 anchor_right = 1.0 -margin_left = -215.0 -margin_top = 20.0 -margin_right = -8.0 -margin_bottom = 335.0 +margin_left = -633.0 +margin_top = 26.0 +margin_right = -426.0 +margin_bottom = 355.0 [node name="ScrollContainer2" type="ScrollContainer" parent="Panel"] anchor_right = 1.0 @@ -96,7 +105,7 @@ scroll_horizontal_enabled = false [node name="VBoxContainer" type="VBoxContainer" parent="Panel/ScrollContainer2"] margin_right = 201.0 -margin_bottom = 1389.0 +margin_bottom = 1523.0 size_flags_horizontal = 3 size_flags_vertical = 3 custom_constants/separation = 5 @@ -106,6 +115,7 @@ margin_right = 201.0 margin_bottom = 12.0 [node name="ColorsSimpleLabel" type="Label" parent="Panel/ScrollContainer2/VBoxContainer/HBoxContainer"] +modulate = Color( 0.392157, 0.823529, 0.419608, 1 ) margin_right = 69.0 margin_bottom = 11.0 size_flags_horizontal = 3 @@ -163,6 +173,7 @@ margin_right = 201.0 margin_bottom = 31.0 [node name="ColorsAdvancedLabel" type="Label" parent="Panel/ScrollContainer2/VBoxContainer"] +modulate = Color( 0.392157, 0.823529, 0.419608, 1 ) margin_top = 36.0 margin_right = 201.0 margin_bottom = 47.0 @@ -206,6 +217,7 @@ margin_right = 201.0 margin_bottom = 281.0 [node name="HitsparkLabel" type="Label" parent="Panel/ScrollContainer2/VBoxContainer"] +modulate = Color( 0.392157, 0.823529, 0.419608, 1 ) margin_top = 286.0 margin_right = 201.0 margin_bottom = 297.0 @@ -235,10 +247,11 @@ margin_right = 201.0 margin_bottom = 328.0 [node name="TrailEditLabel" type="Label" parent="Panel/ScrollContainer2/VBoxContainer/HBoxContainer2"] +modulate = Color( 0.392157, 0.823529, 0.419608, 1 ) margin_right = 126.0 margin_bottom = 11.0 size_flags_horizontal = 3 -text = "Particle Aura" +text = "Aura" [node name="ShowAura" type="CheckButton" parent="Panel/ScrollContainer2/VBoxContainer/HBoxContainer2"] unique_name_in_owner = true @@ -251,25 +264,23 @@ text = "show aura" unique_name_in_owner = true margin_top = 333.0 margin_right = 201.0 -margin_bottom = 1463.0 +margin_bottom = 1523.0 [node name="MovingSprite" type="Sprite" parent="."] unique_name_in_owner = true material = ExtResource( 4 ) -position = Vector2( 232, 220 ) -z_index = 10 +position = Vector2( 392, 220 ) texture = ExtResource( 5 ) [node name="StaticSprite" type="Sprite" parent="."] unique_name_in_owner = true material = ExtResource( 4 ) -position = Vector2( 232, 156 ) -z_index = 10 +position = Vector2( 392, 156 ) texture = ExtResource( 5 ) [node name="HitsparkDisplay" type="Node2D" parent="."] unique_name_in_owner = true -position = Vector2( 232, 96 ) +position = Vector2( 392, 96 ) [node name="BackButton" type="Button" parent="."] unique_name_in_owner = true @@ -280,14 +291,25 @@ margin_bottom = 354.0 size_flags_horizontal = 0 text = "go back" -[node name="SavedLabel" type="Label" parent="."] +[node name="HBoxContainer2" type="HBoxContainer" parent="."] +margin_right = 40.0 +margin_bottom = 40.0 + +[node name="DLCWarning" type="RichTextLabel" parent="."] unique_name_in_owner = true visible = false -margin_left = 139.0 -margin_top = 31.0 -margin_right = 179.0 -margin_bottom = 42.0 -text = "style saved" +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +margin_left = -102.0 +margin_top = -339.0 +margin_right = 312.0 +margin_bottom = -325.0 +bbcode_enabled = true +bbcode_text = "[center]This style will not be usable in multiplayer without the [url][color=#64d26b]Supporter Pack![/color]" +text = "This style will not be usable in multiplayer without the Supporter Pack!" [connection signal="text_entered" from="HBoxContainer/StyleName" to="." method="_on_StyleName_text_entered"] [connection signal="pressed" from="HBoxContainer/OpenFolderButton" to="." method="_on_OpenFolderButton_pressed"] +[connection signal="meta_clicked" from="DLCWarning" to="." method="_on_DLCWarning_meta_clicked"] diff --git a/ui/CustomizationScreen/LoadStyleButton.gd b/ui/CustomizationScreen/LoadStyleButton.gd index ab0dc8f7..431f4f7b 100644 --- a/ui/CustomizationScreen/LoadStyleButton.gd +++ b/ui/CustomizationScreen/LoadStyleButton.gd @@ -2,13 +2,19 @@ extends OptionButton signal style_selected(style) +export var player_id = 1 + var loaded_styles = [] func update_styles(): clear() loaded_styles.clear() add_item("load style") - var styles = Custom.load_all_styles() + var all_styles = Custom.load_all_styles() + var styles = [] + for style in all_styles: + if Custom.can_use_style(player_id, style): + styles.append(style) for i in range(styles.size()): var style = styles[i] add_item(style.style_name, i) diff --git a/ui/CustomizationScreen/SettingsSlider.gd b/ui/CustomizationScreen/SettingsSlider.gd index d146d692..7042b5bf 100644 --- a/ui/CustomizationScreen/SettingsSlider.gd +++ b/ui/CustomizationScreen/SettingsSlider.gd @@ -27,6 +27,10 @@ func _on_HSlider_value_changed(value): emit_signal("value_changed", value) $"%Value".text = str(value) +func set_value(value): + slider.value = value + _on_HSlider_value_changed(value) + func get_data(): return value diff --git a/ui/CustomizationScreen/TrailSettings.gd b/ui/CustomizationScreen/TrailSettings.gd index b6afe0a9..71d07ff4 100644 --- a/ui/CustomizationScreen/TrailSettings.gd +++ b/ui/CustomizationScreen/TrailSettings.gd @@ -40,9 +40,29 @@ onready var settings_map = { $"%End Alpha": "end_alpha", $"%X Offset": "x_offset", $"%Y Offset": "y_offset", - + $"%Angle": "angle", + $"%Angle Randomness": "angle_random", } +var nodes_map = {} + +func load_settings(settings): + for setting in settings: + if setting in nodes_map: + var node = nodes_map[setting] + var value = settings[setting] + if value is float and node is SettingsSlider: + node.set_value(value) + if value is bool and node is BaseButton: + node.set_pressed(value) + if value is Color and node is YomiColorPicker: + node.set_color(value) + if (value is int or value is float) and node is SpinBox: + node.set_value(value) + if value is Vector2 and node is XYPlot: + node.set_value_float(value) +# yield(get_tree(), "idle_frame") + func _ready(): $"%Shape".max_value = CustomTrailParticle.get_shapes().size() - 1 for node in settings_map: @@ -54,7 +74,8 @@ func _ready(): node.connect("data_changed", self, "_setting_value_changed") if node.has_signal("color_changed"): node.connect("color_changed", self, "_setting_value_changed") - pass + var setting = settings_map[node] + nodes_map[setting] = node pass # Replace with function body. func _setting_value_changed(_value=null): diff --git a/ui/CustomizationScreen/TrailSettings.tscn b/ui/CustomizationScreen/TrailSettings.tscn index 175e6257..5737e091 100644 --- a/ui/CustomizationScreen/TrailSettings.tscn +++ b/ui/CustomizationScreen/TrailSettings.tscn @@ -28,10 +28,25 @@ min_value = 0.064 max_value = 2.0 step = 0.001 -[node name="HFlowContainer" type="HFlowContainer" parent="."] +[node name="Lifetime Randomness" parent="." instance=ExtResource( 3 )] +unique_name_in_owner = true margin_top = 60.0 +margin_bottom = 85.0 +default_value = 0.5 +max_value = 1.0 + +[node name="Speed Scale" parent="." instance=ExtResource( 3 )] +unique_name_in_owner = true +margin_top = 90.0 +margin_bottom = 115.0 +default_value = 2.0 +min_value = 0.1 +max_value = 10.0 + +[node name="HFlowContainer" type="HFlowContainer" parent="."] +margin_top = 120.0 margin_right = 212.0 -margin_bottom = 72.0 +margin_bottom = 132.0 [node name="InFront" type="CheckButton" parent="HFlowContainer"] unique_name_in_owner = true @@ -49,9 +64,9 @@ size_flags_horizontal = 0 text = "local" [node name="HBoxContainer" type="HBoxContainer" parent="."] -margin_top = 77.0 +margin_top = 137.0 margin_right = 212.0 -margin_bottom = 88.0 +margin_bottom = 148.0 [node name="Label" type="Label" parent="HBoxContainer"] margin_right = 30.0 @@ -65,10 +80,37 @@ margin_right = 79.0 margin_bottom = 11.0 max_value = 3.0 +[node name="Angle" parent="." instance=ExtResource( 3 )] +unique_name_in_owner = true +margin_top = 153.0 +margin_bottom = 178.0 +min_value = -360.0 +max_value = 360.0 + +[node name="Angle Randomness" parent="." instance=ExtResource( 3 )] +unique_name_in_owner = true +margin_top = 183.0 +margin_bottom = 208.0 +max_value = 1.0 + +[node name="Gravity X" parent="." instance=ExtResource( 3 )] +unique_name_in_owner = true +margin_top = 213.0 +margin_bottom = 238.0 +min_value = -100.0 +step = 0.1 + +[node name="Gravity Y" parent="." instance=ExtResource( 3 )] +unique_name_in_owner = true +margin_top = 243.0 +margin_bottom = 268.0 +min_value = -100.0 +step = 0.1 + [node name="HFlowContainer2" type="HFlowContainer" parent="."] -margin_top = 93.0 +margin_top = 273.0 margin_right = 212.0 -margin_bottom = 155.0 +margin_bottom = 335.0 [node name="Direction" parent="HFlowContainer2" instance=ExtResource( 4 )] unique_name_in_owner = true @@ -81,170 +123,139 @@ default_value = Vector2( 0, -1 ) [node name="Direction Spread" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true -margin_top = 160.0 -margin_bottom = 185.0 +margin_top = 340.0 +margin_bottom = 365.0 max_value = 180.0 step = 1.0 [node name="Initial Velocity" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true -margin_top = 190.0 -margin_bottom = 215.0 -default_value = 20.0 -min_value = -100.0 -step = 0.1 - -[node name="Initial Velocity Randomness" parent="." instance=ExtResource( 3 )] -unique_name_in_owner = true -margin_top = 220.0 -margin_bottom = 245.0 -max_value = 1.0 -step = 0.001 - -[node name="Start Scale" parent="." instance=ExtResource( 3 )] -unique_name_in_owner = true -margin_top = 250.0 -margin_bottom = 275.0 -default_value = 1.0 -max_value = 5.0 - -[node name="End Scale" parent="." instance=ExtResource( 3 )] -unique_name_in_owner = true -margin_top = 280.0 -margin_bottom = 305.0 -default_value = 1.0 -max_value = 5.0 - -[node name="Scale Randomness" parent="." instance=ExtResource( 3 )] -unique_name_in_owner = true -margin_top = 310.0 -margin_bottom = 335.0 -max_value = 1.0 - -[node name="Speed Scale" parent="." instance=ExtResource( 3 )] -unique_name_in_owner = true -margin_top = 340.0 -margin_bottom = 365.0 -default_value = 2.0 -min_value = 0.1 -max_value = 10.0 - -[node name="Gravity X" parent="." instance=ExtResource( 3 )] -unique_name_in_owner = true margin_top = 370.0 margin_bottom = 395.0 min_value = -100.0 step = 0.1 -[node name="Gravity Y" parent="." instance=ExtResource( 3 )] +[node name="Initial Velocity Randomness" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true margin_top = 400.0 margin_bottom = 425.0 -min_value = -100.0 -step = 0.1 +max_value = 1.0 +step = 0.001 -[node name="Explosiveness" parent="." instance=ExtResource( 3 )] +[node name="Linear Accel" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true margin_top = 430.0 margin_bottom = 455.0 -max_value = 1.0 +min_value = -100.0 +step = 0.1 -[node name="Rect Size X" parent="." instance=ExtResource( 3 )] +[node name="Linear Accel Randomness" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true margin_top = 460.0 margin_bottom = 485.0 -default_value = 12.0 -max_value = 32.0 +max_value = 1.0 +step = 0.001 -[node name="Rect Size Y" parent="." instance=ExtResource( 3 )] +[node name="Radial Accel" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true margin_top = 490.0 margin_bottom = 515.0 -default_value = 12.0 -max_value = 32.0 +min_value = -100.0 +step = 0.1 -[node name="X Offset" parent="." instance=ExtResource( 3 )] +[node name="Radial Accel Randomness" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true margin_top = 520.0 margin_bottom = 545.0 -min_value = -24.0 -max_value = 24.0 +max_value = 1.0 +step = 0.001 -[node name="Y Offset" parent="." instance=ExtResource( 3 )] +[node name="Tangential Accel" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true margin_top = 550.0 margin_bottom = 575.0 -min_value = -24.0 -max_value = 24.0 +min_value = -100.0 +step = 0.1 -[node name="Lifetime Randomness" parent="." instance=ExtResource( 3 )] +[node name="Tangential Accel Randomness" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true margin_top = 580.0 margin_bottom = 605.0 -default_value = 0.5 max_value = 1.0 +step = 0.001 -[node name="Linear Accel" parent="." instance=ExtResource( 3 )] +[node name="Orbit Velocity" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true margin_top = 610.0 margin_bottom = 635.0 -min_value = -100.0 +min_value = -3.0 +max_value = 3.0 step = 0.1 -[node name="Linear Accel Randomness" parent="." instance=ExtResource( 3 )] +[node name="Orbit Velocity Randomness" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true margin_top = 640.0 margin_bottom = 665.0 max_value = 1.0 step = 0.001 -[node name="Radial Accel" parent="." instance=ExtResource( 3 )] +[node name="Start Scale" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true margin_top = 670.0 margin_bottom = 695.0 -min_value = -100.0 -step = 0.1 +default_value = 1.0 +max_value = 5.0 -[node name="Radial Accel Randomness" parent="." instance=ExtResource( 3 )] +[node name="End Scale" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true margin_top = 700.0 margin_bottom = 725.0 -max_value = 1.0 -step = 0.001 +default_value = 1.0 +max_value = 5.0 -[node name="Tangential Accel" parent="." instance=ExtResource( 3 )] +[node name="Scale Randomness" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true margin_top = 730.0 margin_bottom = 755.0 -min_value = -100.0 -step = 0.1 +max_value = 1.0 -[node name="Tangential Accel Randomness" parent="." instance=ExtResource( 3 )] +[node name="Explosiveness" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true margin_top = 760.0 margin_bottom = 785.0 max_value = 1.0 -step = 0.001 -[node name="Orbit Velocity" parent="." instance=ExtResource( 3 )] +[node name="Rect Size X" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true margin_top = 790.0 margin_bottom = 815.0 -min_value = -3.0 -max_value = 3.0 -step = 0.1 +default_value = 12.0 +max_value = 32.0 -[node name="Orbit Velocity Randomness" parent="." instance=ExtResource( 3 )] +[node name="Rect Size Y" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true margin_top = 820.0 margin_bottom = 845.0 +default_value = 12.0 +max_value = 32.0 + +[node name="X Offset" parent="." instance=ExtResource( 3 )] +unique_name_in_owner = true +margin_top = 850.0 +margin_bottom = 875.0 +min_value = -24.0 +max_value = 24.0 + +[node name="Y Offset" parent="." instance=ExtResource( 3 )] +unique_name_in_owner = true +margin_top = 880.0 +margin_bottom = 905.0 max_value = 1.0 -step = 0.001 [node name="ColorPickers" type="TabContainer" parent="."] -margin_top = 850.0 +margin_top = 910.0 margin_right = 212.0 -margin_bottom = 1070.0 +margin_bottom = 1130.0 rect_min_size = Vector2( 0, 220 ) tab_align = 0 @@ -273,16 +284,16 @@ margin_bottom = 0.0 [node name="Start Alpha" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true -margin_top = 1075.0 -margin_bottom = 1100.0 +margin_top = 1135.0 +margin_bottom = 1160.0 default_value = 1.0 max_value = 1.0 step = 0.001 [node name="End Alpha" parent="." instance=ExtResource( 3 )] unique_name_in_owner = true -margin_top = 1105.0 -margin_bottom = 1130.0 +margin_top = 1165.0 +margin_bottom = 1190.0 default_value = 1.0 max_value = 1.0 step = 0.001 diff --git a/ui/GameSettingsPanelContainer.tscn b/ui/GameSettingsPanelContainer.tscn index 56336729..3b9a9807 100644 --- a/ui/GameSettingsPanelContainer.tscn +++ b/ui/GameSettingsPanelContainer.tscn @@ -26,8 +26,8 @@ scroll_horizontal_enabled = false [node name="GameSettingsContainer" type="VBoxContainer" parent="ScrollContainer"] unique_name_in_owner = true -margin_right = 152.0 -margin_bottom = 163.0 +margin_right = 158.0 +margin_bottom = 174.0 size_flags_horizontal = 3 size_flags_vertical = 3 diff --git a/ui/NagWindow.tscn b/ui/NagWindow.tscn index 7200c8fc..8e119611 100644 --- a/ui/NagWindow.tscn +++ b/ui/NagWindow.tscn @@ -43,13 +43,13 @@ mouse_filter = 2 [node name="TickerText" type="RichTextLabel" parent="VBoxContainer/Ticker"] unique_name_in_owner = true -margin_left = 229.0 +margin_left = 261.0 margin_top = 1.0 -margin_right = 4519.0 +margin_right = 4765.0 margin_bottom = 13.0 mouse_filter = 2 bbcode_enabled = true -bbcode_text = "[color=#ff333d]SAVE A LIFE!!![/color] FOR ALL THAT IS GOOD AND HOLY, BUY THE YOMI HUSTLE SUPPORTER PACK ON THE STEAM STORE FOR $4.99 USD!!! GET YOUR SWAG ALL THE WAY ON WITH EXTRA COSMETIC FEATURES AND DIGITAL STATUS SYMBOLS WITH WHICH TO FLEX ON YOUR PEERS, AND DO IT RIGHT NOW OR ELSE IT'S OVER FOR ME, INDIE GAME'S DEVELOPER IVY SLY!!! MY LIFE WILL BE IN RUIN!!! MY WIFE WILL RUN AWAY!!! MY DOG WILL LEAVE ME!!! ALL THAT I KNOW AND LOVE WILL PERISH!!! WORST OF ALL: AS THE FINAL, STRAINED BREATH IS SQUEEZED FROM MY EMACIATED BODY, THE ENTIRE DEVELOPMENT EFFORT FOR HIT VIDEOGAME STICK FIGURE YOMI HUSTLE WILL CRUMBLE TO DUST!!! WITH NOBODY AT THE WHEEL, YOUR MAIN WILL STAY BOTTOM TIER FOR THE REMAINDER OF ETERNOTY!!! I BEG OF YOU, PURCHASE THE YOMI $4.99 SUPPORTER HUSTLE PACK ON STEAM IMMEDIATELY SO I MAY REPAY MY DEBT TO GOD!!!!!!1" -text = "SAVE A LIFE!!! FOR ALL THAT IS GOOD AND HOLY, BUY THE YOMI HUSTLE SUPPORTER PACK ON THE STEAM STORE FOR $4.99 USD!!! GET YOUR SWAG ALL THE WAY ON WITH EXTRA COSMETIC FEATURES AND DIGITAL STATUS SYMBOLS WITH WHICH TO FLEX ON YOUR PEERS, AND DO IT RIGHT NOW OR ELSE IT'S OVER FOR ME, INDIE GAME'S DEVELOPER IVY SLY!!! MY LIFE WILL BE IN RUIN!!! MY WIFE WILL RUN AWAY!!! MY DOG WILL LEAVE ME!!! ALL THAT I KNOW AND LOVE WILL PERISH!!! WORST OF ALL: AS THE FINAL, STRAINED BREATH IS SQUEEZED FROM MY EMACIATED BODY, THE ENTIRE DEVELOPMENT EFFORT FOR HIT VIDEOGAME STICK FIGURE YOMI HUSTLE WILL CRUMBLE TO DUST!!! WITH NOBODY AT THE WHEEL, YOUR MAIN WILL STAY BOTTOM TIER FOR THE REMAINDER OF ETERNOTY!!! I BEG OF YOU, PURCHASE THE YOMI $4.99 SUPPORTER HUSTLE PACK ON STEAM IMMEDIATELY SO I MAY REPAY MY DEBT TO GOD!!!!!!1" +bbcode_text = "HEY YOU!!! [color=#ff333d]SAVE A LIFE!!![/color] FOR ALL THAT IS GOOD AND HOLY, BUY THE YOMI HUSTLE SUPPORTER PACK ON THE STEAM STORE FOR [color=#64d26b]$4.99 USD!!![/color] GET YOUR SWAG ALL THE WAY ON WITH EXTRA COSMETIC FEATURES AND DIGITAL STATUS SYMBOLS WITH WHICH TO FLEX ON YOUR PEERS, AND DO IT RIGHT NOW OR ELSE IT'S OVER FOR ME, INDIE GAME'S DEVELOPER IVY SLY!!! MY LIFE WILL BE IN RUIN!!! MY WIFE WILL RUN AWAY!!! MY DOG WILL LEAVE ME!!! ALL THAT I KNOW AND LOVE WILL PERISH!!! WORST OF ALL: AS THE FINAL, STRAINED BREATH IS SQUEEZED FROM MY EMACIATED BODY, THE ENTIRE DEVELOPMENT EFFORT FOR HIT VIDEOGAME STICK FIGURE YOMI HUSTLE WILL CRUMBLE TO DUST!!! WITH NOBODY AT THE WHEEL, YOUR MAIN WILL STAY BOTTOM TIER FOR THE REMAINDER OF ETERNOTY!!! I BEG OF YOU, PURCHASE THE YOMI [color=#64d26b]$4.99[/color] SUPPORTER HUSTLE PACK ON STEAM IMMEDIATELY SO I MAY REPAY MY DEBT TO GOD!!!!!!1" +text = "HEY YOU!!! SAVE A LIFE!!! FOR ALL THAT IS GOOD AND HOLY, BUY THE YOMI HUSTLE SUPPORTER PACK ON THE STEAM STORE FOR $4.99 USD!!! GET YOUR SWAG ALL THE WAY ON WITH EXTRA COSMETIC FEATURES AND DIGITAL STATUS SYMBOLS WITH WHICH TO FLEX ON YOUR PEERS, AND DO IT RIGHT NOW OR ELSE IT'S OVER FOR ME, INDIE GAME'S DEVELOPER IVY SLY!!! MY LIFE WILL BE IN RUIN!!! MY WIFE WILL RUN AWAY!!! MY DOG WILL LEAVE ME!!! ALL THAT I KNOW AND LOVE WILL PERISH!!! WORST OF ALL: AS THE FINAL, STRAINED BREATH IS SQUEEZED FROM MY EMACIATED BODY, THE ENTIRE DEVELOPMENT EFFORT FOR HIT VIDEOGAME STICK FIGURE YOMI HUSTLE WILL CRUMBLE TO DUST!!! WITH NOBODY AT THE WHEEL, YOUR MAIN WILL STAY BOTTOM TIER FOR THE REMAINDER OF ETERNOTY!!! I BEG OF YOU, PURCHASE THE YOMI $4.99 SUPPORTER HUSTLE PACK ON STEAM IMMEDIATELY SO I MAY REPAY MY DEBT TO GOD!!!!!!1" fit_content_height = true scroll_active = false diff --git a/ui/NagWindow2.gd b/ui/NagWindow2.gd index 27626b94..7cd689c9 100644 --- a/ui/NagWindow2.gd +++ b/ui/NagWindow2.gd @@ -11,7 +11,7 @@ var dir = Vector2(1, 1) # Called when the node enters the scene tree for the first time. func _ready(): $"%ShowButton".connect("pressed", self, "queue_free") - $"%StoreButton".connect("pressed", OS, "shell_open", [STEAM_URL]) + $"%StoreButton".connect("pressed", self, "_on_store_button_pressed") pass # Replace with function body. # Called every frame. 'delta' is the elapsed time since the previous frame. @@ -23,6 +23,9 @@ func _on_LabelBlink_timeout(): else: $"%Title".modulate.a = 0.0 +func _on_store_button_pressed(): + Steam.activateGameOverlayToStore(Custom.SUPPORTER_PACK) + func _process(delta): rect_position += MOVE_SPEED * dir * delta var viewport_size = get_viewport_rect().size diff --git a/ui/NagWindow2.tscn b/ui/NagWindow2.tscn index fa9fcccf..0cae08e1 100644 --- a/ui/NagWindow2.tscn +++ b/ui/NagWindow2.tscn @@ -21,7 +21,7 @@ margin_right = 176.0 [node name="Title" parent="VBoxContainer/TitleBar" index="0"] unique_name_in_owner = true -text = "URGENT MESASGE FROM IVYSLY" +text = "URGENT MESASGE FROM IVY SLY" [node name="ShowButton" type="TextureButton" parent="VBoxContainer/TitleBar" index="1"] unique_name_in_owner = true diff --git a/ui/SteamLobby/SteamLobby.tscn b/ui/SteamLobby/SteamLobby.tscn index 6d4eda3f..691410d9 100644 --- a/ui/SteamLobby/SteamLobby.tscn +++ b/ui/SteamLobby/SteamLobby.tscn @@ -106,7 +106,8 @@ margin_bottom = 303.0 [node name="UserList" type="VBoxContainer" parent="MarginContainer/HBoxContainer/PanelContainer/VBoxContainer/HBoxContainer/MarginContainer/VBoxContainer/HBoxContainer/UserListPanel/ScrollContainer"] unique_name_in_owner = true -margin_bottom = 30.0 +margin_right = 129.0 +margin_bottom = 302.0 size_flags_horizontal = 3 size_flags_vertical = 3 @@ -135,7 +136,8 @@ margin_bottom = 303.0 [node name="MatchList" type="VBoxContainer" parent="MarginContainer/HBoxContainer/PanelContainer/VBoxContainer/HBoxContainer/MarginContainer/VBoxContainer/HBoxContainer/MatchListPanel/ScrollContainer"] unique_name_in_owner = true -margin_bottom = 204.0 +margin_right = 219.0 +margin_bottom = 302.0 size_flags_horizontal = 3 size_flags_vertical = 3 diff --git a/ui/SteamLobby/SteamLobbyList.tscn b/ui/SteamLobby/SteamLobbyList.tscn index 81c9b7d5..a6cbb7bb 100644 --- a/ui/SteamLobby/SteamLobbyList.tscn +++ b/ui/SteamLobby/SteamLobbyList.tscn @@ -83,7 +83,7 @@ size_flags_vertical = 3 [node name="LobbyList" type="VBoxContainer" parent="NetworkSetupScreen/LobbyListContainer"] unique_name_in_owner = true -margin_right = 110.0 +margin_right = 330.0 margin_bottom = 356.0 size_flags_horizontal = 3 size_flags_vertical = 3 diff --git a/ui/UILayer.gd b/ui/UILayer.gd index a9d7f51b..8be46236 100644 --- a/ui/UILayer.gd +++ b/ui/UILayer.gd @@ -242,6 +242,7 @@ func reset_ui(): $"%PostGameButtons".hide() $"%OpponentDisconnectedLabel".hide() forfeit_pressed = false + actionable = false func _on_quit_button_pressed(): if will_forfeit(): diff --git a/ui/XYPlot/XYPlot.gd b/ui/XYPlot/XYPlot.gd index f67feb19..a7aba354 100644 --- a/ui/XYPlot/XYPlot.gd +++ b/ui/XYPlot/XYPlot.gd @@ -42,6 +42,11 @@ func _ready(): panel.connect("data_changed", self, "emit_signal", ["data_changed"]) panel.parent = self +func set_value_float(value): +# panel.x_value_float = value.x +# panel.y_value_float = value.y + panel.update_value(value) + func get_value(): return panel.get_value()