2019-03-05 19:20:38 -05:00
|
|
|
-- LUALOCALS < ---------------------------------------------------------
|
2019-09-09 08:11:06 -04:00
|
|
|
local minetest, pairs
|
|
|
|
= minetest, pairs
|
2019-03-05 19:20:38 -05:00
|
|
|
-- LUALOCALS > ---------------------------------------------------------
|
|
|
|
|
2019-09-09 08:11:06 -04:00
|
|
|
local footsteps = {}
|
|
|
|
|
2019-03-05 19:20:38 -05:00
|
|
|
minetest.register_on_joinplayer(function(player)
|
2019-04-06 20:49:27 -04:00
|
|
|
local inv = player:get_inventory()
|
2019-04-10 08:33:34 -04:00
|
|
|
inv:set_size("main", 8)
|
|
|
|
inv:set_size("craft", 0)
|
|
|
|
inv:set_size("craftpreview", 0)
|
|
|
|
inv:set_size("craftresult", 0)
|
2019-03-07 10:08:22 -05:00
|
|
|
|
2019-03-10 15:47:22 -04:00
|
|
|
player:set_physics_override({speed = 1.25})
|
|
|
|
|
2019-03-07 10:08:22 -05:00
|
|
|
player:set_properties({
|
|
|
|
makes_footstep_sound = true,
|
2019-03-10 15:47:22 -04:00
|
|
|
|
2019-03-07 10:08:22 -05:00
|
|
|
-- Allow slight zoom for screenshots
|
|
|
|
zoom_fov = 60
|
|
|
|
})
|
2019-09-09 08:11:06 -04:00
|
|
|
footsteps[player:get_player_name()] = true
|
2019-03-05 19:20:38 -05:00
|
|
|
end)
|
2019-04-09 21:06:55 -04:00
|
|
|
|
|
|
|
minetest.register_allow_player_inventory_action(function(_, action)
|
|
|
|
return action == "move" and 0 or 1000000
|
|
|
|
end)
|
2019-08-27 07:33:38 -04:00
|
|
|
|
2019-08-27 19:14:51 -04:00
|
|
|
minetest.unregister_chatcommand("kill")
|
2019-09-09 08:11:06 -04:00
|
|
|
|
|
|
|
minetest.register_globalstep(function()
|
|
|
|
for _, player in pairs(minetest.get_connected_players()) do
|
|
|
|
local name = player:get_player_name()
|
|
|
|
local value = not player:get_player_control().sneak
|
|
|
|
if footsteps[name] ~= value then
|
|
|
|
player:set_properties({
|
|
|
|
makes_footstep_sound = value
|
|
|
|
})
|
|
|
|
footsteps[name] = value
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end)
|