JasonLautzenheiser / trizbort

Trizbort, the Interactive Fiction Mapper
http://www.trizbort.com
Other
129 stars 35 forks source link

Converting copied rooms to square edges doesn't work #379

Closed andrewschultz closed 7 years ago

andrewschultz commented 7 years ago

This is an odd bug, but there are a lot of workarounds, so I think there's an initialization missing.

If you copy and paste a room, you can't use ctrl-h to make square corners right away. But you can do ctrl-(e,r,s) then ctrl-h.

https://gist.github.com/andrewschultz/0a0a694e9af00bf8aa7d2fbef7201587 is the test file I used.

To reproduce this, highlight a chunk of rooms in the center. Copy, delete, and paste. Then ctrl-h. Then ctrl-e and ctrl-h to see it works.

JasonLautzenheiser commented 7 years ago

So looked into this a bit...and it is really a copy/paste issue. In some sense easy to fix, but the copy/paste feature has always been a bit of a mess and very difficult to manage especially when adding new properties to an element that would need to be copied. Hence this kind of problem....I'm guessing there are other issues out there that have the same root cause and we just haven't discovered them yet.

So, having said that, it's time to revamp the copy / paste feature. In doing so, I should be making the code less complex and easier to maintain. I think most "new" properties that would arise in the future will be copied with little if any work on our part.

However, doing so uncovered some other complexities to how Trizbort was originally laid out that is making this a bit more of a challenge than I first suspected. Hopefully when this is all said and done, we'll have a more robust system, it will just take a bit of work to get there.