]> git.lizzy.rs Git - Crafter.git/commitdiff
Add ores
authoroilboi <47129783+oilboi@users.noreply.github.com>
Thu, 13 Feb 2020 00:17:46 +0000 (19:17 -0500)
committeroilboi <47129783+oilboi@users.noreply.github.com>
Thu, 13 Feb 2020 00:17:46 +0000 (19:17 -0500)
mods/main/init.lua
mods/main/nodes.lua
mods/main/ore.lua [new file with mode: 0644]
mods/main/settings.lua
mods/main/textures/coalore.png [new file with mode: 0644]
mods/main/textures/diamondore.png [new file with mode: 0644]
mods/main/textures/goldore.png [new file with mode: 0644]
mods/main/textures/ironore.png [new file with mode: 0644]
todo.txt

index 1b183c390145c81d54f3a9d6ccd39f8f2680734a..888b8b1de29a3c523f07c796866ceb449a342736 100644 (file)
@@ -6,6 +6,7 @@ local path = minetest.get_modpath("main")
 
 dofile(path.."/sounds.lua")
 dofile(path.."/nodes.lua")
+dofile(path.."/ore.lua")
 dofile(path.."/items.lua")
 dofile(path.."/schematics.lua")
 dofile(path.."/mapgen.lua")
index f47fbdb9c5d9ddb50fb99da97a3fcce7b20de172..9caf83b850f59d7147a4366f785c1eff9efa49b1 100644 (file)
@@ -8,6 +8,16 @@ minetest.register_node("main:stone", {
     drop="main:cobble",
 })
 
+local ores = {"coal","iron","gold","diamond"}
+for id,ore in pairs(ores) do
+       minetest.register_node("main:"..ore.."ore", {
+               description = ore:gsub("^%l", string.upper).." Ore",
+               tiles = {"stone.png^"..ore.."ore.png"},
+               groups = {stone = id, hard = id, pickaxe = 1, hand = 4},
+               sounds = main.stoneSound(),
+       })
+end
+
 minetest.register_node("main:cobble", {
     description = "Cobblestone",
     tiles = {"cobble.png"},
diff --git a/mods/main/ore.lua b/mods/main/ore.lua
new file mode 100644 (file)
index 0000000..044c60c
--- /dev/null
@@ -0,0 +1,21 @@
+--[[
+depth = initial level found
+]]--
+
+       
+local gold_depth = 64
+local incriment = 50
+local loops = 31000/incriment
+
+for i = 1,loops do
+       minetest.register_ore({
+               ore_type       = "scatter",
+               ore            = "main:coalore",
+               wherein        = "main:stone",
+               clust_scarcity = 13 * 13 * 13,
+               clust_num_ores = 5,
+               clust_size     = 3,
+               y_max          = 31000,
+               y_min          = -31000,
+       })
+end
index 155a7bafc37f19e5c1d4f712789fdd7dbd481532..411d417f78b53c3e6118a421d6e776207e98a563 100644 (file)
@@ -22,6 +22,8 @@ minetest.register_on_mods_loaded(function()
        end
 end)
 
+print("Max stack set to 1000")
+
 --minetest.register_globalstep(function(dtime)
 --     print(settings:get("dedicated_server_step"))
 --end)
diff --git a/mods/main/textures/coalore.png b/mods/main/textures/coalore.png
new file mode 100644 (file)
index 0000000..2695ae0
Binary files /dev/null and b/mods/main/textures/coalore.png differ
diff --git a/mods/main/textures/diamondore.png b/mods/main/textures/diamondore.png
new file mode 100644 (file)
index 0000000..9f0ea24
Binary files /dev/null and b/mods/main/textures/diamondore.png differ
diff --git a/mods/main/textures/goldore.png b/mods/main/textures/goldore.png
new file mode 100644 (file)
index 0000000..d6e004c
Binary files /dev/null and b/mods/main/textures/goldore.png differ
diff --git a/mods/main/textures/ironore.png b/mods/main/textures/ironore.png
new file mode 100644 (file)
index 0000000..f83b830
Binary files /dev/null and b/mods/main/textures/ironore.png differ
index dd296d5939566d4af2c76b9db69cda99c253f4c3..5075ddc4a0d88743b2be9efc1796cabf7dca19cc 100644 (file)
--- a/todo.txt
+++ b/todo.txt
@@ -6,10 +6,10 @@
 --make trees drop stuff with shears
 --add treecapitator
 --itemstack max 1000
+ores
 crafting recipes
 make trees drop items on treecapitator
 crafting bench
-ores
 make a mob?
 fishing
 bows