Commit Graph

122 Commits

Author SHA1 Message Date
haven1433
ff3f2bd3df prototype for wave function collapse
given an area of all the same block, replace all those blocks with blocks that match the surrounding non-same blocks based on what blocks should 'match'. Note that this is a single-pass algorithm right now, which means that it creates a bunch of bad blocks as it gets further from the edge and more conflicts are found.

We may try to update this more in the future, or we may just go with something simpler like a maze generator using border blocks or 9-grid. But the results of this are tantalizing...
2023-02-18 00:53:05 -06:00
haven1433
5770ff9e03 first pass at the 'block bag' feature
holding control and selecting blocks will add/remove them from the block bag. When drawing (or painting), all blocks in the bag are treated as equivalent, so HMA will select one of the blocks at random to draw with. This works great for grass, but can also be used to create 'noisy' areas by selecting other blocks like flowers or shrubs.

Control+Click on the bag block indicator to clear all blocks from the bag.
2023-02-13 22:42:17 -06:00
haven1433
690379abea early exits to prevent crashes if data is missing 2023-02-11 22:14:54 -06:00
haven1433
7c07337d3b updating blocksets should reload all loaded maps
If a blockset is edited, that could change not just the current map that
owns that blockset, but any other map that uses that blockset.
Refresh caches on all those maps.
2023-02-04 22:21:35 -06:00
haven1433
913e83ae96 add copy/paste tiles for foreground/background of blocks 2023-02-04 22:20:16 -06:00
haven1433
ee6583b946 add shift+click for 9-grid support
also fix the flickering issue, where ctrl+drag causes flickering sprites
2023-02-03 22:07:14 -06:00
haven1433
4880abe268 fix undo new map case where new map is primary map
when undo removes the primary map, try to set the primary map to another visible map. If no visible maps are valid, just close the map editor.
2023-01-29 22:21:59 -06:00
haven1433
09f2766790 make more resilient to nulls 2023-01-29 22:03:33 -06:00
haven1433
4be64ce1d6 add paranoid null checks to autocrop.
It's already allowed to return null, so just return null if any of these weird cases happen.
2023-01-24 20:21:58 -06:00
haven1433
548ecf2ac1 require that the PrimaryMap be in the VisibleMaps collection 2023-01-20 15:45:08 -06:00
haven1433
084a15c407 allow adding connections to maps that have none
* refactor some code from ImageTests into an IntegrationTests base class
* add MapTests class
* add test for adding a connection to Viridian Forest
* Have `ConnectNewMap` call new `GetOrCreateConnections` method instead of just trying to get the connection data that may not exist.
2023-01-06 20:29:26 -06:00
haven1433
47388d5f3e map editor bug fixes
* creating a new map should be considered an autonomous operation for undo purposes
* support connection-objects for FireRed
* crash less when reading invalid map / layout data
* show correct hover square when hovering over neighbor maps with borders
* fix elevation names / map permissions
* don't update tile render info for the block editor if the x/y change is a no-op
*
2023-01-05 22:53:35 -06:00
haven1433
99a680ddef map editor improvements
* Draw a box around the active map (but not the border) to make the separation between maps (and border blocks) more clear
* Change the Primary Map when selecting an event on a non-primary map
* update wild pokemon tooltip during refresh
* reduce visual studdering when dragging a tile around the map
* limit hover and selection to the actual map, not the border block
2023-01-05 19:34:53 -06:00
haven1433
65e534a46d map editor fixes
* say width/height correctly in the tooltips of the map size handles
* less flickering during undo
* include default OW sprite instead of blank (for example, tutorial catch man in viridian city)
* speed up the initial script-check process that looks for default trainer sprites for each OW by not caring about the length of child scripts
* use proper thread locking during block cache invalidation and renewal so that undo doesn't mess up the number of blocks shown in the block panel
2023-01-04 23:06:51 -06:00
haven1433
3b79b0d3eb minor bugfixes 2022-12-27 00:17:36 -06:00
haven1433
a44841290f first pass at updating script pointer logic
instead of the script line itself knowing that it points to something,
pull it down to the argument level, so that each argument knows
if it points to something.

This will allow a single script line to point to multiple things (like trainers pointing to multiple text or scripts)
2022-12-02 08:38:21 -06:00
haven1433
6a49359716 finish last big feature for 0.5 2022-12-01 21:31:22 -06:00
haven1433
903d430e07 initial pass at last feature for 0.5 2022-12-01 08:15:48 -06:00
haven1433
5483c5e0e6 part one of r/s/e DE feature 2022-11-29 23:14:10 -06:00
haven1433
7efde66586 bugfix for R/S/E special case logic 2022-11-29 23:12:12 -06:00
haven1433
5bcb5b9f00 import/export data 2022-11-27 20:54:02 -06:00
haven1433
d8eea8db88 improve loading conflicting data
used TrainerX's Glazed as a prototype
2022-11-25 15:27:22 -06:00
haven1433
8f3da7f04e bugfixes 2022-11-25 13:17:21 -06:00
haven1433
8a75b2bd4f add blank template 2022-11-24 22:26:25 -06:00
haven1433
af20da7a1d extend header
blocksets
2022-11-24 20:26:39 -06:00
haven1433
38ca0d3c3c update lists 2022-11-24 15:38:08 -06:00
haven1433
4c2089196b usability feedback
label stuff
center new connections
berry shortcuts
fix goto shortcuts
2022-11-24 11:24:56 -06:00
haven1433
78d0297d91 bugfixes
* make pokemon of the chosen type more likely
* create new border for new interiors
* don't cut off trainer sprite in template (for large OWs)
* update selected block render when editing blocks
2022-11-23 23:04:47 -06:00
haven1433
c71aadb94a updates from testing
add more close buttons
support left-click+drag for main view (swap)
improve tooltips
add new tutorial
2022-11-16 20:55:22 -06:00
haven1433
051d4edf8d improve resilience 2022-11-10 23:56:03 -06:00
haven1433
7a9b911a89 bugfix / performance fix 2022-11-10 20:29:15 -06:00
haven1433
2d7fa1e741 bugfixes
* back/forward behavior between tabs
* wild data creation improvements
2022-11-10 20:11:02 -06:00
haven1433
fffb03a5d5 fix elevation bug 2022-11-07 22:20:41 -06:00
haven1433
d09b3c32c7 finish more templates 2022-11-07 21:56:39 -06:00
haven1433
c55ced5cbc bugfixes 2022-11-06 20:20:11 -06:00
haven1433
f8efa227c0 updates from test
this isn't all the updates needed after the test with wet blanket, but it's most of the small things
2022-11-06 00:05:21 -05:00
haven1433
0c0acc9258 bugfix
undo should fix borders
2022-11-04 21:57:51 -05:00
haven1433
3b02c6a186 Ctrl+Drag for drawing rectangles 2022-11-04 21:36:46 -05:00
haven1433
84eb6ba435 improve event cycling 2022-11-04 11:44:55 -05:00
haven1433
0bcaccea82 fix double-draw issue
when the selected block changes, we're between draw interactions
2022-11-04 10:30:43 -05:00
haven1433
197882dec1 fix warp bug 2022-11-04 09:04:34 -05:00
haven1433
22ec42d9f2 bugfixes
* don't crash drawing outside of bounds
* don't crash showing tooltip for invalid data
* don't flicker the panel during selection
2022-11-03 23:07:23 -05:00
haven1433
04aba5dae7 improve tooltips
also show range for trainers/NPCs
2022-11-01 19:59:53 -05:00
haven1433
1f17d9dbe9 first pass at tooltips 2022-10-31 21:46:41 -05:00
haven1433
d523fb70dd fix fly logic, allow duplicate 2022-10-31 20:21:50 -05:00
haven1433
85bf7e6b6b refactor 2022-10-31 14:38:11 -05:00
haven1433
c7c45f7c89 Improve text that shows when making new 2022-10-31 11:36:10 -05:00
haven1433
3afc244baf fix fly x/y 2022-10-31 11:29:38 -05:00
haven1433
7677293b40 place return in right location 2022-10-31 11:19:46 -05:00
haven1433
1ff49ec4f1 another pass at tutorial improvements 2022-10-30 18:43:28 -05:00