Compare commits
5 Commits
6110e85a90
...
df0599e2e7
Author | SHA1 | Date |
---|---|---|
ezhh | df0599e2e7 | |
ezhh | 9befd7fbb4 | |
Ezhh | 5707dc4cb5 | |
Ezhh | 4a6be1eb79 | |
ezhh | b06079ed16 |
|
@ -2,4 +2,5 @@ local modpath = minetest.get_modpath("abri").. DIR_DELIM
|
|||
|
||||
dofile(modpath.."nodes.lua")
|
||||
dofile(modpath.."water.lua")
|
||||
dofile(modpath.."mapgen.lua")
|
||||
dofile(modpath.."mapgen.lua")
|
||||
dofile(modpath.."ore.lua")
|
|
@ -1,8 +1,4 @@
|
|||
|
||||
|
||||
-- crash and show error if v6 is used
|
||||
assert(minetest.get_mapgen_setting("mg_name") ~= "v6", "Please choose another Mapgen.")
|
||||
|
||||
-- mapgen aliases
|
||||
minetest.register_alias("mapgen_stone", "abri:stone_black")
|
||||
minetest.register_alias("mapgen_water_source", "abri:blue_water_source")
|
||||
|
@ -37,9 +33,32 @@ for i in ipairs(col_list) do
|
|||
node_river_water = "abri:"..col.."_river_water_source",
|
||||
node_riverbed = "abri:stone",
|
||||
depth_riverbed = 2,
|
||||
y_min = -30000,
|
||||
y_min = -3000,
|
||||
y_max = 31000,
|
||||
heat_point = heat,
|
||||
humidity_point = humidity,
|
||||
})
|
||||
|
||||
minetest.register_biome({
|
||||
name = col.."_deep_land",
|
||||
-- node_dust = "",
|
||||
-- node_top = "abri:dirt_with_"..col.."_grass",
|
||||
-- depth_top = 1,
|
||||
-- node_filler = "abri:dirt",
|
||||
-- depth_filler = 3,
|
||||
node_stone = "abri:stone_"..col,
|
||||
-- node_water_top = "default:ice",
|
||||
-- depth_water_top = 1,
|
||||
node_water = "abri:"..col.."_water_source",
|
||||
node_river_water = "abri:"..col.."_river_water_source",
|
||||
node_riverbed = "abri:stone",
|
||||
depth_riverbed = 2,
|
||||
y_min = -30000,
|
||||
y_max = -3000,
|
||||
heat_point = heat,
|
||||
humidity_point = humidity,
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -40,3 +40,11 @@ for i in ipairs(col_list) do
|
|||
})
|
||||
end
|
||||
|
||||
-- ore
|
||||
minetest.register_node("abri:stone_blue_with_azurite", {
|
||||
description = "Blue Stone with Azurite",
|
||||
tiles = {"abri_stone.png^[colorize:#0000FF:60^abri_ore_azurite.png"},
|
||||
groups = {cracky = 3, stone = 1},
|
||||
drop = 'abri:stone_blue', -- change to azurite
|
||||
-- sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "abri:stone_blue_with_azurite",
|
||||
wherein = "abri:stone_blue",
|
||||
clust_scarcity = 15 * 15 * 15,
|
||||
clust_num_ores = 4,
|
||||
clust_size = 3,
|
||||
y_min = -31000,
|
||||
y_max = -1000,
|
||||
})
|
After Width: | Height: | Size: 2.9 KiB |
|
@ -0,0 +1,39 @@
|
|||
|
||||
Textures:
|
||||
Original torch textures from minetest_game/default:
|
||||
License: CC BY-SA 3.0
|
||||
Recolouring and editing by Shara RedCat
|
||||
|
||||
Torch model:
|
||||
License: CC-BY 3.0
|
||||
Attribution: BlockMen, from https://github.com/BlockMen/torches
|
||||
|
||||
Code:
|
||||
License: MIT (https://opensource.org/licenses/MIT)
|
||||
By Shara RedCat
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Shara RedCat
|
||||
|
||||
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:
|
||||
|
||||
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.
|
|
@ -0,0 +1,3 @@
|
|||
local modpath = minetest.get_modpath("abritorch").. DIR_DELIM
|
||||
|
||||
dofile(modpath.."torches.lua")
|
|
@ -0,0 +1,48 @@
|
|||
# Blender v2.73 (sub 0) OBJ File: 'mt_torch_full_vertices3.blend'
|
||||
# www.blender.org
|
||||
mtllib mt_torch_full_vertices3.mtl
|
||||
o Cube_Cube.001
|
||||
v 0.061653 -0.496733 0.061674
|
||||
v 0.061653 -0.496733 -0.062460
|
||||
v -0.059258 -0.496733 0.061674
|
||||
v -0.059258 -0.496733 -0.062460
|
||||
v -0.059994 -0.497234 0.497315
|
||||
v -0.059994 -0.497234 -0.498102
|
||||
v -0.059994 0.507706 -0.498102
|
||||
v -0.059994 0.507706 0.497315
|
||||
v -0.494900 0.507706 0.061709
|
||||
v -0.494900 -0.497234 0.061709
|
||||
v 0.497295 0.507706 0.061709
|
||||
v 0.497295 -0.497234 0.061709
|
||||
v 0.062686 0.507706 -0.498102
|
||||
v 0.062686 -0.497234 -0.498102
|
||||
v 0.062686 0.507706 0.497315
|
||||
v 0.062686 -0.497234 0.497315
|
||||
v -0.494900 0.507706 -0.063149
|
||||
v -0.494900 -0.497234 -0.063149
|
||||
v 0.497295 0.507706 -0.063149
|
||||
v 0.497295 -0.497234 -0.063149
|
||||
v -0.058217 0.134520 0.060216
|
||||
v -0.058217 0.135872 -0.061813
|
||||
v 0.061944 0.135872 -0.061813
|
||||
v 0.061944 0.134520 0.060216
|
||||
vt 0.000000 1.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.437500 0.500000
|
||||
vt 0.562500 0.500000
|
||||
vt 0.562500 0.625000
|
||||
vt 0.437541 0.625000
|
||||
vt 0.437541 0.000000
|
||||
vt 0.562500 0.000000
|
||||
vt 0.562500 0.125000
|
||||
vt 0.437500 0.125000
|
||||
usemtl None
|
||||
s off
|
||||
f 11/1 9/2 10/3 12/4
|
||||
f 22/5 21/6 24/7 23/8
|
||||
f 17/2 19/1 20/4 18/3
|
||||
f 13/2 15/1 16/4 14/3
|
||||
f 3/9 4/10 2/11 1/12
|
||||
f 8/1 7/2 6/3 5/4
|
|
@ -0,0 +1,48 @@
|
|||
# Blender v2.73 (sub 0) OBJ File: 'mt_torch_full_vertices3.blend'
|
||||
# www.blender.org
|
||||
mtllib torch_wall4.mtl
|
||||
o Cube_Cube.001
|
||||
v 0.061653 -0.554493 -0.328908
|
||||
v 0.061653 -0.442208 -0.381835
|
||||
v -0.059258 -0.554493 -0.328908
|
||||
v -0.059258 -0.442208 -0.381835
|
||||
v -0.059994 -0.948766 -0.143618
|
||||
v -0.059994 -0.048361 -0.568031
|
||||
v -0.059994 0.380112 0.340988
|
||||
v -0.059994 -0.520293 0.765401
|
||||
v -0.494900 -0.126265 0.579672
|
||||
v -0.494900 -0.554738 -0.329346
|
||||
v 0.497295 -0.126265 0.579672
|
||||
v 0.497295 -0.554738 -0.329346
|
||||
v 0.062686 0.380112 0.340988
|
||||
v 0.062686 -0.048361 -0.568031
|
||||
v 0.062686 -0.520293 0.765401
|
||||
v 0.062686 -0.948766 -0.143618
|
||||
v -0.494900 -0.013324 0.526437
|
||||
v -0.494900 -0.441797 -0.382582
|
||||
v 0.497295 -0.013324 0.526437
|
||||
v 0.497295 -0.441797 -0.382582
|
||||
v -0.058217 -0.284029 0.241470
|
||||
v -0.058217 -0.173071 0.190665
|
||||
v 0.061944 -0.173071 0.190665
|
||||
v 0.061944 -0.284029 0.241470
|
||||
vt 0.000000 1.000000
|
||||
vt 1.000000 1.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 0.000000 0.000000
|
||||
vt 0.437500 0.500000
|
||||
vt 0.562500 0.500000
|
||||
vt 0.562500 0.625000
|
||||
vt 0.437541 0.625000
|
||||
vt 0.437541 0.000000
|
||||
vt 0.562500 0.000000
|
||||
vt 0.562500 0.125000
|
||||
vt 0.437500 0.125000
|
||||
usemtl None
|
||||
s off
|
||||
f 11/1 9/2 10/3 12/4
|
||||
f 22/5 21/6 24/7 23/8
|
||||
f 17/2 19/1 20/4 18/3
|
||||
f 13/2 15/1 16/4 14/3
|
||||
f 3/9 4/10 2/11 1/12
|
||||
f 8/1 7/2 6/3 5/4
|
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
|
@ -0,0 +1,121 @@
|
|||
|
||||
local colour_list = {
|
||||
{"black", "Darkened",}, {"blue", "Blue",},
|
||||
{"cyan", "Cyan",}, {"green", "Green",},
|
||||
{"magenta", "Magenta",}, {"orange", "Orange",},
|
||||
{"purple", "Purple",}, {"red", "Red",},
|
||||
{"yellow", "Yellow",}, {"white", "Frosted",},
|
||||
}
|
||||
|
||||
local enable_ceiling = true
|
||||
|
||||
for i in ipairs(colour_list) do
|
||||
local colour = colour_list[i][1]
|
||||
local desc = colour_list[i][2]
|
||||
|
||||
minetest.register_craftitem("abritorch:torch_"..colour, {
|
||||
description = desc.." Torch",
|
||||
inventory_image = "abritorch_torch_on_floor_"..colour..".png",
|
||||
wield_image = "abritorch_torch_on_floor_"..colour..".png",
|
||||
wield_scale = {x = 1, y = 1, z = 1 + 1/16},
|
||||
liquids_pointable = false,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local above = pointed_thing.above
|
||||
local under = pointed_thing.under
|
||||
local wdir = minetest.dir_to_wallmounted({x = under.x - above.x, y = under.y - above.y, z = under.z - above.z})
|
||||
if wdir < 1 and not enable_ceiling then
|
||||
return itemstack
|
||||
end
|
||||
local fakestack = itemstack
|
||||
local retval = false
|
||||
if wdir <= 1 then
|
||||
retval = fakestack:set_name("abritorch:floor_"..colour)
|
||||
else
|
||||
retval = fakestack:set_name("abritorch:wall_"..colour)
|
||||
end
|
||||
if not retval then
|
||||
return itemstack
|
||||
end
|
||||
itemstack, retval = minetest.item_place(fakestack, placer, pointed_thing, param2)
|
||||
itemstack:set_name("abritorch:torch_"..colour)
|
||||
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("abritorch:floor_"..colour, {
|
||||
description = desc.." Torch",
|
||||
inventory_image = "abritorch_torch_on_floor_"..colour..".png",
|
||||
wield_image = "abritorch_torch_on_floor_"..colour..".png",
|
||||
wield_scale = {x = 1, y = 1, z = 1 + 1/16},
|
||||
drawtype = "mesh",
|
||||
mesh = "torch_floor.obj",
|
||||
tiles = {
|
||||
{
|
||||
name = "abritorch_torch_on_floor_animated_"..colour..".png",
|
||||
animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3}
|
||||
}
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
light_source = 13,
|
||||
groups = {choppy=2, dig_immediate=3, flammable=1, not_in_creative_inventory=1, attached_node=1, torch=1},
|
||||
drop = "abritorch:torch_"..colour,
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
wall_top = {-1/16, -2/16, -1/16, 1/16, 0.5, 1/16},
|
||||
wall_bottom = {-1/16, -0.5, -1/16, 1/16, 2/16, 1/16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("abritorch:wall_"..colour, {
|
||||
inventory_image = "abritorch_torch_on_floor_"..colour..".png",
|
||||
wield_image = "abritorch_torch_on_floor_"..colour..".png",
|
||||
wield_scale = {x = 1, y = 1, z = 1 + 1/16},
|
||||
drawtype = "mesh",
|
||||
mesh = "torch_wall.obj",
|
||||
tiles = {
|
||||
{
|
||||
name = "abritorch_torch_on_floor_animated_"..colour..".png",
|
||||
animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3}
|
||||
}
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
light_source = 13,
|
||||
groups = {choppy=2, dig_immediate=3, flammable=1, not_in_creative_inventory=1, attached_node=1, torch=1},
|
||||
drop = "abritorch:torch_"..colour,
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
wall_top = {-0.1, -0.1, -0.1, 0.1, 0.5, 0.1},
|
||||
wall_bottom = {-0.1, -0.5, -0.1, 0.1, 0.1, 0.1},
|
||||
wall_side = {-0.5, -0.3, -0.1, -0.2, 0.3, 0.1},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"abritorch:torch_"..colour},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
action = function(pos)
|
||||
local n = minetest.get_node(pos)
|
||||
local def = minetest.registered_nodes[n.name]
|
||||
if n and def then
|
||||
local wdir = n.param2
|
||||
local node_name = "abritorch:wall_"..colour
|
||||
if wdir < 1 and not enable_ceiling then
|
||||
minetest.remove_node(pos)
|
||||
return
|
||||
elseif wdir <= 1 then
|
||||
node_name = "abritorch:floor_"..colour
|
||||
end
|
||||
minetest.set_node(pos, {name = node_name, param2 = wdir})
|
||||
end
|
||||
end
|
||||
})
|
||||
end
|
||||
|
|
@ -0,0 +1 @@
|
|||
abri
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
minetest.register_node("plants:redgrass", {
|
||||
description = "Red Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.3,
|
||||
tiles = {"plants_redgrass.png"},
|
||||
inventory_image = "plants_redgrass.png",
|
||||
wield_image = "plants_redgrass.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy=3, flora=1, attached_node=1},
|
||||
-- sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = "abri:dirt_with_red_grass",
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.03,
|
||||
biomes = {"red_land"},
|
||||
decoration = "plants:redgrass",
|
||||
height = 1,
|
||||
})
|
|
@ -0,0 +1,37 @@
|
|||
Code:
|
||||
---
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Shara RedCat
|
||||
|
||||
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:
|
||||
|
||||
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.
|
||||
|
||||
|
||||
-----------------------
|
||||
|
||||
|
||||
Textures:
|
||||
---
|
||||
|
||||
(unless otherwise listed, recolouring and editing done by Shara RedCat)
|
||||
|
||||
plants_redgrass.png
|
||||
Based on junglegrass texture in minetest_game (CC BY-SA 3.0).
|
||||
|
After Width: | Height: | Size: 3.6 KiB |