Fix some method names.

This commit is contained in:
Relintai 2023-06-02 14:06:15 +02:00
parent 2a95c7925b
commit 761d6b1bc8
5 changed files with 10 additions and 12 deletions

View File

@ -52,8 +52,6 @@ cdef class AABB:
{{ render_operator_eq() | indent }} {{ render_operator_eq() | indent }}
{{ render_operator_ne() | indent }} {{ render_operator_ne() | indent }}
{{ render_method("as_string") | indent }} {{ render_method("as_string") | indent }}
{{ render_method("get_area") | indent }}
{{ render_method("has_no_area") | indent }}
{{ render_method("has_no_surface") | indent }} {{ render_method("has_no_surface") | indent }}
{{ render_method("intersects") | indent }} {{ render_method("intersects") | indent }}
{{ render_method("encloses") | indent }} {{ render_method("encloses") | indent }}

View File

@ -117,11 +117,11 @@ cdef class Basis:
{{ render_method("scaled") | indent }} {{ render_method("scaled") | indent }}
{{ render_method("get_scale") | indent }} {{ render_method("get_scale") | indent }}
{{ render_method("get_euler") | indent }} {{ render_method("get_euler") | indent }}
{{ render_method("get_quat") | indent }} {{ render_method("get_quaternion") | indent }}
{{ render_method("set_quat") | indent }} {{ render_method("set_quaternion") | indent }}
{{ render_method("set_axis_angle_scale") | indent }} {{ render_method("set_axis_angle_scale") | indent }}
{{ render_method("set_euler_scale") | indent }} {{ render_method("set_euler_scale") | indent }}
{{ render_method("set_quat_scale") | indent }} {{ render_method("set_quaternion_scale") | indent }}
{{ render_method("tdotx") | indent }} {{ render_method("tdotx") | indent }}
{{ render_method("tdoty") | indent }} {{ render_method("tdoty") | indent }}
{{ render_method("tdotz") | indent }} {{ render_method("tdotz") | indent }}

View File

@ -29,16 +29,16 @@ cdef class StringName:
gdapi10.pandemonium_string_name_destroy(&self._gd_data) gdapi10.pandemonium_string_name_destroy(&self._gd_data)
def __repr__(StringName self): def __repr__(StringName self):
return f"<StringName({self.as_string()})>" return f"<StringName({self.get_name()})>"
def __str__(StringName self): def __str__(StringName self):
return str(self.as_string()) return str(self.get_name())
{{ render_operator_eq() | indent }} {{ render_operator_eq() | indent }}
{{ render_operator_ne() | indent }} {{ render_operator_ne() | indent }}
{{ render_method("destroy") | indent }} {{ render_method("destroy") | indent }}
{{ render_method("as_string") | indent }} {{ render_method("get_name") | indent }}
{% endblock %} {% endblock %}
{%- block python_consts %} {%- block python_consts %}

View File

@ -107,7 +107,7 @@ cdef class Vector2:
{{ render_method("bounce") | indent }} {{ render_method("bounce") | indent }}
{{ render_method("reflect") | indent }} {{ render_method("reflect") | indent }}
{{ render_method("abs") | indent }} {{ render_method("abs") | indent }}
{{ render_method("clamped") | indent }} {{ render_method("limit_length") | indent }}
{% endblock %} {% endblock %}
{%- block python_consts %} {%- block python_consts %}

View File

@ -98,11 +98,11 @@ def test_repr():
["scaled", Basis, (Vector3(),)], ["scaled", Basis, (Vector3(),)],
["get_scale", Vector3, ()], ["get_scale", Vector3, ()],
["get_euler", Vector3, ()], ["get_euler", Vector3, ()],
["get_quat", Quaternion, ()], ["get_quaternion", Quaternion, ()],
["set_quat", type(None), (Quaternion(),)], ["set_quaternion", type(None), (Quaternion(),)],
["set_axis_angle_scale", type(None), (Vector3.ONE, 1.1, Vector3.ONE)], ["set_axis_angle_scale", type(None), (Vector3.ONE, 1.1, Vector3.ONE)],
["set_euler_scale", type(None), (Vector3.ONE, Vector3.ONE)], ["set_euler_scale", type(None), (Vector3.ONE, Vector3.ONE)],
["set_quat_scale", type(None), (Quaternion(), Vector3.ONE)], ["set_quaternion_scale", type(None), (Quaternion(), Vector3.ONE)],
["tdotx", float, (Vector3(),)], ["tdotx", float, (Vector3(),)],
["tdoty", float, (Vector3(),)], ["tdoty", float, (Vector3(),)],
["tdotz", float, (Vector3(),)], ["tdotz", float, (Vector3(),)],