1212using System . Text ;
1313using System . Timers ;
1414using UnityEngine ;
15+ using TMPro ;
1516using Logger = BepInEx . Logging . Logger ;
1617namespace PolyTechFramework
1718{
@@ -23,7 +24,7 @@ public class PolyTechMain : PolyTechMod
2324 public new const string
2425 PluginGuid = "polytech.polytechframework" ,
2526 PluginName = "PolyTech Framework" ,
26- PluginVersion = "0.9.2 " ;
27+ PluginVersion = "0.9.3 " ;
2728 private static BindingList < PolyTechMod >
2829 noncheatMods = new BindingList < PolyTechMod > { } ,
2930 cheatMods = new BindingList < PolyTechMod > { } ;
@@ -117,6 +118,8 @@ public void Awake()
117118 this . isEnabled = modEnabled . Value ;
118119 ptfInstance = this ;
119120
121+ this . authors = new string [ ] { "MoonlitJolty" , "Conqu3red" , "Razboy20" , "Tran Fox" , "nitsuga5124" } ;
122+
120123 registerMod ( this ) ;
121124 }
122125
@@ -844,14 +847,41 @@ private static void PatchMainAwake()
844847 {
845848 string cosmetics = "" ;
846849 string cheats = "" ;
850+
851+ // load credit values
852+ TMPro . TextMeshProUGUI titleCredits = GameUI . m_Instance . m_Settings . m_CreditsPanel . transform
853+ . Find ( "Mask/Credits/Titles" )
854+ . GetComponent < TMPro . TextMeshProUGUI > ( ) ;
855+
856+ TMPro . TextMeshProUGUI nameCredits = GameUI . m_Instance . m_Settings . m_CreditsPanel . transform
857+ . Find ( "Mask/Credits/Names" )
858+ . GetComponent < TMPro . TextMeshProUGUI > ( ) ;
859+
860+ // aligning things properly
861+ titleCredits . text = titleCredits . text + "\n \n \n \n \n " ;
862+ nameCredits . text = nameCredits . text . TrimEnd ( '\n ' ) + "\n Arglin Kampling\n \n " ;
863+
847864 foreach ( PolyTechMod mod in PolyTechMain . noncheatMods )
848865 {
849866 cosmetics += $ "\n { mod . Info . Metadata . Name } - v{ mod . Info . Metadata . Version } ";
867+ if ( mod . authors != null ) {
868+ titleCredits . text += $ "{ mod . Info . Metadata . Name } \n ";
869+ nameCredits . text += String . Join ( "\n " , mod . authors ) + "\n \n " ;
870+ titleCredits . text += new string ( '\n ' , mod . authors . Length ) ;
871+ }
850872 }
851873 foreach ( PolyTechMod mod in PolyTechMain . cheatMods )
852874 {
853875 cheats += $ "\n { mod . Info . Metadata . Name } - v{ mod . Info . Metadata . Version } ";
876+ if ( mod . authors != null ) {
877+ titleCredits . text += $ "{ mod . Info . Metadata . Name } \n ";
878+ nameCredits . text += String . Join ( "\n " , mod . authors ) + "\n \n " ;
879+ titleCredits . text += new string ( '\n ' , mod . authors . Length ) ;
880+ }
854881 }
882+ titleCredits . text += "\n \n " ;
883+ nameCredits . text += "\n \n " ;
884+
855885 ptfInstance . ptfLogger . LogMessage ( $ "Game Started with the following Cosmetic mods: { cosmetics } ") ;
856886 ptfInstance . ptfLogger . LogMessage ( $ "Game Started with the following Cheat mods: { cheats } ") ;
857887 }
0 commit comments