From 8893d66dc64e4d8d1b51cb9da1ccf9fe43e802d7 Mon Sep 17 00:00:00 2001 From: unknown <24964441+wsor4035@users.noreply.github.com> Date: Thu, 20 Oct 2022 21:59:11 -0400 Subject: [PATCH] fix https://github.com/mt-mods/dreambuilder_game/issues/20 - quote on quote improper dor rotation which turned out to be badly applied model work around --- homedecor_doors_and_gates/init.lua | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/homedecor_doors_and_gates/init.lua b/homedecor_doors_and_gates/init.lua index 415b04d2..265915d2 100644 --- a/homedecor_doors_and_gates/init.lua +++ b/homedecor_doors_and_gates/init.lua @@ -26,25 +26,25 @@ local door_list = { sounds = default.node_sound_wood_defaults(), sound_open = "homedecor_door_open", sound_close = "homedecor_door_close", - mesh = "homedecor_door_fancy.obj" + mesh = "homedecor_door_fancy" }, { name = "french_oak", description = S("French door, Oak-colored"), sounds = default.node_sound_glass_defaults(), - mesh = "homedecor_door_french.obj" + mesh = "homedecor_door_french" }, { name = "french_mahogany", description = S("French door, Mahogany-colored"), sounds = default.node_sound_glass_defaults(), - mesh = "homedecor_door_french.obj" + mesh = "homedecor_door_french" }, { name = "french_white", description = S("French door, White"), sounds = default.node_sound_glass_defaults(), - mesh = "homedecor_door_french.obj" + mesh = "homedecor_door_french" }, { name = "basic_panel", @@ -59,7 +59,7 @@ local door_list = { sounds = default.node_sound_metal_defaults(), sound_open = "doors_steel_door_open", sound_close = "doors_steel_door_close", - mesh = "homedecor_door_wrought_iron.obj" + mesh = "homedecor_door_wrought_iron" }, { name = "carolina", @@ -74,13 +74,13 @@ local door_list = { sounds = default.node_sound_wood_defaults(), sound_open = "homedecor_door_open", sound_close = "homedecor_door_close", - mesh = "homedecor_door_wood_glass_3.obj" + mesh = "homedecor_door_wood_glass_3" }, { name = "closet_mahogany", description = S("Mahogany Closet Door"), sounds = default.node_sound_wood_defaults(), - mesh = "homedecor_door_closet.obj" + mesh = "homedecor_door_closet" }, { name = "closet_oak", @@ -93,6 +93,7 @@ local door_list = { local old_doors = {} local door_types = {"_a", "_b", "_c", "_d"} +local door_conversion = {["_c"]="_a", ["_d"]="_b"} local function generate_door(def) local default_settings = { @@ -125,14 +126,15 @@ local function generate_door(def) end for _, door in ipairs(door_list) do - local name = door.name + local name, mesh = door.name, door.mesh doors.register("homedecor_" .. name, generate_door(door)) --hack to get around doors not allowing custom meshes - if door.mesh then + if mesh then for _, v in pairs(door_types) do + if door_conversion[v] then v=door_conversion[v] end minetest.override_item("doors:homedecor_" .. name .. v, { - mesh = door.mesh + mesh = mesh .. v .. ".obj" }) end end