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

A custom condition that tracks a float 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

 CustomFloatCondition (string name, float 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, float maxValue)
 

Protected Member Functions

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

Properties

float 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 a float 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 CustomFloatCondition.Clear ( )
virtual

Reimplemented from AchievementCondition.

◆ Complete()

override void CustomFloatCondition.Complete ( )
virtual

Reimplemented from AchievementCondition.

◆ CreateAchievementTracker()

override IAchievementTracker CustomFloatCondition.CreateAchievementTracker ( )
protectedvirtual

Reimplemented from AchievementCondition.

◆ Load()

override void CustomFloatCondition.Load ( JObject  state)
virtual

Reimplemented from AchievementCondition.