legacy.lua 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. -- legacy (Minetest 0.4 mod)
  2. -- Provides as much backwards-compatibility as feasible
  3. --
  4. -- Aliases to support loading 0.3 and old 0.4 worlds and inventories
  5. --
  6. minetest.register_node("default:rdirt", {
  7. description = "Legacy Dirt",
  8. tiles = {"default_dirt.png"},
  9. drop = "default:dirt",
  10. groups = {not_in_creative_inventory = 1, oddly_breakable_by_hand = 1}
  11. })
  12. minetest.register_abm({
  13. nodenames = {"default:rdirt"},
  14. interval = 10,
  15. chance = 1,
  16. action = function(pos)
  17. minetest.remove_node(pos)
  18. end
  19. })
  20. minetest.register_alias("stone", "default:stone")
  21. minetest.register_alias("stone_with_coal", "default:stone_with_coal")
  22. minetest.register_alias("stone_with_iron", "default:stone_with_iron")
  23. minetest.register_alias("dirt_with_grass", "default:dirt_with_grass")
  24. minetest.register_alias("dirt_with_grass_footsteps", "default:dirt_with_grass_footsteps")
  25. minetest.register_alias("dirt", "default:dirt")
  26. minetest.register_alias("sand", "default:sand")
  27. minetest.register_alias("gravel", "default:gravel")
  28. minetest.register_alias("sandstone", "default:sandstone")
  29. minetest.register_alias("clay", "default:clay")
  30. minetest.register_alias("brick", "default:brick")
  31. minetest.register_alias("tree", "default:tree")
  32. minetest.register_alias("jungletree", "default:jungletree")
  33. minetest.register_alias("junglegrass", "default:junglegrass")
  34. minetest.register_alias("leaves", "default:leaves")
  35. minetest.register_alias("cactus", "default:cactus")
  36. minetest.register_alias("papyrus", "default:papyrus")
  37. minetest.register_alias("bookshelf", "default:bookshelf")
  38. minetest.register_alias("glass", "default:glass")
  39. minetest.register_alias("wooden_fence", "default:fence_wood")
  40. minetest.register_alias("rail", "default:rail")
  41. minetest.register_alias("ladder", "default:ladder")
  42. minetest.register_alias("wood", "default:wood")
  43. minetest.register_alias("mese", "default:mese")
  44. minetest.register_alias("cloud", "default:cloud")
  45. minetest.register_alias("water_flowing", "default:water_flowing")
  46. minetest.register_alias("water_source", "default:water_source")
  47. minetest.register_alias("lava_flowing", "default:lava_flowing")
  48. minetest.register_alias("lava_source", "default:lava_source")
  49. minetest.register_alias("torch", "default:torch")
  50. minetest.register_alias("sign_wall", "default:sign_wall")
  51. minetest.register_alias("furnace", "default:furnace")
  52. minetest.register_alias("chest", "default:chest")
  53. minetest.register_alias("locked_chest", "default:chest_locked")
  54. minetest.register_alias("cobble", "default:cobble")
  55. minetest.register_alias("mossycobble", "default:mossycobble")
  56. minetest.register_alias("steelblock", "default:steelblock")
  57. minetest.register_alias("nyancat", "default:nyancat")
  58. minetest.register_alias("nyancat_rainbow", "default:nyancat_rainbow")
  59. minetest.register_alias("sapling", "default:sapling")
  60. minetest.register_alias("apple", "default:apple")
  61. minetest.register_alias("WPick", "default:pick_wood")
  62. minetest.register_alias("STPick", "default:pick_stone")
  63. minetest.register_alias("SteelPick", "default:pick_steel")
  64. minetest.register_alias("MesePick", "default:pick_mese")
  65. minetest.register_alias("WShovel", "default:shovel_wood")
  66. minetest.register_alias("STShovel", "default:shovel_stone")
  67. minetest.register_alias("SteelShovel", "default:shovel_steel")
  68. minetest.register_alias("WAxe", "default:axe_wood")
  69. minetest.register_alias("STAxe", "default:axe_stone")
  70. minetest.register_alias("SteelAxe", "default:axe_steel")
  71. minetest.register_alias("WSword", "default:sword_wood")
  72. minetest.register_alias("STSword", "default:sword_stone")
  73. minetest.register_alias("SteelSword", "default:sword_steel")
  74. minetest.register_alias("Stick", "default:stick")
  75. minetest.register_alias("paper", "default:paper")
  76. minetest.register_alias("book", "default:book")
  77. minetest.register_alias("lump_of_coal", "default:coal_lump")
  78. minetest.register_alias("lump_of_iron", "default:iron_lump")
  79. minetest.register_alias("lump_of_clay", "default:clay_lump")
  80. minetest.register_alias("steel_ingot", "default:steel_ingot")
  81. minetest.register_alias("clay_brick", "default:clay_brick")
  82. minetest.register_alias("scorched_stuff", "default:dirt")
  83. minetest.register_alias("rat", "default:dirt")
  84. minetest.register_alias("cooked_rat", "default:dirt")
  85. minetest.register_alias("firefly", "lottplants:firefly")
  86. minetest.register_alias("moreores:mineral_gold", "default:stone_with_gold")
  87. minetest.register_alias("moreores:gold_block", "default:goldblock")
  88. minetest.register_alias("moreores:gold_lump", "default:gold_lump")
  89. minetest.register_alias("moreores:gold_ingot", "default:gold_ingot")
  90. minetest.register_alias("moreores:mineral_copper", "default:stone_with_copper")
  91. minetest.register_alias("moreores:copper_lump", "default:copper_lump")
  92. minetest.register_alias("moreores:copper_ingot", "default:copper_ingot")
  93. minetest.register_alias("moreores:copper_block", "default:copperblock")
  94. minetest.register_alias("moreores:bronze_ingot", "default:bronze_ingot")
  95. minetest.register_alias("moreores:bronze_block", "default:bronzeblock")
  96. minetest.register_alias("diamonds:diamond_in_ground", "default:stone_with_diamond")
  97. minetest.register_alias("diamonds:block", "default:diamondblock")
  98. minetest.register_alias("diamonds:sword", "default:sword_diamond")
  99. minetest.register_alias("diamonds:pick", "default:pick_diamond")
  100. minetest.register_alias("diamonds:shovel", "default:shovel_diamond")
  101. minetest.register_alias("diamonds:axe", "default:axe_diamond")
  102. minetest.register_alias("diamonds:diamond", "default:diamond")
  103. minetest.register_alias("diamonds:ingot", "default:diamond")
  104. minetest.register_alias("lottspecial:helmet_birthday", "lottarmor:helmet_bronze")
  105. minetest.register_alias("lottspecial:chestplate_birthday", "lottarmor:chestplate_bronze")
  106. minetest.register_alias("lottspecial:leggings_birthday", "lottarmor:leggings_bronze")
  107. minetest.register_alias("lottspecial:boots_birthday", "lottarmor:boots_bronze")
  108. minetest.register_alias("lottspecial:shield_birthday", "lottarmor:shield_bronze")
  109. minetest.register_alias("lottspecial:birthday_paxel", "lottores:mithrilpick")
  110. minetest.register_alias("lottspecial:chest", "default:chest")
  111. minetest.register_alias("lottspecial:cake_knife", "default:sword_steel")
  112. minetest.register_alias("lottspecial:cake_slice", "default:apple")
  113. minetest.register_alias("lottspecial:cake", "default:bread")
  114. minetest.register_alias("hatches:hatch_alderwood_open", "lottblocks:hatch_alder_open")
  115. minetest.register_alias("hatches:hatch_alderwood", "lottblocks:hatch_alder")
  116. minetest.register_alias("hatches:hatch_birchwood_open", "lottblocks:hatch_birch_open")
  117. minetest.register_alias("hatches:hatch_birchwood", "lottblocks:hatch_birch")
  118. minetest.register_alias("hatches:hatch_lebethronwood_open", "lottblocks:hatch_lebethron_open")
  119. minetest.register_alias("hatches:hatch_lebethronwood", "lottblocks:hatch_lebethron")
  120. minetest.register_alias("hatches:hatch_mallornwood_open", "lottblocks:hatch_mallorn_open")
  121. minetest.register_alias("hatches:hatch_mallornwood", "lottblocks:hatch_mallorn")
  122. minetest.register_alias("lottspecial:jackomelon", "lottfarming:melon")
  123. minetest.register_alias("lottspecial:jackomelon_lighted", "lottfarming:melon")
  124. minetest.register_alias("lottspecial:scarecrow", "lottfarming:melon")
  125. minetest.register_alias("lottspecial:scarecrow_bottom", "lottfarming:melon")
  126. minetest.register_alias("lottspecial:scarecrow_light", "lottfarming:melon")
  127. minetest.register_alias("lottmapgen:beechgen", "air")
  128. minetest.register_alias("lottmapgen:mallorngen", "air")
  129. minetest.register_alias("lottmapgen:mirkgen", "air")
  130. minetest.register_alias("default:diamond", "default:mese_crystal")
  131. minetest.register_alias("default:stone_with_diamond", "default:stone_with_mese")
  132. minetest.register_alias("default:diamondblock", "default:mese")
  133. minetest.register_alias("default:fence_wood", "lottblocks:fence_wood")
  134. minetest.register_alias("default:ladder", "lottblocks:ladder_wood")
  135. minetest.register_alias("defualt:nyancat", "lottores:mithril_block")
  136. minetest.register_alias("default:nyancat_rainbow", "lottores:galvorn_block")
  137. gaurds = {"dwarven", "elven", "gondor", "orc", "rohan", "uruk_hai"}
  138. for i, v in pairs(gaurds) do
  139. minetest.register_alias("lottnpc:" .. v .. "_guard_spawner", "default:rdirt")
  140. minetest.register_entity(":lottnpc:" .. v .. "_guard", {
  141. physical = false,
  142. on_step = function(self)
  143. self.object:remove()
  144. end
  145. })
  146. end
  147. minetest.register_entity(":npcf:nametag", {
  148. physical = false,
  149. on_step = function(self)
  150. self.object:remove()
  151. end
  152. })