Merge branch 'development' into imageAsset_refactor_rev3

This commit is contained in:
marauder2k7 2025-03-24 20:07:06 +00:00 committed by GitHub
commit 0da0903599
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4189 changed files with 29881 additions and 635347 deletions

View file

@ -165,18 +165,18 @@ void afxZodiacData::initPersistFields()
"Specifies if the zodiac's verticalRange should scale according to changes in the "
"radius. When a zodiacs is used as an expanding shockwave, this value should be set "
"to false, otherwise the zodiac can expand to cover an entire interior.");
addField("startAngle", TypeF32, Offset(start_ang, afxZodiacData),
addFieldV("startAngle", TypeRangedF32, Offset(start_ang, afxZodiacData), &CommonValidators::DegreeRange,
"The starting angle in degrees of the zodiac's rotation.");
addField("rotationRate", TypeF32, Offset(ang_per_sec, afxZodiacData),
addFieldV("rotationRate", TypeRangedF32, Offset(ang_per_sec, afxZodiacData), &CommonValidators::DegreeRange,
"The rate of rotation in degrees-per-second. Zodiacs with a positive rotationRate "
"rotate clockwise, while those with negative values turn counter-clockwise.");
addField("growInTime", TypeF32, Offset(grow_in_time, afxZodiacData),
addFieldV("growInTime", TypeRangedF32, Offset(grow_in_time, afxZodiacData), &CommonValidators::PositiveFloat,
"A duration of time in seconds over which the zodiac grows from a zero size to its "
"full size as specified by the radius.");
addField("shrinkOutTime", TypeF32, Offset(shrink_out_time, afxZodiacData),
addFieldV("shrinkOutTime", TypeRangedF32, Offset(shrink_out_time, afxZodiacData), &CommonValidators::PositiveFloat,
"A duration of time in seconds over which the zodiac shrinks from full size to "
"invisible.");
addField("growthRate", TypeF32, Offset(growth_rate, afxZodiacData),
addFieldV("growthRate", TypeRangedF32, Offset(growth_rate, afxZodiacData), &CommonValidators::F32Range,
"A rate in meters-per-second at which the zodiac grows in size. A negative value will "
"shrink the zodiac.");
addField("color", TypeColorF, Offset(color, afxZodiacData),
@ -213,20 +213,20 @@ void afxZodiacData::initPersistFields()
addField("interiorIgnoreTransparent", TypeBool, Offset(interior_transp_ignore, afxZodiacData),
"");
addField("altitudeMax", TypeF32, Offset(altitude_max, afxZodiacData),
addFieldV("altitudeMax", TypeRangedF32, Offset(altitude_max, afxZodiacData), &CommonValidators::F32Range,
"The altitude at which zodiac becomes invisible as the result of fading out or "
"becoming too small.");
addField("altitudeFalloff", TypeF32, Offset(altitude_falloff, afxZodiacData),
addFieldV("altitudeFalloff", TypeRangedF32, Offset(altitude_falloff, afxZodiacData), &CommonValidators::F32Range,
"The altitude at which zodiac begins to fade and/or shrink.");
addField("altitudeShrinks", TypeBool, Offset(altitude_shrinks, afxZodiacData),
"When true, zodiac becomes smaller as altitude increases.");
addField("altitudeFades", TypeBool, Offset(altitude_fades, afxZodiacData),
"When true, zodiac fades out as altitude increases.");
addField("distanceMax", TypeF32, Offset(distance_max, afxZodiacData),
addFieldV("distanceMax", TypeRangedF32, Offset(distance_max, afxZodiacData), &CommonValidators::PositiveFloat,
"The distance from camera at which the zodiac becomes invisible as the result of "
"fading out.");
addField("distanceFalloff", TypeF32, Offset(distance_falloff, afxZodiacData),
addFieldV("distanceFalloff", TypeRangedF32, Offset(distance_falloff, afxZodiacData), &CommonValidators::PositiveFloat,
"The distance from camera at which the zodiac begins to fade out.");
addField("useGradientRange", TypeBool, Offset(use_grade_range, afxZodiacData),
@ -324,6 +324,22 @@ bool afxZodiacData::preload(bool server, String &errorStr)
if (vert_range.x == 0.0f && vert_range.y == 0.0f)
vert_range.x = vert_range.y = radius_xy;
if (mTextureAssetId != StringTable->EmptyString())
{
mTextureAsset = mTextureAssetId;
if (mTextureAsset.notNull())
{
if (getTexture() != StringTable->EmptyString() && mTextureName != StringTable->insert("texhandle"))
{
if (mTextureAsset.notNull())
{
mTextureAsset->getChangedSignal().notify(this, &afxZodiacData::onImageChanged);
}
mTexture.set(getTexture(), mTextureProfile, avar("%s() - mTextureObject (line %d)", __FUNCTION__, __LINE__));
}
}
}
return true;
}