First commit

master
ezhh 2017-11-15 03:07:57 +00:00
commit dde657cbf2
33 changed files with 255 additions and 0 deletions

6
README.md Normal file
View File

@ -0,0 +1,6 @@
Abri
===
The Abri game for Minetest, also known as Colour Test, is currently an unfinished testing ground not intended for use on servers or in singleplayer.
It may or may not reach the point of being a usable game, and currently exists only for the purpose of testing and experimentation.

1
game.conf Normal file
View File

@ -0,0 +1 @@
name = abri

0
minetest.conf Normal file
View File

5
mods/abri/init.lua Normal file
View File

@ -0,0 +1,5 @@
local modpath = minetest.get_modpath("abri").. DIR_DELIM
dofile(modpath.."nodes.lua")
dofile(modpath.."water.lua")
dofile(modpath.."mapgen.lua")

45
mods/abri/license.txt Normal file
View File

@ -0,0 +1,45 @@
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)
abri_water.png
Based on default_water.png by Cisoun from minetest_game (CC BY-SA 3.0).
abri_water_flowing_animated.png and abri_water_source_animated.png
Based on textures by RealBadAngel from minetest_game (CC BY-SA 3.0).
dirt_with_grass textures
Based on original texture in minetest_game (CC BY-SA 3.0).
stone and dirt textures
From minetest_game (CC BY-SA 3.0).

45
mods/abri/mapgen.lua Normal file
View File

@ -0,0 +1,45 @@
-- 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")
minetest.register_alias("mapgen_water_source", "abri:blue_water_source")
minetest.register_alias("mapgen_river_water_source", "abri:blue_water_source")
-- register biomes
local col_list = {
{"black",10,10}, {"purple",20,20}, {"blue",30,30},
{"cyan",40,40}, {"green",50,50}, {"yellow",60,60},
{"orange",70,70}, {"red",80,80}, {"magenta",90,90},
{"white",100,100},
}
for i in ipairs(col_list) do
local col = col_list[i][1]
local heat = col_list[i][2]
local humidity = col_list[i][2]
minetest.register_biome({
name = col.."_land",
-- node_dust = "",
node_top = "abri:dirt_with_"..col.."_grass",
depth_top = 1,
node_filler = "abri:dirt",
depth_filler = 3,
node_stone = "abri:stone",
-- node_water_top = "default:ice",
-- depth_water_top = 1,
node_water = "abri:"..col.."_water_source",
-- node_river_water = "",
node_riverbed = "abri:stone",
depth_riverbed = 2,
y_min = -30000,
y_max = 31000,
heat_point = heat,
humidity_point = humidity,
})
end

41
mods/abri/nodes.lua Normal file
View File

@ -0,0 +1,41 @@
minetest.register_node("abri:stone", {
description = "Stone",
tiles = {"abri_stone.png"},
groups = {cracky = 3, stone = 1},
drop = 'abri:stone',
legacy_mineral = true,
-- sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("abri:dirt", {
description = "Dirt",
tiles = {"abri_dirt.png"},
groups = {crumbly = 3, soil = 1},
-- sounds = default.node_sound_dirt_defaults(),
})
local col_list = {
{"black", "292421"}, {"purple", "800080"}, {"blue", "0000FF"},
{"cyan", "00FFFF"}, {"green", "00FF00"}, {"yellow", "FFFF00"},
{"orange", "FF6103"}, {"red", "FF0000"}, {"magenta", "FF00FF"},
{"white", "FFFFFF"},
}
for i in ipairs(col_list) do
local col = col_list[i][1]
local code = col_list[i][2]
minetest.register_node("abri:dirt_with_"..col.."_grass", {
description = "Dirt with "..col.." Grass",
tiles = {"abri_grass_"..col..".png", "abri_dirt.png",
{name = "abri_dirt.png^abri_grass_side_"..col..".png",
tileable_vertical = false}},
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
drop = 'abri:dirt',
-- sounds = default.node_sound_dirt_defaults({
-- footstep = {name = "default_grass_footstep", gain = 0.25},
-- }),
})
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

112
mods/abri/water.lua Normal file
View File

@ -0,0 +1,112 @@
local source_list = {
{"black", "Darkened", "292421", 40, 36, 33},
{"blue", "Blue", "0000FF", 0, 0, 255},
{"cyan", "Cyan", "00FFFF", 0, 255, 255},
{"green", "Green", "00FF00", 0, 255, 0},
{"magenta", "Magenta", "FF00FF", 255, 0, 255},
{"orange", "Orange", "FF6103", 255, 97, 3},
{"purple", "Purple", "800080", 128, 0, 128},
{"red", "Red", "FF0000", 255, 0, 0},
{"yellow", "Yellow", "FFFF00", 255, 255, 0},
{"white", "Frosted", "FFFFFF", 255, 255, 255}
}
for i in ipairs(source_list) do
local name = source_list[i][1]
local description = source_list[i][2]
local colour = source_list[i][3]
local red = source_list[i][4]
local green = source_list[i][5]
local blue = source_list[i][6]
minetest.register_node("abri:"..name.."_water_source", {
description = description.." Water Source",
drawtype = "liquid",
tiles = {
{
name = "abri_water_source_animated.png^[colorize:#"..colour..":70",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
},
},
special_tiles = {
{
name = "abri_water_source_animated.png^[colorize:#"..colour..":70",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
backface_culling = false,
},
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
liquidtype = "source",
liquid_alternative_flowing = "abri:"..name.."_water_flowing",
liquid_alternative_source = "abri:"..name.."_water_source",
liquid_viscosity = 1,
post_effect_color = {a = 50, r = red, g = green, b = blue},
groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1},
-- sounds = default.node_sound_water_defaults(),
})
minetest.register_node("abri:"..name.."_water_flowing", {
description = description.." Flowing Water",
drawtype = "flowingliquid",
tiles = {"abri_water.png^[colorize:#"..colour},
special_tiles = {
{
name = "abri_water_flowing_animated.png^[colorize:#"..colour..":70",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8,
},
},
{
name = "abri_water_flowing_animated.png^[colorize:#"..colour..":70",
backface_culling = true,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8,
},
},
},
alpha = 160,
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
liquidtype = "flowing",
liquid_alternative_flowing = "abri:"..name.."_water_flowing",
liquid_alternative_source = "abri:"..name.."_water_source",
liquid_viscosity = 1,
post_effect_color = {a = 50, r = red, g = green, b = blue},
groups = {water = 3, liquid = 3, puts_out_fire = 1,
not_in_creative_inventory = 1, cools_lava = 1},
-- sounds = default.node_sound_water_defaults(),
})
end