12
12
using System . Text ;
13
13
using System . Timers ;
14
14
using UnityEngine ;
15
+ using TMPro ;
15
16
using Logger = BepInEx . Logging . Logger ;
16
17
namespace PolyTechFramework
17
18
{
@@ -23,7 +24,7 @@ public class PolyTechMain : PolyTechMod
23
24
public new const string
24
25
PluginGuid = "polytech.polytechframework" ,
25
26
PluginName = "PolyTech Framework" ,
26
- PluginVersion = "0.9.2 " ;
27
+ PluginVersion = "0.9.3 " ;
27
28
private static BindingList < PolyTechMod >
28
29
noncheatMods = new BindingList < PolyTechMod > { } ,
29
30
cheatMods = new BindingList < PolyTechMod > { } ;
@@ -117,6 +118,8 @@ public void Awake()
117
118
this . isEnabled = modEnabled . Value ;
118
119
ptfInstance = this ;
119
120
121
+ this . authors = new string [ ] { "MoonlitJolty" , "Conqu3red" , "Razboy20" , "Tran Fox" , "nitsuga5124" } ;
122
+
120
123
registerMod ( this ) ;
121
124
}
122
125
@@ -844,14 +847,41 @@ private static void PatchMainAwake()
844
847
{
845
848
string cosmetics = "" ;
846
849
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
+
847
864
foreach ( PolyTechMod mod in PolyTechMain . noncheatMods )
848
865
{
849
866
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
+ }
850
872
}
851
873
foreach ( PolyTechMod mod in PolyTechMain . cheatMods )
852
874
{
853
875
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
+ }
854
881
}
882
+ titleCredits . text += "\n \n " ;
883
+ nameCredits . text += "\n \n " ;
884
+
855
885
ptfInstance . ptfLogger . LogMessage ( $ "Game Started with the following Cosmetic mods: { cosmetics } ") ;
856
886
ptfInstance . ptfLogger . LogMessage ( $ "Game Started with the following Cheat mods: { cheats } ") ;
857
887
}
0 commit comments