Skip to content

Commit

Permalink
Merge concrete into technic_worldgen and extranodes (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
OgelGames committed Aug 7, 2023
1 parent 867e907 commit 5f00592
Show file tree
Hide file tree
Showing 37 changed files with 217 additions and 242 deletions.
132 changes: 0 additions & 132 deletions concrete/init.lua

This file was deleted.

12 changes: 0 additions & 12 deletions concrete/locale/concrete.de.tr

This file was deleted.

10 changes: 0 additions & 10 deletions concrete/locale/concrete.es.tr

This file was deleted.

9 changes: 0 additions & 9 deletions concrete/locale/concrete.fr.tr

This file was deleted.

11 changes: 0 additions & 11 deletions concrete/locale/concrete.ja.tr

This file was deleted.

12 changes: 0 additions & 12 deletions concrete/locale/concrete.pl.tr

This file was deleted.

12 changes: 0 additions & 12 deletions concrete/locale/concrete.pt_BR.tr

This file was deleted.

9 changes: 0 additions & 9 deletions concrete/locale/concrete.tr.tr

This file was deleted.

7 changes: 0 additions & 7 deletions concrete/locale/concrete.zh_CN.tr

This file was deleted.

10 changes: 0 additions & 10 deletions concrete/locale/template.txt

This file was deleted.

3 changes: 0 additions & 3 deletions concrete/mod.conf

This file was deleted.

101 changes: 100 additions & 1 deletion extranodes/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if minetest.get_modpath("moreblocks") then
tiles={"technic_granite_bricks.png"},
})

stairsplus:register_all("technic", "concrete", "technic:concrete", {
stairsplus:register_all("technic", "concrete", "basic_materials:concrete_block", {
description=S("Concrete"),
groups={cracky=3, not_in_creative_inventory=1},
tiles={"basic_materials_concrete_block.png"},
Expand Down Expand Up @@ -62,6 +62,18 @@ if minetest.get_modpath("moreblocks") then
tiles={"technic_stainless_steel_block.png"},
})

stairsplus:register_all("technic", "blast_resistant_concrete", "technic:blast_resistant_concrete", {
description = S("Blast-resistant Concrete"),
tiles = {"technic_blast_resistant_concrete_block.png",},
groups = {cracky = 1, level = 3, concrete = 1},
on_blast = function(pos, intensity)
if intensity > 3 then
minetest.remove_node(pos)
minetest.add_item(pos, "technic:blast_resistant_concrete")
end
end
})

-- FIXME: Clean this function up somehow
local function register_technic_stairs_alias(modname, origname, newmod, newname)
minetest.register_alias(modname .. ":slab_" .. origname, newmod..":slab_" .. newname)
Expand Down Expand Up @@ -334,3 +346,90 @@ if minetest.get_modpath("unifieddyes") then
})
end
end

for i = 0, 31 do
minetest.register_alias("technic:concrete_post"..i,
"technic:concrete_post")
end
for i = 32, 63 do
minetest.register_alias("technic:concrete_post"..i,
"technic:concrete_post_with_platform")
end

minetest.register_craft({
output = 'technic:concrete_post_platform 6',
recipe = {
{'basic_materials:concrete_block','technic:concrete_post','basic_materials:concrete_block'},
}
})

minetest.register_craft({
output = 'technic:concrete_post 12',
recipe = {
{'basic_materials:concrete_block','basic_materials:steel_bar','basic_materials:concrete_block'},
{'basic_materials:concrete_block','basic_materials:steel_bar','basic_materials:concrete_block'},
{'basic_materials:concrete_block','basic_materials:steel_bar','basic_materials:concrete_block'},
}
})

local box_platform = {-0.5, 0.3, -0.5, 0.5, 0.5, 0.5}
local box_post = {-0.15, -0.5, -0.15, 0.15, 0.5, 0.15}
local box_front = {-0.1, -0.3, -0.5, 0.1, 0.3, 0}
local box_back = {-0.1, -0.3, 0, 0.1, 0.3, 0.5}
local box_left = {-0.5, -0.3, -0.1, 0, 0.3, 0.1}
local box_right = {0, -0.3, -0.1, 0.5, 0.3, 0.1}

minetest.register_node(":technic:concrete_post_platform", {
description = S("Concrete Post Platform"),
tiles = {"basic_materials_concrete_block.png",},
groups={cracky=1, level=2},
sounds = default.node_sound_stone_defaults(),
paramtype = "light",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {box_platform}
},
on_place = function (itemstack, placer, pointed_thing)
local node = minetest.get_node(pointed_thing.under)
if node.name ~= "technic:concrete_post" then
return minetest.item_place_node(itemstack, placer, pointed_thing)
end
minetest.set_node(pointed_thing.under, {name="technic:concrete_post_with_platform"})
itemstack:take_item()
placer:set_wielded_item(itemstack)
return itemstack
end,
})

for platform = 0, 1 do
local after_dig_node = nil
if platform == 1 then
after_dig_node = function(pos, old_node)
old_node.name = "technic:concrete_post"
minetest.set_node(pos, old_node)
end
end

minetest.register_node(":technic:concrete_post"..(platform == 1 and "_with_platform" or ""), {
description = S("Concrete Post"),
tiles = {"basic_materials_concrete_block.png"},
groups = {cracky=1, level=2, concrete_post=1, not_in_creative_inventory=platform},
sounds = default.node_sound_stone_defaults(),
drop = (platform == 1 and "technic:concrete_post_platform" or
"technic:concrete_post"),
paramtype = "light",
sunlight_propagates = true,
drawtype = "nodebox",
connects_to = {"group:concrete", "group:concrete_post"},
node_box = {
type = "connected",
fixed = {box_post, (platform == 1 and box_platform or nil)},
connect_front = box_front,
connect_back = box_back,
connect_left = box_left,
connect_right = box_right,
},
after_dig_node = after_dig_node,
})
end
4 changes: 3 additions & 1 deletion extranodes/locale/extranodes.de.tr
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ Marble=Marmor
Marble Bricks=Marmorziegel
Granite=Granit
Concrete=Beton

Blast-resistant Concrete=
Granite Bricks=
Zinc Block=
Cast Iron Block=
Carbon Steel Block=
Stainless Steel Block=
Insulator/cable clip=
Steel strut with insulator/cable clip=
Concrete Post Platform=Betonpfostenplattform
Concrete Post=Betonpfosten
4 changes: 3 additions & 1 deletion extranodes/locale/extranodes.es.tr
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ Marble=Mármol
Marble Bricks=Ladrillos de mármol
Granite=Granito
Concrete=Concreto

Blast-resistant Concrete=
Granite Bricks=
Zinc Block=
Cast Iron Block=
Carbon Steel Block=
Stainless Steel Block=
Insulator/cable clip=
Steel strut with insulator/cable clip=
Concrete Post Platform=Plataforma de concreto
Concrete Post=Postes de concreto

0 comments on commit 5f00592

Please sign in to comment.