Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

Function Type Auto-complete

An asset by kahanscious
The page banner background of a mountain and forest
Function Type Auto-complete image holder but it is empty

Quick Information

0 ratings
Function Type Auto-complete icon image
kahanscious
Function Type Auto-complete

this is a simple godot 4 plugin that helps you write functions faster by auto-completing return types and adding default return values. just write your function and hit tab.what does it do?when you hit tab after writing a function, it:adds the return type for you (-> void if you don't specify one)puts in default return valuekeeps your parameters and types intactworks with partial or complete function declarationsdefault return valueshere's what you get based on the return type:void functions get 'pass'func do_something() -> void:passbools get 'false'func is_something() -> bool:return falsenumbers get zerosfunc count_stuff() -> int:return 0func get_speed() -> float:return 0.0strings get empty quotesfunc get_name() -> String:return ""arrays and dictionaries start emptyfunc get_items() -> Array:return []func get_data() -> Dictionary:return {}objects get nullfunc get_node() -> Node:return nullhow it handles different ways of writing functionsworks with complete functionsfunc do_math(value: int) -> int:return 0works with incomplete onesfunc not_done(value: int->func not_done(value: int) -> void:passworks with arrowsfunc arrows_are_cool() ->->func arrows_are_cool() -> void:passworks without arrowsfunc give_string String->func give_string() -> String:return ""keeps your parameters safefunc move_stuff(pos: vector2, speed: float->func move_stuff(pos: vector2, speed: float) -> void:pass

Supported Engine Version
4.3
Version String
1.3.1
License Version
MIT
Support Level
community
Modified Date
9 months ago
Git URL
Issue URL

this is a simple godot 4 plugin that helps you write functions faster by auto-completing return types and adding default return values. just write your function and hit tab.

what does it do?
when you hit tab after writing a function, it:

adds the return type for you (-> void if you don't specify one)
puts in default return value
keeps your parameters and types intact
works with partial or complete function declarations

default return values
here's what you get based on the return type:
void functions get 'pass'
func do_something() -> void:
pass
bools get 'false'
func is_something() -> bool:
return false
numbers get zeros
func count_stuff() -> int:
return 0
func get_speed() -> float:
return 0.0
strings get empty quotes
func get_name() -> String:
return ""
arrays and dictionaries start empty
func get_items() -> Array:
return []
func get_data() -> Dictionary:
return {}
objects get null
func get_node() -> Node:
return null
how it handles different ways of writing functions
works with complete functions
func do_math(value: int) -> int:
return 0
works with incomplete ones
func not_done(value: int
->
func not_done(value: int) -> void:
pass
works with arrows
func arrows_are_cool() ->
->
func arrows_are_cool() -> void:
pass
works without arrows
func give_string String
->
func give_string() -> String:
return ""
keeps your parameters safe
func move_stuff(pos: vector2, speed: float
->
func move_stuff(pos: vector2, speed: float) -> void:
pass

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Function Type Auto-complete icon image
kahanscious
Function Type Auto-complete

this is a simple godot 4 plugin that helps you write functions faster by auto-completing return types and adding default return values. just write your function and hit tab.what does it do?when you hit tab after writing a function, it:adds the return type for you (-> void if you don't specify one)puts in default return valuekeeps your parameters and types intactworks with partial or complete function declarationsdefault return valueshere's what you get based on the return type:void functions get 'pass'func do_something() -> void:passbools get 'false'func is_something() -> bool:return falsenumbers get zerosfunc count_stuff() -> int:return 0func get_speed() -> float:return 0.0strings get empty quotesfunc get_name() -> String:return ""arrays and dictionaries start emptyfunc get_items() -> Array:return []func get_data() -> Dictionary:return {}objects get nullfunc get_node() -> Node:return nullhow it handles different ways of writing functionsworks with complete functionsfunc do_math(value: int) -> int:return 0works with incomplete onesfunc not_done(value: int->func not_done(value: int) -> void:passworks with arrowsfunc arrows_are_cool() ->->func arrows_are_cool() -> void:passworks without arrowsfunc give_string String->func give_string() -> String:return ""keeps your parameters safefunc move_stuff(pos: vector2, speed: float->func move_stuff(pos: vector2, speed: float) -> void:pass

Supported Engine Version
4.3
Version String
1.3.1
License Version
MIT
Support Level
community
Modified Date
9 months ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers