RedCore
Loading...
Searching...
No Matches
red::ProfileReplaceBuilder< T > Class Template Reference

Builder for replacing a vanilla profile with a custom one by its numeric ID. More...

#include <ProfileReplaceBuilder.h>

Inherits red::ProfileBuilder< ProfileReplaceBuilder< T > >.

Public Member Functions

 ProfileReplaceBuilder (s32 id)
 Begins replacing a vanilla profile.
Profilebuild ()
 Completes the builder by replacing the vanilla profile.
Public Member Functions inherited from red::ProfileBuilder< ProfileReplaceBuilder< T > >
ProfileReplaceBuilder< T > & createInfo (const ActorCreateInfo *createInfo)
 Set the ActorCreateInfo field in the profile.
ProfileReplaceBuilder< T > & flag (const Profile::Flag flag)
 Set the Flag field in the profile.
ProfileReplaceBuilder< T > & drawPriority (const s16 drawPriority)
 Set the drawPriority field in the profile.
ProfileReplaceBuilder< T > & executePriority (const s16 executePriority)
 Set the executePriority field in the profile.
ProfileReplaceBuilder< T > & resources (ProfileInfo::ResType type)
 Set the resources field in the profile.

Additional Inherited Members

Protected Attributes inherited from red::ProfileBuilder< ProfileReplaceBuilder< T > >
const ActorCreateInfomCreateInfo
 The createInfo data for the profile we are building.
Profile::Flag mFlag
 The flag data for the profile we are building.
s16 mDrawPriority
 The drawPriority data for the profile we are building.
s16 mExecutePriority
 The createInfo data for the profile we are building. This is a custom field added by RedCore.
u8 mResourceCount
 The entry for ProfileInfo::cResNum for the profile we are building. This is stored separately for custom profiles.
sead::SafeStringmResources
 The entry for ProfileInfo::cResList for the profile we are building. This is stored separately for custom profiles.
ProfileInfo::ResType mResourceType
 The entry for ProfileInfo::cResType for the profile we are building. This is stored separately for custom profiles.
bool mCreateInfoModified
 Whether mCreateInfo was modified. Used for validation and partial application in red::ProfileEditBuilder.
bool mFlagModified
 Whether mFlag was modified. Used for validation and partial application in red::ProfileEditBuilder.
bool mDrawPriorityModified
 Whether mDrawPriority was modified. Used for validation and partial application in red::ProfileEditBuilder.
bool mExecutePriorityModified
 Whether mExecutePriority was modified. Used for validation and partial application in red::ProfileEditBuilder.
bool mResourcesModified
 Whether mResources was modified. Used for validation and partial application in red::ProfileEditBuilder.

Detailed Description

template<class T>
requires std::derived_from<T, ActorBase>
class red::ProfileReplaceBuilder< T >

Builder for replacing a vanilla profile with a custom one by its numeric ID.

Template Parameters
TActor class that the profile will now instantiate.

Constructor & Destructor Documentation

◆ ProfileReplaceBuilder()

template<class T>
red::ProfileReplaceBuilder< T >::ProfileReplaceBuilder ( s32 id)
inlineexplicit

Begins replacing a vanilla profile.

Parameters
idThe target profile ID to replace.

Member Function Documentation

◆ build()

template<class T>
Profile * red::ProfileReplaceBuilder< T >::build ( )
inline

Completes the builder by replacing the vanilla profile.

Returns
The profile which now contains the replaced data.