feat: RP asset functions

This commit is contained in:
2024-10-27 19:49:15 +01:00
parent b4e8796e74
commit 86362e2658
9 changed files with 281 additions and 79 deletions

View File

@@ -4,8 +4,17 @@
bool URRDATurbineDataAsset::IsEnabled_Internal(UObject* WorldContextObject) const
{
fgcheck(mTier > 0);
fgcheck(mRPMDrag > 0);
fgcheck(mMaxRPM > 0);
// If this Asset is not disabled we want to check that all the values are valid
if(!mIsDisabled)
{
fgcheckf(mTier > 0, TEXT("%s: mTier must be larger then 0"), *GetName());
fgcheckf(mRPMDrag > 0, TEXT("%s: mRPMDrag must be larger then 0"), *GetName());
fgcheckf(mMaxRPM > 0, TEXT("%s: mMaxRPM must be larger then 0"), *GetName());
fgcheckf(mRPMMultiplier > 0.f, TEXT("%s: mMaxRPM must be larger then 0"), *GetName());
fgcheckf(mRPHandleTime > 0.f, TEXT("%s: mRPHandleTime must be larger then 0"), *GetName());
fgcheckf(mDuration > 0.f, TEXT("%s: mDuration must be larger then 0"), *GetName());
fgcheckf(mItem.Amount > 0, TEXT("%s: mItem.Amount must be larger then 0"), *GetName());
fgcheckf(mItem.ItemClass, TEXT("%s: mItem.ItemClass must be valid"), *GetName());
}
return Super::IsEnabled_Internal(WorldContextObject);
}