Add diggable controller in MineClone2-derived games
This commit is contained in:
parent
bcf4633457
commit
e0b96e3307
6
init.lua
6
init.lua
|
@ -37,6 +37,9 @@ end
|
|||
dofile(minetest.get_modpath(minetest.get_current_modname()).."/api.lua")
|
||||
|
||||
local ctrl_groups = {choppy=2, oddly_breakable_by_hand=2}
|
||||
if has_mcl then
|
||||
ctrl_groups = {axey=2, handy=1}
|
||||
end
|
||||
local has_worldedit = minetest.global_exists("worldedit")
|
||||
local is_singleplayer = minetest.is_singleplayer()
|
||||
local control_textures = {
|
||||
|
@ -381,6 +384,9 @@ minetest.register_node("meshnode:controller", {
|
|||
paramtype2 = "facedir",
|
||||
tiles = control_textures,
|
||||
groups = ctrl_groups,
|
||||
-- _mcl_hardness is needed so that the controller is not
|
||||
-- diggable without a delay in MineClone2-derived games.
|
||||
_mcl_hardness = 1,
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
|
|
Loading…
Reference in New Issue