Format scripts

This commit is contained in:
2025-09-11 20:59:11 -07:00
parent ff2acc233e
commit bd1b02236b
10 changed files with 30 additions and 21 deletions

View File

@@ -460,7 +460,7 @@ public class BazookaManager : MonoBehaviour
if (saveFile["bird"]["overlay"] == null) return 0;
return int.Parse(saveFile["bird"]["overlay"].ToString());
}
public void SetCustomBirdIconData(MarketplaceIconStorageType value)
{
if (saveFile["bird"] == null) saveFile["bird"] = new JObject();

View File

@@ -200,7 +200,8 @@ public class ChatroomMenu : MonoBehaviour
optionsPanel.SetActive(false);
editMessage.SetActive(true);
});
optionsPanelReportButton.onClick.AddListener(() => {
optionsPanelReportButton.onClick.AddListener(() =>
{
reportMessagePanelReportReason.text = "";
optionsPanel.SetActive(false);
reportMessagePanel.SetActive(true);

View File

@@ -389,7 +389,7 @@ public class CustomGamePlayer : MonoBehaviour
newBerry.tag = "AntiBerry";
goto finish;
}
finish:
finish:
spriteRenderer.sortingOrder = -5;
float screenWidth = Camera.main.orthographicSize * 2 * Camera.main.aspect;

View File

@@ -1,17 +1,21 @@
using UnityEngine;
public class HideIfSettingFalse : MonoBehaviour {
public class HideIfSettingFalse : MonoBehaviour
{
public SettingTypes setting;
public bool reverse;
void Start() {
void Start()
{
bool value = GetSettingValue(setting);
gameObject.SetActive(value == !reverse);
}
bool GetSettingValue(SettingTypes s) {
bool GetSettingValue(SettingTypes s)
{
var b = BazookaManager.Instance;
return s switch {
return s switch
{
SettingTypes.FullScreen => b.GetSettingFullScreen(),
SettingTypes.ShowFPS => b.GetSettingShowFPS(),
SettingTypes.Vsync => b.GetSettingVsync(),

View File

@@ -206,18 +206,18 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
btnText.text = "Claimed";
}
}
else
{
btn.onClick.AddListener(() => HandlePurchase(entry, btn, localUserID));
if (localUserID != entry.CreatorUserID)
{
btnText.text = "Purchase";
}
else
{
btn.onClick.AddListener(() => HandlePurchase(entry, btn, localUserID));
if (localUserID != entry.CreatorUserID)
{
btnText.text = "Purchase";
}
else
{
btnText.text = "Claim";
}
btnText.text = "Claim";
}
}
newIcon.SetActive(true);
}

View File

@@ -96,7 +96,7 @@ public class SettingsMenu : MonoBehaviour
{
var type = color == -1 ? colorType : color;
var text = colorMenu.transform.GetChild(0).GetComponent<TMP_Text>();
var colorToSet = new JArray(255, 255, 255);;
var colorToSet = new JArray(255, 255, 255);
switch (type)
{
case 0: //IGBGColor

View File

@@ -3,7 +3,8 @@ using Newtonsoft.Json;
using System.Numerics;
[Preserve]
public class ChatroomMessage {
public class ChatroomMessage
{
[Preserve]
[JsonProperty("username")]
public string Username { get; set; }

View File

@@ -2,7 +2,8 @@ using System;
using System.Numerics;
using Newtonsoft.Json;
public class MarketplaceIconStorageType {
public class MarketplaceIconStorageType
{
[JsonProperty("selected")]
public string Selected { get; set; } = null;
[JsonProperty("balance")]

View File

@@ -3,7 +3,8 @@ using Newtonsoft.Json;
using System.Numerics;
[Preserve]
public class MarketplaceIconType {
public class MarketplaceIconType
{
[Preserve]
[JsonProperty("username")]
public string CreatorUsername { get; set; }

View File

@@ -3,7 +3,8 @@ using Newtonsoft.Json;
using System.Numerics;
[Preserve]
public class ProfileMessageResponse {
public class ProfileMessageResponse
{
[Preserve]
[JsonProperty("id")]
public BigInteger ID { get; set; }