From 230bd05bfceefed2b10704f0ca826be8d8e5097b Mon Sep 17 00:00:00 2001 From: An0n3m0us Date: Sat, 1 Jun 2019 02:45:01 +0100 Subject: [PATCH] Substitute condition for variable --- mods/doors/init.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/mods/doors/init.lua b/mods/doors/init.lua index 7e1d4051..756c5566 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -437,13 +437,12 @@ function doors.register(name, def) def.selection_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}} def.collision_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}} - if def.model == def.model or "door" then - def.mesh = def.model .. "_a.obj" - minetest.register_node(":" .. name .. "_a", def) + def.model = def.model or "door" + def.mesh = def.model .. "_a.obj" + minetest.register_node(":" .. name .. "_a", def) - def.mesh = def.model .. "_b.obj" - minetest.register_node(":" .. name .. "_b", def) - end + def.mesh = def.model .. "_b.obj" + minetest.register_node(":" .. name .. "_b", def) doors.registered_doors[name .. "_a"] = true doors.registered_doors[name .. "_b"] = true