minetest-tools / mcimport

71 stars 22 forks source link

Add optional conversion to MineClone2, along with a few related fixes. #21

Open MysticTempest opened 5 years ago

MysticTempest commented 5 years ago

Alright, per the earlier discussion here's a pr that adds the option to choose between games, and closes #20

I also removed the random rotation of pumpkins/melons; and re-added the old door code. Both are unnecessary for MTG, but needed for MCL2. Though I did add some extra conversions for the "new" door wood-types, and mapped them to wooden doors in MTG.

And finally, I added a few extra notes on how coordinates are roughly converted, and which minecraft world versions are currently compatible with mcimport.

sofar commented 5 years ago

in large this is ok, but I'd like to see some dedup work so we're not just blowing up our code base.

MysticTempest commented 5 years ago

Alrighty, did some research and figured out enough python to fix the dedup issues you requested. Then went ahead and moved the documentation to its own file. And lastly, cleared out the ifdef related stuff from the mcl2_map_content file as requested.

I retested importing maps to both games, and everything appears to still work fine.

MysticTempest commented 5 years ago

So, I was testing in Minetest v5.0, and I noticed a large amount of warning message spam in "debug.txt".

Example error: WARNING[Emerge-0]: VoxelManip:set_lighting called for a non-mapgen VoxelManip object

It seems to be due to this commit in Minetest that added warnings: https://github.com/minetest/minetest/commit/741e3efaf5c8e6d85178051d8655971a7f8b0bb9 And, is related to the lighting update code here in "mcimport.py" which creates the "/worldmods/mcimport/init.lua" file for every converted world.

I tested commenting out the 'set_lighting' line in a new branch: -- vm:set_lighting({day = 15, night = 0}, minp, maxp)

And, it clears the error spam, while lighting seems to still be okay. So, I went ahead, and fixed that while updating the PR.