Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add our environments #7

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ AppDir

## Non-static Minetest directories or symlinks to these
/bin/
/games/*
!/games/devtest/
/games/devtest/mods/soundstuff/sounds/gitignored_sounds/*
!/games/devtest/mods/soundstuff/sounds/gitignored_sounds/custom_sounds_here.txt
Expand Down Expand Up @@ -126,3 +125,7 @@ lib/irrlichtmt

# Generated mod storage database
client/mod_storage.sqlite
run
/games/globo/baloo.log
/games/globo/history.md
/games/globo/toc.md
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ else()
string(CONCAT explanation_msg
"The Minetest team has forked Irrlicht to make their own customizations. "
"It can be found here: https://github.com/minetest/irrlicht\n"
"For example use: git clone --depth=1 https://github.com/minetest/irrlicht lib/irrlichtmt\n")
/ "For example use: git clone --depth=1 --branch=$(cat misc/irrlichtmt_tag.txt) https://github.com/minetest/irrlicht lib/irrlichtmt\n")
if(BUILD_CLIENT)
message(FATAL_ERROR "IrrlichtMt is required to build the client, but it was not found.\n${explanation_msg}")
endif()
Expand Down
2 changes: 1 addition & 1 deletion doc/compiling/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Download source (this is the URL to the latest of source repository, which might

Download IrrlichtMt to `lib/irrlichtmt`, it will be used to satisfy the IrrlichtMt dependency that way:

git clone --depth 1 https://github.com/minetest/irrlicht.git lib/irrlichtmt
git clone --depth 1 --branch $(cat misc/irrlichtmt_tag.txt) https://github.com/minetest/irrlicht.git lib/irrlichtmt

Download source, without using Git:

Expand Down
2 changes: 1 addition & 1 deletion doc/compiling/macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cd minetest
Download Minetest's fork of Irrlicht:

```
git clone --depth 1 https://github.com/minetest/irrlicht.git lib/irrlichtmt
git clone --depth 1 --branch $(cat misc/irrlichtmt_tag.txt) https://github.com/minetest/irrlicht.git lib/irrlichtmt
```

## Build
Expand Down
43 changes: 43 additions & 0 deletions games/boad/.luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
unused_args = false
allow_defined_top = true
max_string_line_length = false
max_line_length = false

ignore = {
"131", -- Unused global variable
"211", -- Unused local variable
"231", -- Local variable never accessed
"311", -- Value assigned to a local variable is unused
"412", -- Redefining an argument
"421", -- Shadowing a local variable
"431", -- Shadowing an upvalue
"432", -- Shadowing an upvalue argument
"611", -- Line contains only whitespace
}

read_globals = {
"ItemStack",
"INIT",
"DIR_DELIM",
"dump", "dump2",
"fgettext", "fgettext_ne",
"vector",
"VoxelArea",
"profiler",
"Settings",
"check",
"PseudoRandom",

string = {fields = {"split", "trim"}},
table = {fields = {"copy", "getn", "indexof", "insert_all"}},
math = {fields = {"hypot", "round"}},
}

globals = {
"aborted",
"minetest",
"core",
os = { fields = { "tempfolder" } },
"_",
}

6 changes: 6 additions & 0 deletions games/boad/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# BOAD

Simple small flat world.
The agent needs food and water or it will die.
It can get food from apples and water from the snow blocks.

3 changes: 3 additions & 0 deletions games/boad/game.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
title = BOAD Training Environment
description = Training environment for simple agents of eboa level capabilities.

Binary file added games/boad/menu/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/boad/menu/header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/boad/menu/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
174 changes: 174 additions & 0 deletions games/boad/mods/basenodes/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
local WATER_ALPHA = "^[opacity:" .. 160
local WATER_VISC = 1
local LAVA_VISC = 7



minetest.register_node("basenodes:dirt_with_grass", {
description = "Dirt with Grass",
tiles ={"default_grass.png",
-- a little dot on the bottom to distinguish it from dirt
"default_dirt.png^basenodes_dirt_with_grass_bottom.png",
{name = "default_dirt.png^default_grass_side.png",
tileable_vertical = false}},
groups = {crumbly=3, soil=1},
})


minetest.register_node("basenodes:dirt", {
description = "Dirt",
tiles ={"default_dirt.png"},
groups = {crumbly=3, soil=1},
})

minetest.register_node("basenodes:stone", {
description = "Stone",
tiles = {"default_stone.png"},
groups = {cracky=3},
})

minetest.register_node("basenodes:water_source", {
description = "Water Source".."\n"..
"Swimmable, spreading, renewable liquid".."\n"..
"Drowning damage: 1",
drawtype = "liquid",
waving = 3,
tiles = {"default_water.png"..WATER_ALPHA},
special_tiles = {
{name = "default_water.png"..WATER_ALPHA, backface_culling = false},
{name = "default_water.png"..WATER_ALPHA, backface_culling = true},
},
use_texture_alpha = "blend",
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drowning = 1,
liquidtype = "source",
liquid_alternative_flowing = "basenodes:water_flowing",
liquid_alternative_source = "basenodes:water_source",
liquid_viscosity = WATER_VISC,
post_effect_color = {a = 64, r = 100, g = 100, b = 200},
post_effect_color_shaded = true,
groups = {water = 3, liquid = 3},
})

minetest.register_node("basenodes:water_flowing", {
description = "Flowing Water".."\n"..
"Swimmable, spreading, renewable liquid".."\n"..
"Drowning damage: 1",
drawtype = "flowingliquid",
waving = 3,
tiles = {"default_water_flowing.png"},
special_tiles = {
{name = "default_water_flowing.png"..WATER_ALPHA,
backface_culling = false},
{name = "default_water_flowing.png"..WATER_ALPHA,
backface_culling = false},
},
use_texture_alpha = "blend",
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drowning = 1,
liquidtype = "flowing",
liquid_alternative_flowing = "basenodes:water_flowing",
liquid_alternative_source = "basenodes:water_source",
liquid_viscosity = WATER_VISC,
post_effect_color = {a = 64, r = 100, g = 100, b = 200},
post_effect_color_shaded = true,
groups = {water = 3, liquid = 3},
})

minetest.register_node("basenodes:river_water_source", {
description = "River Water Source".."\n"..
"Swimmable, spreading, non-renewable liquid".."\n"..
"Drowning damage: 1",
drawtype = "liquid",
waving = 3,
tiles = { "default_river_water.png"..WATER_ALPHA },
special_tiles = {
{name = "default_river_water.png"..WATER_ALPHA, backface_culling = false},
{name = "default_river_water.png"..WATER_ALPHA, backface_culling = true},
},
use_texture_alpha = "blend",
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drowning = 1,
liquidtype = "source",
liquid_alternative_flowing = "basenodes:river_water_flowing",
liquid_alternative_source = "basenodes:river_water_source",
liquid_viscosity = 1,
liquid_renewable = false,
liquid_range = 2,
post_effect_color = {a = 103, r = 30, g = 76, b = 90},
post_effect_color_shaded = true,
groups = {water = 3, liquid = 3, },
})

minetest.register_node("basenodes:river_water_flowing", {
description = "Flowing River Water".."\n"..
"Swimmable, spreading, non-renewable liquid".."\n"..
"Drowning damage: 1",
drawtype = "flowingliquid",
waving = 3,
tiles = {"default_river_water_flowing.png"..WATER_ALPHA},
special_tiles = {
{name = "default_river_water_flowing.png"..WATER_ALPHA,
backface_culling = false},
{name = "default_river_water_flowing.png"..WATER_ALPHA,
backface_culling = false},
},
use_texture_alpha = "blend",
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drowning = 1,
liquidtype = "flowing",
liquid_alternative_flowing = "basenodes:river_water_flowing",
liquid_alternative_source = "basenodes:river_water_source",
liquid_viscosity = 1,
liquid_renewable = false,
liquid_range = 2,
post_effect_color = {a = 103, r = 30, g = 76, b = 90},
post_effect_color_shaded = true,
groups = {water = 3, liquid = 3, },
})

minetest.register_node("basenodes:apple", {
description = "Apple".."\n"..
"Punch: Eat (+2)",
drawtype = "plantlike",
tiles ={"default_apple.png"},
inventory_image = "default_apple.png",
paramtype = "light",
is_ground_content = false,
sunlight_propagates = true,
walkable = false,
groups = {dig_immediate=3},

-- Make eatable because why not?
on_use = minetest.item_eat(2),
})

minetest.register_node("basenodes:snowblock", {
description = "Snow Block",
tiles ={"default_snow.png"},
groups = {crumbly=3},
})


2 changes: 2 additions & 0 deletions games/boad/mods/basenodes/mod.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
name = basenodes
description = Contains basic nodes for mapgen
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/boad/mods/basenodes/textures/default_apple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/boad/mods/basenodes/textures/default_dirt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/boad/mods/basenodes/textures/default_grass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/boad/mods/basenodes/textures/default_ice.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/boad/mods/basenodes/textures/default_lava.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added games/boad/mods/basenodes/textures/default_sand.png
Binary file added games/boad/mods/basenodes/textures/default_snow.png
Binary file added games/boad/mods/basenodes/textures/default_stone.png
Binary file added games/boad/mods/basenodes/textures/default_tree.png
Binary file added games/boad/mods/basenodes/textures/default_water.png
7 changes: 7 additions & 0 deletions games/boad/mods/basenodes/textures/info.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

The dirt_with_grass folder is for testing loading textures from subfolders.
If it works correctly, the default_grass_side.png file in the folder is used but
default_grass.png is not overwritten by the file in the folder.

default_dirt.png should be overwritten by the default_dirt.png in the unittests
mod which depends on basenodes.
Loading