Compare commits
2 Commits
897849943b
...
372e46070e
Author | SHA1 | Date | |
---|---|---|---|
|
372e46070e | ||
|
cce4abee1a |
19
.luacheckrc
Normal file
@ -0,0 +1,19 @@
|
||||
unused_args = false
|
||||
allow_defined_top = true
|
||||
|
||||
globals = {
|
||||
"minetest",
|
||||
}
|
||||
|
||||
read_globals = {
|
||||
string = {fields = {"split"}},
|
||||
table = {fields = {"copy", "getn"}},
|
||||
|
||||
-- Builtin
|
||||
"vector", "ItemStack",
|
||||
"dump", "DIR_DELIM", "VoxelArea", "Settings",
|
||||
|
||||
-- MTG
|
||||
"default", "sfinv", "creative",
|
||||
}
|
||||
|
19
LICENSE
@ -1,9 +1,16 @@
|
||||
MIT License
|
||||
MIT No Attribution
|
||||
|
||||
Copyright (c) <year> <copyright holders>
|
||||
Copyright 2023 tea@brass.host
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
software and associated documentation files (the "Software"), to deal in the Software
|
||||
without restriction, including without limitation the rights to use, copy, modify,
|
||||
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
BIN
menu/icon.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
75
mods/ebiome/biomes/grasslands.lua
Normal file
@ -0,0 +1,75 @@
|
||||
local S = minetest.get_translator("eterrain")
|
||||
minetest.register_biome({
|
||||
name = "grasslands",
|
||||
node_top = "mapgen_topsoil",
|
||||
depth_top = 1,
|
||||
node_filler = "mapgen_soil",
|
||||
depth_filler = 3,
|
||||
y_max = 1000,
|
||||
y_min = -3,
|
||||
heat_point = 50,
|
||||
humidity_point = 50,
|
||||
})
|
||||
minetest.register_node("ebiome:oak_trunk_normal", {
|
||||
description = S("Oak tree trunk"),
|
||||
tiles = { "ebiome_oak_trunk_slice_normal.png", "ebiome_oak_trunk_slice_normal.png","ebiome_oak_trunk_normal.png"},
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
groups = {tree = 1, choppy = 2, flammable = 2},
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
minetest.register_node("ebiome:oak_trunk_normal_corner", {
|
||||
description = S("Oak tree trunk corner branch"),
|
||||
tiles = {
|
||||
"ebiome_oak_trunk_normal.png",
|
||||
"ebiome_oak_trunk_slice_normal.png",
|
||||
"ebiome_oak_trunk_corner_normal.png^[transformFX",
|
||||
"ebiome_oak_trunk_corner_normal.png",
|
||||
"ebiome_oak_trunk_normal.png",
|
||||
"ebiome_oak_trunk_slice_normal.png",
|
||||
},
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
groups = {tree = 1, choppy = 2, flammable = 2},
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
minetest.register_node("ebiome:oak_sapling", {
|
||||
description = S("Oak tree sapling"),
|
||||
drawtype = "plantlike",
|
||||
tiles = { "ebiome_oak_sapling.png" },
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1}
|
||||
})
|
||||
minetest.register_node("ebiome:grass", {
|
||||
description = S("Grass"),
|
||||
tiles = {"ebiome_grass.png"},
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.4,
|
||||
waving = 1,
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, attached_node = 1,
|
||||
flora = 1, grass = 1, flammable = 1,
|
||||
fuel = 1
|
||||
},
|
||||
})
|
||||
minetest.register_alias("grass", "ebiome:grass")
|
||||
minetest.register_alias("grassplant", "ebiome:grass")
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"mapgen_topsoil"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.9,
|
||||
biomes = {"grasslands"},
|
||||
y_max = 200,
|
||||
y_min = 1,
|
||||
decoration = "ebiome:grass",
|
||||
})
|
||||
|
||||
|
5
mods/ebiome/config.lua
Normal file
@ -0,0 +1,5 @@
|
||||
ebiome = {
|
||||
blocktypes = {
|
||||
stone = "eterrain:rock"
|
||||
}
|
||||
}
|
2
mods/ebiome/init.lua
Normal file
@ -0,0 +1,2 @@
|
||||
dofile(minetest.get_modpath("ebiome") .. "/biomes/grasslands.lua")
|
||||
|
BIN
mods/ebiome/textures/ebiome_grass.png
Normal file
After Width: | Height: | Size: 914 B |
BIN
mods/ebiome/textures/ebiome_grass.png~
Normal file
After Width: | Height: | Size: 911 B |
BIN
mods/ebiome/textures/ebiome_oak_sapling.png
Normal file
After Width: | Height: | Size: 686 B |
BIN
mods/ebiome/textures/ebiome_oak_trunk_corner_normal.png
Normal file
After Width: | Height: | Size: 808 B |
BIN
mods/ebiome/textures/ebiome_oak_trunk_corner_normal.png~
Normal file
After Width: | Height: | Size: 758 B |
BIN
mods/ebiome/textures/ebiome_oak_trunk_normal.png
Normal file
After Width: | Height: | Size: 699 B |
BIN
mods/ebiome/textures/ebiome_oak_trunk_normal.png~
Normal file
After Width: | Height: | Size: 673 B |
BIN
mods/ebiome/textures/ebiome_oak_trunk_slice_normal.png
Normal file
After Width: | Height: | Size: 737 B |
14
mods/eplayer/init.lua
Normal file
@ -0,0 +1,14 @@
|
||||
minetest.override_item("", {
|
||||
wield_scale = {x=1,y=1,z=2.5},
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.9,
|
||||
max_drop_level = 0,
|
||||
groupcaps = {
|
||||
crumbly = {times={[1]=0.01, [2]=0.01, [3]=0.01}, uses=0, maxlevel=1},
|
||||
snappy = {times={[1]=0.01, [2]=0.01, [3]=0.01}, uses=0, maxlevel=1},
|
||||
choppy = {times={[1]=0.01, [2]=0.01, [3]=0.01}, uses=0, maxlevel=1},
|
||||
oddly_breakable_by_hand = {times={[1]=3.50,[2]=2.00,[3]=0.70}, uses=0}
|
||||
},
|
||||
damage_groups = {fleshy=1},
|
||||
}
|
||||
})
|
1
mods/eterrain/init.lua
Normal file
@ -0,0 +1 @@
|
||||
dofile(minetest.get_modpath("eterrain") .. "/nodes.lua")
|
4
mods/eterrain/mod.conf
Normal file
@ -0,0 +1,4 @@
|
||||
name = eterrain
|
||||
title = Electric game — terrain module
|
||||
description = provides base terrain blocks and generator aliases
|
||||
|
158
mods/eterrain/nodes.lua
Normal file
@ -0,0 +1,158 @@
|
||||
local S = minetest.get_translator("eterrain")
|
||||
|
||||
---------------------------------------------------
|
||||
-- eterrain:rock (rock, stone, mapgen_stone)
|
||||
minetest.register_node("eterrain:rock", {
|
||||
description = S("Barren rock"),
|
||||
tiles={"eterrain_rock.png"},
|
||||
groups={solid=1, rock=1, crumbly=2}
|
||||
})
|
||||
minetest.register_alias("mapgen_stone", "eterrain:rock")
|
||||
minetest.register_alias("rock", "eterrain:rock")
|
||||
minetest.register_alias("stone", "eterrain:rock")
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-- eterrain:soil (mapgen_soil, soil)
|
||||
minetest.register_node("eterrain:soil", {
|
||||
description = S("Topsoil"),
|
||||
tiles={{name="eterrain_soil.png", align_style="world", scale=16}},
|
||||
groups={dirt=1, fertile=2, crumbly=3}
|
||||
})
|
||||
minetest.register_alias("mapgen_soil", "eterrain:soil")
|
||||
minetest.register_alias("soil", "eterrain:soil")
|
||||
|
||||
---------------------------------------------------
|
||||
-- topsoil
|
||||
minetest.register_node("eterrain:topsoil", {
|
||||
description = S("Topsoil"),
|
||||
tiles={
|
||||
{
|
||||
name="eterrain_topsoil_top.png",
|
||||
align_style="world",
|
||||
scale=16
|
||||
},
|
||||
"eterrain_soil.png",
|
||||
{
|
||||
name="eterrain_topsoil_side.png",
|
||||
align_style="world",
|
||||
scale=16
|
||||
}
|
||||
},
|
||||
groups={dirt=1, fertile=2, crumbly=3}
|
||||
})
|
||||
minetest.register_alias("dirt_with_grass", "eterrain:topsoil")
|
||||
minetest.register_alias("topsoil", "eterrain:topsoil")
|
||||
minetest.register_alias("topsoil_with_grass", "eterrain:topsoil")
|
||||
minetest.register_alias("mapgen_topsoil", "eterrain:topsoil")
|
||||
|
||||
---------------------------------------------------
|
||||
-- ocean water
|
||||
minetest.register_node("eterrain:water_ocean", {
|
||||
description = S("Water"),
|
||||
paramtype = "light",
|
||||
tiles = {
|
||||
{
|
||||
name = "eterrain_water_animated.png",
|
||||
backface_culling = false,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 2.0,
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "eterrain_water.png",
|
||||
backface_culling = true,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 2.0,
|
||||
}
|
||||
}
|
||||
},
|
||||
groups = { liquid=3, water=3 },
|
||||
drawtype = "liquid",
|
||||
liquidtype = "source",
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
is_ground_content = false,
|
||||
buildable_to = true,
|
||||
use_texture_alpha = "blend",
|
||||
drowning = 1,
|
||||
drop = "",
|
||||
liquid_alternative_flowing = "eterrain:water_ocean_stream",
|
||||
liquid_alternative_source = "eterrain:water_ocean",
|
||||
post_effect_color = {a = 250, r = 3, g = 6, b = 17},
|
||||
liquid_viscosity = 2,
|
||||
move_resistance = 2,
|
||||
liquid_move_physics = true,
|
||||
waving = 3
|
||||
})
|
||||
minetest.register_alias("mapgen_water_source", "eterrain:water_ocean")
|
||||
minetest.register_alias("water", "eterrain:water_ocean")
|
||||
|
||||
---------------------------------------------------
|
||||
-- ocean water stream
|
||||
minetest.register_node("eterrain:water_ocean_stream", {
|
||||
description = S("Flowing water"),
|
||||
paramtype = "light",
|
||||
tiles = {"eterrain_water.png"},
|
||||
special_tiles = {
|
||||
{
|
||||
name = "eterrain_water_animated.png",
|
||||
backface_culling = false,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 2.0,
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "eterrain_water.png",
|
||||
backface_culling = true,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 2.0,
|
||||
}
|
||||
}
|
||||
},
|
||||
groups = { liquid=3, water=3 },
|
||||
drawtype = "flowingliquid",
|
||||
paramtype2 = "flowingliquid",
|
||||
liquidtype = "flowing",
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
is_ground_content = false,
|
||||
buildable_to = true,
|
||||
use_texture_alpha = "blend",
|
||||
drowning = 1,
|
||||
drop = "",
|
||||
liquid_alternative_flowing = "eterrain:water_ocean_stream",
|
||||
liquid_alternative_source = "eterrain:water_ocean",
|
||||
post_effect_color = {a = 110, r = 3, g = 6, b = 17},
|
||||
liquid_viscosity = 2,
|
||||
move_resistance = 2,
|
||||
liquid_move_physics = false,
|
||||
waving = 3
|
||||
})
|
||||
minetest.register_alias("mapgen_water_source_stream", "eterrain:water_ocean")
|
||||
minetest.register_alias("ocean", "eterrain:water_ocean")
|
||||
|
||||
|
||||
|
||||
---------------------------------------------------
|
||||
-- TODO:river water
|
||||
minetest.register_alias("mapgen_river_water_source", "eterrain:water_ocean_stream")
|
||||
-- TODO:river water stream
|
||||
minetest.register_alias("mapgen_river_water_stream", "eterrain:water_ocean_stream")
|
||||
-- TODO:saltwater
|
||||
-- TODO:saltwater
|
||||
-- TODO: create river water and change mapgen
|
BIN
mods/eterrain/textures/eterrain_rock.png
Normal file
After Width: | Height: | Size: 192 B |
BIN
mods/eterrain/textures/eterrain_soil.png
Normal file
After Width: | Height: | Size: 90 KiB |
BIN
mods/eterrain/textures/eterrain_topsoil_side.png
Normal file
After Width: | Height: | Size: 103 KiB |
BIN
mods/eterrain/textures/eterrain_topsoil_top.png
Normal file
After Width: | Height: | Size: 102 KiB |
BIN
mods/eterrain/textures/eterrain_water.png
Normal file
After Width: | Height: | Size: 898 B |
BIN
mods/eterrain/textures/eterrain_water_animated.png
Normal file
After Width: | Height: | Size: 3.0 KiB |