aboutsummaryrefslogtreecommitdiff
path: root/games/devtest/mods/util_commands
diff options
context:
space:
mode:
authorParamat <paramat@users.noreply.github.com>2020-10-20 22:13:27 +0100
committerGitHub <noreply@github.com>2020-10-20 22:13:27 +0100
commit4d9c9186ce61e11e13bc35ce1a319e568cf08662 (patch)
treeb9218c4e85b06673aaac41badc52b5876fda1382 /games/devtest/mods/util_commands
parentc7aa92aaed27ad8e10af7463b154b5b580c86da5 (diff)
downloadminetest-4d9c9186ce61e11e13bc35ce1a319e568cf08662.tar.gz
minetest-4d9c9186ce61e11e13bc35ce1a319e568cf08662.tar.bz2
minetest-4d9c9186ce61e11e13bc35ce1a319e568cf08662.zip
Devtest: Automatically enable zoom capability (#10493)
Make minor improvements to the zoom testing chat command. Delete incorrect line about creative mode from README.md.
Diffstat (limited to 'games/devtest/mods/util_commands')
-rw-r--r--games/devtest/mods/util_commands/init.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/games/devtest/mods/util_commands/init.lua b/games/devtest/mods/util_commands/init.lua
index f2a155fb2..ca5dca2d9 100644
--- a/games/devtest/mods/util_commands/init.lua
+++ b/games/devtest/mods/util_commands/init.lua
@@ -36,8 +36,12 @@ minetest.register_chatcommand("hp", {
end,
})
-minetest.register_chatcommand("zoom", {
- params = "[<zoom_fov>]",
+minetest.register_on_joinplayer(function(player)
+ player:set_properties({zoom_fov = 15})
+end)
+
+minetest.register_chatcommand("zoomfov", {
+ params = "[<FOV>]",
description = "Set or display your zoom_fov",
func = function(name, param)
local player = minetest.get_player_by_name(name)
@@ -58,8 +62,6 @@ minetest.register_chatcommand("zoom", {
end,
})
-
-
local s_infplace = minetest.settings:get("devtest_infplace")
if s_infplace == "true" then
infplace = true