forked from mtcontrib/plantlife_modpack
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@ -1,17 +1,2 @@
|
||||
-----------------------------------------------------------------------------------------------
|
||||
local title = "Cave Stuff"
|
||||
local version = "0.0.3"
|
||||
local mname = "cavestuff"
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("cavestuff")
|
||||
|
||||
cavestuff = {}
|
||||
|
||||
dofile(minetest.get_modpath("cavestuff").."/nodes.lua")
|
||||
dofile(minetest.get_modpath("cavestuff").."/mapgen.lua")
|
||||
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
print("[Mod] "..title.." ["..version.."] ["..mname.."] Loaded...")
|
||||
|
@ -1,11 +1,4 @@
|
||||
# textdomain: cavestuff
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# reusityback, 2022.
|
||||
#
|
||||
|
||||
Pebble=Kieselstein
|
||||
Desert Pebble=Wüstenkiesel
|
||||
Stalactite=Stalaktit
|
||||
|
@ -1,11 +1,4 @@
|
||||
# textdomain: cavestuff
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# Jolesh, 2022.
|
||||
#
|
||||
|
||||
Pebble=Ŝtoneto
|
||||
Desert Pebble=Dezerta Ŝtoneto
|
||||
Stalactite=Stalaktito
|
||||
|
@ -1,11 +1,4 @@
|
||||
# textdomain: cavestuff
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# fat115 <fat115@framasoft.org>, 2017.
|
||||
#
|
||||
|
||||
Pebble=Caillou
|
||||
Desert Pebble=Caillou du désert
|
||||
Stalactite=Stalactite
|
||||
|
@ -1,11 +1,4 @@
|
||||
# textdomain: cavestuff
|
||||
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
|
||||
Pebble=
|
||||
Desert Pebble=
|
||||
Stalactite=
|
||||
|
@ -1,39 +1,65 @@
|
||||
--Map Generation Stuff
|
||||
|
||||
biome_lib.register_on_generate(
|
||||
{
|
||||
surface = {
|
||||
"default:dirt_with_grass",
|
||||
"default:gravel",
|
||||
"default:stone",
|
||||
"default:permafrost_with_stones"
|
||||
},
|
||||
max_count = 50,
|
||||
rarity = 0,
|
||||
plantlife_limit = -1,
|
||||
check_air = true,
|
||||
random_facedir = {0, 3}
|
||||
},
|
||||
{
|
||||
minetest.register_decoration({
|
||||
decoration = {
|
||||
"cavestuff:pebble_1",
|
||||
"cavestuff:pebble_2"
|
||||
}
|
||||
)
|
||||
|
||||
biome_lib.register_on_generate(
|
||||
{
|
||||
surface = {
|
||||
"default:desert_sand",
|
||||
"default:desert_stone"
|
||||
},
|
||||
max_count = 50,
|
||||
rarity = 0,
|
||||
plantlife_limit = -1,
|
||||
check_air = true,
|
||||
random_facedir = {0, 3}
|
||||
},
|
||||
{
|
||||
place_on = {
|
||||
"default:dirt_with_grass",
|
||||
"default:gravel",
|
||||
"default:stone",
|
||||
"default:permafrost_with_stones"
|
||||
},
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 0.0078125,
|
||||
spread = {
|
||||
y = 100,
|
||||
z = 100,
|
||||
x = 100
|
||||
},
|
||||
seed = 0,
|
||||
octaves = 3,
|
||||
persist = 0.6,
|
||||
flags = "absvalue",
|
||||
lacunarity = 2
|
||||
},
|
||||
param2 = 0,
|
||||
flags = "all_floors",
|
||||
deco_type = "simple",
|
||||
param2_max = 3,
|
||||
y_min = -16,
|
||||
y_max = 48
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
decoration = {
|
||||
"cavestuff:desert_pebble_1",
|
||||
"cavestuff:desert_pebble_2"
|
||||
}
|
||||
)
|
||||
},
|
||||
place_on = {
|
||||
"default:desert_sand",
|
||||
"default:desert_stone"
|
||||
},
|
||||
noise_params = {
|
||||
offset = 0,
|
||||
scale = 0.0078125,
|
||||
spread = {
|
||||
y = 100,
|
||||
z = 100,
|
||||
x = 100
|
||||
},
|
||||
seed = 0,
|
||||
octaves = 3,
|
||||
persist = 0.6,
|
||||
flags = "absvalue",
|
||||
lacunarity = 2
|
||||
},
|
||||
param2 = 0,
|
||||
flags = "all_floors",
|
||||
deco_type = "simple",
|
||||
param2_max = 3,
|
||||
y_min = -16,
|
||||
y_max = 48
|
||||
})
|
@ -1,2 +1,2 @@
|
||||
name = cavestuff
|
||||
depends = default,biome_lib
|
||||
depends = default
|
||||
|
@ -14,33 +14,32 @@ minetest.register_node("cavestuff:pebble_1",{
|
||||
description = S("Pebble"),
|
||||
drawtype = "mesh",
|
||||
mesh = "cavestuff_pebble.obj",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1, attached_node=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
groups = {cracky=3, stone=1, attached_node=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random pebble node
|
||||
local stack = ItemStack("cavestuff:pebble_"..random(1,2))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("cavestuff:pebble_1 "..itemstack:get_count()-(1-ret:get_count()))
|
||||
end,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("cavestuff:pebble_2",{
|
||||
drawtype = "mesh",
|
||||
mesh = "cavestuff_pebble.obj",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
drop = "cavestuff:pebble_1",
|
||||
tiles = {"undergrowth_pebble.png"},
|
||||
paramtype = "light",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1},
|
||||
groups = {cracky=3, stone=1, attached_node=1, not_in_creative_inventory=1},
|
||||
selection_box = cbox,
|
||||
collision_box = cbox,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("cavestuff:desert_pebble_1",{
|
||||
@ -102,7 +101,7 @@ minetest.register_node("cavestuff:stalactite_1",{
|
||||
if not placer then return end
|
||||
local playername = placer:get_player_name()
|
||||
if minetest.is_protected(place, playername)
|
||||
or minetest.is_protected(above, playername) then
|
||||
or minetest.is_protected(above, playername) then
|
||||
minetest.record_protection_violation(place, playername)
|
||||
return
|
||||
end
|
||||
@ -115,7 +114,7 @@ minetest.register_node("cavestuff:stalactite_1",{
|
||||
name = "cavestuff:stalactite_"..math.random(1,3),
|
||||
param2 = minetest.dir_to_wallmounted(vector.multiply(dir, -1))
|
||||
})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.is_creative_enabled(playername) then
|
||||
itemstack:take_item()
|
||||
end
|
||||
end
|
||||
@ -158,5 +157,3 @@ minetest.register_node("cavestuff:stalactite_3",{
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
--Stalagmites
|
||||
|
Reference in New Issue
Block a user