Coder Social home page Coder Social logo

Comments (8)

Razoric480 avatar Razoric480 commented on August 26, 2024

The current placeholder in _get_methods does not seem to pick up the virtual tag

# Returns a number of neighbors based on a `callback` function.
#
# `_find_neighbors` calls `callback` for each agent in the `agents` array that lie within
# the radius around the owning agent and adds one to the count if its `callback` returns true.
# 
# virtual
func _find_neighbors(callback: FuncRef) -> int:

Am I using it wrong or is the python code in the wrong?

from gdscript-docs-maker.

NathanLovato avatar NathanLovato commented on August 26, 2024

The python code is certainly wrong here, I'll check that right away

from gdscript-docs-maker.

Razoric480 avatar Razoric480 commented on August 26, 2024

I think I figured it out.
"description":" Callback for the proximity to call when finding neighbors. Adds neighbor's position\n to the center of mass of the group.\n virtual\n"

But the python looks to [-1], but there's a baked in \n. So virtual is actually the second to last entry.

from gdscript-docs-maker.

NathanLovato avatar NathanLovato commented on August 26, 2024

I've already fixed it, gimme a moment to also write virtual in the markdown

from gdscript-docs-maker.

Razoric480 avatar Razoric480 commented on August 26, 2024

Works great \♥

from gdscript-docs-maker.

NathanLovato avatar NathanLovato commented on August 26, 2024

Another use case from #27:

Marking the constructor of a class as a constructor, i.e., _init? I'm not sure if we need a tag for that, but I was thinking you may want to document _init and _ready at times, and maybe other functions that could be part of the initialization of your object?

from gdscript-docs-maker.

Razoric480 avatar Razoric480 commented on August 26, 2024

Yeah. This could be especially important for systems that, for example, spawn nodes in the scene tree, or modify other already existing nodes. Would be things like that to keep aware as a Godot developer.

from gdscript-docs-maker.

Razoric480 avatar Razoric480 commented on August 26, 2024

Another tag could be a directory path or category path, instead of dropping everything in one lump
path:Behaviors/Individual

Depending on what system will use these, anyway.

from gdscript-docs-maker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.