diff options
author | Yuri Sizov <yuris@humnom.net> | 2022-08-12 23:57:11 +0300 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2022-08-22 18:35:11 +0300 |
commit | 1a24c9e14bf1f9578eda338344c12faf66fb0e65 (patch) | |
tree | ada6f4deefe627b4a77133ef3c074e35d6f2a738 /modules/noise/fastnoise_lite.cpp | |
parent | fdc36ad08290a8453d26fce3d8b7b13bd8cd5a1a (diff) | |
download | redot-engine-1a24c9e14bf1f9578eda338344c12faf66fb0e65.tar.gz |
Make `_validate_property` a multilevel method
Diffstat (limited to 'modules/noise/fastnoise_lite.cpp')
-rw-r--r-- | modules/noise/fastnoise_lite.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/noise/fastnoise_lite.cpp b/modules/noise/fastnoise_lite.cpp index b21e3247d7..06d97838f6 100644 --- a/modules/noise/fastnoise_lite.cpp +++ b/modules/noise/fastnoise_lite.cpp @@ -476,24 +476,24 @@ void FastNoiseLite::_bind_methods() { BIND_ENUM_CONSTANT(DOMAIN_WARP_FRACTAL_INDEPENDENT); } -void FastNoiseLite::_validate_property(PropertyInfo &property) const { - if (property.name.begins_with("cellular") && get_noise_type() != TYPE_CELLULAR) { - property.usage = PROPERTY_USAGE_NO_EDITOR; +void FastNoiseLite::_validate_property(PropertyInfo &p_property) const { + if (p_property.name.begins_with("cellular") && get_noise_type() != TYPE_CELLULAR) { + p_property.usage = PROPERTY_USAGE_NO_EDITOR; return; } - if (property.name != "fractal_type" && property.name.begins_with("fractal") && get_fractal_type() == FRACTAL_NONE) { - property.usage = PROPERTY_USAGE_NO_EDITOR; + if (p_property.name != "fractal_type" && p_property.name.begins_with("fractal") && get_fractal_type() == FRACTAL_NONE) { + p_property.usage = PROPERTY_USAGE_NO_EDITOR; return; } - if (property.name == "fractal_ping_pong_strength" && get_fractal_type() != FRACTAL_PING_PONG) { - property.usage = PROPERTY_USAGE_NO_EDITOR; + if (p_property.name == "fractal_ping_pong_strength" && get_fractal_type() != FRACTAL_PING_PONG) { + p_property.usage = PROPERTY_USAGE_NO_EDITOR; return; } - if (property.name != "domain_warp_enabled" && property.name.begins_with("domain_warp") && !domain_warp_enabled) { - property.usage = PROPERTY_USAGE_NO_EDITOR; + if (p_property.name != "domain_warp_enabled" && p_property.name.begins_with("domain_warp") && !domain_warp_enabled) { + p_property.usage = PROPERTY_USAGE_NO_EDITOR; return; } } |