Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tilemap editor plugins #7665

Draft
wants to merge 9 commits into
base: dev
Choose a base branch
from
Draft

Tilemap editor plugins #7665

wants to merge 9 commits into from

Conversation

britzl
Copy link
Contributor

@britzl britzl commented May 20, 2023

This pull request adds a plugin system for the tilemap editor, where plugins can hook into the paint and clear tile functionality of the tilemap editor. Plugins will be notified when a tile is painted or cleared and the plugin can return a list of additional tiles which should be changed based on the change to the tilemap. This can be used to implement auto tiling and similar functionality.

PR checklist

  • Code
    • Add engine and/or editor unit tests.
    • New and changed code follows the overall code style of existing code
    • Add comments where needed
  • Documentation
    • Make sure that API documentation is updated in code comments
    • Make sure that manuals are updated (in github.com/defold/doc)
  • Prepare pull request and affected issue for automatic release notes generator
    • Pull request - Write a message that explains what this pull request does. What was the problem? How was it solved? What are the changes to APIs or the new APIs introduced? This message will be used in the generated release notes. Make sure it is well written and understandable for a user of Defold.
    • Pull request - Write a pull request title that in a sentence summarises what the pull request does. Do not include "Issue-1234 ..." in the title. This text will be used in the generated release notes.
    • Pull request - Link the pull request to the issue(s) it is closing. Use on of the approved closing keywords.
    • Affected issue - Assign the issue to a project. Do not assign the pull request to a project if there is an issue which the pull request closes.
    • Affected issue - Assign the "breaking change" label to the issue if introducing a breaking change.
    • Affected issue - Assign the "skip release notes" is the issue should not be included in the generated release notes.

@britzl britzl marked this pull request as draft May 20, 2023 13:48
@@ -0,0 +1,13 @@
package com.defold.extension.editor;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Questionable if the interface for editor plugins should be located here in bob?

(dissoc! cell-map (cell-index x y))))
[cell-map layer-id x y tile h-flip v-flip rotate90]
; figure out where to best do this once
(TilemapPlugins/init workspace/class-loader)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initialising every frame is ofc not necessary. The question is where to put this line of code?

@@ -45,13 +54,14 @@ public class PluginScanner {
* This function will generate a CompileExceptionError if more than one
* class in the package path extends the same base class.
*
* @param scanner
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to be able to pass classloader scanner from the editor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant