|
|
@@ -7,7 +7,7 @@ using System.Collections.Generic;
|
|
|
|
|
|
namespace SplashTexts
|
|
|
{
|
|
|
- [Gadget("SplashTexts")]
|
|
|
+ [Gadget("SplashTexts", RequiredOnClients: false)]
|
|
|
public class SplashTexts : Gadget<SplashTexts>
|
|
|
{
|
|
|
public const string MOD_VERSION = "1.0"; // Set this to the version of your mod.
|
|
|
@@ -22,7 +22,7 @@ namespace SplashTexts
|
|
|
|
|
|
protected override void Initialize()
|
|
|
{
|
|
|
- Logger.Log("Platform Block v" + Info.Mod.Version);
|
|
|
+ Logger.Log("Splash Texts v" + Info.Mod.Version);
|
|
|
Core.logger = Logger;
|
|
|
SceneManager.sceneLoaded += OnSceneLoaded;
|
|
|
ChangeMenuText();
|
|
|
@@ -36,41 +36,10 @@ namespace SplashTexts
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- private static Texture2D texture2D = GadgetCoreAPI.LoadTexture2D("roguelandsTitle.png");
|
|
|
- private static Texture2D texture2DL = GadgetCoreAPI.LoadTexture2D("roguelandsTitleL2.png");
|
|
|
-
|
|
|
private static void ChangeMenuText()
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- var titleElement = GameObject.Find("MAIN").transform.Find("-").gameObject;
|
|
|
- var renderer = titleElement.GetComponent<Renderer>();
|
|
|
- if (Core.defaultTitleTexture == null)
|
|
|
- Core.defaultTitleTexture = renderer.material.mainTexture;
|
|
|
- if (random.Next(2) == 0)
|
|
|
- {
|
|
|
- renderer.material = new Material(Shader.Find("Unlit/Transparent"))
|
|
|
- {
|
|
|
- mainTexture = texture2DL
|
|
|
- };
|
|
|
- }
|
|
|
- else if (random.Next(2) == 0)
|
|
|
- {
|
|
|
- renderer.material = new Material(Shader.Find("Unlit/Transparent"))
|
|
|
- {
|
|
|
- mainTexture = texture2D
|
|
|
- };
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- renderer.material = new Material(Shader.Find("Unlit/Transparent"))
|
|
|
- {
|
|
|
- mainTexture = Core.defaultTitleTexture
|
|
|
- };
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
var text = GetText();
|
|
|
|
|
|
var textElement = GameObject.Find("MAIN").transform.Find("-").Find("txtALPHA").gameObject;
|
|
|
@@ -83,7 +52,7 @@ namespace SplashTexts
|
|
|
textElement.GetComponent<TextMesh>().text = text;
|
|
|
textElementShadow.GetComponent<TextMesh>().text = shadowText;
|
|
|
}
|
|
|
- catch (Exception e) { Core.logger.LogConsole(e); }
|
|
|
+ catch (Exception e) { Core.logger.Log(e); }
|
|
|
}
|
|
|
|
|
|
private static System.Random random = new System.Random();
|
|
|
@@ -92,13 +61,69 @@ namespace SplashTexts
|
|
|
{
|
|
|
List<string> texts = new List<string>();
|
|
|
texts.Add("v1.5.1 Deluxe");
|
|
|
+ texts.Add("10,000,000$ Edition");
|
|
|
+ texts.Add("Premium Ultra Deluxe Gold Edition");
|
|
|
texts.Add("#C#AAAAFF#Infinity Edition");
|
|
|
texts.Add("Gadget Core " + GadgetCoreAPI.GetFullVersion() + " Edition");
|
|
|
texts.Add("There are mods?");
|
|
|
texts.Add("1 + 5 = 1#S#1 + 5 = 6");
|
|
|
texts.Add("v1.5.1#S#v1.5");
|
|
|
+ texts.Add("v1.5.1");
|
|
|
+ texts.Add("v?.?.?");
|
|
|
texts.Add("Magicite 2");
|
|
|
+ texts.Add("Magicite In Space");
|
|
|
texts.Add("I wouldn't talk to the guy with the pickaxe.");
|
|
|
+ texts.Add("You should talk to the guy with the pickaxe.");
|
|
|
+ texts.Add("powered by Unity");
|
|
|
+ texts.Add("5% Explosions");
|
|
|
+ Gadget[] gadgets = Gadgets.ListAllEnabledGadgets();
|
|
|
+ if (gadgets.Length > 0)
|
|
|
+ {
|
|
|
+ Gadget g = gadgets[random.Next(gadgets.Length)];
|
|
|
+ texts.Add(g.Info.ModName + " included");
|
|
|
+ }
|
|
|
+ if (random.Next(4) == 0)
|
|
|
+ {
|
|
|
+ texts.Add("#C#2160FF#Play Galactic Fleet");
|
|
|
+ texts.Add("#C#AF9346#Play Church of Faust");
|
|
|
+ texts.Add("#C#F42912#Play Starlight Rebellion");
|
|
|
+ texts.Add("#C#632887#Play Gray Enigma");
|
|
|
+ }
|
|
|
+ if (random.Next(6) == 0)
|
|
|
+ {
|
|
|
+ texts.Add("#C#2160FF#Galactic Fleet is the best!");
|
|
|
+ texts.Add("#C#AF9346#Church of Faust is the best!");
|
|
|
+ texts.Add("#C#F42912#Starlight Rebellion is the best!");
|
|
|
+ texts.Add("#C#632887#Gray Enigma is the best!");
|
|
|
+ }
|
|
|
+ texts.Add("The shrooms want to cuddle.");
|
|
|
+ texts.Add("42");
|
|
|
+ var time = DateTime.Now;
|
|
|
+ texts.Add(time.Hour + ":" + time.Minute + ":" + time.Minute);
|
|
|
+ texts.Add("maybe " + (time.Year + 1) + "?");
|
|
|
+ texts.Add("made on earth");
|
|
|
+ {
|
|
|
+ int i = random.Next(6);
|
|
|
+ int @int = PreviewLabs.PlayerPrefs.GetInt(i + "isChar");
|
|
|
+ if (@int > 0)
|
|
|
+ {
|
|
|
+ var name = PreviewLabs.PlayerPrefs.GetString(i + "name");
|
|
|
+ texts.Add("Hi, " + name + "!");
|
|
|
+ texts.Add("Have a nice day " + name + "!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ texts.Add("Have a nice day!");
|
|
|
+ texts.Add("You should go to sleep.");
|
|
|
+ texts.Add("OwO");
|
|
|
+ texts.Add(":3");
|
|
|
+ texts.Add("Nice");
|
|
|
+ texts.Add("made by Sean Young");
|
|
|
+ texts.Add("music by Bashi Boizu");
|
|
|
+ texts.Add("Exodus exists");
|
|
|
+ texts.Add("end of 2019");
|
|
|
+ texts.Add("Rock Scarabs do like that.");
|
|
|
+ texts.Add("RUN TO THE PORTALS!!!");
|
|
|
+ texts.Add("Graphics: AMAZING");
|
|
|
return texts[random.Next(texts.Count)];
|
|
|
}
|
|
|
|