36 Commits

Author SHA1 Message Date
David Vierra
963d2a728c Added: "Record Undo" option.
"Record Undo" is reset when loading or saving a level.
Long undo operations can be canceled.
2013-03-13 23:13:54 -10:00
David Vierra
25dc17389d Fixed: Paste brush now refreshes the correct area. 2012-12-01 15:50:14 -10:00
David Vierra
83a08cb84f Worlds in the world select screen and levels being imported are now opened read-only.
Submodule pymclevel:
    > ce70e8b - Fixed: Dimensions check the parent world's session instead of creating their own. (xxx)
    > 1540076 - Added: Infinite worlds can now be opened read-only. This doesn't acquire the session lock.
    > 4d1d968 - Catch struct errors when checking session lock.
    > e0f1ca1 - Fixed: Session lock is checked before all chunk writes.
2012-12-01 15:49:54 -10:00
David Vierra
636b1b46e7 Fixed: Shift-clicking with Brush tool draws straight lines again 2012-11-27 00:19:11 -10:00
David Vierra
81b682d728 Undo records are stored in a dedicated temp directory which is deleted on exit. 2012-11-21 21:39:28 -10:00
David Vierra
ead87c03ff Refactor: Remove toolbasics.py.
All wildcard imports under editortools are gone.
2012-11-13 15:26:53 -10:00
David Vierra
b00f708aa2 Refactor: Move EditorTool to its own file. 2012-11-13 15:26:53 -10:00
David Vierra
1c1857b17c Refactor: Move ToolOptions to its own file. 2012-11-13 15:26:52 -10:00
David Vierra
b3c6a7b84d Refactor: Move BlockView and BlockButton to their own file. 2012-11-13 15:26:52 -10:00
David Vierra
cd56c8f0e6 Refactor: Move BlockPicker to its own file. 2012-11-13 15:26:51 -10:00
David Vierra
a4e8a632fc Refactor: Move Operation to its own file 2012-11-13 15:26:50 -10:00
David Vierra
4985791551 Added: Use copyChunkFrom to record undo information.
Operation now has `editor` and `level` as required arguments to init. Operation has a default `undo` implementation that copies all chunks from `undoLevel`. `undoSchematic` renamed to `undoLevel`
2012-11-13 15:26:45 -10:00
David Vierra
8e67b57b2b Fixed: Erosion brush had a misaligned destination point, causing results to be badly skewed in one direction. 2012-11-01 19:00:31 -10:00
David Vierra
c8921b7d9d Refactor: Recent changes in pymclevel require some changes.
Use getChunkSlicesForBox to compute slices.
blockReplaceTable is moved to block_fill.py
adjustCopyParameters is moved to block_copy
info() was accidentally imported from some unknown module (wat? stop using wildcard imports!)

Submodule pymclevel:
    > 35bbbdc - Refactor: Change log statements to use `log.info()` instead of `info=log.info; info()`
    > ecac4fa - Refactor: Move fillBlocks into its own file and remove "fillBlocksFinite" implementation.
    > a7fd3ed - Refactor: Move copyEntitiesFrom logic into copyBlocksFrom and remove "copyEntitiesFromFinite" implementation.
    > b0ef494 - Test: copyBlocksFrom no longer fails if the requested box is partially out of the source level's bounds.
    > 459b208 - Indev: Now separates LocalPlayer from Entities on load and reinserts it on save.
    > 14f5343 - Test: Improve copyConvertBlocks to count entities copied
    > ea585d7 - Test: test_mcr no longer re-runs TestAnvilLevel.
    > cf51ef4 - Refactor: infiniteworld.py: Change log statements to use `log.info()` instead of `info=log.info; info()`
    > f36634b - Refactor: Move copyBlocksFrom and supporting methods to its own file and simplify them.
    > ded3b8f - Refactor: Remove redundant code for setting an anvil world's Height.
    > 93ccf9d - Refactor: Change a chunk's Height to reference the Height of its containing world.
    > fe03b70 - Entities: Fixed Tile positions when copying and rotating ItemFrames
2012-10-31 02:04:42 -10:00
David Vierra
b384768f7e Fixed: BrushOperation._perform correctly skips over absent chunks. 2012-10-30 04:39:44 -10:00
David Vierra
bba800c692 Refactor: Rearrange the main loops in BrushOperation.perform to have the chunks on the outer loop and the brush points on the inner loop.
This reduces the number of calls to getChunk which can avoid causing chunks to be loaded and unloaded constantly.
BrushMode.performAtPoint is split up into apply, applyToChunk, and applyToChunkSlices
Some modes need to use apply to just loop over the points without looping over any chunks.
dirtyBoxForPointAndOptions renamed to brushBoxForPointAndOptions
2012-10-30 04:39:32 -10:00
David Vierra
a9d6c96a07 Refactor: Move createBrushMask to global scope 2012-10-29 22:07:53 -10:00
David Vierra
d6739b1282 Refactor: Remove all uses of chunk.compress and related methods.
MCServerChunkGenerator was moved to minecraft_server.py
Some strings were changed from single- to double-quoted while removing statically declared tag names.Submodule pymclevel updated.

Submodule pymclevel:
    > f4b4091 - Fixed: Statement seems to have no effect
    > b7ce019 - Fixed: Remove redundant parentheses
    > 55c2369 - Fixed: Incorrect call arguments
    > bca5e18 - Fixed: Default argument value is mutable
    > 6fa9249 - Refactor: Remove dead class members.
    > 79f4e1a - Refactor: Remove dead function.
    > a749389 - Fixed: Comparison with None performed with equality operators
    > 670bb46 - Refactor: Move MCServerChunkGenerator and related classes and functions to a new file minecraft_server.py
    > 0b55db7 - Refactor: Remove tag names statically declared as string constants.
    > 50f9ee5 - Add .gitattributes with core.autocrlf
    > 78e45ae - Refactor: Remove compressedChunks and related methods and data from MCInfdevOldLevel and AnvilChunk
2012-10-29 22:03:03 -10:00
David Vierra
23659a5cf0 Fix bug in Topsoil brush introduced by import reshuffling. 2012-10-25 12:18:18 -10:00
David Vierra
513ddc0398 Normalized line endings 2012-10-25 00:09:56 -10:00
David Sowder
f4cc898145 import tempfile locally rather than relying on it being available through our import of pymclevel 2012-03-04 19:14:21 -06:00
David Sowder
73ceb85b75 pep8 compliance: E225 missing whitespace around operator 2012-02-21 21:11:46 -06:00
David Sowder
a86f7c8a97 pep8 compliance: E201 whitespace after '(' 2012-02-21 21:09:42 -06:00
David Sowder
bc17a2cadf pep8 compliance: E231 missing whitespace after ',' 2012-02-21 21:08:58 -06:00
David Sowder
33dc6a8e6a pep8 compliance: E231 missing whitespace after ':' 2012-02-21 21:06:51 -06:00
David Sowder
9009d57c4c pep8 compliance: E251 no spaces around keyword / parameter equals 2012-02-21 21:05:48 -06:00
David Sowder
e19025ef2a pep8 compliance: E702 multiple statements on one line (semicolon) 2012-02-21 20:05:40 -06:00
David Sowder
bbdd02abed pep8 compliance: E261 at least two spaces before inline comment 2012-02-21 20:03:35 -06:00
David Sowder
0e9faa3f4e pep8 compliance: E701 multiple statements on one line (colon) 2012-02-21 19:54:32 -06:00
David Sowder
a81a6c3a8d pep8 compliance: E301 expected 1 blank line 2012-02-21 19:40:48 -06:00
David Sowder
44277200a0 pep8 compliance: E302 expected 2 blank lines 2012-02-21 19:29:21 -06:00
David Sowder
cab5c2a1e0 pep8 compliance: E303 too many blank lines 2012-02-21 19:26:02 -06:00
David Sowder
0dc7fba346 pep8 compliance: W602 deprecated form of raising exception 2012-02-21 19:14:00 -06:00
David Sowder
fa633c64fb pep8 compliance: W291 trailing whitespace 2012-02-21 19:11:45 -06:00
David Sowder
f60c6bb30c pep8 compliance: W293 blank line contains whitespace 2012-02-21 19:06:46 -06:00
David Vierra
e20a70d963 Initial open source release. 2012-02-13 14:59:37 -10:00