sync
This commit is contained in:
@@ -264,12 +264,32 @@ public class CupidSettings
|
||||
public int waiting_time;
|
||||
public int port_range_min;
|
||||
public int port_range_max;
|
||||
public CupidGameEntry[] games;
|
||||
/// <summary>RC stake per player for the default match (<c>/settings</c>), in coin units (same as matchmaker <c>entry_fee</c>).</summary>
|
||||
public int entry_fee;
|
||||
/// <summary>Optional side-bet or table minimum from matchmaker settings; same units as <see cref="entry_fee"/>.</summary>
|
||||
public int bet_fee;
|
||||
/// <summary>Winner net RC prize from settings, coin units (same as room <c>rc_prize</c>).</summary>
|
||||
public int rc_prize;
|
||||
public CupidTableSettings table_settings;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class CupidGameEntry
|
||||
{
|
||||
public string name;
|
||||
public string exe;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class CupidTableSettings
|
||||
{
|
||||
public string entry_fee;
|
||||
public string bet_fee;
|
||||
/// <summary>Minimum client version (e.g. <c>0.99</c>, <c>1.21</c>). Compared to <see cref="Application.version"/>.</summary>
|
||||
public string version;
|
||||
public string error_msg;
|
||||
public string warning_msg;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
|
||||
@@ -1647,6 +1647,456 @@ MonoBehaviour:
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 10188005
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -2.97
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 5
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 6
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 8
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 9
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 10
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 12
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 13
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 15
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 16
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 17
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 18
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 20
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 22
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -1.26
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 23
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.99
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 30
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -2.97
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 31
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 32
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 34
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 35
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 36
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 38
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 39
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 41
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 42
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 43
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 44
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 46
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.45000002
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 48
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -1.26
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 49
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 25
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: -0.99
|
||||
m_YAdvance: 0
|
||||
m_SecondAdjustmentRecord:
|
||||
m_GlyphIndex: 56
|
||||
m_GlyphValueRecord:
|
||||
m_XPlacement: 0
|
||||
m_YPlacement: 0
|
||||
m_XAdvance: 0
|
||||
m_YAdvance: 0
|
||||
m_FeatureLookupFlags: 1016088
|
||||
- m_FirstAdjustmentRecord:
|
||||
m_GlyphIndex: 26
|
||||
m_GlyphValueRecord:
|
||||
|
||||
+40
-71
@@ -1,72 +1,41 @@
|
||||
Logger initiated at 5/19/2026 1:11:43 AM
|
||||
Logger initiated at 5/27/2026 11:22:24 PM
|
||||
|
||||
[5/19/2026 1:11:43 AM] Cupid settings updated
|
||||
[5/19/2026 1:11:43 AM] Cupid settings updated
|
||||
[5/19/2026 1:11:46 AM] Starting matchmake as warlock
|
||||
[5/19/2026 1:11:51 AM] Still waiting: {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock","LastSeen":1779133311048,"UserId":2,"l10_wins":3,"l10_losses":1}],"GameName":"soccar","Port":26486,"InitTime":1779133311048,"entry_fee":21,"match_id":60,"rc_prize":34,"your_team":"red"},"for_blue":null}
|
||||
[5/19/2026 1:11:52 AM] Got into a room
|
||||
[5/19/2026 1:11:52 AM] {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock","LastSeen":1779133312496,"UserId":2,"l10_wins":3,"l10_losses":1},{"Name":"warlock3","LastSeen":1779133311431,"UserId":6,"l10_wins":1,"l10_losses":5}],"GameName":"soccar","Port":26486,"InitTime":1779133311048,"entry_fee":21,"match_id":60,"instance_started":true,"rc_prize":34,"your_team":"red"},"for_blue":{"Players":[{"Name":"warlock","LastSeen":1779133312496,"UserId":2,"l10_wins":3,"l10_losses":1},{"Name":"warlock3","LastSeen":1779133311431,"UserId":6,"l10_wins":1,"l10_losses":5}],"GameName":"soccar","Port":26486,"InitTime":1779133311048,"entry_fee":21,"match_id":60,"instance_started":true,"rc_prize":34,"your_team":"blue"}}
|
||||
[5/19/2026 1:11:52 AM] Configured dedicated match reporting for match id 60 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
|
||||
[5/19/2026 1:11:52 AM] Setting cupid to load game scene
|
||||
[5/19/2026 1:11:52 AM] Loading game scene
|
||||
[5/19/2026 1:11:58 AM] Starting client at $kickkingsapi.playpoolstudios.com:26486
|
||||
[5/19/2026 1:11:58 AM] Client connected
|
||||
[5/19/2026 1:12:04 AM] Selected team changed from Red to Blue
|
||||
[5/19/2026 1:12:05 AM] Score changed from 0 to 1
|
||||
[5/19/2026 1:12:08 AM] Selected team changed from Blue to Red
|
||||
[5/19/2026 1:12:13 AM] Selected team changed from Red to Blue
|
||||
[5/19/2026 1:12:17 AM] Selected team changed from Blue to Red
|
||||
[5/19/2026 1:12:21 AM] Selected team changed from Red to Blue
|
||||
[5/19/2026 1:12:25 AM] Selected team changed from Blue to Red
|
||||
[5/19/2026 1:12:31 AM] Selected team changed from Red to Blue
|
||||
[5/19/2026 1:12:36 AM] Selected team changed from Blue to Red
|
||||
[5/19/2026 1:12:40 AM] Selected team changed from Red to Blue
|
||||
[5/19/2026 1:12:45 AM] Selected team changed from Blue to Red
|
||||
[5/19/2026 1:12:49 AM] Selected team changed from Red to Blue
|
||||
[5/19/2026 1:12:52 AM] Selected team changed from Blue to Red
|
||||
[5/19/2026 1:12:53 AM] Selected team changed from Red to Blue
|
||||
[5/19/2026 1:12:53 AM] Score changed from 1 to 2
|
||||
[5/19/2026 1:12:56 AM] Selected team changed from Blue to Red
|
||||
[5/19/2026 1:13:03 AM] Selected team changed from Red to Blue
|
||||
[5/19/2026 1:13:05 AM] Score changed from 2 to 3
|
||||
[5/19/2026 1:13:35 AM] Client disconnected
|
||||
[5/19/2026 1:13:41 AM] Cupid settings updated
|
||||
[5/19/2026 1:13:41 AM] Cupid settings updated
|
||||
[5/19/2026 1:13:51 AM] Starting matchmake as warlock
|
||||
[5/19/2026 1:14:03 AM] Still waiting: {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock","LastSeen":1779133443158,"UserId":2,"l10_wins":3,"l10_losses":2}],"GameName":"soccar","Port":26999,"InitTime":1779133443158,"entry_fee":21,"match_id":61,"rc_prize":34,"your_team":"red"},"for_blue":null}
|
||||
[5/19/2026 1:14:04 AM] Got into a room
|
||||
[5/19/2026 1:14:04 AM] {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock","LastSeen":1779133444601,"UserId":2,"l10_wins":3,"l10_losses":2},{"Name":"warlock3","LastSeen":1779133443864,"UserId":6,"l10_wins":2,"l10_losses":5}],"GameName":"soccar","Port":26999,"InitTime":1779133443158,"entry_fee":21,"match_id":61,"instance_started":true,"rc_prize":34,"your_team":"red"},"for_blue":{"Players":[{"Name":"warlock","LastSeen":1779133444601,"UserId":2,"l10_wins":3,"l10_losses":2},{"Name":"warlock3","LastSeen":1779133443864,"UserId":6,"l10_wins":2,"l10_losses":5}],"GameName":"soccar","Port":26999,"InitTime":1779133443158,"entry_fee":21,"match_id":61,"instance_started":true,"rc_prize":34,"your_team":"blue"}}
|
||||
[5/19/2026 1:14:04 AM] Configured dedicated match reporting for match id 61 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
|
||||
[5/19/2026 1:14:04 AM] Setting cupid to load game scene
|
||||
[5/19/2026 1:14:04 AM] Loading game scene
|
||||
[5/19/2026 1:14:08 AM] Starting client at $kickkingsapi.playpoolstudios.com:26999
|
||||
[5/19/2026 1:14:09 AM] Client connected
|
||||
[5/19/2026 1:14:24 AM] Selected team changed from Red to Blue
|
||||
[5/19/2026 1:14:29 AM] Selected team changed from Blue to Red
|
||||
[5/19/2026 1:14:31 AM] Score changed from 0 to 1
|
||||
[5/19/2026 1:14:34 AM] Selected team changed from Red to Blue
|
||||
[5/19/2026 1:14:38 AM] Selected team changed from Blue to Red
|
||||
[5/19/2026 1:14:39 AM] Score changed from 1 to 2
|
||||
[5/19/2026 1:14:42 AM] Selected team changed from Red to Blue
|
||||
[5/19/2026 1:14:46 AM] Selected team changed from Blue to Red
|
||||
[5/19/2026 1:14:47 AM] Score changed from 2 to 3
|
||||
[5/19/2026 1:14:57 AM] Configured dedicated match reporting for match id 62 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
|
||||
[5/19/2026 1:14:57 AM] Client disconnected
|
||||
[5/19/2026 1:15:02 AM] Starting client at $kickkingsapi.playpoolstudios.com:26340
|
||||
[5/19/2026 1:15:02 AM] Client connected
|
||||
[5/19/2026 1:15:07 AM] Selected team changed from Red to Blue
|
||||
[5/19/2026 1:15:08 AM] Score changed from 0 to 1
|
||||
[5/19/2026 1:15:11 AM] Selected team changed from Blue to Red
|
||||
[5/19/2026 1:15:15 AM] Selected team changed from Red to Blue
|
||||
[5/19/2026 1:15:17 AM] Score changed from 1 to 2
|
||||
[5/19/2026 1:15:20 AM] Selected team changed from Blue to Red
|
||||
[5/19/2026 1:15:35 AM] Selected team changed from Red to Blue
|
||||
[5/19/2026 1:15:42 AM] Selected team changed from Blue to Red
|
||||
[5/19/2026 1:15:45 AM] Score changed from 0 to 1
|
||||
[5/19/2026 1:15:48 AM] Selected team changed from Red to Blue
|
||||
[5/19/2026 1:16:03 AM] Selected team changed from Blue to Red
|
||||
[5/19/2026 1:16:11 AM] Selected team changed from Red to Blue
|
||||
[5/19/2026 1:16:14 AM] Score changed from 2 to 3
|
||||
[5/19/2026 1:16:29 AM] Client disconnected
|
||||
[5/19/2026 1:16:31 AM] Cupid settings updated
|
||||
[5/19/2026 1:16:31 AM] Cupid settings updated
|
||||
[5/27/2026 11:22:24 PM] Cupid settings updated
|
||||
[5/27/2026 11:22:25 PM] Cupid settings updated
|
||||
[5/27/2026 11:22:27 PM] Starting matchmake as warlock2
|
||||
[5/27/2026 11:22:27 PM] Starting matchmake as warlock
|
||||
[5/27/2026 11:22:29 PM] Still waiting: {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock2","LastSeen":1779904349877,"UserId":3,"l10_wins":3,"l10_losses":5}],"GameName":"soccar","Port":26958,"InitTime":1779904349877,"entry_fee":21,"match_id":118,"rc_prize":34,"your_team":"red"},"for_blue":null}
|
||||
[5/27/2026 11:22:30 PM] Got into a room
|
||||
[5/27/2026 11:22:30 PM] {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock2","LastSeen":1779904349877,"UserId":3,"l10_wins":3,"l10_losses":5},{"Name":"warlock","LastSeen":1779904350254,"UserId":2,"l10_wins":4,"l10_losses":2}],"GameName":"soccar","Port":26958,"InitTime":1779904349877,"entry_fee":21,"match_id":118,"instance_started":true,"rc_prize":34,"your_team":"red"},"for_blue":{"Players":[{"Name":"warlock2","LastSeen":1779904349877,"UserId":3,"l10_wins":3,"l10_losses":5},{"Name":"warlock","LastSeen":1779904350254,"UserId":2,"l10_wins":4,"l10_losses":2}],"GameName":"soccar","Port":26958,"InitTime":1779904349877,"entry_fee":21,"match_id":118,"instance_started":true,"rc_prize":34,"your_team":"blue"}}
|
||||
[5/27/2026 11:22:30 PM] Configured dedicated match reporting for match id 118 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
|
||||
[5/27/2026 11:22:30 PM] Setting cupid to load game scene
|
||||
[5/27/2026 11:22:30 PM] Loading game scene
|
||||
[5/27/2026 11:22:31 PM] Got into a room
|
||||
[5/27/2026 11:22:31 PM] {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock2","LastSeen":1779904351324,"UserId":3,"l10_wins":3,"l10_losses":5},{"Name":"warlock","LastSeen":1779904350254,"UserId":2,"l10_wins":4,"l10_losses":2}],"GameName":"soccar","Port":26958,"InitTime":1779904349877,"entry_fee":21,"match_id":118,"instance_started":true,"rc_prize":34,"your_team":"red"},"for_blue":{"Players":[{"Name":"warlock2","LastSeen":1779904351324,"UserId":3,"l10_wins":3,"l10_losses":5},{"Name":"warlock","LastSeen":1779904350254,"UserId":2,"l10_wins":4,"l10_losses":2}],"GameName":"soccar","Port":26958,"InitTime":1779904349877,"entry_fee":21,"match_id":118,"instance_started":true,"rc_prize":34,"your_team":"blue"}}
|
||||
[5/27/2026 11:22:31 PM] Configured dedicated match reporting for match id 118 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
|
||||
[5/27/2026 11:22:31 PM] Setting cupid to load game scene
|
||||
[5/27/2026 11:22:31 PM] Loading game scene
|
||||
[5/27/2026 11:22:35 PM] Starting client at $kickkingsapi.playpoolstudios.com:26958
|
||||
[5/27/2026 11:22:35 PM] Client connected
|
||||
[5/27/2026 11:22:36 PM] Starting client at $kickkingsapi.playpoolstudios.com:26958
|
||||
[5/27/2026 11:22:36 PM] Client connected
|
||||
[5/27/2026 11:22:43 PM] Selected team changed from Red to Blue
|
||||
[5/27/2026 11:22:43 PM] Selected team changed from Red to Blue
|
||||
[5/27/2026 11:22:47 PM] Selected team changed from Blue to Red
|
||||
[5/27/2026 11:22:47 PM] Score changed from 0 to 1
|
||||
[5/27/2026 11:22:47 PM] Selected team changed from Blue to Red
|
||||
[5/27/2026 11:22:47 PM] Score changed from 0 to 1
|
||||
[5/27/2026 11:22:50 PM] Selected team changed from Red to Blue
|
||||
[5/27/2026 11:22:50 PM] Selected team changed from Red to Blue
|
||||
[5/27/2026 11:22:56 PM] Selected team changed from Blue to Red
|
||||
[5/27/2026 11:22:56 PM] Selected team changed from Blue to Red
|
||||
[5/27/2026 11:22:58 PM] Score changed from 1 to 2
|
||||
[5/27/2026 11:22:58 PM] Score changed from 1 to 2
|
||||
[5/27/2026 11:23:01 PM] Selected team changed from Red to Blue
|
||||
[5/27/2026 11:23:01 PM] Selected team changed from Red to Blue
|
||||
[5/27/2026 11:23:06 PM] Selected team changed from Blue to Red
|
||||
[5/27/2026 11:23:06 PM] Selected team changed from Blue to Red
|
||||
[5/27/2026 11:23:08 PM] Score changed from 2 to 3
|
||||
[5/27/2026 11:23:08 PM] Score changed from 2 to 3
|
||||
[5/27/2026 11:23:59 PM] Client disconnected
|
||||
[5/27/2026 11:24:01 PM] Client disconnected
|
||||
|
||||
+3106
-19
File diff suppressed because it is too large
Load Diff
+3001
-3
File diff suppressed because it is too large
Load Diff
@@ -45,6 +45,20 @@ public class GameOverCanvas : MonoBehaviour
|
||||
/// <summary>Each player needs at least 2.0 RC (20 coin units) to rematch.</summary>
|
||||
const int MinimumRematchRcCoins = 20;
|
||||
|
||||
[Header("Bet Limit")]
|
||||
public TMP_Text txtBetLimitWarning;
|
||||
public CanvasGroup betLimitAdjustPanel;
|
||||
//minVal: 2, max Val 500, when its 500, show ∞ on the text
|
||||
public Slider betLimitSlider;
|
||||
public TMP_Text txtBetLimitSliderValue;
|
||||
public Button btnBetLimitAdjustAccept;
|
||||
public Button btnBetLimitAdjustCancel;
|
||||
|
||||
const string PersonalBetLimitPrefsKey = "WalkInvest.PersonalBetLimit";
|
||||
const int BetLimitMin = 2;
|
||||
const int BetLimitMax = 500;
|
||||
const int BetLimitUnlimited = 500;
|
||||
|
||||
[Header("Rematch panel")]
|
||||
public CanvasGroup rematchPanel;
|
||||
public RectTransform rematchPopup;
|
||||
@@ -85,6 +99,107 @@ public class GameOverCanvas : MonoBehaviour
|
||||
|
||||
btnConfirmBet.onClick.AddListener(OnBetAccepted);
|
||||
btnCancelBet.onClick.AddListener(OnBetCancelled);
|
||||
|
||||
SetupBetLimitUi();
|
||||
}
|
||||
|
||||
void SetupBetLimitUi()
|
||||
{
|
||||
if (betLimitSlider != null)
|
||||
{
|
||||
betLimitSlider.minValue = BetLimitMin;
|
||||
betLimitSlider.maxValue = BetLimitMax;
|
||||
betLimitSlider.wholeNumbers = true;
|
||||
betLimitSlider.onValueChanged.AddListener(OnBetLimitSliderValueChanged);
|
||||
}
|
||||
|
||||
if (btnBetLimitAdjustAccept != null)
|
||||
btnBetLimitAdjustAccept.onClick.AddListener(OnBetLimitAdjustAccepted);
|
||||
if (btnBetLimitAdjustCancel != null)
|
||||
btnBetLimitAdjustCancel.onClick.AddListener(CloseBetLimitAdjuster);
|
||||
|
||||
var warningButton = txtBetLimitWarning != null
|
||||
? txtBetLimitWarning.GetComponentInChildren<Button>()
|
||||
: null;
|
||||
if (warningButton != null)
|
||||
warningButton.onClick.AddListener(OpenBetLimitAdjuster);
|
||||
}
|
||||
|
||||
public static int GetPersonalBetLimit()
|
||||
{
|
||||
return PlayerPrefs.GetInt(PersonalBetLimitPrefsKey, BetLimitUnlimited);
|
||||
}
|
||||
|
||||
static void SetPersonalBetLimit(int limitCoins)
|
||||
{
|
||||
limitCoins = Mathf.Clamp(limitCoins, BetLimitMin, BetLimitMax);
|
||||
PlayerPrefs.SetInt(PersonalBetLimitPrefsKey, limitCoins);
|
||||
PlayerPrefs.Save();
|
||||
}
|
||||
|
||||
static string FormatBetLimitLabel(int limitCoins)
|
||||
{
|
||||
if (limitCoins >= BetLimitUnlimited)
|
||||
return "∞";
|
||||
return CoinHelper.FormatString(limitCoins) + " RC";
|
||||
}
|
||||
|
||||
static string FormatBetLimitWarningText(int limitCoins) =>
|
||||
"Max Bet : " + FormatBetLimitLabel(limitCoins);
|
||||
|
||||
void UpdateBetLimitWarningText()
|
||||
{
|
||||
if (txtBetLimitWarning != null)
|
||||
txtBetLimitWarning.text = FormatBetLimitWarningText(GetPersonalBetLimit());
|
||||
}
|
||||
|
||||
void OnBetLimitSliderValueChanged(float value)
|
||||
{
|
||||
if (txtBetLimitSliderValue != null)
|
||||
txtBetLimitSliderValue.text = FormatBetLimitLabel(Mathf.RoundToInt(value));
|
||||
}
|
||||
|
||||
void ApplyBetLimitVisibility()
|
||||
{
|
||||
bool isLoser = myTeam != winningTeam;
|
||||
if (txtBetLimitWarning != null)
|
||||
txtBetLimitWarning.gameObject.SetActive(isLoser);
|
||||
if (!isLoser)
|
||||
return;
|
||||
UpdateBetLimitWarningText();
|
||||
}
|
||||
|
||||
public void OpenBetLimitAdjuster()
|
||||
{
|
||||
if (betLimitAdjustPanel == null)
|
||||
return;
|
||||
|
||||
int limit = GetPersonalBetLimit();
|
||||
if (betLimitSlider != null)
|
||||
betLimitSlider.SetValueWithoutNotify(limit);
|
||||
OnBetLimitSliderValueChanged(limit);
|
||||
|
||||
betLimitAdjustPanel.DOFade(1, 0.25f);
|
||||
betLimitAdjustPanel.blocksRaycasts = true;
|
||||
betLimitAdjustPanel.interactable = true;
|
||||
}
|
||||
|
||||
public void CloseBetLimitAdjuster()
|
||||
{
|
||||
if (betLimitAdjustPanel == null)
|
||||
return;
|
||||
|
||||
betLimitAdjustPanel.DOFade(0, 0.25f);
|
||||
betLimitAdjustPanel.blocksRaycasts = false;
|
||||
betLimitAdjustPanel.interactable = false;
|
||||
}
|
||||
|
||||
void OnBetLimitAdjustAccepted()
|
||||
{
|
||||
if (betLimitSlider != null)
|
||||
SetPersonalBetLimit(Mathf.RoundToInt(betLimitSlider.value));
|
||||
UpdateBetLimitWarningText();
|
||||
CloseBetLimitAdjuster();
|
||||
}
|
||||
|
||||
void OnBetAccepted(){
|
||||
@@ -181,6 +296,13 @@ public class GameOverCanvas : MonoBehaviour
|
||||
rematchPanel.alpha=0;
|
||||
rematchPanel.blocksRaycasts = false;
|
||||
rematchPanel.interactable = false;
|
||||
|
||||
if (betLimitAdjustPanel != null)
|
||||
{
|
||||
betLimitAdjustPanel.alpha = 0;
|
||||
betLimitAdjustPanel.blocksRaycasts = false;
|
||||
betLimitAdjustPanel.interactable = false;
|
||||
}
|
||||
}
|
||||
|
||||
Team winningTeam;
|
||||
@@ -220,6 +342,8 @@ public class GameOverCanvas : MonoBehaviour
|
||||
p1_winner.gameObject.SetActive(false);
|
||||
p2_winner.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
ApplyBetLimitVisibility();
|
||||
}
|
||||
|
||||
float rcPrize = 0;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
#if UNITY_EDITOR
|
||||
@@ -27,12 +28,31 @@ public class LoginManager : MonoBehaviour
|
||||
[SerializeField] private Button btnLogin;
|
||||
[Header("Register")]
|
||||
[SerializeField] private TMP_InputField usernameInputRegister;
|
||||
[SerializeField] private TMP_InputField emailInputRegister;
|
||||
|
||||
[SerializeField] private TMP_InputField passwordInputRegister;
|
||||
[SerializeField] private Button btnRegister;
|
||||
|
||||
[Header("UI")]
|
||||
[SerializeField] private TMP_Text error_txt;
|
||||
|
||||
[Header("Server messages (GET /table_settings, no auth)")]
|
||||
[Header("Update")]
|
||||
[SerializeField] private GameObject serverUpdatePanel;
|
||||
[SerializeField] private Button btnServerUpdate;
|
||||
[Tooltip("Opened when the user taps Update on the forced-update panel (e.g. Telegram channel).")]
|
||||
public string telegramUpdateChannelUrl = "";
|
||||
|
||||
[Header("Error")]
|
||||
[SerializeField] private GameObject errorPanel;
|
||||
[SerializeField] private TMP_Text serverErrorMessageTxt;
|
||||
[SerializeField] private Button btnErrorClose;
|
||||
|
||||
[Header("Warning")]
|
||||
[SerializeField] private GameObject warningPanel;
|
||||
[SerializeField] private TMP_Text serverWarningMessageTxt;
|
||||
[SerializeField] private Button btnWarningClose;
|
||||
|
||||
bool _authInProgress;
|
||||
|
||||
public static string AuthToken { get; private set; }
|
||||
@@ -85,6 +105,7 @@ public class LoginManager : MonoBehaviour
|
||||
void Awake()
|
||||
{
|
||||
error_txt.text = "";
|
||||
HideServerMessagePanels();
|
||||
AuthToken = PlayerPrefs.GetString(PlayerPrefsAuthKey, "");
|
||||
|
||||
if(instance !=null){
|
||||
@@ -102,6 +123,26 @@ public class LoginManager : MonoBehaviour
|
||||
{
|
||||
btnLogin.onClick.AddListener(OnLogin);
|
||||
btnRegister.onClick.AddListener(OnRegister);
|
||||
if (btnServerUpdate != null)
|
||||
btnServerUpdate.onClick.AddListener(OnServerUpdateClick);
|
||||
if (btnErrorClose != null)
|
||||
btnErrorClose.onClick.AddListener(OnServerErrorCloseClick);
|
||||
|
||||
SetBusy(true);
|
||||
StartCoroutine(StartupSequenceCoroutine());
|
||||
}
|
||||
|
||||
IEnumerator StartupSequenceCoroutine()
|
||||
{
|
||||
bool mayContinue = false;
|
||||
yield return StartCoroutine(CoApplyTableSettingsGate(r => mayContinue = r));
|
||||
|
||||
if (!mayContinue)
|
||||
{
|
||||
// Blocked by update or error panel — keep login UI disabled.
|
||||
SetBusy(false);
|
||||
yield break;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
// Dev: log in with clone-aware credentials instead of resuming a saved session.
|
||||
@@ -117,12 +158,12 @@ public class LoginManager : MonoBehaviour
|
||||
|
||||
string loginJson = "{\"username\":\"" + EscapeJsonString(devUser) + "\",\"password\":\"" + EscapeJsonString(devPass) + "\"}";
|
||||
// StartCoroutine(AuthPostCoroutine(AuthBaseUrl + "/auth/login", loginJson, "Signed in."));
|
||||
SetBusy(false);
|
||||
#else
|
||||
if (!string.IsNullOrEmpty(AuthToken))
|
||||
{
|
||||
SetBusy(true);
|
||||
StartCoroutine(ResumeSessionCoroutine());
|
||||
}
|
||||
yield return StartCoroutine(ResumeSessionCoroutine());
|
||||
else
|
||||
SetBusy(false);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -231,13 +272,21 @@ public class LoginManager : MonoBehaviour
|
||||
if (_authInProgress) return;
|
||||
|
||||
string username = usernameInputRegister.text;
|
||||
string email = emailInputRegister != null ? emailInputRegister.text : "";
|
||||
string password = passwordInputRegister.text;
|
||||
if (string.IsNullOrEmpty(username) || string.IsNullOrEmpty(password))
|
||||
if (string.IsNullOrEmpty(username) || string.IsNullOrEmpty(email) || string.IsNullOrEmpty(password))
|
||||
{
|
||||
error_txt.text = "Please fill in all fields";
|
||||
return;
|
||||
}
|
||||
|
||||
email = email.Trim().ToLowerInvariant();
|
||||
if (!IsValidEmailFormat(email))
|
||||
{
|
||||
error_txt.text = "Please enter a valid email address";
|
||||
return;
|
||||
}
|
||||
|
||||
if (username.Length < MIN_USERNAME_LENGTH || username.Length > MAX_USERNAME_LENGTH)
|
||||
{
|
||||
error_txt.text = "Username must be between " + MIN_USERNAME_LENGTH + " and " + MAX_USERNAME_LENGTH + " characters";
|
||||
@@ -250,11 +299,36 @@ public class LoginManager : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
// Server register endpoint accepts username + password only (email field is optional UI-only).
|
||||
string json = "{\"username\":\"" + EscapeJsonString(username) + "\",\"password\":\"" + EscapeJsonString(password) + "\"}";
|
||||
string json = "{\"username\":\"" + EscapeJsonString(username) + "\",\"email\":\"" + EscapeJsonString(email) + "\",\"password\":\"" + EscapeJsonString(password) + "\"}";
|
||||
StartCoroutine(AuthPostCoroutine(AuthBaseUrl + "/auth/register", json, "Account created."));
|
||||
}
|
||||
|
||||
static bool IsValidEmailFormat(string email)
|
||||
{
|
||||
if (string.IsNullOrEmpty(email))
|
||||
return false;
|
||||
|
||||
int at = email.IndexOf('@');
|
||||
if (at <= 0)
|
||||
return false;
|
||||
|
||||
if (email.IndexOf('@', at + 1) >= 0)
|
||||
return false;
|
||||
|
||||
string domain = email.Substring(at + 1);
|
||||
int dot = domain.LastIndexOf('.');
|
||||
if (dot <= 0 || dot >= domain.Length - 1)
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < email.Length; i++)
|
||||
{
|
||||
if (char.IsWhiteSpace(email[i]))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static string EscapeJsonString(string s)
|
||||
{
|
||||
if (string.IsNullOrEmpty(s)) return s;
|
||||
@@ -325,6 +399,149 @@ public class LoginManager : MonoBehaviour
|
||||
SetBusy(false);
|
||||
}
|
||||
|
||||
void HideServerMessagePanels()
|
||||
{
|
||||
if (serverUpdatePanel != null) serverUpdatePanel.SetActive(false);
|
||||
if (errorPanel != null) errorPanel.SetActive(false);
|
||||
if (warningPanel != null) warningPanel.SetActive(false);
|
||||
}
|
||||
|
||||
void OnServerUpdateClick()
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(telegramUpdateChannelUrl))
|
||||
Application.OpenURL(telegramUpdateChannelUrl.Trim());
|
||||
}
|
||||
|
||||
void OnServerErrorCloseClick()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
EditorApplication.ExitPlaymode();
|
||||
#else
|
||||
Application.Quit();
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GET <c>/table_settings</c> (public) and applies version / error / warning gates.
|
||||
/// Callback receives <c>true</c> when login may continue to the main menu.
|
||||
/// </summary>
|
||||
IEnumerator CoApplyTableSettingsGate(Action<bool> onComplete)
|
||||
{
|
||||
CupidTableSettings table = null;
|
||||
yield return StartCoroutine(FetchTableSettingsCoroutine(t => table = t));
|
||||
|
||||
if (table == null)
|
||||
{
|
||||
onComplete?.Invoke(true);
|
||||
yield break;
|
||||
}
|
||||
|
||||
if (IsClientBelowRequiredVersion(table.version))
|
||||
{
|
||||
if (serverUpdatePanel != null)
|
||||
serverUpdatePanel.SetActive(true);
|
||||
onComplete?.Invoke(false);
|
||||
yield break;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(table.error_msg))
|
||||
{
|
||||
if (serverErrorMessageTxt != null)
|
||||
serverErrorMessageTxt.text = table.error_msg.Trim();
|
||||
if (errorPanel != null)
|
||||
errorPanel.SetActive(true);
|
||||
onComplete?.Invoke(false);
|
||||
yield break;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(table.warning_msg))
|
||||
yield return CoWaitForWarningDismiss(table.warning_msg.Trim());
|
||||
|
||||
onComplete?.Invoke(true);
|
||||
}
|
||||
|
||||
IEnumerator FetchTableSettingsCoroutine(Action<CupidTableSettings> onResult)
|
||||
{
|
||||
string url = AuthBaseUrl + "/table_settings";
|
||||
using (var request = UnityWebRequest.Get(url))
|
||||
{
|
||||
request.downloadHandler = new DownloadHandlerBuffer();
|
||||
yield return request.SendWebRequest();
|
||||
|
||||
string text = request.downloadHandler != null ? request.downloadHandler.text : "";
|
||||
|
||||
if (request.result != UnityWebRequest.Result.Success &&
|
||||
request.result != UnityWebRequest.Result.ProtocolError)
|
||||
{
|
||||
onResult?.Invoke(null);
|
||||
yield break;
|
||||
}
|
||||
|
||||
if (request.responseCode < 200 || request.responseCode >= 300 || string.IsNullOrWhiteSpace(text))
|
||||
{
|
||||
onResult?.Invoke(null);
|
||||
yield break;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
CupidTableSettings parsed = JsonUtility.FromJson<CupidTableSettings>(text);
|
||||
onResult?.Invoke(parsed);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Log("table_settings JSON error: " + e.Message + " body=" + text);
|
||||
onResult?.Invoke(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static bool IsClientBelowRequiredVersion(string requiredVersion)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(requiredVersion))
|
||||
return false;
|
||||
if (!TryParseVersionFloat(requiredVersion, out float required))
|
||||
return false;
|
||||
if (!TryParseVersionFloat(Application.version, out float client))
|
||||
return false;
|
||||
return client < required;
|
||||
}
|
||||
|
||||
static bool TryParseVersionFloat(string version, out float value)
|
||||
{
|
||||
value = 0f;
|
||||
if (string.IsNullOrWhiteSpace(version))
|
||||
return false;
|
||||
return float.TryParse(version.Trim(), NumberStyles.Float, CultureInfo.InvariantCulture, out value);
|
||||
}
|
||||
|
||||
IEnumerator CoWaitForWarningDismiss(string message)
|
||||
{
|
||||
if (serverWarningMessageTxt != null)
|
||||
serverWarningMessageTxt.text = message;
|
||||
if (warningPanel != null)
|
||||
warningPanel.SetActive(true);
|
||||
|
||||
bool dismissed = false;
|
||||
void OnDismiss()
|
||||
{
|
||||
dismissed = true;
|
||||
if (warningPanel != null)
|
||||
warningPanel.SetActive(false);
|
||||
}
|
||||
|
||||
if (btnWarningClose != null)
|
||||
{
|
||||
btnWarningClose.onClick.RemoveListener(OnDismiss);
|
||||
btnWarningClose.onClick.AddListener(OnDismiss);
|
||||
}
|
||||
|
||||
yield return new WaitUntil(() => dismissed);
|
||||
|
||||
if (btnWarningClose != null)
|
||||
btnWarningClose.onClick.RemoveListener(OnDismiss);
|
||||
}
|
||||
|
||||
static void ApplyUserData(UserData u)
|
||||
{
|
||||
_currentUser = u;
|
||||
|
||||
@@ -6,6 +6,7 @@ public class UserData
|
||||
{
|
||||
public int id;
|
||||
public string username;
|
||||
public string email;
|
||||
public int cc;
|
||||
public int rc;
|
||||
public string created_at;
|
||||
|
||||
Reference in New Issue
Block a user