From 0ca19dacb03a0d33de34a2dabf921ba7c9cb5b25 Mon Sep 17 00:00:00 2001 From: RealBadAngel Date: Thu, 4 Apr 2013 01:17:39 +0200 Subject: [PATCH] Update 0.4.6-0 --- concrete/init.lua | 508 ++++++++++++++++++ .../textures/technic_concrete_block.png | Bin .../textures/technic_rebar.png | Bin .../textures/x32/technic_concrete_block.png | Bin 0 -> 2319 bytes concrete/textures/x32/technic_rebar.png | Bin 0 -> 813 bytes extranodes/depends.txt | 4 + extranodes/init.lua | 42 ++ technic/concrete.lua | 94 ---- technic/depends.txt | 3 +- technic/init.lua | 6 +- technic_worldgen/init.lua | 1 - technic_worldgen/oregen.lua | 21 +- technic_worldgen/stairslike.lua | 122 ----- 13 files changed, 564 insertions(+), 237 deletions(-) create mode 100644 concrete/init.lua rename {technic_worldgen => concrete}/textures/technic_concrete_block.png (100%) rename {technic_worldgen => concrete}/textures/technic_rebar.png (100%) create mode 100644 concrete/textures/x32/technic_concrete_block.png create mode 100644 concrete/textures/x32/technic_rebar.png create mode 100644 extranodes/depends.txt create mode 100644 extranodes/init.lua delete mode 100644 technic/concrete.lua diff --git a/concrete/init.lua b/concrete/init.lua new file mode 100644 index 0000000..12deb74 --- /dev/null +++ b/concrete/init.lua @@ -0,0 +1,508 @@ +--Minetest 0.4.6 mod: concrete +--(c) 2013 by RealBadAngel + +minetest.register_craft({ + output = ':technic:rebar 6', + recipe = { + {'','', 'default:steel_ingot'}, + {'','default:steel_ingot',''}, + {'default:steel_ingot', '', ''}, + } +}) + +minetest.register_craft({ + output = ':technic:concrete 5', + recipe = { + {'default:stone','technic:rebar','default:stone'}, + {'technic:rebar','default:stone','technic:rebar'}, + {'default:stone','technic:rebar','default:stone'}, + } +}) + +minetest.register_craft({ + output = ':technic:concrete_post_platform 6', + recipe = { + {'technic:concrete','technic:concrete_post','technic:concrete'}, + } +}) + +minetest.register_craft({ + output = ':technic:concrete_post 12', + recipe = { + {'default:stone','technic:rebar','default:stone'}, + {'default:stone','technic:rebar','default:stone'}, + {'default:stone','technic:rebar','default:stone'}, +} +}) + +platform_box = {-0.5 , 0.3 , -0.5 , 0.5 , 0.5 , 0.5 } +post_str_y={ -0.15 , -0.5 , -0.15 , 0.15 , 0.5 , 0.15 } +post_str_x1={ 0 , -0.3 , -0.1, 0.5 , 0.3 , 0.1 } -- x+ +post_str_z1={ -0.1 , -0.3 , 0, 0.1 , 0.3 , 0.5 } -- z+ +post_str_x2={ 0 , -0.3 , -0.1, -0.5 , 0.3 , 0.1 } -- x- +post_str_z2={ -0.1 , -0.3 , 0, 0.1 , 0.3 , -0.5 } -- z- + +minetest.register_craftitem(":technic:rebar", { + description = "Rebar", + inventory_image = "technic_rebar.png", + stack_max = 99, +}) + +minetest.register_craftitem(":technic:concrete", { + description = "Concrete Block", + inventory_image = "technic_concrete_block.png", + stack_max = 99, +}) + +minetest.register_craftitem(":technic:concrete_post", { + description = "Concrete Post", + stack_max = 99, +}) + +minetest.register_craftitem(":technic:concrete_post_platform", { + description = "Concrete Post Platform", + stack_max = 99, +}) + +minetest.register_node(":technic:concrete", { + description = "Concrete Block", + tile_images = {"technic_concrete_block.png",}, + is_ground_content = true, + groups={cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), + paramtype = "light", + light_source = 0, + sunlight_propagates = true, + on_construct = function(pos) + meta=minetest.env:get_meta(pos) + meta:set_float("postlike",1) + check_post_connections (pos,1) + end, + after_dig_node = function (pos, oldnode, oldmetadata, digger) + check_post_connections (pos,0) + end, +}) + +minetest.register_node(":technic:concrete_post_platform", { + description = "Concrete Post Platform", + tile_images = {"technic_concrete_block.png",}, + is_ground_content = true, + groups={cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), + paramtype = "light", + light_source = 0, + sunlight_propagates = true, + drawtype = "nodebox", + selection_box = { + type = "fixed", + fixed = {platform_box} + }, + node_box = { + type = "fixed", + fixed = {platform_box} + }, + on_place=function (itemstack, placer, pointed_thing) + local node=minetest.env:get_node(pointed_thing.under) + if minetest.get_item_group(node.name, "concrete_post")==0 then + return minetest.item_place_node(itemstack, placer, pointed_thing) + end + local meta=minetest.env:get_meta(pointed_thing.under) + y1=meta:get_float("y1") + platform=meta:get_float("platform") + if y1==1 or platform==1 then + return minetest.item_place_node(itemstack, placer, pointed_thing) + end + y2=meta:get_float("y2") + x1=meta:get_float("x1") + x2=meta:get_float("x2") + z1=meta:get_float("z1") + z2=meta:get_float("z2") + rule=make_post_rule_number(x1,x2,y1,y2,z1,z2,1) + meta:set_float("platform",1) + hacky_swap_posts(pointed_thing.under,"technic:concrete_post"..rule) + itemstack:take_item() + placer:set_wielded_item(itemstack) + return itemstack + end, +}) + + +minetest.register_node(":technic:concrete_post", { + description = "Concrete Post", + tiles = {"technic_concrete_block.png"}, + groups={cracky=1,level=2,concrete_post=1}, + sounds = default.node_sound_stone_defaults(), + paramtype = "light", + light_source = 0, + sunlight_propagates = true, + drawtype = "nodebox", + selection_box = { + type = "fixed", + fixed = { -0.15 , -0.5 , -0.15 , 0.15 , 0.5 , 0.15 }}, + node_box = { + type = "fixed", + fixed = {-0.15 , -0.5 , -0.15 , 0.15 , 0.5 , 0.15 }}, + on_construct = function(pos) + meta=minetest.env:get_meta(pos) + meta:set_int("postlike",1) + meta:set_int("platform",0) + meta:set_int("x1",0) + meta:set_int("x2",0) + meta:set_int("y1",0) + meta:set_int("y2",0) + meta:set_int("z1",0) + meta:set_int("z2",0) + check_post_connections (pos,1) + end, + + after_dig_node = function (pos, oldnode, oldmetadata, digger) + check_post_connections (pos,0) + end, + +}) + +local x1,x2,y1,z1,z2 +local count=0 + +for x1 = 0, 1, 1 do --x- +for x2 = 0, 1, 1 do --x+ +for z1 = 0, 1, 1 do --z- +for z2 = 0, 1, 1 do --z+ + +temp_x1={} temp_x2={} temp_z1={} temp_z2={} + +if x1==1 then temp_x1=post_str_x1 end +if x2==1 then temp_x2=post_str_x2 end +if z1==1 then temp_z1=post_str_z1 end +if z2==1 then temp_z2=post_str_z2 end + + +minetest.register_node(":technic:concrete_post"..count, { + description = "Concrete Post", + tiles = {"technic_concrete_block.png"}, + groups={cracky=1,level=2,not_in_creative_inventory=1,concrete_post=1}, + sounds = default.node_sound_stone_defaults(), + drop = "technic:concrete_post", + paramtype = "light", + light_source = 0, + sunlight_propagates = true, + drawtype = "nodebox", + selection_box = { + type = "fixed", + fixed = { + temp_x1,temp_x2,post_str_y,temp_z1,temp_z2, + }}, + + node_box = { + type = "fixed", + fixed = { + temp_x1,temp_x2,post_str_y,temp_z1,temp_z2, + }}, + + after_dig_node = function (pos, oldnode, oldmetadata, digger) + check_post_connections (pos,0) + end, + +}) + +minetest.register_node(":technic:concrete_post"..count+16, { + description = "Concrete Post", + tiles = {"technic_concrete_block.png"}, + groups={cracky=1,level=2,not_in_creative_inventory=1,concrete_post=1}, + sounds = default.node_sound_stone_defaults(), + drop = "technic:concrete_post_platform", + paramtype = "light", + light_source = 0, + sunlight_propagates = true, + drawtype = "nodebox", + selection_box = { + type = "fixed", + fixed = { + platform_box,temp_x1,temp_x2,post_str_y,temp_z1,temp_z2, + }}, + + node_box = { + type = "fixed", + fixed = { + platform_box,temp_x1,temp_x2,post_str_y,temp_z1,temp_z2, + }}, + + after_dig_node = function (pos, oldnode, oldmetadata, digger) + dig_post_with_platform (pos,oldnode,oldmetadata) + end, +}) + +count=count+1 end end end end + +minetest.register_node(":technic:concrete_post32", { + description = "Concrete Post", + tiles = {"technic_concrete_block.png"}, + groups={cracky=1,level=2,not_in_creative_inventory=1,concrete_post=1}, + sounds = default.node_sound_stone_defaults(), + drop = "technic:concrete_post", + paramtype = "light", + light_source = 0, + sunlight_propagates = true, + drawtype = "nodebox", + selection_box = { + type = "fixed", + fixed = {-0.5,-0.3,-0.1,0.5,0.3,0.1}, + }, + node_box = { + type = "fixed", + fixed = { + post_str_x1,post_str_x2, + }}, + + after_dig_node = function (pos, oldnode, oldmetadata, digger) + check_post_connections (pos,0) + end, +}) +minetest.register_node(":technic:concrete_post33", { + description = "Concrete Post", + tiles = {"technic_concrete_block.png"}, + groups={cracky=1,level=2,not_in_creative_inventory=1,concrete_post=1}, + sounds = default.node_sound_stone_defaults(), + drop = "technic:concrete_post", + paramtype = "light", + light_source = 0, + sunlight_propagates = true, + drawtype = "nodebox", + selection_box = { + type = "fixed", + fixed = { + post_str_z1,post_str_z2, + }}, + node_box = { + type = "fixed", + fixed = { + post_str_z1,post_str_z2, + }}, + + after_dig_node = function (pos, oldnode, oldmetadata, digger) + check_post_connections (pos,0) + end, +}) + +minetest.register_node(":technic:concrete_post34", { + description = "Concrete Post", + tiles = {"technic_concrete_block.png"}, + groups={cracky=1,level=2,not_in_creative_inventory=1,concrete_post=1}, + sounds = default.node_sound_stone_defaults(), + drop = "technic:concrete_post_platform", + paramtype = "light", + light_source = 0, + sunlight_propagates = true, + drawtype = "nodebox", + selection_box = { + type = "fixed", + fixed = { + platform_box,post_str_x1,post_str_x2, + }}, + node_box = { + type = "fixed", + fixed = { + platform_box,post_str_x1,post_str_x2, + }}, + + after_dig_node = function (pos, oldnode, oldmetadata, digger) + dig_post_with_platform (pos,oldnode,oldmetadata) + end, +}) +minetest.register_node(":technic:concrete_post35", { + description = "Concrete Post", + tiles = {"technic_concrete_block.png"}, + groups={cracky=1,level=2,not_in_creative_inventory=1,concrete_post=1}, + sounds = default.node_sound_stone_defaults(), + drop = "technic:concrete_post_platform", + paramtype = "light", + light_source = 0, + sunlight_propagates = true, + drawtype = "nodebox", + selection_box = { + type = "fixed", + fixed = { + platform_box,post_str_z1,post_str_z2, + }}, + node_box = { + type = "fixed", + fixed = { + platform_box,post_str_z1,post_str_z2, + }}, + after_dig_node = function (pos, oldnode, oldmetadata, digger) + dig_post_with_platform (pos,oldnode,oldmetadata) + end, +}) + +dig_post_with_platform = function (pos,oldnode,oldmetadata) + x1=tonumber(oldmetadata.fields["x1"]) + x2=tonumber(oldmetadata.fields["x2"]) + y1=tonumber(oldmetadata.fields["y1"]) + y2=tonumber(oldmetadata.fields["y2"]) + z1=tonumber(oldmetadata.fields["z1"]) + z2=tonumber(oldmetadata.fields["z2"]) + print(dump(x1)) + oldmetadata.fields["platform"]="0" + local rule=make_post_rule_number(x1,x2,y1,y2,z1,z2,0) + print(dump(rule)) + oldnode.name="technic:concrete_post"..rule + minetest.env:set_node(pos,oldnode) + meta = minetest.env:get_meta(pos) + meta:from_table(oldmetadata) +end + +check_post_connections = function(pos,mode) + local pos1={} + pos1.x=pos.x + pos1.y=pos.y + pos1.z=pos.z + tempx1=0 + tempx2=0 + tempy1=0 + tempy2=0 + tempz1=0 + tempz2=0 + + pos1.x=pos1.x+1 + if minetest.env:get_meta(pos1):get_int("postlike")==1 then + x2=mode + x1=minetest.env:get_meta(pos1):get_int("x1") + y1=minetest.env:get_meta(pos1):get_int("y1") + y2=minetest.env:get_meta(pos1):get_int("y2") + z1=minetest.env:get_meta(pos1):get_int("z1") + z2=minetest.env:get_meta(pos1):get_int("z2") + platform=minetest.env:get_meta(pos1):get_int("platform") + rule=make_post_rule_number(x1,x2,y1,y2,z1,z2,platform) + hacky_swap_posts(pos1,"technic:concrete_post"..rule) + meta=minetest.env:get_meta(pos1) + meta:set_int("x2",x2) + tempx1=mode + end + + pos1.x=pos1.x-2 + if minetest.env:get_meta(pos1):get_int("postlike")==1 then + x1=mode + x2=minetest.env:get_meta(pos1):get_int("x2") + y1=minetest.env:get_meta(pos1):get_int("y1") + y2=minetest.env:get_meta(pos1):get_int("y2") + z1=minetest.env:get_meta(pos1):get_int("z1") + z2=minetest.env:get_meta(pos1):get_int("z2") + platform=minetest.env:get_meta(pos1):get_int("platform") + rule=make_post_rule_number(x1,x2,y1,y2,z1,z2,platform) + hacky_swap_posts(pos1,"technic:concrete_post"..rule) + meta=minetest.env:get_meta(pos1) + meta:set_int("x1",x1) + tempx2=mode + end + + pos1.x=pos1.x+1 + + pos1.y=pos1.y+1 + if minetest.env:get_meta(pos1):get_int("postlike")==1 then + y2=mode + x1=minetest.env:get_meta(pos1):get_int("x1") + x2=minetest.env:get_meta(pos1):get_int("x2") + y1=minetest.env:get_meta(pos1):get_int("y1") + z1=minetest.env:get_meta(pos1):get_int("z1") + z2=minetest.env:get_meta(pos1):get_int("z2") + platform=minetest.env:get_meta(pos1):get_int("platform") + rule=make_post_rule_number(x1,x2,y1,y2,z1,z2,platform) + hacky_swap_posts(pos1,"technic:concrete_post"..rule) + meta=minetest.env:get_meta(pos1) + meta:set_int("y2",y2) + tempy1=mode + end + + pos1.y=pos1.y-2 + if minetest.env:get_meta(pos1):get_int("postlike")==1 then + y1=mode + x1=minetest.env:get_meta(pos1):get_int("x1") + x2=minetest.env:get_meta(pos1):get_int("x2") + y2=minetest.env:get_meta(pos1):get_int("y2") + z1=minetest.env:get_meta(pos1):get_int("z1") + z2=minetest.env:get_meta(pos1):get_int("z2") + platform=minetest.env:get_meta(pos1):get_int("platform") + rule=make_post_rule_number(x1,x2,y1,y2,z1,z2,platform) + hacky_swap_posts(pos1,"technic:concrete_post"..rule) + meta=minetest.env:get_meta(pos1) + meta:set_int("y1",y1) + tempy2=mode + end + pos1.y=pos1.y+1 + + pos1.z=pos1.z+1 + if minetest.env:get_meta(pos1):get_int("postlike")==1 then + z2=mode + x1=minetest.env:get_meta(pos1):get_int("x1") + x2=minetest.env:get_meta(pos1):get_int("x2") + y1=minetest.env:get_meta(pos1):get_int("y1") + y2=minetest.env:get_meta(pos1):get_int("y2") + z1=minetest.env:get_meta(pos1):get_int("z1") + platform=minetest.env:get_meta(pos1):get_int("platform") + rule=make_post_rule_number(x1,x2,y1,y2,z1,z2,platform) + hacky_swap_posts(pos1,"technic:concrete_post"..rule) + meta=minetest.env:get_meta(pos1) + meta:set_int("z2",z2) + tempz1=mode + end + pos1.z=pos1.z-2 + + if minetest.env:get_meta(pos1):get_int("postlike")==1 then + z1=mode + x1=minetest.env:get_meta(pos1):get_int("x1") + x2=minetest.env:get_meta(pos1):get_int("x2") + y1=minetest.env:get_meta(pos1):get_int("y1") + y2=minetest.env:get_meta(pos1):get_int("y2") + z2=minetest.env:get_meta(pos1):get_int("z2") + platform=minetest.env:get_meta(pos1):get_int("platform") + rule=make_post_rule_number(x1,x2,y1,y2,z1,z2,platform) + hacky_swap_posts(pos1,"technic:concrete_post"..rule) + meta=minetest.env:get_meta(pos1) + meta:set_int("z1",z1) + tempz2=mode + end + pos1.z=pos1.z+1 + if mode==1 then + meta=minetest.env:get_meta(pos) + meta:set_int("x1",tempx1) + meta:set_int("x2",tempx2) + meta:set_int("y1",tempy1) + meta:set_int("y2",tempy2) + meta:set_int("z1",tempz1) + meta:set_int("z2",tempz2) + rule=make_post_rule_number(tempx1,tempx2,tempy1,tempy2,tempz1,tempz2,0) + hacky_swap_posts(pos,"technic:concrete_post"..rule) + end +end + +function make_post_rule_number (x1,x2,y1,y2,z1,z2,platform) +local tempy=y1+y2 +local tempx=x1+x2 +local tempz=z1+z2 +if platform==0 then + if tempy==0 and tempx==0 and tempz==0 then return 0 end + if x1==1 and x2==1 and tempz==0 and tempy==0 then return 32 end + if z1==1 and z2==1 and tempx==0 and tempy==0 then return 33 end + return z2+z1*2+x2*4+x1*8 +else + if tempy==0 and tempx==0 and tempz==0 then return 16 end + if x1==1 and x2==1 and tempz==0 and tempy==0 then return 34 end + if z1==1 and z2==1 and tempx==0 and tempy==0 then return 35 end + return z2+z1*2+x2*4+x1*8+16 +end +end + +function hacky_swap_posts(pos,name) + local node = minetest.env:get_node(pos) + if node.name == "technic:concrete" then + return nil + end + local meta = minetest.env:get_meta(pos) + local meta0 = meta:to_table() + node.name = name + local meta0 = meta:to_table() + minetest.env:set_node(pos,node) + meta = minetest.env:get_meta(pos) + meta:from_table(meta0) + return 1 +end diff --git a/technic_worldgen/textures/technic_concrete_block.png b/concrete/textures/technic_concrete_block.png similarity index 100% rename from technic_worldgen/textures/technic_concrete_block.png rename to concrete/textures/technic_concrete_block.png diff --git a/technic_worldgen/textures/technic_rebar.png b/concrete/textures/technic_rebar.png similarity index 100% rename from technic_worldgen/textures/technic_rebar.png rename to concrete/textures/technic_rebar.png diff --git a/concrete/textures/x32/technic_concrete_block.png b/concrete/textures/x32/technic_concrete_block.png new file mode 100644 index 0000000000000000000000000000000000000000..91364f33f5d51e6b83765b15bb57ac1fab0698a6 GIT binary patch literal 2319 zcmV+q3GnubP)#R7{j`*<9PuCBMxgFDP1`4F-AC!lQBBC+eXO+?>){ttOy?;cb3KDose=z z6`U3N7`U7ZKYo1Y^YcNi6=Pso7J_%Q-m%u=oW(lJ+qWC7K`9w)1q?i&2O@$hc;~2f z5JF&CB04&$6s)tT8fsHi2daV*A$pILS{S_%mw*+65n+h|?>z=kRj%ve{nsbP7-~th zT4}8z#>`?wFh)49%yAq5JRVQ1b2uvuRmK?f-Z`&KZH<&OtyN^(Hs0?~z_4u_PQZId z${FVzITvahhzR%llhy}{;pfl)!5HD&+Z!SVYvwn`!2A0L&*R|Z{R3lQ4URDsV}xZ{ zsHL#23){9L+ACtfTA|i5k4`&c3|Gn+W9WU5OXE0Z_acVZw>MgEwANAWC?KMM!H0lz z4kMQ9O57h$6iB&XP(rYX70&a*ZTk%nLhyhmM$c#+=PJ%;PyqcZq|=7w^VcWezr9jg z=XTp^CDU4`sG-z?>job@IcItwgy7N9F#xJK=XiYH+4dcGo)@hT`jr@CP>N%X9vB4g z`Mf`9trKHpT~}&rh_wt=taUsePY}x(1MeN)J5-ezJjZdeZX2~0dLKAvDYX%TL#*JP z;0$2IphFp|)Y>@D3ss0qM8vZ15gmi;Itd~2eHLfdh90_;j!Wun~>tcy3y$@8O56Gn=)_^MBIlTAuUeP|d-yeur zj_cxiCJgYmzy1b544zVi);lRB)WE*27_mGacXSM*cU&pqoCw>tq8O|dK0co~XE9>% z&SEV%=jeUVTF3i9ADw^w`|qS&X{}JJqQK*EV2qNTCj>uP(gv!XkIy@;502wxTNluQ zSV7ixVObVpjHD~E#E7avbzrT*I}h4Oh@GhP&LiS5 zhB-tbV1U*d06*StSZjH?ZFo2NURwhUxpYK?HF|>gIA_t(sb#XnIfq#1Ij%G@TPsF{ z$K#k&o-(CYu9Q%PQVJ<0wryn$#W~?P6V3_F3EQ?1y`}d)uS;g3$CYMbwQ)QTu9OJD zkJ}-wO`$b$dB7jtCcGk+`2^eZQ=2}z5w9~A<)ObiouHEyb=It!&!qd4n+_n80#1{ zbAKLKnR9TS7cVb6A0Ky0tvG90*M&X?0IhYbb&N4^t#^8^EYY)XD~BY`D^E(hg1-p>xb^V4!hxUR%d&{4VV8{T_rZ9E=d zYTtK6rW;}mtn17h>k?p0FYMcjdpu9pH4>aHR7x#T^DC=eB7VN%WWs6!j43OImStsK*BMks z=e!a+qXnQ}AhHY{3{|f474LhB7HGnD!mS^Jojvlh(2S)uhYT@VA;dC^D5 z7;vq1_HDx$_;%ZPKA$t58N<45I5E`LIG!iVy0EM(I+Rip+ZMl+?dIKH378%!Ib)2{ zo$zwo0j0HxdLx1}LMatztwnWUjN$YCVDvHD(;2tCcPwjUS>r@=aG+6mC{Yj}6D>L{GZS>aIww=)jPQobIi;m@D%h{()=DAGFK2}_KWoVmT+V03!#_^@E@ z%nrr~?;oGIF&d9&ruT+5hM~%DKfZIN3&R|s<4oN4jeXy#wbJ_x9k-Vot#wB4^j1-n z(L1NkqrXzYmdX+X06Ax_bRotPLcmT=SaL3e5LwsA@jN-Nix?cvI=T*Gh+L`A+QHCi zyluN-bnyFcZ+v_{$)#fLG-S$!S{uE0#5k@i5tlgsi)CHnTzMF z&Y9ylamSg!7;gK pLtt4vs){OL46SuST)w)8{{?77tH*U*h@Aic002ovPDHLkV1g4LUh)6{ literal 0 HcmV?d00001 diff --git a/concrete/textures/x32/technic_rebar.png b/concrete/textures/x32/technic_rebar.png new file mode 100644 index 0000000000000000000000000000000000000000..16d1fc541cd007378cc0ced0ca55127ec9d11952 GIT binary patch literal 813 zcmV+|1JeA7P)Yxd6vpvqW;(V! zHlBE76_4%6vWk@uMF^=CQD6~~(wCIBVnrAI6#Y)D*?=IBAZV3BP$N-^f=DeaH79fJVR;&F0z&i;*aLn9VYo7qPm?X*2^SldE%9mwXzH$Ws09Kae z6W{kY27^JT*=$~9jBRnw|8WHXfH#!VeE{F|dcD((vE@9^Zy95lD*%i!hm_JH48tp7 z7!IYBb4scE#u)7c003I+UkM?dG)+I5o0~gF2pJ0@ezDfN0RYfa%EyF|m1?zmCW@j} zA;g{#;?NZU0Jsoh*IN5ktJO;D_4=yTdXsZLb_D={w?c^hN~QAka5(HWo6WPF^IMcs z?g{{F?V(cY58wB%j7FmcDP^@NiU(3k>jVG*Qp(>r=eg&3pS4=8^IGc{lgVV?8DNHZ z#yJmawc6!0P1k}TxH}$?-#7yRFr4$JTI)0Ic6%jBl0~icoh-|kD*ymU#@Id2^A?tt zmabZBPZL768Dr8F0M=Tel-ki+U+(w&Unr&Ol+uSn2<-#_078f&%d)*72(AtWgLNT< z&hz|dt+jOmm>uO`Qp$ryqw#IG+g(#iy`D~|&y6u|006)k`&|ezO_F4z-|v4K1i_1= zqoV_7001C_JmZ|JG)+H`<9NL+%bhIC{&WTaUED!e*T)Zb~K$%Z%QeR6Ts{y6s7c0 rQ4}r4*x!`Whf+$7caVqo{ilBc1GJl=xluv200000NkvXXu0mjfdTMa{ literal 0 HcmV?d00001 diff --git a/extranodes/depends.txt b/extranodes/depends.txt new file mode 100644 index 0000000..cd0e778 --- /dev/null +++ b/extranodes/depends.txt @@ -0,0 +1,4 @@ +default +moreblocks +technic_worldgen +concrete diff --git a/extranodes/init.lua b/extranodes/init.lua new file mode 100644 index 0000000..2cca1ed --- /dev/null +++ b/extranodes/init.lua @@ -0,0 +1,42 @@ +-- Minetest 0.4.6 mod: extranodes +-- namespace: technic + +--register stairslike nodes +register_stair_slab_panel_micro("technic", "marble", "technic:marble", + {cracky=2, not_in_creative_inventory=1}, + {"technic_marble.png"}, + "Marble", + "marble", + "facedir", + 0) + +register_stair_slab_panel_micro("technic", "marble_bricks", "technic:marble_bricks", + {cracky=2, not_in_creative_inventory=1}, + {"technic_marble_bricks.png"}, + "Marble Bricks", + "marble_bricks", + "facedir", + 0) + +register_stair_slab_panel_micro("technic", "granite", "technic:granite", + {cracky=3, not_in_creative_inventory=1}, + {"technic_granite.png"}, + "Granite", + "granite", + "facedir", + 0) + +register_stair_slab_panel_micro("technic", "concrete", "technic:concrete", + {cracky=3, not_in_creative_inventory=1}, + {"technic_concrete_block.png"}, + "Concrete", + "concrete", + "facedir", + 0) + +--register nodes in circular saw if aviable +if circular_saw then + for i,v in ipairs({"concrete", "marble", "marble_bricks", "granite", "default:obsidian"}) do + table.insert(circular_saw.known_stairs, "technic:" ..v); + end +end diff --git a/technic/concrete.lua b/technic/concrete.lua deleted file mode 100644 index d936f5b..0000000 --- a/technic/concrete.lua +++ /dev/null @@ -1,94 +0,0 @@ - -minetest.register_craft({ - output = 'technic:rebar 6', - recipe = { - {'','', 'default:steel_ingot'}, - {'','default:steel_ingot',''}, - {'default:steel_ingot', '', ''}, - } -}) - -minetest.register_craft({ - output = 'technic:concrete 5', - recipe = { - {'default:stone','technic:rebar','default:stone'}, - {'technic:rebar','default:stone','technic:rebar'}, - {'default:stone','technic:rebar','default:stone'}, - } -}) - -minetest.register_craft({ - output = 'technic:concrete_post 4', - recipe = { - {'default:stone','technic:rebar','default:stone'}, - {'default:stone','technic:rebar','default:stone'}, - {'default:stone','technic:rebar','default:stone'}, -} -}) - -minetest.register_craftitem("technic:rebar", { - description = "Rebar", - inventory_image = "technic_rebar.png", - stack_max = 99, -}) - -minetest.register_craftitem("technic:concrete", { - description = "Concrete Block", - inventory_image = "technic_concrete_block.png", - stack_max = 99, -}) - -minetest.register_craftitem("technic:concrete_post", { - description = "Concrete Post", - inventory_image = "technic_concrete_post.png", - stack_max = 99, -}) - - - --- NODES: - -minetest.register_node("technic:concrete", { - description = "Concrete Block", - tile_images = {"technic_concrete_block.png",}, - is_ground_content = true, - groups = {cracky=1}, - sounds = default.node_sound_stone_defaults(), -}) - -minetest.register_node("technic:concrete_post", { - description = "Concrete Post", - drawtype = "fencelike", - tiles = {"technic_concrete_block.png"}, - inventory_image = "default_fence.png", - wield_image = "default_fence.png", - paramtype = "light", - is_ground_content = true, - selection_box = { - type = "fixed", - fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, - }, - - groups = {cracky=1}, - sounds = default.node_sound_stone_defaults(), -}) -if type(register_stair_and_slab_and_panel_and_micro) == "function" then -register_stair_and_slab_and_panel_and_micro(":stairsplus", "concrete", "technic:concrete", - {cracky=3, not_in_creative_inventory=1}, - {"technic_concrete_block.png"}, - "Concrete Stairs", - "Concrete Slab", - "Concrete Panel", - "Concrete Microblock", - "concrete") -end -if type(register_stair_slab_panel_micro) == "function" then -register_stair_slab_panel_micro(":stairsplus", "concrete", "technic:concrete", - {cracky=3, not_in_creative_inventory=1}, - {"technic_concrete_block.png"}, - "Concrete Stairs", - "Concrete Slab", - "Concrete Panel", - "Concrete Microblock", - "concrete") -end diff --git a/technic/depends.txt b/technic/depends.txt index 90f17c0..f034c60 100644 --- a/technic/depends.txt +++ b/technic/depends.txt @@ -1,5 +1,6 @@ +default moreores pipeworks mesecons -moreblocks technic_worldgen + diff --git a/technic/init.lua b/technic/init.lua index e57c7a2..0aa91fe 100644 --- a/technic/init.lua +++ b/technic/init.lua @@ -1,4 +1,6 @@ --- Minetest 0.4.6 : technic +-- Minetest 0.4.6 mod: technic +-- namespace: technic +-- (c) 2012-2013 by RealBadAngel modpath=minetest.get_modpath("technic") @@ -16,7 +18,6 @@ dofile(modpath.."/gold_chest.lua") dofile(modpath.."/mithril_chest.lua") --items -dofile(modpath.."/concrete.lua") dofile(modpath.."/items.lua") --LV machines @@ -57,7 +58,6 @@ dofile(modpath.."/deployer.lua") dofile(modpath.."/constructor.lua") dofile(modpath.."/frames.lua") - if enable_item_drop then dofile(modpath.."/item_drop.lua") end if enable_item_pickup then dofile(modpath.."/item_pickup.lua") end diff --git a/technic_worldgen/init.lua b/technic_worldgen/init.lua index 37aa386..3e9e4dd 100644 --- a/technic_worldgen/init.lua +++ b/technic_worldgen/init.lua @@ -4,5 +4,4 @@ modpath=minetest.get_modpath("technic_worldgen") dofile(modpath.."/nodes.lua") dofile(modpath.."/oregen.lua") ---dofile(modpath.."/stairslike.lua") dofile(modpath.."/crafts.lua") diff --git a/technic_worldgen/oregen.lua b/technic_worldgen/oregen.lua index ad2d5d6..b17e438 100644 --- a/technic_worldgen/oregen.lua +++ b/technic_worldgen/oregen.lua @@ -1,14 +1,3 @@ -minetest.register_ore({ - ore_type = "scatter", - ore = "technic:mineral_diamond", - wherein = "default:stone", - clust_scarcity = 11*11*11, - clust_num_ores = 4, - clust_size = 3, - height_min = -31000, - height_max = -450, -}) - minetest.register_ore({ ore_type = "scatter", ore = "technic:mineral_uranium", @@ -46,9 +35,9 @@ minetest.register_ore({ clust_scarcity = 1, clust_num_ores = 1, clust_size = 3, - height_min = -150, + height_min = -31000, height_max = -50, - noise_threshhold = 0.5, + noise_threshhold = 0.4, noise_params = {offset=0, scale=15, spread={x=150, y=150, z=150}, seed=23, octaves=3, persist=0.70} }) minetest.register_ore({ @@ -58,9 +47,9 @@ minetest.register_ore({ clust_scarcity = 1, clust_num_ores = 1, clust_size = 4, - height_min = -100, - height_max = -250, - noise_threshhold = 0.5, + height_min = -31000, + height_max = -150, + noise_threshhold = 0.4, noise_params = {offset=0, scale=15, spread={x=130, y=130, z=130}, seed=24, octaves=3, persist=0.70} }) diff --git a/technic_worldgen/stairslike.lua b/technic_worldgen/stairslike.lua index 038d653..8b13789 100644 --- a/technic_worldgen/stairslike.lua +++ b/technic_worldgen/stairslike.lua @@ -1,123 +1 @@ --- cross-compatibility with default obsidian -function register_technic_stairs_alias(modname, origname, newmod, newname) - minetest.register_alias(modname .. ":slab_" .. origname, newmod..":slab_" .. newname) - minetest.register_alias(modname .. ":slab_" .. origname .. "_inverted", newmod..":slab_" .. newname .. "_inverted") - minetest.register_alias(modname .. ":slab_" .. origname .. "_wall", newmod..":slab_" .. newname .. "_wall") - minetest.register_alias(modname .. ":slab_" .. origname .. "_quarter", newmod..":slab_" .. newname .. "_quarter") - minetest.register_alias(modname .. ":slab_" .. origname .. "_quarter_inverted", newmod..":slab_" .. newname .. "_quarter_inverted") - minetest.register_alias(modname .. ":slab_" .. origname .. "_quarter_wall", newmod..":slab_" .. newname .. "_quarter_wall") - minetest.register_alias(modname .. ":slab_" .. origname .. "_three_quarter", newmod..":slab_" .. newname .. "_three_quarter") - minetest.register_alias(modname .. ":slab_" .. origname .. "_three_quarter_inverted", newmod..":slab_" .. newname .. "_three_quarter_inverted") - minetest.register_alias(modname .. ":slab_" .. origname .. "_three_quarter_wall", newmod..":slab_" .. newname .. "_three_quarter_wall") - minetest.register_alias(modname .. ":stair_" .. origname, newmod..":stair_" .. newname) - minetest.register_alias(modname .. ":stair_" .. origname .. "_inverted", newmod..":stair_" .. newname .. "_inverted") - minetest.register_alias(modname .. ":stair_" .. origname .. "_wall", newmod..":stair_" .. newname .. "_wall") - minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half", newmod..":stair_" .. newname .. "_wall_half") - minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half_inverted", newmod..":stair_" .. newname .. "_wall_half_inverted") - minetest.register_alias(modname .. ":stair_" .. origname .. "_half", newmod..":stair_" .. newname .. "_half") - minetest.register_alias(modname .. ":stair_" .. origname .. "_half_inverted", newmod..":stair_" .. newname .. "_half_inverted") - minetest.register_alias(modname .. ":stair_" .. origname .. "_right_half", newmod..":stair_" .. newname .. "_right_half") - minetest.register_alias(modname .. ":stair_" .. origname .. "_right_half_inverted", newmod..":stair_" .. newname .. "_right_half_inverted") - minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half", newmod..":stair_" .. newname .. "_wall_half") - minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half_inverted", newmod..":stair_" .. newname .. "_wall_half_inverted") - minetest.register_alias(modname .. ":stair_" .. origname .. "_inner", newmod..":stair_" .. newname .. "_inner") - minetest.register_alias(modname .. ":stair_" .. origname .. "_inner_inverted", newmod..":stair_" .. newname .. "_inner_inverted") - minetest.register_alias(modname .. ":stair_" .. origname .. "_outer", newmod..":stair_" .. newname .. "_outer") - minetest.register_alias(modname .. ":stair_" .. origname .. "_outer_inverted", newmod..":stair_" .. newname .. "_outer_inverted") - minetest.register_alias(modname .. ":panel_" .. origname .. "_bottom", newmod..":panel_" .. newname .. "_bottom") - minetest.register_alias(modname .. ":panel_" .. origname .. "_top", newmod..":panel_" .. newname .. "_top") - minetest.register_alias(modname .. ":panel_" .. origname .. "_vertical", newmod..":panel_" .. newname .. "_vertical") - minetest.register_alias(modname .. ":micro_" .. origname .. "_bottom", newmod..":micro_" .. newname .. "_bottom") - minetest.register_alias(modname .. ":micro_" .. origname .. "_top", newmod..":micro_" .. newname .. "_top") -end - -minetest.register_alias("technic:obsidian", "default:obsidian") -minetest.register_alias("moreblocks:obsidian", "default:obsidian") - -register_stair_slab_panel_micro( - ":default", - "obsidian", - "default:obsidian", - {cracky=3, not_in_creative_inventory=1}, - {"default_obsidian.png"}, - "Obsidian", - "default:obsidian", - "none", - light -) - -register_technic_stairs_alias("moreblocks", "obsidian", "default", "obsidian") -table.insert(circular_saw.known_stairs, "default:obsidian") - --- other stairs/slabs - -if type(register_stair_and_slab_and_panel_and_micro) == "function" then -register_stair_and_slab_and_panel_and_micro(":stairsplus", "marble", "technic:marble", - {cracky=3, not_in_creative_inventory=1}, - {"technic_marble.png"}, - "Marble Stairs", - "Marble Slab", - "Marble Panel", - "Marble Microblock", - "marble") -register_stair_and_slab_and_panel_and_micro(":stairsplus", "marble_bricks", "technic:marble_bricks", - {cracky=3, not_in_creative_inventory=1}, - {"technic_marble_bricks.png"}, - "Marble Bricks Stairs", - "Marble Bricks Slab", - "Marble Bricks Panel", - "Marble Bricks Microblock", - "marble_bricks") -register_stair_and_slab_and_panel_and_micro(":stairsplus", "granite", "technic:granite", - {cracky=3, not_in_creative_inventory=1}, - {"technic_granite.png"}, - "Granite Stairs", - "Granite Slab", - "Granite Panel", - "Granite Microblock", - "granite") -register_stair_and_slab_and_panel_and_micro(":stairsplus", "obsidian", "default:obsidian", - {cracky=3, not_in_creative_inventory=1}, - {"default_obsidian.png"}, - "Obsidian Stairs", - "Obsidian Slab", - "Obsidian Panel", - "Obsidian Microblock", - "obsidian") -end - -if type(register_stair_slab_panel_micro) == "function" then -register_stair_slab_panel_micro(":stairsplus", "marble", "technic:marble", - {cracky=3, not_in_creative_inventory=1}, - {"technic_marble.png"}, - "Marble Stairs", - "Marble Slab", - "Marble Panel", - "Marble Microblock", - "marble") -register_stair_slab_panel_micro(":stairsplus", "marble_bricks", "technic:marble_bricks", - {cracky=3, not_in_creative_inventory=1}, - {"technic_marble_bricks.png"}, - "Marble Bricks Stairs", - "Marble Bricks Slab", - "Marble Bricks Panel", - "Marble Bricks Microblock", - "marble_bricks") -register_stair_slab_panel_micro(":stairsplus", "granite", "technic:granite", - {cracky=3, not_in_creative_inventory=1}, - {"technic_granite.png"}, - "Granite Stairs", - "Granite Slab", - "Granite Panel", - "Granite Microblock", - "granite") -register_stair_slab_panel_micro(":stairsplus", "obsidian", "technic:obsidian", - {cracky=3, not_in_creative_inventory=1}, - {"technic_obsidian.png"}, - "Obsidian Stairs", - "Obsidian Slab", - "Obsidian Panel", - "Obsidian Microblock", - "obsidian") -end