Quellcode durchsuchen

[SplashTexts] [2.0.2.1] split from title graphics

Zariteis vor 4 Jahren
Ursprung
Commit
e29be215bd

BIN
SplashTexts/Assets/roguelandsTitle.png


BIN
SplashTexts/Assets/roguelandsTitleL.png


BIN
SplashTexts/Assets/roguelandsTitleL2.png


+ 2 - 2
SplashTexts/Properties/AssemblyInfo.cs

@@ -1,9 +1,9 @@
 using System.Reflection;
 using static SplashTexts.SplashTexts;
 
-[assembly: AssemblyProduct("Platform Block Mod")] //Set this to the full name of the mod including spaces.
+[assembly: AssemblyProduct("SplashTexts")] //Set this to the full name of the mod including spaces.
 [assembly: AssemblyTitle("Platform Block")] //This is only used when mousing over a dll file in Windows explorer.
-[assembly: AssemblyDescription("A Gadget mod for Roguelands, adding a platform block.")] //This is a short description for your mod's assembly.
+[assembly: AssemblyDescription("A mod that adds random splash texts to the main menu.")] //This is a short description for your mod's assembly.
 [assembly: AssemblyCompany("")] //Set this to your name/nickname and/or website
 [assembly: AssemblyCopyright("© 2021 Zariteis. All rights reserved.")] //Set this to your copyright name.
 [assembly: AssemblyVersion(MOD_VERSION)]

+ 59 - 34
SplashTexts/SplashTexts.cs

@@ -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)];
     }
 

+ 2 - 10
SplashTexts/SplashTexts.csproj

@@ -9,7 +9,7 @@
     <ProjectGuid>{91AB81DE-EAEE-47D1-93DD-541179208219}</ProjectGuid>
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>MoreLights</RootNamespace>
+    <RootNamespace>SplashTexts</RootNamespace>
     <AssemblyName>SplashTexts</AssemblyName>
     <TargetFrameworks>net35</TargetFrameworks>
     <FileAlignment>512</FileAlignment>
@@ -149,15 +149,6 @@
     <None Update="Assets\one">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </None>
-    <None Update="Assets\roguelandsTitle.png">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </None>
-    <None Update="Assets\roguelandsTitleL.png">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </None>
-    <None Update="Assets\roguelandsTitleL2.png">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </None>
     <None Update="Manifest.ini">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </None>
@@ -204,6 +195,7 @@
     </Reference>
   </ItemGroup>
   <ItemGroup>
+    <Folder Include="Assets\" />
     <Folder Include="Patches\" />
   </ItemGroup>
 </Project>