Missing gdscript functions
- Ngôn ngữ chính
- C++
- Star
- 1.1k
- Fork
- 80
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I notice we're missing some print functions that are in gdscript. Namely [prints](https://docs.godotengine.org/en/stable/classes/class_@gdscript.html#class-gdscript-method-prints), [printt](https://docs.godotengine.org/en/stable/classes/class_@gdscript.html#class-gdscript-method-printt), [print_debug](https://docs.godotengine.org/en/stable/classes/class_@gdscript.html#class-gdscript-method-print-debug), and [print-stack](https://docs.godotengine.org/en/stable/classes/class_@gdscript.html#class-gdscript-method-print-stack).
When writing gdscript I use `prints` in every situation (as it inserts spaces between arguments, just like `console.log` in JavaScript), so I noticed it quickly when trying this project.
Also I'm not sure that `print` is working as expected. It is supposed to accept and print any number of arguments, but in my testing it only prints the first:
```typescript
// this prints: "a"
godot.print("a", "b", "c")
```
The typings for `print` seem correct though:
```typescript
function godot.print(...args: any[]): void
```
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách xác định binding phía sau godot.print và so sánh cách xử lý đối số của nó với các hàm GDScript được liên kết trong issue. Kiểm tra cách print hiện xử lý nhiều đối số, sau đó lần theo các điểm vào API tương ứng cho print, printt, print_debug và print-stack. Công việc được xem là hoàn tất khi bốn hàm này khả dụng và print chấp nhận tất cả các đối số được cung cấp như mô tả.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- godot, javascript, typescript
- Lĩnh vực
- api
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 42/100