From f630633daaed3dfa131b2cf318833ec153dab47a Mon Sep 17 00:00:00 2001 From: Tanasart Date: Thu, 14 Nov 2024 13:31:22 +0700 Subject: [PATCH] pat --- .gitignore | 2 ++ objects/o_dialog_patreon/Create_0.gml | 11 ++++++----- objects/o_dialog_patreon/Draw_64.gml | 7 +++++-- objects/o_main/Create_0.gml | 2 +- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 3015f188e..5e630692b 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,5 @@ __KEYS_PRIVATE scripts/panel_patreon/panel_patreon.gml objects/o_dialog_patreon/o_dialog_patreon.yy /objects/o_dialog_patreon +/scripts/patreon_email_check +/scripts/panel_patreon diff --git a/objects/o_dialog_patreon/Create_0.gml b/objects/o_dialog_patreon/Create_0.gml index 7b2b664c5..d3403936b 100644 --- a/objects/o_dialog_patreon/Create_0.gml +++ b/objects/o_dialog_patreon/Create_0.gml @@ -8,11 +8,12 @@ event_inherited(); destroy_on_click_out = false; req_sign_in = ""; + req_auth = ""; - var port = 6510; - // do { - server = network_create_server_raw(network_socket_tcp, port, 32); - // } until(server >= 0 || port >= 65535); + attmp = 0; + do { + port = irandom_range(7000, 20000); + server = network_create_server_raw(network_socket_ws, port, 32); + } until(server >= 0 || attmp++ >= 100); - // show_debug_message($"Create new server at {port}"); #endregion \ No newline at end of file diff --git a/objects/o_dialog_patreon/Draw_64.gml b/objects/o_dialog_patreon/Draw_64.gml index 910f67182..79571f544 100644 --- a/objects/o_dialog_patreon/Draw_64.gml +++ b/objects/o_dialog_patreon/Draw_64.gml @@ -33,9 +33,12 @@ if !ready exit; var _by = yy + ui(104); if(buttonInstant(THEME.button_def, _bx, _by, _bw, _bh, mouse_ui, sFOCUS, sHOVER) == 2) { - req_sign_in = url_open(@"www.patreon.com/oauth2/authorize?response_type=code + var _url = @"www.patreon.com/oauth2/authorize?response_type=code &client_id=oZ1PNvUY61uH0FiA7ZPMBy77Xau3Ok9tfvsT_Y8DQwyKeMNjaVC35r1qsK09QJhY -&redirect_uri=http://localhost:6510"); +&redirect_uri=https://pixel-composer.com/verify"; + _url += $"&state={port}"; + + url_open(_url); } draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text); diff --git a/objects/o_main/Create_0.gml b/objects/o_main/Create_0.gml index 5aee9b61e..69d111a04 100644 --- a/objects/o_main/Create_0.gml +++ b/objects/o_main/Create_0.gml @@ -267,7 +267,7 @@ for( var i = 0; i < paramCount; i++ ) { var param = parameter_string(i); - //print($" >>> params {i}: {param}"); + print($" >>> params {i}: {param}"); if(string_starts_with(param, "-")) { switch(param) {