fill in the validated variables

This commit is contained in:
AzaezelX 2025-03-09 11:53:23 -05:00
parent fa760fa746
commit f633ef3a3d
184 changed files with 1359 additions and 1216 deletions

View file

@ -31,6 +31,7 @@
#include "scene/pathManager.h"
#include "scene/sceneRenderState.h"
#include "math/mathIO.h"
#include "console/typeValidators.h"
#include "core/stream/bitStream.h"
#include "renderInstance/renderPassManager.h"
#include "console/engineAPI.h"
@ -174,13 +175,13 @@ void Path::initPersistFields()
{
docsURL;
addField("isLooping", TypeBool, Offset(mIsLooping, Path), "If this is true, the loop is closed, otherwise it is open.\n");
addField("Speed", TypeF32, Offset(mPathSpeed, Path), "Speed.\n");
addFieldV("Speed", TypeRangedF32, Offset(mPathSpeed, Path), &CommonValidators::PositiveFloat, "Speed.\n");
addProtectedField("mPathShape", TYPEID< PathShapeData >(), Offset(mDataBlock, Path),
&setDataBlockProperty, &defaultProtectedGetFn,
"@brief Spawned PathShape.\n\n");
addField("spawnCount", TypeS32, Offset(mSpawnCount, Path), "Spawn Count.\n");
addField("minDelay", TypeS32, Offset(mMinDelay, Path), "Spawn Delay (min).\n");
addField("maxDelay", TypeS32, Offset(mMaxDelay, Path), "Spawn Delay (max).\n");
addFieldV("spawnCount", TypeRangedS32, Offset(mSpawnCount, Path), &CommonValidators::PositiveInt, "Spawn Count.\n");
addFieldV("minDelay", TypeRangedS32, Offset(mMinDelay, Path), &CommonValidators::PositiveInt, "Spawn Delay (min).\n");
addFieldV("maxDelay", TypeRangedS32, Offset(mMaxDelay, Path), &CommonValidators::PositiveInt, "Spawn Delay (max).\n");
Parent::initPersistFields();
//
@ -467,10 +468,10 @@ void Marker::initPersistFields()
{
docsURL;
addGroup( "Misc" );
addField("seqNum", TypeS32, Offset(mSeqNum, Marker), "Marker position in sequence of markers on this path.\n");
addFieldV("seqNum", TypeRangedS32, Offset(mSeqNum, Marker), &CommonValidators::PositiveInt, "Marker position in sequence of markers on this path.\n");
addField("hitCommand", TypeCommand, Offset(mHitCommand, Marker), "The command to execute when a path follower reaches this marker.");
addField("type", TYPEID< KnotType >(), Offset(mKnotType, Marker), "Type of this marker/knot. A \"normal\" knot will have a smooth camera translation/rotation effect.\n\"Position Only\" will do the same for translations, leaving rotation un-touched.\nLastly, a \"Kink\" means the rotation will take effect immediately for an abrupt rotation change.\n");
addField("msToNext", TypeS32, Offset(mMSToNext, Marker), "Milliseconds to next marker in sequence.\n");
addFieldV("msToNext", TypeRangedS32, Offset(mMSToNext, Marker), &CommonValidators::NaturalNumber, "Milliseconds to next marker in sequence.\n");
addField("smoothingType", TYPEID< SmoothingType >(), Offset(mSmoothingType, Marker), "Path smoothing at this marker/knot. \"Linear\" means no smoothing, while \"Spline\" means to smooth.\n");
endGroup("Misc");