@@ -23,7 +23,7 @@ internal class ClickerCompat : ModSystem
2323
2424 //This is the version of the calls that are used for the mod.
2525 //If Clicker Class updates, it will keep working on the outdated calls, but new features might not be available
26- internal static readonly Version apiVersion = new Version ( 1 , 3 , 2 , 6 ) ;
26+ internal static readonly Version apiVersion = new Version ( 1 , 3 , 3 ) ;
2727
2828 internal static string versionString ;
2929
@@ -128,10 +128,11 @@ internal static void RegisterClickerWeapon(ModItem modItem, string borderTexture
128128 /// <param name="amount">The amount of clicks required to trigger the effect</param>
129129 /// <param name="colorFunc">The (dynamic) text color representing the effect in the tooltip</param>
130130 /// <param name="action">The method that runs when the effect is triggered</param>
131+ /// <param name="preHardMode">If this effect primarily belongs to something available pre-hardmode</param>
131132 /// <returns>The unique identifier, null if an exception occured. READ THE LOGS!</returns>
132- internal static string RegisterClickEffect ( Mod mod , string internalName , string displayName , string description , int amount , Func < Color > colorFunc , Action < Player , EntitySource_ItemUse_WithAmmo , Vector2 , int , int , float > action )
133+ internal static string RegisterClickEffect ( Mod mod , string internalName , string displayName , string description , int amount , Func < Color > colorFunc , Action < Player , EntitySource_ItemUse_WithAmmo , Vector2 , int , int , float > action , bool preHardMode = false )
133134 {
134- return ClickerClass ? . Call ( "RegisterClickEffect" , versionString , mod , internalName , displayName , description , amount , colorFunc , action ) as string ;
135+ return ClickerClass ? . Call ( "RegisterClickEffect" , versionString , mod , internalName , displayName , description , amount , colorFunc , action , preHardMode ) as string ;
135136 }
136137
137138 /// <summary>
@@ -144,11 +145,12 @@ internal static string RegisterClickEffect(Mod mod, string internalName, string
144145 /// <param name="amount">The amount of clicks required to trigger the effect</param>
145146 /// <param name="color">The text color representing the effect in the tooltip</param>
146147 /// <param name="action">The method that runs when the effect is triggered</param>
148+ /// <param name="preHardMode">If this effect primarily belongs to something available pre-hardmode</param>
147149 /// <remarks>For dynamic colors, use the Func[Color] overload</remarks>
148150 /// <returns>The unique identifier, null if an exception occured. READ THE LOGS!</returns>
149- internal static string RegisterClickEffect ( Mod mod , string internalName , string displayName , string description , int amount , Color color , Action < Player , EntitySource_ItemUse_WithAmmo , Vector2 , int , int , float > action )
151+ internal static string RegisterClickEffect ( Mod mod , string internalName , string displayName , string description , int amount , Color color , Action < Player , EntitySource_ItemUse_WithAmmo , Vector2 , int , int , float > action , bool preHardMode = false )
150152 {
151- return RegisterClickEffect ( mod , internalName , displayName , description , amount , ( ) => color , action ) ;
153+ return RegisterClickEffect ( mod , internalName , displayName , description , amount , ( ) => color , action , preHardMode ) ;
152154 }
153155
154156 /// <summary>
@@ -180,6 +182,7 @@ internal static List<string> GetAllEffectNames()
180182 /// | "Amount": The amount of clicks to trigger the effect (int).
181183 /// | "ColorFunc": The color (Color) if invoked.
182184 /// | "Action": The method ran when triggered (Action[Player, EntitySource_ItemUse_WithAmmo, Vector2, int, int, float]).
185+ /// | "PreHardMode": Belongs to something available pre-hardmode (bool).
183186 /// </summary>
184187 /// <param name="effect">The unique effect name</param>
185188 /// <returns>Dictionary[string, object]</returns>
0 commit comments