Skip to content

Readonly Property #25

@mileswest07

Description

@mileswest07

Currently, the only way to implement a sort of "readonly" property to the tree object is to check for a outside "readonly" flag when techtree.researchNode() is fired. This does not prevent users from clicking on the node and firing the canAfford() and researchNode() functions. Is there a better way? Would a readonly property in the treeConfig object be useful?

Would be used when a developer wants to display his tech tree on a documentation website, but restrict the interactivity that goes with it.

By extension, could a readonly attribute be applied to each individual node, based on external parameters (such as species, etc.), for the purpose of disabling the node from beginning research?

Also, functions toggling the readonly property (or properties) would be useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions