mirror of
https://github.com/minetest-mods/drawers.git
synced 2024-11-09 16:33:44 +01:00
Add MineClone2 support, Make dependency to default
optional
This commit is contained in:
parent
6180b96817
commit
5f9a4f20ae
@ -1,2 +1,3 @@
|
|||||||
default
|
default?
|
||||||
screwdriver?
|
screwdriver?
|
||||||
|
mcl_core?
|
||||||
|
8
init.lua
8
init.lua
@ -27,7 +27,6 @@ SOFTWARE.
|
|||||||
|
|
||||||
drawers = {}
|
drawers = {}
|
||||||
|
|
||||||
-- TODO: Support other games than MTG/MTG-like (e.g. MineClone2)
|
|
||||||
local WOOD_SOUNDS
|
local WOOD_SOUNDS
|
||||||
local WOOD_ITEMSTRING
|
local WOOD_ITEMSTRING
|
||||||
local CHEST_ITEMSTRING
|
local CHEST_ITEMSTRING
|
||||||
@ -35,6 +34,12 @@ if default then
|
|||||||
WOOD_SOUNDS = default.node_sound_wood_defaults()
|
WOOD_SOUNDS = default.node_sound_wood_defaults()
|
||||||
WOOD_ITEMSTRING = "default:wood"
|
WOOD_ITEMSTRING = "default:wood"
|
||||||
CHEST_ITEMSTRING = "default:chest"
|
CHEST_ITEMSTRING = "default:chest"
|
||||||
|
elseif mcl_core then -- MineClone 2
|
||||||
|
WOOD_ITEMSTRING = "mcl_core:wood"
|
||||||
|
CHEST_ITEMSTRING = "mcl_chests:chest"
|
||||||
|
if mcl_sounds then
|
||||||
|
WOOD_SOUNDS = mcl_sounds.node_sound_wood_defaults()
|
||||||
|
end
|
||||||
else
|
else
|
||||||
WOOD_ITEMSTRING = "wood"
|
WOOD_ITEMSTRING = "wood"
|
||||||
CHEST_ITEMSTRING = "chest"
|
CHEST_ITEMSTRING = "chest"
|
||||||
@ -383,7 +388,6 @@ function drawers.register_drawer(name, def)
|
|||||||
def.node_box = {type = "fixed", fixed = drawers.node_box_simple}
|
def.node_box = {type = "fixed", fixed = drawers.node_box_simple}
|
||||||
def.collision_box = {type = "regular"}
|
def.collision_box = {type = "regular"}
|
||||||
def.selection_box = {type = "regular"}
|
def.selection_box = {type = "regular"}
|
||||||
def.tiles = def.tiles or {"default_wood.png"}
|
|
||||||
def.paramtype = "light"
|
def.paramtype = "light"
|
||||||
def.paramtype2 = "facedir"
|
def.paramtype2 = "facedir"
|
||||||
def.legacy_facedir_simple = true
|
def.legacy_facedir_simple = true
|
||||||
|
Loading…
Reference in New Issue
Block a user