mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 07:04:36 +00:00
fill in the validated variables
This commit is contained in:
parent
fa760fa746
commit
f633ef3a3d
184 changed files with 1359 additions and 1216 deletions
|
|
@ -127,28 +127,28 @@ void AITurretShapeData::initPersistFields()
|
|||
docsURL;
|
||||
Parent::initPersistFields();
|
||||
addGroup("AI Steering");
|
||||
addField("maxScanHeading", TypeF32, Offset(maxScanHeading, AITurretShapeData),
|
||||
addFieldV("maxScanHeading", TypeRangedF32, Offset(maxScanHeading, AITurretShapeData), &CommonValidators::PosDegreeRangeQuarter,
|
||||
"@brief Maximum number of degrees to scan left and right.\n\n"
|
||||
"@note Maximum scan heading is 90 degrees.\n");
|
||||
addField("maxScanPitch", TypeF32, Offset(maxScanPitch, AITurretShapeData),
|
||||
addFieldV("maxScanPitch", TypeRangedF32, Offset(maxScanPitch, AITurretShapeData), &CommonValidators::PosDegreeRangeQuarter,
|
||||
"@brief Maximum number of degrees to scan up and down.\n\n"
|
||||
"@note Maximum scan pitch is 90 degrees.\n");
|
||||
addField("maxScanDistance", TypeF32, Offset(maxScanDistance, AITurretShapeData),
|
||||
addFieldV("maxScanDistance", TypeRangedF32, Offset(maxScanDistance, AITurretShapeData), &CommonValidators::PositiveFloat,
|
||||
"@brief Maximum distance to scan.\n\n"
|
||||
"When combined with maxScanHeading and maxScanPitch this forms a 3D scanning wedge used to initially "
|
||||
"locate a target.\n");
|
||||
addField("scanTickFrequency", TypeS32, Offset(scanTickFrequency, AITurretShapeData),
|
||||
addFieldV("scanTickFrequency", TypeRangedS32, Offset(scanTickFrequency, AITurretShapeData), &CommonValidators::NaturalNumber,
|
||||
"@brief How often should we perform a full scan when looking for a target.\n\n"
|
||||
"Expressed as the number of ticks between full scans, but no less than 1.\n");
|
||||
addField("scanTickFrequencyVariance", TypeS32, Offset(scanTickFrequencyVariance, AITurretShapeData),
|
||||
addFieldV("scanTickFrequencyVariance", TypeRangedS32, Offset(scanTickFrequencyVariance, AITurretShapeData), &CommonValidators::PositiveInt,
|
||||
"@brief Random amount that should be added to the scan tick frequency each scan period.\n\n"
|
||||
"Expressed as the number of ticks to randomly add, but no less than zero.\n");
|
||||
addField("trackLostTargetTime", TypeF32, Offset(trackLostTargetTime, AITurretShapeData),
|
||||
addFieldV("trackLostTargetTime", TypeRangedF32, Offset(trackLostTargetTime, AITurretShapeData), &CommonValidators::PositiveFloat,
|
||||
"@brief How long after the turret has lost the target should it still track it.\n\n"
|
||||
"Expressed in seconds.\n");
|
||||
addField("maxWeaponRange", TypeF32, Offset(maxWeaponRange, AITurretShapeData),
|
||||
addFieldV("maxWeaponRange", TypeRangedF32, Offset(maxWeaponRange, AITurretShapeData), &CommonValidators::PositiveFloat,
|
||||
"@brief Maximum distance that the weapon will fire upon a target.\n\n");
|
||||
addField("weaponLeadVelocity", TypeF32, Offset(weaponLeadVelocity, AITurretShapeData),
|
||||
addFieldV("weaponLeadVelocity", TypeRangedF32, Offset(weaponLeadVelocity, AITurretShapeData), &CommonValidators::PositiveFloat,
|
||||
"@brief Velocity used to lead target.\n\n"
|
||||
"If value <= 0, don't lead target.\n");
|
||||
endGroup("AI Steering");
|
||||
|
|
@ -173,7 +173,7 @@ void AITurretShapeData::initPersistFields()
|
|||
addField( "stateTransitionOnTimeout", TypeString, Offset(stateTransitionTimeout, AITurretShapeData), MaxStates,
|
||||
"Name of the state to transition to when we have been in this state "
|
||||
"for stateTimeoutValue seconds." );
|
||||
addField( "stateTimeoutValue", TypeF32, Offset(stateTimeoutValue, AITurretShapeData), MaxStates,
|
||||
addFieldV( "stateTimeoutValue", TypeRangedF32, Offset(stateTimeoutValue, AITurretShapeData), &CommonValidators::PositiveFloat, MaxStates,
|
||||
"Time in seconds to wait before transitioning to stateTransitionOnTimeout." );
|
||||
addField( "stateWaitForTimeout", TypeBool, Offset(stateWaitForTimeout, AITurretShapeData), MaxStates,
|
||||
"If false, this state ignores stateTimeoutValue and transitions "
|
||||
|
|
|
|||
|
|
@ -138,17 +138,17 @@ void TurretShapeData::initPersistFields()
|
|||
"@brief Should the turret allow only z rotations.\n\n"
|
||||
"True indicates that the turret may only be rotated on its z axis, just like the Item class. "
|
||||
"This keeps the turret always upright regardless of the surface it lands on.\n");
|
||||
addField("maxHeading", TypeF32, Offset(maxHeading, TurretShapeData),
|
||||
addFieldV("maxHeading", TypeRangedF32, Offset(maxHeading, TurretShapeData), &CommonValidators::PosDegreeRangeQuarter,
|
||||
"@brief Maximum number of degrees to rotate from center.\n\n"
|
||||
"A value of 180 or more degrees indicates the turret may rotate completely around.\n");
|
||||
addField("minPitch", TypeF32, Offset(minPitch, TurretShapeData),
|
||||
addFieldV("minPitch", TypeRangedF32, Offset(minPitch, TurretShapeData), &CommonValidators::PosDegreeRangeQuarter,
|
||||
"@brief Minimum number of degrees to rotate down from straight ahead.\n\n");
|
||||
addField("maxPitch", TypeF32, Offset(maxPitch, TurretShapeData),
|
||||
addFieldV("maxPitch", TypeRangedF32, Offset(maxPitch, TurretShapeData), &CommonValidators::PosDegreeRangeQuarter,
|
||||
"@brief Maximum number of degrees to rotate up from straight ahead.\n\n");
|
||||
addField("headingRate", TypeF32, Offset(headingRate, TurretShapeData),
|
||||
addFieldV("headingRate", TypeRangedF32, Offset(headingRate, TurretShapeData), &CommonValidators::DegreeRange,
|
||||
"@brief Degrees per second rotation.\n\n"
|
||||
"A value of 0 means no rotation is allowed. A value less than 0 means the rotation is instantaneous.\n");
|
||||
addField("pitchRate", TypeF32, Offset(pitchRate, TurretShapeData),
|
||||
addFieldV("pitchRate", TypeRangedF32, Offset(pitchRate, TurretShapeData), &CommonValidators::DegreeRange,
|
||||
"@brief Degrees per second rotation.\n\n"
|
||||
"A value of 0 means no rotation is allowed. A value less than 0 means the rotation is instantaneous.\n");
|
||||
endGroup("Steering");
|
||||
|
|
@ -167,7 +167,7 @@ void TurretShapeData::initPersistFields()
|
|||
endGroup("Weapon State");
|
||||
|
||||
addGroup("Camera", "The settings used by the shape when it is the camera.");
|
||||
addField("cameraOffset", TypeF32, Offset(cameraOffset, TurretShapeData),
|
||||
addFieldV("cameraOffset", TypeRangedF32, Offset(cameraOffset, TurretShapeData), &CommonValidators::F32Range,
|
||||
"Vertical (Z axis) height of the camera above the turret." );
|
||||
endGroup("Camera");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue