Big update

master
Johannes Fritz 2022-07-21 12:43:41 -05:00
parent 046db08d71
commit 3e0ed1273b
15 changed files with 844 additions and 273 deletions

124
README.md
View File

@ -1,82 +1,84 @@
Minetest Mod Edit
==================
# Minetest Edit Mod
This mod provides a block way to cut, paste, fill or delete regions
[![ContentDB](https://content.minetest.net/packages/Mr.%20Rar/edit/shields/downloads/)](https://content.minetest.net/packages/Mr.%20Rar/edit/)
Information
-----------
## Overview
This mod is named `edit`, permits to a player, manage regions by the usage
of blocks to mark ones. It provides functionalities of `cut`, `copy`, `paste` and `delete`,
but using always special blocks to mark the dessired area.
This mod named `edit` allows copying, pasting, filling, deleting, opening and saving 3D areas.
Schematics are loaded and saved from .mts files located in the world subfolder `schems`.
This mod was inspired by the Fill Start and Fill End blocks in Manic Digger.
![screenshot](screenshot.png)
Technical information
---------------------
## Items
This source provides mod named `edit`, a block way to cut, paste, fill
or delete regions by the usage of special blocks.
| Block | internal name | item |
| ----------- | ---------- | ------------------- |
| Copy block | edit:copy | ![](textures/edit_copy.png) |
| Paste block | edit:paste | ![](textures/edit_paste.png) |
| Fill block | edit:fill | ![](textures/edit_fill.png) |
| Delete block | edit:delete | ![](textures/edit_delete.png) |
##### dependences
none
Usage
------
The usage is by the mark of areas beetween two blocks, player must have the special blocks,
must mark an area using two paired blocks of the same type, later can operate that area:
| Name | Node ID | Image |
| ------ | ----------- | ----------------------------- |
| Copy | edit:copy | ![](textures/edit_copy.png) |
| Paste | edit:paste | ![](textures/edit_paste.png) |
| Fill | edit:fill | ![](textures/edit_fill.png) |
| Delete | edit:delete | ![](textures/edit_delete.png) |
| Open | edit:open | ![](textures/edit_open.png) |
| Save | edit:save | ![](textures/edit_save.png) |
| Undo | edit:undo | ![](textures/edit_undo.png) |
#### Copy Block and Paste Block
## Dependences
![editblocks1copy.png](editblocks1copy.png)
When two Copy Blocks are placed they select an area between them as show
in figure 1. When an area is surrounded it is copied and the two Copy
Blocks are deleted.
The Paste Block is used for pasting a 3D area copied by the Copy Block.
When a Paste Block is placed the copied area is pasted relative to the
position of the first placed Copy Block when it was copied.
###### Delete Block
Delete Blocks are used to delete a 3D area. When two Delete Blocks are
placed they select an area between them as show in figure 1. When an area
is surrounded it is deleted and the two Delete Blocks are deleted as well.
#### Fill Block
![](editblocks2delete.png)
None
Fill Blocks are used to fill a 3D area with a certain block. You can do so
by first selecting an area by surrounding it with two fill blocks. Fill
Blocks work differently when surrounding an area in that the area selected
includes the position of the Fill Blocks themselves as show in figure 2.
## Usage
Once an area is surrounded a dialog pops up and shows you all the blocks
in your inventory. If you press one, the selected area will be filled with
the block pressed. If you press a blank slot the selected area will be
filled with air. To cancel, press the "X".
### Copy Node
LICENCE
-------
![figure1.png](figure1.png)
CC0 by MrRar check [LICENSE](LICENSE) file, this mod was started by MrRar,
minetest-mods community later absorved.
When two copy nodes are placed at opposite corners of an area, they select the area as show in figure 1. When an area is selected, it is copied and the two copy nodes are deleted.
### Paste Node
The paste node is used for pasting the area copied by the copy node or a schematic loaded with the open node. When a paste node is placed, the copied area or schematic is placed at the corner of the paste node. In the case of a copied area, area is pasted relative to the position of the first placed copy node when it was copied. The copied area can be rotated when the paste preview is visable by pressing the sneak key and an arrow key.
### Delete Node
Delete nodes are used to delete an area. When two delete nodes are placed at opposite corners of an area, they select the area as show in figure 1. When an area is selected, it is deleted and the two delete nodes are removed as well.
### Fill Node
![figure1.png](figure2.png)
Fill nodes are used to fill a 3D area with a certain item. Start by placing two fill nodes at opposite corners of the desired area. The selected area includes the positions of the fill nodes themselves as shown in figure 2.
Once a second fill node is placed, a dialog appears listing all items in the players inventory. Clicking an item will cause it to be used used for filling the selected area. Clicking on a blank slot will cause the selected area to be filled with air. To cancel the fill, press the "X".
### Open Tool
Right click with this tool to load a .mts schematic for pasting from the the world subfolder `schems`.
### Save Tool
Right click with this tool to save copied area as a .mts schematic in the the world subfolder `schems`.
### Undo Tool
Right click with this tool to undo a world modification like filling or pasting.
Use a second time to redo the undo.
Only the most resent world modification can be undone.
### License
CC0 by MrRar check [License](LICENSE) file, this mod was started by MrRar,
minetest-mods community.

View File

@ -1 +0,0 @@
This mod allows you to copy, paste, fill and delete 3D areas using blocks pairs.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

BIN
figure1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
figure2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

985
init.lua

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +1,3 @@
name = edit
description = This mod allows you to copy, paste, fill and delete 3D areas using blocks pairs
description = Allows copying, pasting, filling, deleting, opening and saving 3D areas.
min_minetest_version = 5.4

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 KiB

After

Width:  |  Height:  |  Size: 209 KiB

4
settingtypes.txt Normal file
View File

@ -0,0 +1,4 @@
paste_preview_max_entities (Paste preview max entities) int 2000
max_operation_volume (Max edit operation volume) int 20000

Binary file not shown.

Before

Width:  |  Height:  |  Size: 239 B

After

Width:  |  Height:  |  Size: 149 B

BIN
textures/edit_open.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

BIN
textures/edit_save.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

BIN
textures/edit_undo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B