-
Notifications
You must be signed in to change notification settings - Fork 19
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
Added custom json configs and improved autotiles #327
Conversation
…only adjacent tiles)
…ere that's useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works exactly as I would expect. I think this will actually have a major impact on mod developers.
Just some minor nitpicks (mostly internal stuff).
One small bug I found:
After selecting a different layer, the selection box is not rendered properly.
We should probably document which .json file does what and how it is structured but I wouldn't block the PR on that.
|
||
// cancel current selection when out of bounds | ||
const phaserLayer = this.layer.getPhaserLayer(); | ||
if (!this.rightClickStart || !this.rightClickEnd || !phaserLayer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also need to check phaserLayer.layer
for undefined
otherwise there is an error is the user deletes all layers and then interacts with the tile selector
if (!this.rightClickStart || !this.rightClickEnd || !phaserLayer) { | |
if (!this.rightClickStart || !this.rightClickEnd || !phaserLayer || !phaserLayer.layer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be fixed, but would be good if you could try it out a bit. There could be some edge cases left
webapp/src/app/components/dialogs/floating-window/tile-selector/tile-selector.scene.ts
Show resolved
Hide resolved
webapp/src/app/components/dialogs/map-settings/map-settings.component.ts
Show resolved
Hide resolved
webapp/src/app/components/widgets/event-widget/event-editor/event-helper.service.ts
Outdated
Show resolved
Hide resolved
Can you elaborate a bit? I don't know what you mean |
fixed issues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what you mean. The tile selector always had a fixed size |
I was sure that it did resize at some point and did some digging. Apparently, 5 years ago in 0.4.0 it would resize itself to fit the tileset. Obviously, I do not expect you to add it back in this PR (or at all for that matter) |
This pull request adds two things
Custom JSON Configurations
Users can now provide custom JSON configs for the map editor through mods.
Implementation Details:
Usage:
map-editor
folder in your mods directory:Improved Autotiles
This update enhances autotile functionality and introduces a new autotile type.
Changes:
Autotile Types:
Height 2 autotiles:
4x4 autotiles:
I made a simple tool to help creating autotile definitions: https://github.com/Vegita2/cc-autotiler