mirror of
https://github.com/adrido/darkage.git
synced 2024-11-15 23:00:41 +01:00
removed sandstone_cobble and desert_stone_cobble because its in default
removed sandstone_cobble and desert_stone_cobble because its in default the moreblocks mod is now only a option added alias for sandstone_cobble and desert_stone_cobble
This commit is contained in:
parent
9ccd5caf09
commit
c334970311
2
alias.lua
Normal file
2
alias.lua
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
minetest.register_alias("darkage:sandstone_cobble", "default:sandstonebrick")
|
||||||
|
minetest.register_alias("darkage:desert_stone_cobble", "default:desert_stonebrick")
|
|
@ -1,2 +1,3 @@
|
||||||
default
|
default
|
||||||
moreblocks
|
farming?
|
||||||
|
moreblocks?
|
129
init.lua
129
init.lua
|
@ -3,8 +3,12 @@ print (" ---- Dark Age is Loading! ---- ")
|
||||||
dofile(minetest.get_modpath("darkage").."/mapgen.lua")
|
dofile(minetest.get_modpath("darkage").."/mapgen.lua")
|
||||||
dofile(minetest.get_modpath("darkage").."/building.lua")
|
dofile(minetest.get_modpath("darkage").."/building.lua")
|
||||||
dofile(minetest.get_modpath("darkage").."/furniture.lua")
|
dofile(minetest.get_modpath("darkage").."/furniture.lua")
|
||||||
--dofile(minetest.get_modpath("darkage").."/stairs.lua")
|
dofile(minetest.get_modpath("darkage").."/alias.lua")
|
||||||
dofile(minetest.get_modpath("darkage").."/stairsplus.lua")
|
if minetest.get_modpath("moreblocks") then
|
||||||
|
dofile(minetest.get_modpath("darkage").."/stairsplus.lua")--only if moreblocks installed
|
||||||
|
else
|
||||||
|
dofile(minetest.get_modpath("darkage").."/stairs.lua")
|
||||||
|
end
|
||||||
----------
|
----------
|
||||||
-- Items
|
-- Items
|
||||||
----------
|
----------
|
||||||
|
@ -54,13 +58,13 @@ minetest.register_node("darkage:cobble_with_plaster", {
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("darkage:desert_stone_cobble", {
|
--minetest.register_node("darkage:desert_stone_cobble", {
|
||||||
description = "Desert Stone Cobble",
|
-- description = "Desert Stone Cobble",
|
||||||
tiles = {"darkage_desert_stone_cobble.png"},
|
-- tiles = {"darkage_desert_stone_cobble.png"},
|
||||||
is_ground_content = true,
|
-- is_ground_content = true,
|
||||||
groups = {cracky=3},
|
-- groups = {cracky=3},
|
||||||
sounds = default.node_sound_stone_defaults()
|
-- sounds = default.node_sound_stone_defaults()
|
||||||
})
|
--})
|
||||||
|
|
||||||
minetest.register_node("darkage:desert_stone_with_iron", {
|
minetest.register_node("darkage:desert_stone_with_iron", {
|
||||||
description = "Desert Iron Ore",
|
description = "Desert Iron Ore",
|
||||||
|
@ -155,13 +159,15 @@ minetest.register_node("darkage:ors_cobble", {
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("darkage:sandstone_cobble", {
|
--minetest.register_node("darkage:sandstone_cobble", {
|
||||||
description = "Sandstone Cobble",
|
-- description = "Sandstone Cobble",
|
||||||
tiles = {"darkage_sandstone_cobble.png"},
|
-- tiles = {"darkage_sandstone_cobble.png"},
|
||||||
is_ground_content = true,
|
-- is_ground_content = true,
|
||||||
groups = {crumbly=2,cracky=2},
|
-- groups = {crumbly=2,cracky=2},
|
||||||
sounds = default.node_sound_stone_defaults()
|
-- sounds = default.node_sound_stone_defaults()
|
||||||
})
|
--})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("darkage:serpentine", {
|
minetest.register_node("darkage:serpentine", {
|
||||||
description = "Serpentine",
|
description = "Serpentine",
|
||||||
|
@ -267,19 +273,19 @@ minetest.register_node("darkage:marble", {
|
||||||
---------------
|
---------------
|
||||||
-- Overrides
|
-- Overrides
|
||||||
---------------
|
---------------
|
||||||
minetest.registered_nodes["default:desert_stone"].drop= {
|
--minetest.registered_nodes["default:desert_stone"].drop= {
|
||||||
max_items = 1,
|
-- max_items = 1,
|
||||||
items = {
|
-- items = {
|
||||||
{
|
-- {
|
||||||
-- player will get cobbles with 1/3 chance
|
-- -- player will get cobbles with 1/3 chance
|
||||||
items = {'darkage:desert_stone_cobble'},
|
-- items = {'darkage:desert_stone_cobble'},
|
||||||
rarity = 2,
|
-- rarity = 2,
|
||||||
},
|
-- },
|
||||||
{
|
-- {
|
||||||
items = {'default:desert_stone'},
|
-- items = {'default:desert_stone'},
|
||||||
}
|
-- }
|
||||||
}
|
-- }
|
||||||
}
|
--}
|
||||||
|
|
||||||
|
|
||||||
---------------
|
---------------
|
||||||
|
@ -337,6 +343,14 @@ minetest.register_craft({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'darkage:chalk 2',
|
||||||
|
recipe = {
|
||||||
|
{'darkage:chalk_powder','darkage:chalk_powder'},
|
||||||
|
{'darkage:chalk_powder','darkage:chalk_powder'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'darkage:cobble_with_plaster 2',
|
output = 'darkage:cobble_with_plaster 2',
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -377,13 +391,13 @@ minetest.register_craft({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
--minetest.register_craft({
|
||||||
output = 'darkage:ors_cobble 4',
|
-- output = 'darkage:ors_cobble 4',
|
||||||
recipe = {
|
-- recipe = {
|
||||||
{'darkage:sandstone_cobble','darkage:sandstone_cobble'},
|
-- {'darkage:sandstone_cobble','darkage:sandstone_cobble'},
|
||||||
{'default:iron_lump','darkage:sandstone_cobble'},
|
-- {'default:iron_lump','darkage:sandstone_cobble'},
|
||||||
}
|
-- }
|
||||||
})
|
--})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'darkage:silt 3',
|
output = 'darkage:silt 3',
|
||||||
|
@ -434,6 +448,19 @@ minetest.register_craft({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if minetest.get_modpath("farming") then
|
||||||
|
--only if farming installed
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'darkage:straw 4',
|
||||||
|
recipe = {
|
||||||
|
{'farming:wheat_harvested','farming:wheat_harvested'},
|
||||||
|
{'farming:wheat_harvested','farming:wheat_harvested'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
else
|
||||||
|
--nothing else
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'darkage:straw_bale',
|
output = 'darkage:straw_bale',
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -456,11 +483,11 @@ minetest.register_craft({
|
||||||
recipe = "darkage:basalt_cobble",
|
recipe = "darkage:basalt_cobble",
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
--minetest.register_craft({
|
||||||
type = "cooking",
|
-- type = "cooking",
|
||||||
output = "default:desert_stone",
|
-- output = "default:desert_stone",
|
||||||
recipe = "darkage:desert_stone_cobble",
|
-- recipe = "darkage:desert_stone_cobble",
|
||||||
})
|
--})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "cooking",
|
type = "cooking",
|
||||||
|
@ -468,11 +495,11 @@ minetest.register_craft({
|
||||||
recipe = "default:leaves",
|
recipe = "default:leaves",
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
--minetest.register_craft({
|
||||||
type = "cooking",
|
-- type = "cooking",
|
||||||
output = "darkage:sandstone_cobble",
|
-- output = "darkage:sandstone_cobble",
|
||||||
recipe = "default:sandstone",
|
-- recipe = "default:sandstone",
|
||||||
})
|
--})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "cooking",
|
type = "cooking",
|
||||||
|
@ -493,11 +520,11 @@ minetest.register_craft({
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craft({
|
--minetest.register_craft({
|
||||||
type = "cooking",
|
-- type = "cooking",
|
||||||
output = "darkage:sandstone_cobble",
|
-- output = "darkage:sandstone_cobble",
|
||||||
recipe = "default:sandstone",
|
-- recipe = "default:sandstone",
|
||||||
})
|
--})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "cooking",
|
type = "cooking",
|
||||||
|
|
146
stairs.lua
146
stairs.lua
|
@ -1,17 +1,111 @@
|
||||||
darkage = {};
|
darkage = {}
|
||||||
function darkage.register_stairs(modname, subname, groups, images, desc)
|
|
||||||
table.insert(circular_saw.known_stairs, modname..":"..subname);
|
function darkage.register_stairs(modname, item, groups, images, description)
|
||||||
recipeitem = modname..":"..subname;
|
local recipeitem = modname..":"..item
|
||||||
desc_stair = desc.." stair";
|
local itemname = modname..":stair_"..item
|
||||||
desc_slab = desc.." slab";
|
minetest.register_node(itemname, {
|
||||||
desc_panel = desc.." panel";
|
description = description.." stair",
|
||||||
desc_micro = desc.." micro";
|
drawtype = "nodebox",
|
||||||
drop = subname
|
tiles = images,
|
||||||
register_stair(modname, subname, recipeitem, groups, images, desc_stair, drop)
|
paramtype = "light",
|
||||||
register_slab(modname, subname, recipeitem, groups, images, desc_slab, drop)
|
paramtype2 = "facedir",
|
||||||
register_panel(modname, subname, recipeitem, groups, images, desc_panel, drop)
|
is_ground_content = true,
|
||||||
register_micro(modname, subname, recipeitem, groups, images, desc_micro, drop)
|
groups = groups,
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||||
|
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = itemname .. ' 4',
|
||||||
|
recipe = {
|
||||||
|
{recipeitem, "", ""},
|
||||||
|
{recipeitem, recipeitem, ""},
|
||||||
|
{recipeitem, recipeitem, recipeitem},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Flipped recipe for the silly minecrafters
|
||||||
|
minetest.register_craft({
|
||||||
|
output = itemname .. ' 4',
|
||||||
|
recipe = {
|
||||||
|
{"", "", recipeitem},
|
||||||
|
{"", recipeitem, recipeitem},
|
||||||
|
{recipeitem, recipeitem, recipeitem},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
itemname=modname..":slab_" .. item
|
||||||
|
|
||||||
|
minetest.register_node(itemname, {
|
||||||
|
description = description.." slab",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
tiles = images,
|
||||||
|
paramtype = "light",
|
||||||
|
is_ground_content = true,
|
||||||
|
groups = groups,
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||||
|
},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||||
|
},
|
||||||
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
if pointed_thing.type ~= "node" then
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
-- If it's being placed on an another similar one, replace it with
|
||||||
|
-- a full block
|
||||||
|
local slabpos = nil
|
||||||
|
local slabnode = nil
|
||||||
|
local p0 = pointed_thing.under
|
||||||
|
local p1 = pointed_thing.above
|
||||||
|
local n0 = minetest.env:get_node(p0)
|
||||||
|
local n1 = minetest.env:get_node(p1)
|
||||||
|
if n0.name == itemname then
|
||||||
|
slabpos = p0
|
||||||
|
slabnode = n0
|
||||||
|
elseif n1.name == itemname then
|
||||||
|
slabpos = p1
|
||||||
|
slabnode = n1
|
||||||
|
end
|
||||||
|
if slabpos then
|
||||||
|
-- Remove the slab at slabpos
|
||||||
|
minetest.env:remove_node(slabpos)
|
||||||
|
-- Make a fake stack of a single item and try to place it
|
||||||
|
local fakestack = ItemStack(recipeitem)
|
||||||
|
pointed_thing.above = slabpos
|
||||||
|
fakestack = minetest.item_place(fakestack, placer, pointed_thing)
|
||||||
|
-- If the item was taken from the fake stack, decrement original
|
||||||
|
if not fakestack or fakestack:is_empty() then
|
||||||
|
itemstack:take_item(1)
|
||||||
|
-- Else put old node back
|
||||||
|
else
|
||||||
|
minetest.env:set_node(slabpos, slabnode)
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Otherwise place regularly
|
||||||
|
return minetest.item_place(itemstack, placer, pointed_thing)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = itemname .. ' 3',
|
||||||
|
recipe = {
|
||||||
|
{recipeitem, recipeitem, recipeitem},
|
||||||
|
},
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
darkage.register_stairs("darkage","basalt_cobble",
|
darkage.register_stairs("darkage","basalt_cobble",
|
||||||
{cracky=3},
|
{cracky=3},
|
||||||
{"darkage_basalt_cobble.png"},
|
{"darkage_basalt_cobble.png"},
|
||||||
|
@ -42,25 +136,9 @@ darkage.register_stairs("darkage","ors_cobble",
|
||||||
"Old Red Sandtone"
|
"Old Red Sandtone"
|
||||||
)
|
)
|
||||||
|
|
||||||
darkage.register_stairs("darkage","desert_stone_cobble",
|
--darkage.register_stairs("darkage","desert_stone_cobble",
|
||||||
{cracky=3},
|
-- {cracky=3},
|
||||||
{"darkage_desert_stone_cobble.png"},
|
-- {"darkage_desert_stone_cobble.png"},
|
||||||
"Desert Stone Cobble"
|
-- "Desert Stone Cobble"
|
||||||
)
|
--)
|
||||||
|
|
||||||
darkage.register_stairs("darkage","slate_cobble",
|
|
||||||
{cracky=3},
|
|
||||||
{"darkage_slate_cobble.png"},
|
|
||||||
"Slate Cobble"
|
|
||||||
)
|
|
||||||
darkage.register_stairs("darkage","sandstone_cobble",
|
|
||||||
{cracky=3},
|
|
||||||
{"darkage_sandstone_cobble.png"},
|
|
||||||
"Sandstone Cobble"
|
|
||||||
)
|
|
||||||
|
|
||||||
darkage.register_stairs("darkage","gneiss_cobble",
|
|
||||||
{cracky=3},
|
|
||||||
{"darkage_gneiss_cobble.png"},
|
|
||||||
"Gneiss Cobble"
|
|
||||||
)
|
|
|
@ -42,22 +42,22 @@ darkage.register_stairs("darkage","ors_cobble",
|
||||||
"Old Red Sandtone"
|
"Old Red Sandtone"
|
||||||
)
|
)
|
||||||
|
|
||||||
darkage.register_stairs("darkage","desert_stone_cobble",
|
--darkage.register_stairs("darkage","desert_stone_cobble",
|
||||||
{cracky=3},
|
-- {cracky=3},
|
||||||
{"darkage_desert_stone_cobble.png"},
|
-- {"darkage_desert_stone_cobble.png"},
|
||||||
"Desert Stone Cobble"
|
-- "Desert Stone Cobble"
|
||||||
)
|
--)
|
||||||
|
|
||||||
darkage.register_stairs("darkage","slate_cobble",
|
darkage.register_stairs("darkage","slate_cobble",
|
||||||
{cracky=3},
|
{cracky=3},
|
||||||
{"darkage_slate_cobble.png"},
|
{"darkage_slate_cobble.png"},
|
||||||
"Slate Cobble"
|
"Slate Cobble"
|
||||||
)
|
)
|
||||||
darkage.register_stairs("darkage","sandstone_cobble",
|
--darkage.register_stairs("darkage","sandstone_cobble",
|
||||||
{cracky=3},
|
-- {cracky=3},
|
||||||
{"darkage_sandstone_cobble.png"},
|
-- {"darkage_sandstone_cobble.png"},
|
||||||
"Sandstone Cobble"
|
-- "Sandstone Cobble"
|
||||||
)
|
--)
|
||||||
|
|
||||||
darkage.register_stairs("darkage","gneiss_cobble",
|
darkage.register_stairs("darkage","gneiss_cobble",
|
||||||
{cracky=3},
|
{cracky=3},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user