{"action":"created","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/16958","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/16958/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/16958/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/16958/events","html_url":"https://github.com/godotengine/godot/issues/16958","id":299834786,"number":16958,"title":"Better auto completion","user":{"login":"mateusak","id":18586380,"avatar_url":"https://avatars1.githubusercontent.com/u/18586380?v=4","gravatar_id":"","url":"https://api.github.com/users/mateusak","html_url":"https://github.com/mateusak","followers_url":"https://api.github.com/users/mateusak/followers","following_url":"https://api.github.com/users/mateusak/following{/other_user}","gists_url":"https://api.github.com/users/mateusak/gists{/gist_id}","starred_url":"https://api.github.com/users/mateusak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateusak/subscriptions","organizations_url":"https://api.github.com/users/mateusak/orgs","repos_url":"https://api.github.com/users/mateusak/repos","events_url":"https://api.github.com/users/mateusak/events{/privacy}","received_events_url":"https://api.github.com/users/mateusak/received_events","type":"User","site_admin":false},"labels":[{"id":279097162,"url":"https://api.github.com/repos/godotengine/godot/labels/discussion","name":"discussion","color":"ee77ee","default":false},{"id":73330066,"url":"https://api.github.com/repos/godotengine/godot/labels/enhancement","name":"enhancement","color":"44bbff","default":true},{"id":279098219,"url":"https://api.github.com/repos/godotengine/godot/labels/topic:editor","name":"topic:editor","color":"ffdd44","default":false},{"id":279098082,"url":"https://api.github.com/repos/godotengine/godot/labels/topic:gdscript","name":"topic:gdscript","color":"ffdd44","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-02-23T20:07:21Z","updated_at":"2018-02-24T16:24:35Z","closed_at":null,"author_association":"NONE","body":"Right now Godot handles auto-completion using the class the script inherits from; e.g If a script inherits `KinematicBody2D` it will auto-complete everything that belongs to it and it's ancestors (`CollisionObject2D`).\r\n\r\nIn the case it's the opposite; if your script inherits `CollisionObject2D` but is attached to a `KinematicBody2D` and you call `move_and_slide`, for example, it will still work. Same goes for variables if you use `self.desired_variable`. The auto-completion in this case does not work, but the functionality do.\r\n\r\nTL;DR\r\nAuto-completion should work not only with the class the script inherits, but with the class the object is attached to."},"comment":{"url":"https://api.github.com/repos/godotengine/godot/issues/comments/368239804","html_url":"https://github.com/godotengine/godot/issues/16958#issuecomment-368239804","issue_url":"https://api.github.com/repos/godotengine/godot/issues/16958","id":368239804,"user":{"login":"mateusak","id":18586380,"avatar_url":"https://avatars1.githubusercontent.com/u/18586380?v=4","gravatar_id":"","url":"https://api.github.com/users/mateusak","html_url":"https://github.com/mateusak","followers_url":"https://api.github.com/users/mateusak/followers","following_url":"https://api.github.com/users/mateusak/following{/other_user}","gists_url":"https://api.github.com/users/mateusak/gists{/gist_id}","starred_url":"https://api.github.com/users/mateusak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateusak/subscriptions","organizations_url":"https://api.github.com/users/mateusak/orgs","repos_url":"https://api.github.com/users/mateusak/repos","events_url":"https://api.github.com/users/mateusak/events{/privacy}","received_events_url":"https://api.github.com/users/mateusak/received_events","type":"User","site_admin":false},"created_at":"2018-02-24T16:24:35Z","updated_at":"2018-02-24T16:24:35Z","author_association":"NONE","body":"\"Having those common functions in a common base\" is **exactly** what OOP stands for. And it's exactly what I'm doing. \"Breaking the OOP\" would be create two different scripts for identical behavior.\r\n\r\nAnd `self` isn't optional in this case. To access a variable from the class your script do not inherits you have to use `self`."}}
{"actor":{"display_login":"mateusak"}}