]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Devtest: Automatically enable zoom capability (#10493)
authorParamat <paramat@users.noreply.github.com>
Tue, 20 Oct 2020 21:13:27 +0000 (22:13 +0100)
committerGitHub <noreply@github.com>
Tue, 20 Oct 2020 21:13:27 +0000 (22:13 +0100)
Make minor improvements to the zoom testing chat command.
Delete incorrect line about creative mode from README.md.

games/devtest/README.md
games/devtest/mods/util_commands/init.lua

index 8b71da6259a7775fefe0afa00ee6dde0c4ebb9fd..77e722af78022af255ee2591c85f53407d4a6e78 100644 (file)
@@ -23,7 +23,6 @@ Basically, just create a world and start. A few important things to note:
 * Use the `/infplace` command to toggle infinite node placement in-game
 * Use the Param2 Tool to change the param2 of nodes; it's useful to experiment with the various drawtype test nodes
 * Check out the game settings and server commands for additional tests and features
-* Creative Mode does nothing (apart from default engine behavior)
 
 Confused by a certain node or item? Check out for inline code comments. The usages of most tools are explained in their tooltips.
 
index f2a155fb2c345fd57ff95410760057c6248afa6f..ca5dca2d950114ec10f862f246cb125c3fcb6e74 100644 (file)
@@ -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