inspector cleanups

clustering work for datablocks for both consistent scanning for object parameters, as well as an eye towards orgainizing things to make reviewing what variations of components we'll be needing down the line clearer
This commit is contained in:
AzaezelX 2023-01-24 17:12:23 -06:00
parent 23895e365a
commit f07c8745b2
27 changed files with 692 additions and 700 deletions

View file

@ -87,8 +87,6 @@ TurretShapeData::TurretShapeData()
{
weaponLinkType = FireTogether;
shadowEnable = true;
zRotOnly = false;
startLoaded = true;
@ -133,40 +131,44 @@ TurretShapeData::TurretShapeData()
void TurretShapeData::initPersistFields()
{
addField("zRotOnly", TypeBool, Offset(zRotOnly, TurretShapeData),
"@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");
addGroup("Steering");
addField("zRotOnly", TypeBool, Offset(zRotOnly, TurretShapeData),
"@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),
"@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),
"@brief Minimum number of degrees to rotate down from straight ahead.\n\n");
addField("maxPitch", TypeF32, Offset(maxPitch, TurretShapeData),
"@brief Maximum number of degrees to rotate up from straight ahead.\n\n");
addField("headingRate", TypeF32, Offset(headingRate, TurretShapeData),
"@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),
"@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");
addGroup("Weapon State");
addField( "weaponLinkType", TYPEID< TurretShapeData::FireLinkType >(), Offset(weaponLinkType, TurretShapeData),
"@brief Set how the mounted weapons are linked and triggered.\n\n"
"<ul><li>FireTogether: All weapons fire under trigger 0.</li>"
"<li>GroupedFire: Weapon mounts 0,2 fire under trigger 0, mounts 1,3 fire under trigger 1.</li>"
"<li>IndividualFire: Each weapon mount fires under its own trigger 0-3.</li></ul>\n"
"@see TurretShapeFireLinkType");
addField("startLoaded", TypeBool, Offset(startLoaded, TurretShapeData),
"@brief Does the turret's mounted weapon(s) start in a loaded state.\n\n"
"True indicates that all mounted weapons start in a loaded state.\n"
"@see ShapeBase::setImageLoaded()");
endGroup("Weapon State");
addGroup("Camera", "The settings used by the shape when it is the camera.");
addField("cameraOffset", TypeF32, Offset(cameraOffset, TurretShapeData),
"Vertical (Z axis) height of the camera above the turret." );
endGroup("Camera");
addField("maxHeading", TypeF32, Offset(maxHeading, TurretShapeData),
"@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),
"@brief Minimum number of degrees to rotate down from straight ahead.\n\n");
addField("maxPitch", TypeF32, Offset(maxPitch, TurretShapeData),
"@brief Maximum number of degrees to rotate up from straight ahead.\n\n");
addField("headingRate", TypeF32, Offset(headingRate, TurretShapeData),
"@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),
"@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");
Parent::initPersistFields();
}