tModLoader v2024.10
A mod to make and play Terraria mods
CreativePowerManager Class Reference

Public Member Functions

void ApplyLoadedDataToPlayer (Player player)
 
GetPower< T > ()
 
ushort GetPowerId< T > ()
 
void LoadFromWorld (BinaryReader reader, int versionGameWasLastSavedOn)
 
void LoadToPlayer (Player player, BinaryReader reader, int versionGameWasLastSavedOn)
 
void Register< T > (string nameInServerConfig)
 
void Reset ()
 
void ResetDataForNewPlayer (Player player)
 
void ResetPowersForPlayer (Player player)
 
void SaveToPlayer (Player player, BinaryWriter writer)
 
void SaveToWorld (BinaryWriter writer)
 
void SyncThingsToJoiningPlayer (int playerIndex)
 
bool TryGetPower (ushort id, out ICreativePower power)
 
void ValidateWorld (BinaryReader reader, int versionGameWasLastSavedOn)
 

Static Public Member Functions

static void Initialize ()
 
static void TryListingPermissionsFrom (string line)
 

Static Public Attributes

static readonly CreativePowerManager Instance = new CreativePowerManager()
 

Member Function Documentation

◆ GetPower< T >()

T CreativePowerManager.GetPower< T > ( )
Type Constraints
T :ICreativePower 
T :PowerTypeStorage<T> 
T :Power 

◆ GetPowerId< T >()

ushort CreativePowerManager.GetPowerId< T > ( )
Type Constraints
T :ICreativePower 
T :PowerTypeStorage<T> 
T :Id 

◆ Register< T >()

void CreativePowerManager.Register< T > ( string  nameInServerConfig)
Type Constraints
T :ICreativePower 
T :new()