minestead_mods/default/legacy.lua
Sergei Mozhaisky 2ac5a5fc35
Update default game (#31)
* update: xpanes

* update wool

* update walls

* update vessels

* update tnt

* update stairs

* update spawn

* update sfinv

* update sethome

* update screwdriver

* update player_api

* update map

* update give_initial_stuff

* update game_commands

* update flowers

* update fireflies

* update fire

* update dye

* update dungeon_loot

* update doors

* update creative

* update butterflies

* update bucket

* update bones

* update boats

* update binoculars

* update beds

* update default

* revert to stairs_redo

* mc brick texture

* add xpanes_space.png as dependency
2020-05-25 12:35:59 +03:00

50 lines
1.9 KiB
Lua

-- mods/default/legacy.lua
-- Horrible stuff to support old code registering falling nodes
-- Don't use this and never do what this does, it's completely wrong!
-- (More specifically, the client and the C++ code doesn't get the group)
function default.register_falling_node(nodename, texture)
minetest.log("error", debug.traceback())
minetest.log('error', "WARNING: default.register_falling_node is deprecated")
if minetest.registered_nodes[nodename] then
minetest.registered_nodes[nodename].groups.falling_node = 1
end
end
function default.spawn_falling_node(p, nodename)
spawn_falling_node(p, nodename)
end
-- Liquids
WATER_ALPHA = minetest.registered_nodes["default:water_source"].alpha
WATER_VISC = minetest.registered_nodes["default:water_source"].liquid_viscosity
LAVA_VISC = minetest.registered_nodes["default:lava_source"].liquid_viscosity
LIGHT_MAX = default.LIGHT_MAX
-- Formspecs
default.gui_suvival_form = default.gui_survival_form
default.gui_bg = ""
default.gui_bg_img = ""
default.gui_slots = ""
-- Players
if minetest.get_modpath("player_api") then
default.registered_player_models = player_api.registered_models
default.player_register_model = player_api.register_model
default.player_attached = player_api.player_attached
default.player_get_animation = player_api.get_animation
default.player_set_model = player_api.set_model
default.player_set_textures = player_api.set_textures
default.player_set_animation = player_api.set_animation
end
-- Chests
default.register_chest = default.chest.register_chest
-- Check for a volume intersecting protection
function default.intersects_protection(minp, maxp, player_name, interval)
minetest.log("warning", "default.intersects_protection() is " ..
"deprecated, use minetest.is_area_protected() instead.")
return minetest.is_area_protected(minp, maxp, player_name, interval)
end