mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-22 05:42:33 +01:00
Blast resistant concrete (by ObKo)
This commit is contained in:
parent
f4302fcbfa
commit
6055ed6503
@ -35,6 +35,15 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technic:blast_resistant_concrete 5',
|
||||||
|
recipe = {
|
||||||
|
{'technic:concrete','technic:composite_plate','technic:concrete'},
|
||||||
|
{'technic:composite_plate','technic:concrete','technic:composite_plate'},
|
||||||
|
{'technic:concrete','technic:composite_plate','technic:concrete'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
platform_box = {-0.5 , 0.3 , -0.5 , 0.5 , 0.5 , 0.5 }
|
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_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_x1={ 0 , -0.3 , -0.1, 0.5 , 0.3 , 0.1 } -- x+
|
||||||
@ -48,6 +57,12 @@ minetest.register_craftitem(":technic:rebar", {
|
|||||||
stack_max = 99,
|
stack_max = 99,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem(":technic:blast_resistant_concrete", {
|
||||||
|
description = "Blast-resistant Concrete Block",
|
||||||
|
inventory_image = "technic_blast_resistant_concrete_block.png",
|
||||||
|
stack_max = 99,
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craftitem(":technic:concrete", {
|
minetest.register_craftitem(":technic:concrete", {
|
||||||
description = "Concrete Block",
|
description = "Concrete Block",
|
||||||
inventory_image = "technic_concrete_block.png",
|
inventory_image = "technic_concrete_block.png",
|
||||||
@ -83,6 +98,25 @@ minetest.register_node(":technic:concrete", {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_node(":technic:blast_resistant_concrete", {
|
||||||
|
description = "Blast-resistant Concrete Block",
|
||||||
|
tile_images = {"technic_blast_resistant_concrete_block.png",},
|
||||||
|
is_ground_content = true,
|
||||||
|
groups={cracky=1,level=3},
|
||||||
|
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", {
|
minetest.register_node(":technic:concrete_post_platform", {
|
||||||
description = "Concrete Post Platform",
|
description = "Concrete Post Platform",
|
||||||
tile_images = {"technic_concrete_block.png",},
|
tile_images = {"technic_concrete_block.png",},
|
||||||
@ -482,20 +516,20 @@ function make_post_rule_number (x1,x2,y1,y2,z1,z2,platform)
|
|||||||
local tempz=z1+z2
|
local tempz=z1+z2
|
||||||
if platform==0 then
|
if platform==0 then
|
||||||
if tempy==0 and tempx==0 and tempz==0 then return 0 end
|
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 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
|
if z1==1 and z2==1 and tempx==0 and tempy==0 then return 33 end
|
||||||
return z2+z1*2+x2*4+x1*8
|
return z2+z1*2+x2*4+x1*8
|
||||||
else
|
else
|
||||||
if tempy==0 and tempx==0 and tempz==0 then return 16 end
|
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 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
|
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
|
return z2+z1*2+x2*4+x1*8+16
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function hacky_swap_posts(pos,name)
|
function hacky_swap_posts(pos,name)
|
||||||
local node = minetest.env:get_node(pos)
|
local node = minetest.env:get_node(pos)
|
||||||
if node.name == "technic:concrete" then
|
if node.name == "technic:concrete" or node.name == "technic:blast_resistant_concrete" then
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.env:get_meta(pos)
|
||||||
|
BIN
concrete/textures/technic_blast_resistant_concrete_block.png
Normal file
BIN
concrete/textures/technic_blast_resistant_concrete_block.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 311 B |
Loading…
Reference in New Issue
Block a user