tModLoader v2025.08
A mod to make and play Terraria mods
CustomIntCondition Class Reference

A custom condition that tracks an int value. Must be manually adjusted by incrementing Value directly. The condition will complete automatically when the supplied max value is reached.

If multiple custom conditions are used for an achievement, a unique key should be provided. More...

Inherits AchievementCondition.

Public Member Functions

 CustomIntCondition (string name, int maxValue)
 
override void Clear ()
 
override void Complete ()
 
override void Load (JObject state)
 
- Public Member Functions inherited from AchievementCondition
delegate void AchievementUpdate (AchievementCondition condition)
 
virtual void Clear ()
 
virtual void Complete ()
 
IAchievementTracker GetAchievementTracker ()
 
virtual void Load (JObject state)
 

Static Public Member Functions

static AchievementCondition Create (string name, int maxValue)
 

Protected Member Functions

override IAchievementTracker CreateAchievementTracker ()
 
- Protected Member Functions inherited from AchievementCondition
 AchievementCondition (string name)
 
virtual IAchievementTracker CreateAchievementTracker ()
 

Properties

int Value [get, set]
 
- Properties inherited from AchievementCondition
bool IsCompleted [get]
 

Additional Inherited Members

- Public Attributes inherited from AchievementCondition
readonly string Name
 
- Protected Attributes inherited from AchievementCondition
IAchievementTracker _tracker
 
- Events inherited from AchievementCondition
AchievementUpdate OnComplete
 

Detailed Description

A custom condition that tracks an int value. Must be manually adjusted by incrementing Value directly. The condition will complete automatically when the supplied max value is reached.

If multiple custom conditions are used for an achievement, a unique key should be provided.

Member Function Documentation

◆ Clear()

override void CustomIntCondition.Clear ( )
virtual

Reimplemented from AchievementCondition.

◆ Complete()

override void CustomIntCondition.Complete ( )
virtual

Reimplemented from AchievementCondition.

◆ CreateAchievementTracker()

override IAchievementTracker CustomIntCondition.CreateAchievementTracker ( )
protectedvirtual

Reimplemented from AchievementCondition.

◆ Load()

override void CustomIntCondition.Load ( JObject  state)
virtual

Reimplemented from AchievementCondition.