mirror of
https://github.com/HybridDog/we_undo.git
synced 2025-01-05 20:27:35 +01:00
Add settingtypes.txt
This commit is contained in:
parent
5fb93e6ca5
commit
5385c24888
@ -2,6 +2,8 @@
|
||||
`//redo` redo what was just undone<br/>
|
||||
`//show_journal` view what can be undone and redone
|
||||
|
||||
The changes of nodes after invoking /set are compressed to improve memory usage.
|
||||
|
||||
Related issues:
|
||||
* https://github.com/Uberi/Minetest-WorldEdit/issues/43
|
||||
* https://forum.minetest.net/viewtopic.php?p=296543#p296543
|
||||
@ -23,10 +25,8 @@ Ignored chatcommands:
|
||||
|
||||
TODO:
|
||||
* simplify mem_usage
|
||||
* Setting for disabling storing harmless things like pos changes
|
||||
* Add parameters to undo and redo: undo the last n
|
||||
* Allow undoing changes which happened before other changes (considered unsafe)
|
||||
e.g. //undo ~1 to undo the change before the latest one
|
||||
* Implement more commands
|
||||
* Add mod load time info
|
||||
* Add settingtypes.txt for the settings
|
||||
|
11
init.lua
11
init.lua
@ -2,10 +2,13 @@
|
||||
|
||||
----------------- Settings -----------------------------------------------------
|
||||
|
||||
local max_commands = 256
|
||||
local min_commands = 3
|
||||
local max_memory_usage = 2^25 -- 32 MiB
|
||||
local remember_innocuous = true
|
||||
local remember_innocuous =
|
||||
minetest.settings:get_bool"we_undo.remember_innocuous" ~= false
|
||||
local max_commands = tonumber(
|
||||
minetest.settings:get"we_undo.max_commands") or 256
|
||||
local min_commands = tonumber(minetest.settings:get"we_undo.min_commands") or 3
|
||||
local max_memory_usage = tonumber(
|
||||
minetest.settings:get"we_undo.max_memory_usage") or 2^25
|
||||
|
||||
|
||||
----------------- Journal and chatcommands -------------------------------------
|
||||
|
19
settingtypes.txt
Normal file
19
settingtypes.txt
Normal file
@ -0,0 +1,19 @@
|
||||
# If set to false, only commands which can harm the map are added to the
|
||||
# journal.
|
||||
we_undo.remember_innocuous (remember innocuous changes) bool true
|
||||
|
||||
# This is the maximum amount of commands in the journal of a player.
|
||||
# The size of the journal is further limited by the memory setting.
|
||||
we_undo.max_commands (maximum count of commands) int 256 1
|
||||
|
||||
# This is the minimum amount of commands in the journal of a player.
|
||||
# The memory limit is ignored up to the last min_commands commands.
|
||||
# This is because being unable to undo a big mistake is worse than exceeding
|
||||
# the configured memory limit.
|
||||
we_undo.min_commands (minimum count of commands) int 3 1
|
||||
|
||||
# If the size of the journal exceeds this limit, old history is removed.
|
||||
# Specify the value in bytes, note that it only considers big data,
|
||||
# approximately.
|
||||
# default value: 2^25 (32 MiB)
|
||||
we_undo.max_memory_usage (maximum memory usage) int 33554432 9
|
Loading…
Reference in New Issue
Block a user