adding in some needed packages

This commit is contained in:
reisenlol 2026-01-02 01:31:54 -08:00
parent 9e739f5dc8
commit aba5310742
No known key found for this signature in database
1012 changed files with 494191 additions and 1 deletions

View file

@ -0,0 +1,22 @@
using Dan.Enums;
namespace Dan
{
internal static class ConstantVariables
{
internal const string GUID_KEY = "LEADERBOARD_CREATOR___LOCAL_GUID";
internal static string GetServerURL(Routes route = Routes.None, string extra = "")
{
return SERVER_URL + (route == Routes.Authorize ? "/authorize" :
route == Routes.Get ? "/get" :
route == Routes.Upload ? "/entry/upload" :
route == Routes.UpdateUsername ? "/entry/update-username" :
route == Routes.DeleteEntry ? "/entry/delete" :
route == Routes.GetPersonalEntry ? "/entry/get" :
route == Routes.GetEntryCount ? "/entry/count" : "/") + extra;
}
private const string SERVER_URL = "https://lcv2-server.danqzq.games";
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 8ba37bb8809248c793a754c692830a1b
timeCreated: 1660731015

View file

@ -0,0 +1,10 @@
using System.Text.RegularExpressions;
namespace Dan
{
public static class ExtensionMethods
{
public static string SplitByUppercase(this string str) =>
Regex.Replace(str, @"(\B[A-Z]+?(?=[A-Z][^A-Z])|\B[A-Z]+?(?=[^A-Z]))", " $1");
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 07c46008f49546899a5404ae5730f8e5
timeCreated: 1660647932

View file

@ -0,0 +1,23 @@
using UnityEngine;
namespace Dan
{
public enum AuthSaveMode
{
PlayerPrefs,
PersistentDataPath,
Unhandled
}
public class LeaderboardCreatorConfig : ScriptableObject
{
public AuthSaveMode authSaveMode = AuthSaveMode.PlayerPrefs;
public string fileName = "leaderboard-creator-guid.txt";
public bool isUpdateLogsEnabled = true;
public TextAsset leaderboardsFile;
#if UNITY_EDITOR
public TextAsset editorOnlyLeaderboardsFile;
#endif
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f004774a7efa44eab4c0e289b68f484f
timeCreated: 1693951769

View file

@ -0,0 +1,23 @@
using System.Collections.Generic;
using UnityEngine.Networking;
namespace Dan
{
internal static partial class Requests
{
/// <summary>
/// Creates a form section and adds the parameters to it.
/// </summary>
/// <returns>IMultipartFormSection object</returns>
public static IMultipartFormSection Field(string fieldName, string data) =>
new MultipartFormDataSection(fieldName, data);
/// <summary>
/// Creates a form out of the given parameters.
/// </summary>
/// <param name="formDataSections"></param>
/// <returns>A list of IMultipartFormSection objects</returns>
public static List<IMultipartFormSection> Form(params IMultipartFormSection[] formDataSections) =>
new List<IMultipartFormSection>(formDataSections);
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 82185ae765074638b9962f5fbb356776
timeCreated: 1651554086