asamy / forgottenmapeditor

Map editor written in lua for Open Tibia. Written with OtClient's framework.
Other
46 stars 20 forks source link

Selection brush #55

Closed mindrage closed 10 years ago

mindrage commented 10 years ago

So lets say you can select an free amount of tiles, then preform regular actions on them, like replaceWith, remove, Add, Autoborder, Zone, MoveWithXYZOffset You can make diffrent selections, Save them as a file and so on to be able to work between multiple files, a certain selection can be saved as an OTBM file, The selection brushes would be pretty simple, Area, Pen, Magic Wand (aka paint bucket) This would compensate the lack of using multiple files at once, as you can simple store a selection and import it when opening another file. Selections can also have a role in redo/undo as the previous tiles can be stored in the selection while in memory.

A selection would be an array of positions with from/to stackpos in the memory.

Some really cool features with this would be sort of "Create House", "Randomize items" (for grass, bushes, etc) , "Protect/Isolate", aka allow only to place items inside the selection or dont allow editing withing the selection.

The selection should be sorted in an X/Y manner so you can preform example autobordering/position related functions

asamy commented 10 years ago

@Crypton33 has this assigned, let's hope he can implement this for us. I'll be busy the next week.

tosty33 commented 10 years ago

Okay, I've started working on this.

asamy commented 10 years ago

Btw, I've done a little bit of this:

https://github.com/decltype/forgottenmapeditor/blob/master/modules/mapeditor_interface/uieditablemap.lua#L254