Merge pull request #15786 from Chaosus/fixbuiltinfuncparamnames
Fixes for parameter names of builtin functions in visual scripts/core
This commit is contained in:
commit
898e997927
3 changed files with 13 additions and 13 deletions
|
@ -182,7 +182,7 @@
|
|||
<method name="clamp">
|
||||
<return type="float">
|
||||
</return>
|
||||
<argument index="0" name="val" type="float">
|
||||
<argument index="0" name="value" type="float">
|
||||
</argument>
|
||||
<argument index="1" name="min" type="float">
|
||||
</argument>
|
||||
|
@ -589,7 +589,7 @@
|
|||
<method name="nearest_po2">
|
||||
<return type="int">
|
||||
</return>
|
||||
<argument index="0" name="val" type="int">
|
||||
<argument index="0" name="value" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Returns the nearest larger power of 2 for integer [code]val[/code].
|
||||
|
|
|
@ -1483,7 +1483,7 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
|
|||
return mi;
|
||||
} break;
|
||||
case MATH_INVERSE_LERP: {
|
||||
MethodInfo mi("inverse_lerp", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"), PropertyInfo(Variant::REAL, "value"));
|
||||
MethodInfo mi("inverse_lerp", PropertyInfo(Variant::REAL, "from"), PropertyInfo(Variant::REAL, "to"), PropertyInfo(Variant::REAL, "weight"));
|
||||
mi.return_val.type = Variant::REAL;
|
||||
return mi;
|
||||
} break;
|
||||
|
@ -1579,12 +1579,12 @@ MethodInfo GDScriptFunctions::get_info(Function p_func) {
|
|||
return mi;
|
||||
} break;
|
||||
case LOGIC_CLAMP: {
|
||||
MethodInfo mi("clamp", PropertyInfo(Variant::REAL, "val"), PropertyInfo(Variant::REAL, "min"), PropertyInfo(Variant::REAL, "max"));
|
||||
MethodInfo mi("clamp", PropertyInfo(Variant::REAL, "value"), PropertyInfo(Variant::REAL, "min"), PropertyInfo(Variant::REAL, "max"));
|
||||
mi.return_val.type = Variant::REAL;
|
||||
return mi;
|
||||
} break;
|
||||
case LOGIC_NEAREST_PO2: {
|
||||
MethodInfo mi("nearest_po2", PropertyInfo(Variant::INT, "val"));
|
||||
MethodInfo mi("nearest_po2", PropertyInfo(Variant::INT, "value"));
|
||||
mi.return_val.type = Variant::INT;
|
||||
return mi;
|
||||
} break;
|
||||
|
|
|
@ -257,10 +257,10 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
|
|||
case MATH_ASIN:
|
||||
case MATH_ACOS:
|
||||
case MATH_ATAN:
|
||||
case MATH_ATAN2:
|
||||
case MATH_SQRT: {
|
||||
return PropertyInfo(Variant::REAL, "num");
|
||||
return PropertyInfo(Variant::REAL, "s");
|
||||
} break;
|
||||
case MATH_ATAN2:
|
||||
case MATH_FMOD:
|
||||
case MATH_FPOSMOD: {
|
||||
if (p_idx == 0)
|
||||
|
@ -273,7 +273,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
|
|||
case MATH_ROUND:
|
||||
case MATH_ABS:
|
||||
case MATH_SIGN: {
|
||||
return PropertyInfo(Variant::REAL, "num");
|
||||
return PropertyInfo(Variant::REAL, "s");
|
||||
|
||||
} break;
|
||||
|
||||
|
@ -287,7 +287,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
|
|||
case MATH_EXP:
|
||||
case MATH_ISNAN:
|
||||
case MATH_ISINF: {
|
||||
return PropertyInfo(Variant::REAL, "num");
|
||||
return PropertyInfo(Variant::REAL, "s");
|
||||
} break;
|
||||
case MATH_EASE: {
|
||||
if (p_idx == 0)
|
||||
|
@ -318,7 +318,7 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
|
|||
else if (p_idx == 1)
|
||||
return PropertyInfo(Variant::REAL, "to");
|
||||
else
|
||||
return PropertyInfo(Variant::REAL, "value");
|
||||
return PropertyInfo(Variant::REAL, "weight");
|
||||
} break;
|
||||
case MATH_RANGE_LERP: {
|
||||
if (p_idx == 0)
|
||||
|
@ -415,14 +415,14 @@ PropertyInfo VisualScriptBuiltinFunc::get_input_value_port_info(int p_idx) const
|
|||
} break;
|
||||
case LOGIC_CLAMP: {
|
||||
if (p_idx == 0)
|
||||
return PropertyInfo(Variant::REAL, "a");
|
||||
else if (p_idx == 0) // FIXME: is it ok to test p_idx == 0 twice?
|
||||
return PropertyInfo(Variant::REAL, "value");
|
||||
else if (p_idx == 1)
|
||||
return PropertyInfo(Variant::REAL, "min");
|
||||
else
|
||||
return PropertyInfo(Variant::REAL, "max");
|
||||
} break;
|
||||
case LOGIC_NEAREST_PO2: {
|
||||
return PropertyInfo(Variant::INT, "num");
|
||||
return PropertyInfo(Variant::INT, "value");
|
||||
} break;
|
||||
case OBJ_WEAKREF: {
|
||||
|
||||
|
|
Loading…
Reference in a new issue