Time Nick Message 04:03 VanessaE anyone alive? need some modding help again :P 04:17 luk3yx VanessaE: Asking to ask is badâ„¢ 04:17 VanessaE :P 04:19 VanessaE I'm having problems with override_item()... it applies the override okay (according to sofar's node inspector tool), but the visuals don't reflect it.. 04:19 luk3yx Are you doing it on-the-fly or during game load? 04:19 VanessaE during load. 04:19 VanessaE consider this: https://pastebin.ubuntu.com/p/9Zmq4sf6PN/ 04:20 VanessaE the override at line 22 is being done in name only. the model in-game is still the default door model, even though the inspector tool shows mesh="the correct model" 04:20 VanessaE yet the override on line 25 works. 04:22 VanessaE why would one of those overrides work, but not the other? 04:26 luk3yx VanessaE: Could it be anything to do with the fact that the doors mod doesn't copy the table when registering door_b? 04:26 VanessaE no idea. 04:26 luk3yx https://github.com/minetest/minetest_game/blob/master/mods/doors/init.lua#L440-L444 04:26 VanessaE yeah, I have that open 04:27 VanessaE (the doors API needs a little more flexibility...) 04:28 luk3yx Not copying the table when defining those nodes seems volatile and weird 04:28 VanessaE lemme try pulling-in an old clone_node() routine and use the 04:28 VanessaE use that 04:29 luk3yx VanessaE: That's the issue 04:29 VanessaE ? 04:29 luk3yx Both of your overrides are overriding _b 04:29 luk3yx Because of the doors mod being lazy and not copying the table 04:29 VanessaE stupid stupid stupid 04:30 luk3yx Try this (untested) code: https://pastebin.ubuntu.com/p/ftfJQSQSpJ/ 04:32 luk3yx VanessaE: If you didn't already see it, ^ 04:33 VanessaE already trying my way first :) 04:33 VanessaE your supposition is correct. 04:33 VanessaE btw, 04:34 VanessaE the old way, of cloning the node, altering the clone, and over-registering it like we did before override_item() was a thing does the trick 04:35 * VanessaE looks at your method 04:36 VanessaE minetest.registered_items[nn.."_a"].name = nn.."_a" 04:36 VanessaE this forces Lua to dereference the table? 04:36 luk3yx No, it's a hack for MT 04:36 VanessaE oh 04:36 luk3yx MT internally uses "def.name" to get the node name 04:37 luk3yx (And minetest.register_node sets this during registration) 04:37 VanessaE I'm not sure I understand how your idea works then 04:37 luk3yx When register_node_raw() is called by builtins, it doesn't get a separate "name" parameter 04:38 luk3yx When the "doors" mod registers door _b, def.name for both doors (since they are the same table) gets set to "doors:..._b" 04:38 luk3yx And override_item() doesn't check if def.name has changed or not. 04:38 VanessaE gotchya 04:39 VanessaE your method is simpler, but I'll stick with my method because lack of brainpower :P 04:40 luk3yx Also, your override setting use_texture_alpha on door _a will probably break too 04:40 VanessaE yeah, gonna rewrite that too 04:40 luk3yx Make sure to reset "mesh" on the _a door if you're not using a custom mesh 04:41 VanessaE right 04:49 VanessaE now to figure out why it's trying to apply a custom mesh to all doors :P 04:49 VanessaE (for testing, only one entry in my table is set to use a custom model) 05:03 VanessaE there we go, now it's behaving exactly as I wanted :) 05:03 * VanessaE wanders off to make a few more meshes 05:33 VanessaE thanks for the help, luk3yx :) 05:33 luk3yx Ypu 05:33 luk3yx *You're welcome 05:48 ChimneySwift that moment when you're writing a question then think of an answer 06:44 VanessaE luk3yx: in case you're curious, https://gitlab.com/VanessaE/homedecor_modpack/commit/7be5e152637eb5c8559c4ee25af9668560e825a5 07:57 Amaz ; 07:57 Amaz Whoops 14:07 Fixer spammers https://forum.minetest.net/memberlist.php?mode=viewprofile&u=24737 and https://forum.minetest.net/memberlist.php?mode=viewprofile&u=24738