From d840042e0c649cef2498fbf69ebbf5f8a2c5ac85 Mon Sep 17 00:00:00 2001 From: AiTechEye <40591179+AiTechEye@users.noreply.github.com> Date: Thu, 6 Jun 2019 17:51:15 +0200 Subject: [PATCH] suggestions by doyousketch2 --- init.lua | 4 ++-- nodes_items.lua | 23 ++++++++++++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 38dcad1..1076910 100644 --- a/init.lua +++ b/init.lua @@ -196,9 +196,9 @@ minetest.register_globalstep(function(dtime) local tpitch=math.abs(pitch) local npointable=not mt2d.pointable(pos2,user) if tyaw>0.5 or (npointable and tyaw>0.2) then - user:set_look_yaw(3.14+((yaw-4.71)*0.9)) + user:set_look_yaw(3.14+((yaw-4.71)*0.99)) elseif tpitch>0.5 or (npointable and tpitch>0.2) then - user:set_look_pitch((pitch*0.9)*-1) + user:set_look_pitch((pitch*0.99)*-1) end end end diff --git a/nodes_items.lua b/nodes_items.lua index b237fe0..699f73c 100644 --- a/nodes_items.lua +++ b/nodes_items.lua @@ -326,4 +326,25 @@ minetest.register_node("mt2d:stoprail", { inventory_image="carts_rail_straight.png^[colorize:#ff0000aa", groups={dig_immediate=2,rail=1,connect_to_raillike=minetest.raillike_group("rail")}, tiles={"carts_rail_crossing_pwr.png^[colorize:#ff0000aa"}, -}) \ No newline at end of file +}) + +mt2d.register_ore=function(def) + minetest.register_ore({ + ore_type="scatter", + ore=def.ore, + wherein="default:stone", + clust_scarcity=def.scarcity and (def.scarcity*def.scarcity*def.scarcity) or (8*8*8), + clust_num_ores=15, + clust_size=def.size or 3, + y_max=def.y_max or 0, + y_min=-31000 + }) +end +mt2d.register_ore({ore="default:stone_with_coal",scarcity=6,y_max=16}) +mt2d.register_ore({ore="default:stone_with_iron",scarcity=7}) +mt2d.register_ore({ore="default:stone_with_copper",scarcity=8,y_max=-16}) +mt2d.register_ore({ore="default:stone_with_tin",scarcity=8,y_max=-32}) +mt2d.register_ore({ore="default:stone_with_gold",scarcity=8,y_max=-100}) +mt2d.register_ore({ore="default:stone_with_mese",scarcity=9,y_max=-700}) +mt2d.register_ore({ore="default:stone_with_diamond",scarcity=10,y_max=-700}) +mt2d.register_ore({ore="default:mese",scarcity=15,y_max=-1000})