diff --git a/mods/beginners_chest/depends.txt b/mods/beginners_chest/depends.txt index 585cc7aa..0679223e 100755 --- a/mods/beginners_chest/depends.txt +++ b/mods/beginners_chest/depends.txt @@ -1,2 +1,3 @@ default 3d_armor +forceload? diff --git a/mods/beginners_chest/init.lua b/mods/beginners_chest/init.lua index 814eb52b..2090301e 100755 --- a/mods/beginners_chest/init.lua +++ b/mods/beginners_chest/init.lua @@ -3,7 +3,7 @@ Put some useful stuff in chests for the new players Version : 1.1 - 11/8/2014_14h48UTC - Last modification by Mg on the : 11/8/2014 @ 14h48 UTC + Last modification by Mg on the : 14/3/2015 @ 14h48 UTC Mod ßý Mg, based on an idea of MinetestForFun/Darcidride ]]-- @@ -140,8 +140,15 @@ minetest.register_globalstep(function(dtime) if node.name ~= "ignore" then if node.name ~= "default:chest" then if node.name == "air" then - minetest.add_node(chests[i].position,{name = "default:chest"}) + minetest.set_node(chests[i].position,{name = "default:chest"}) minetest.log("action","[b_chest]["..i.."] Chest placed at "..chests[i].position.x..", "..chests[i].position.y..", "..chests[i].position.z) + if minetest.get_modpath("forceload") ~= nil + and (minetest.get_node({chests[i].position.x,chests[i].position.y-1,chests[i].position.z}).name == "air" + or minetest.get_node({chests[i].position.x,chests[i].position.y-1,chests[i].position.z}).name == "default:dirt") then + -- Enable use of forceload anchors + minetest.set_node({chests[i].position.x,chests[i].position.y-1,chests[i].position.z},{name = "forceload:anchor"}) + minetest.log("action","[b_chest]["..i.."] Forceload anchor placed under chest") + end else minetest.log("action","[b_chest]["..i.."] Unable to place chest at "..chests[i].position.x..", "..chests[i].position.y..", "..chests[i].position.z.." : place already in use.") break diff --git a/mods/forceload b/mods/forceload new file mode 160000 index 00000000..32d2e038 --- /dev/null +++ b/mods/forceload @@ -0,0 +1 @@ +Subproject commit 32d2e0382866033e921b5dd369c9b36a1876464f diff --git a/mods/trmp_minetest_game/modpack.txt b/mods/trmp_minetest_game/modpack.txt new file mode 100644 index 00000000..e69de29b diff --git a/mods/trmp_minetest_game/trm_boats/depends.txt b/mods/trmp_minetest_game/trm_boats/depends.txt new file mode 100644 index 00000000..4f870e88 --- /dev/null +++ b/mods/trmp_minetest_game/trm_boats/depends.txt @@ -0,0 +1,2 @@ +treasurer +boats diff --git a/mods/trmp_minetest_game/trm_boats/init.lua b/mods/trmp_minetest_game/trm_boats/init.lua new file mode 100644 index 00000000..198b3606 --- /dev/null +++ b/mods/trmp_minetest_game/trm_boats/init.lua @@ -0,0 +1 @@ +treasurer.register_treasure("boats:boat",0.001,4,nil,nil,"transport_vehicle") diff --git a/mods/trmp_minetest_game/trm_bucket/depends.txt b/mods/trmp_minetest_game/trm_bucket/depends.txt new file mode 100644 index 00000000..0db7807e --- /dev/null +++ b/mods/trmp_minetest_game/trm_bucket/depends.txt @@ -0,0 +1,2 @@ +treasurer +bucket diff --git a/mods/trmp_minetest_game/trm_bucket/init.lua b/mods/trmp_minetest_game/trm_bucket/init.lua new file mode 100644 index 00000000..b3ea1b88 --- /dev/null +++ b/mods/trmp_minetest_game/trm_bucket/init.lua @@ -0,0 +1 @@ +treasurer.register_treasure("bucket:bucket_empty",0.01,3.5,{1,3},nil,"tool") diff --git a/mods/trmp_minetest_game/trm_default/depends.txt b/mods/trmp_minetest_game/trm_default/depends.txt new file mode 100644 index 00000000..f05833c8 --- /dev/null +++ b/mods/trmp_minetest_game/trm_default/depends.txt @@ -0,0 +1,2 @@ +treasurer +default diff --git a/mods/trmp_minetest_game/trm_default/init.lua b/mods/trmp_minetest_game/trm_default/init.lua new file mode 100644 index 00000000..1dd31355 --- /dev/null +++ b/mods/trmp_minetest_game/trm_default/init.lua @@ -0,0 +1,84 @@ +--[[ + This is a Treasure Registration Mod (TRM) for the default mod. + It is meant to use together with the default mod and the Treasurer mod. + + This TRM registers a bunch of items found in the default mod. +]] + +treasurer.register_treasure("default:gold_ingot",0.01,7,{1,10},nil,"crafting_component") +treasurer.register_treasure("default:bronze_ingot",0.02,5,{1,16},nil,"crafting_component") +treasurer.register_treasure("default:copper_ingot",0.06,3,{1,17},nil,"crafting_component") +treasurer.register_treasure("default:steel_ingot",0.09,4,{1,20},nil,"crafting_component") +treasurer.register_treasure("default:clay_brick",0.1,5,{2,12},nil,"crafting_component") +treasurer.register_treasure("default:coal_lump",0.2,2,{3,10},nil,{ "crafting_component", "fuel" }) +treasurer.register_treasure("default:coalblock",0.02,6,1,nil, "fuel") +treasurer.register_treasure("default:obsidian_shard",0.05,5,{3,20},nil,"crafting_component") +treasurer.register_treasure("default:obsidian_shard",0.0005,5,{21,90},nil,"crafting_component") +treasurer.register_treasure("default:mese_crystal",0.008,9,{1,5},nil,"crafting_component") + + +treasurer.register_treasure("default:paper",0.1,2,{3,6},nil,"crafting_component") +treasurer.register_treasure("default:stick",0.1,2,{1,15},nil,"crafting_component") +treasurer.register_treasure("default:stick",0.05,2,{16,33},nil,"crafting_component") +treasurer.register_treasure("default:book",0.1,4,{1,2},nil,"crafting_component") + +treasurer.register_treasure("default:mese_crystal_fragment",0.01,3,{1,9},nil,"crafting_component") +treasurer.register_treasure("default:sapling",0.05,2,{1,20},nil,"seed") +treasurer.register_treasure("default:junglesapling",0.03,3,{1,5},nil,"seed") +treasurer.register_treasure("default:apple",0.2,0.5,{1,7},nil,"food") + +treasurer.register_treasure("default:shovel_wood",0.02,2,nil,nil,"minetool") +treasurer.register_treasure("default:shovel_stone",0.050,3,nil,nil,"minetool") +treasurer.register_treasure("default:shovel_steel",0.07,5,nil,nil,"minetool") +treasurer.register_treasure("default:shovel_bronze",0.006,6,nil,nil,"minetool") +treasurer.register_treasure("default:shovel_mese",0.0012,8,nil,nil,"minetool") +treasurer.register_treasure("default:shovel_diamond",0.0008,9,nil,nil,"minetool") + +treasurer.register_treasure("default:axe_wood",0.02,2,nil,nil,"minetool") +treasurer.register_treasure("default:axe_stone",0.045,3,nil,nil,"minetool") +treasurer.register_treasure("default:axe_steel",0.05,5,nil,nil,"minetool") +treasurer.register_treasure("default:axe_bronze",0.005,6,nil,nil,"minetool") +treasurer.register_treasure("default:axe_mese",0.0002,8,nil,nil,"minetool") +treasurer.register_treasure("default:axe_diamond",0.000125,9,nil,nil,"minetool") + +treasurer.register_treasure("default:pick_wood",0.005,2,nil,nil,"minetool") +treasurer.register_treasure("default:pick_stone",0.018,3,nil,nil,"minetool") +treasurer.register_treasure("default:pick_steel",0.02,5,nil,nil,"minetool") +treasurer.register_treasure("default:pick_bronze",0.004,6,nil,nil,"minetool") +treasurer.register_treasure("default:pick_mese",0.008,8,nil,nil,"minetool") +treasurer.register_treasure("default:pick_diamond",0.005,9,nil,nil,"minetool") + +treasurer.register_treasure("default:sword_wood",0.001,2,nil,nil,"melee_weapon") +treasurer.register_treasure("default:sword_stone",0.016,3,nil,nil,"melee_weapon") +treasurer.register_treasure("default:sword_steel",0.02,5,nil,nil,"melee_weapon") +treasurer.register_treasure("default:sword_bronze",0.015,6,nil,nil,"melee_weapon") +treasurer.register_treasure("default:sword_mese",0.007,8,nil,nil,"melee_weapon") +treasurer.register_treasure("default:sword_diamond",0.0035,9,nil,nil,"melee_weapon") + +treasurer.register_treasure("default:rail",0.01,5,15,nil,"vehicle_structure") +treasurer.register_treasure("default:rail",0.02,5,{1,5},nil,"vehicle_structure") +treasurer.register_treasure("default:fence_wood",0.1,4,{1,7},nil,"building_block") + +treasurer.register_treasure("default:sign_wall",0.1,4,nil,nil,"deco") +treasurer.register_treasure("default:ladder",0.1,3,{1,2},nil,"ladder") +treasurer.register_treasure("default:torch",0.2,2,{1,5},nil,"light") + +treasurer.register_treasure("default:stonebrick",0.002,4,{1,5},nil,"building_block") +treasurer.register_treasure("default:desert_stonebrick",0.009,4,{1,10},nil,"building_block") +treasurer.register_treasure("default:sandstone",0.009,3,{1,3},nil,"building_block") +treasurer.register_treasure("default:sandstonebrick",0.0001,4,{1,10},nil,"building_block") +treasurer.register_treasure("default:junglewood",0.005,2,{1,20},nil,"building_block") +treasurer.register_treasure("default:wood",0.01,2,{1,20},nil,"building_block") +treasurer.register_treasure("default:cobble",0.05,1,{1,25},nil,"building_block") +treasurer.register_treasure("default:mossycobble",0.005,1,{1,5},nil,"building_block") + +treasurer.register_treasure("default:cactus",0.002,1.5,{3,4},nil,"fuel") + +treasurer.register_treasure("default:bookshelf",0.02,3.5,1,nil,"deco") +treasurer.register_treasure("default:glass",0.05,2,1,nil,"building_block") +treasurer.register_treasure("default:steelblock",0.002,4,1,nil,"building_block") +treasurer.register_treasure("default:copperblock",0.0015,3,1,nil,"building_block") +treasurer.register_treasure("default:bronzeblock",0.0005,5,1,nil,"building_block") +treasurer.register_treasure("default:goldblock",0.001,7,1,nil,"building_block") +treasurer.register_treasure("default:mese",0.0001,8,1,nil,"building_block") +treasurer.register_treasure("default:diamondblock",0.00002,10,1,nil,"building_block") diff --git a/mods/trmp_minetest_game/trm_doors/depends.txt b/mods/trmp_minetest_game/trm_doors/depends.txt new file mode 100644 index 00000000..7e2b8d67 --- /dev/null +++ b/mods/trmp_minetest_game/trm_doors/depends.txt @@ -0,0 +1,2 @@ +treasurer +doors diff --git a/mods/trmp_minetest_game/trm_doors/init.lua b/mods/trmp_minetest_game/trm_doors/init.lua new file mode 100644 index 00000000..5ef515bf --- /dev/null +++ b/mods/trmp_minetest_game/trm_doors/init.lua @@ -0,0 +1,5 @@ +treasurer.register_treasure("doors:door_wood",0.01,2,{1,2},nil,"building_block") +treasurer.register_treasure("doors:door_glass",0.009,2.5,{1,2},nil,"building_block") +treasurer.register_treasure("doors:door_obsidian_glass",0.008,2.75,1,nil,"building_block") +treasurer.register_treasure("doors:door_steel",0.007,3,nil,nil,"building_block") +treasurer.register_treasure("doors:trapdoor",0.01,2,{1,4},nil,"building_block") diff --git a/mods/trmp_minetest_game/trm_dye/depends.txt b/mods/trmp_minetest_game/trm_dye/depends.txt new file mode 100644 index 00000000..8c818b2b --- /dev/null +++ b/mods/trmp_minetest_game/trm_dye/depends.txt @@ -0,0 +1,2 @@ +dye +treasurer diff --git a/mods/trmp_minetest_game/trm_dye/init.lua b/mods/trmp_minetest_game/trm_dye/init.lua new file mode 100644 index 00000000..9ad4b479 --- /dev/null +++ b/mods/trmp_minetest_game/trm_dye/init.lua @@ -0,0 +1,4 @@ +local colors = {"white", "lightgrey", "grey", "darkgrey", "black", "red", "orange", "yellow", "lime", "green", "aqua", "cyan", "sky_blue", "blue", "violet", "magenta", "red_violet"} +for i=1,#colors do + treasurer.register_treasure("dye:"..colors[i], 0.0117, 1, {1,6}, nil, "crafting_component" ) +end diff --git a/mods/trmp_minetest_game/trm_farming/depends.txt b/mods/trmp_minetest_game/trm_farming/depends.txt new file mode 100644 index 00000000..f463775d --- /dev/null +++ b/mods/trmp_minetest_game/trm_farming/depends.txt @@ -0,0 +1,2 @@ +farming +treasurer diff --git a/mods/trmp_minetest_game/trm_farming/init.lua b/mods/trmp_minetest_game/trm_farming/init.lua new file mode 100644 index 00000000..14977578 --- /dev/null +++ b/mods/trmp_minetest_game/trm_farming/init.lua @@ -0,0 +1,13 @@ +treasurer.register_treasure("farming:hoe_wood",0.01,2,nil,nil,"tool") +treasurer.register_treasure("farming:hoe_stone",0.030,2.2,nil,nil,"tool") +treasurer.register_treasure("farming:hoe_steel",0.05,2.4,nil,nil,"tool") +treasurer.register_treasure("farming:hoe_bronze",0.004,2.6,nil,nil,"tool") + +treasurer.register_treasure("farming:seed_cotton",0.006,2,{1,4},nil,"seed") +treasurer.register_treasure("farming:seed_wheat",0.01,3,{1,3},nil,"seed") + +treasurer.register_treasure("farming:wheat",0.02,0.8,{1,3},nil,"raw_food") +treasurer.register_treasure("farming:flour",0.01,1.8,{1,3},nil,"raw_food") +treasurer.register_treasure("farming:bread",0.006,2,{1,2},nil,"raw_food") + +treasurer.register_treasure("farming:string",0.06,1,{1,4},nil,"crafting_component") diff --git a/mods/trmp_minetest_game/trm_screwdriver/depends.txt b/mods/trmp_minetest_game/trm_screwdriver/depends.txt new file mode 100644 index 00000000..f2474a7d --- /dev/null +++ b/mods/trmp_minetest_game/trm_screwdriver/depends.txt @@ -0,0 +1,2 @@ +screwdriver +treasurer diff --git a/mods/trmp_minetest_game/trm_screwdriver/init.lua b/mods/trmp_minetest_game/trm_screwdriver/init.lua new file mode 100644 index 00000000..a569775b --- /dev/null +++ b/mods/trmp_minetest_game/trm_screwdriver/init.lua @@ -0,0 +1 @@ +treasurer.register_treasure("screwdriver:screwdriver",0.02,3,{1,2},nil,"tool") diff --git a/mods/trmp_minetest_game/trm_tnt/depends.txt b/mods/trmp_minetest_game/trm_tnt/depends.txt new file mode 100644 index 00000000..c8cae57a --- /dev/null +++ b/mods/trmp_minetest_game/trm_tnt/depends.txt @@ -0,0 +1,2 @@ +treasurer +tnt diff --git a/mods/trmp_minetest_game/trm_tnt/init.lua b/mods/trmp_minetest_game/trm_tnt/init.lua new file mode 100644 index 00000000..2dd54df3 --- /dev/null +++ b/mods/trmp_minetest_game/trm_tnt/init.lua @@ -0,0 +1,4 @@ +-- registers TNT and gunpowder + +treasurer.register_treasure("tnt:tnt",0.05,5,nil,nil,"minetool") +treasurer.register_treasure("tnt:gunpowder",0.123,3,{1,10},nil,"crafting_component") diff --git a/mods/trmp_minetest_game/trm_vessels/depends.txt b/mods/trmp_minetest_game/trm_vessels/depends.txt new file mode 100644 index 00000000..1bf987fa --- /dev/null +++ b/mods/trmp_minetest_game/trm_vessels/depends.txt @@ -0,0 +1,2 @@ +vessels +treasurer diff --git a/mods/trmp_minetest_game/trm_vessels/init.lua b/mods/trmp_minetest_game/trm_vessels/init.lua new file mode 100644 index 00000000..ac0511d3 --- /dev/null +++ b/mods/trmp_minetest_game/trm_vessels/init.lua @@ -0,0 +1,5 @@ +treasurer.register_treasure("vessels:glass_bottle",0.005,1,{1,3},nil,"deco") +treasurer.register_treasure("vessels:drinking_glass",0.005,1,{1,12},nil,"deco") +treasurer.register_treasure("vessels:steel_bottle",0.0045,2,1,nil,"deco") + +treasurer.register_treasure("vessels:glass_fragments",0.01,1,{1,8},nil,"crafting_component") diff --git a/mods/trmp_minetest_game/trm_xpanes/depends.txt b/mods/trmp_minetest_game/trm_xpanes/depends.txt new file mode 100644 index 00000000..cecf8136 --- /dev/null +++ b/mods/trmp_minetest_game/trm_xpanes/depends.txt @@ -0,0 +1,2 @@ +treasurer +xpanes diff --git a/mods/trmp_minetest_game/trm_xpanes/init.lua b/mods/trmp_minetest_game/trm_xpanes/init.lua new file mode 100644 index 00000000..f0e1d380 --- /dev/null +++ b/mods/trmp_minetest_game/trm_xpanes/init.lua @@ -0,0 +1,2 @@ +treasurer.register_treasure("xpanes:bar",0.05,4,{1,8},nil,"building_block") +treasurer.register_treasure("xpanes:pane",0.08,4,{1,16},nil,"building_block")