Skip to content

Item Template feature #288

@Andre601

Description

@Andre601

What is it about?

An Item Template would be an item entry as you usually find in the GUI files themself.
They would support everything you can use in a GUI file's items section, but it's defined in its own file (i.e. templates.yml

Example:

items:
  back_to_menu:
    material: book
    slot: 36
    display_name: "Go back to main menu"
    click_commands:
      - "[openguimenu] main_menu"

This would create the template item back_to_menu which could then be referenced in GUI files using a new template option:

items:
  back_to_menu:
    template: back_to_menu

Options could be added to override existing ones in the template, or be added to it, if possible.

Is this related to an issue?

Yes.
Right now does it become extremely tedious to make GUIs using the same Item in them. You have to copy-paste it everywhere and whenever you change something, you have to update it X times.

With this solution, you only would need one Item instance to update and all the other ones using it would be updated accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions