Added customizable keybindings, improved freecam, added special inventory keybind (by default ender inventory)

This commit is contained in:
Elias Fleckenstein
2020-07-18 20:01:17 +02:00
parent 83f59484d3
commit 5a8610c2f4
21 changed files with 146 additions and 34 deletions

View File

@@ -8,12 +8,12 @@ minetest.register_chatcommand("say", {
minetest.register_chatcommand("teleport", {
params = "<X>,<Y>,<Z>",
description = "Teleport to position. " .. (core.anticheat_protection and "Only works for short distances." or ""),
description = "Teleport to relative coordinates. " .. (core.anticheat_protection and "Only works for short distances." or ""),
func = function(param)
local success, pos = core.parse_pos(param)
local success, pos = minetest.parse_relative_pos(param)
if success then
core.localplayer:set_pos(pos)
return true, "Teleporting to " .. core.pos_to_string(pos)
minetest.localplayer:set_pos(pos)
return true, "Teleporting to " .. minetest.pos_to_string(pos)
end
return false, pos
end,

View File

@@ -20,6 +20,6 @@ local formspec = "size[9,8.75]"..
"listring[current_player;enderchest]"..
"listring[current_player;main]"
function minetest.show_extra_inventory()
function minetest.open_special_inventory()
minetest.show_formspec("enderchest:enderchest", formspec)
end

View File

@@ -1,3 +1,3 @@
name = misc
name = mapbot
author = Fleckenstein
description = An API to create simple bots, optimized for map interaction

9
clientmods/mods.conf Normal file
View File

@@ -0,0 +1,9 @@
load_mod_warp = true
load_mod_respawn = true
load_mod_colorchat = true
load_mod_commands = true
load_mod_maputil = true
load_mod_enderchest = true
load_mod_cheat_hud = false
load_mod_misc = true
load_mod_mapbot = false

View File

@@ -18,7 +18,8 @@ minetest.register_on_death(function()
if minetest.settings:get_bool("autorespawn") then
minetest.send_respawn()
else
minetest.show_formspec("respawn:death", formspec)
minetest.show_formspec("respawn:death", formspec)
end
end)
minetest.register_on_formspec_input(function(formname, fields)