diff options
author | Anthony Zhang <azhang9@gmail.com> | 2012-10-22 23:17:37 -0400 |
---|---|---|
committer | Anthony Zhang <azhang9@gmail.com> | 2012-10-22 23:17:37 -0400 |
commit | fdca506505841da24b2b51929da57ab75495276d (patch) | |
tree | 622a8128d2456d6e800a412427f2d45df9ea06d9 /worldedit_commands/init.lua | |
parent | aa4a70d237db22b587d46a50a21d1a71a445874e (diff) |
Fix //load and //allocate for old WorldEdit files.
Diffstat (limited to 'worldedit_commands/init.lua')
-rw-r--r-- | worldedit_commands/init.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/worldedit_commands/init.lua b/worldedit_commands/init.lua index 3931df0..ad6dac8 100644 --- a/worldedit_commands/init.lua +++ b/worldedit_commands/init.lua @@ -663,7 +663,12 @@ minetest.register_chatcommand("/allocate", { local value = file:read("*a")
file:close()
- local nodepos1, nodepos2, count = worldedit.allocate(pos1, value)
+ local nodepos1, nodepos2, count
+ if value:find("{") then --old WorldEdit format
+ nodepos1, nodepos2, count = worldedit.allocate_old(pos1, value)
+ else --new WorldEdit format
+ nodepos1, nodepos2, count = worldedit.allocate(pos1, value)
+ end
worldedit.pos1[name] = nodepos1
worldedit.mark_pos1(name)
|