We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Most of functions can be simplified, as argument_count isn't required anymore - default values can be set instead.
For example:
function pt_size() { var minSize = argument[0]; var maxSize = minSize; var inc = 0; var wiggle = 0; if (argument_count > 1) { maxSize = argument[1]; } if (argument_count > 2) { inc = argument[2]; } if (argument_count > 3) { wiggle = argument[3]; } part_type_size(global.__part_gen_type, argument[0], argument[1], inc, wiggle); }
Becomes
function pt_size(minSize = 0, maxSize = undefined, inc = 0, wiggle = 0) { if (is_undefined(maxSize) { maxSize = minSize; } part_type_size(global.__part_gen_type, minSize, maxSize, inc, wiggle); }
The text was updated successfully, but these errors were encountered:
Yes, definitely. I've got a few things I'd like to overhaul in Particore and this is absolutely a part of that. Sorry for the late reply.
Sorry, something went wrong.
No branches or pull requests
Most of functions can be simplified, as argument_count isn't required anymore - default values can be set instead.
For example:
Becomes
The text was updated successfully, but these errors were encountered: