Devtest: Automatically enable zoom capability (#10493)

Make minor improvements to the zoom testing chat command.
Delete incorrect line about creative mode from README.md.
This commit is contained in:
Paramat 2020-10-20 22:13:27 +01:00 committed by GitHub
parent c7aa92aaed
commit 4d9c9186ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

@ -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 `/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 * 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 * 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. Confused by a certain node or item? Check out for inline code comments. The usages of most tools are explained in their tooltips.

@ -36,8 +36,12 @@ minetest.register_chatcommand("hp", {
end, end,
}) })
minetest.register_chatcommand("zoom", { minetest.register_on_joinplayer(function(player)
params = "[<zoom_fov>]", player:set_properties({zoom_fov = 15})
end)
minetest.register_chatcommand("zoomfov", {
params = "[<FOV>]",
description = "Set or display your zoom_fov", description = "Set or display your zoom_fov",
func = function(name, param) func = function(name, param)
local player = minetest.get_player_by_name(name) local player = minetest.get_player_by_name(name)
@ -58,8 +62,6 @@ minetest.register_chatcommand("zoom", {
end, end,
}) })
local s_infplace = minetest.settings:get("devtest_infplace") local s_infplace = minetest.settings:get("devtest_infplace")
if s_infplace == "true" then if s_infplace == "true" then
infplace = true infplace = true