1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-11-20 16:40:22 +01:00

Merge branch 'master' into customdoormodel

This commit is contained in:
An0n3m0us 2019-09-26 19:00:31 +01:00 committed by GitHub
commit f3e1834fe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
194 changed files with 3249 additions and 1070 deletions

View File

@ -1,12 +1,11 @@
language: generic
sudo: false
addons:
apt:
packages:
- luarocks
before_install:
- luarocks install --local luacheck
script:
- $HOME/.luarocks/bin/luacheck --no-color ./mods
script:
- $HOME/.luarocks/bin/luacheck ./mods
notifications:
email: false

34
README.md Normal file
View File

@ -0,0 +1,34 @@
# Minetest Game
The default game bundled in the Minetest engine.
For further information, check [this forum topic](https://forum.minetest.net/viewtopic.php?f=15&t=9724).
Also see the [Minetest Wiki](https://wiki.minetest.net/Subgames/Minetest_Game) for more information.
## Installation
- Unzip the archive, rename the folder to minetest_game and
place it in .. minetest/games/
- GNU/Linux: If you use a system-wide installation place
it in ~/.minetest/games/.
The Minetest engine can be found at
[GitHub](https://github.com/minetest/minetest).
For further information or help, see:
https://wiki.minetest.net/Installing_Mods
## Compatibility
The Minetest Game GitHub master HEAD is generally compatible with the GitHub
master HEAD of the Minetest engine.
Additionally, when the Minetest engine is tagged to be a certain version (e.g.
0.4.10), Minetest Game is tagged with the version too.
When stable releases are made, Minetest Game and the Minetest engine is packaged and made available at
https://minetest.net/downloads/
## Licensing
See `LICENSE.txt`

View File

@ -1,28 +0,0 @@
Minetest Game [minetest_game]
=============================
The main game for the Minetest engine
=====================================
To use this game with the Minetest engine, insert this repository as
/games/minetest_game
The Minetest engine can be found in:
https://github.com/minetest/minetest/
Compatibility
--------------
The Minetest Game github master HEAD is generally compatible with the github
master HEAD of the Minetest engine.
Additionally, when the Minetest engine is tagged to be a certain version (eg.
0.4.10), Minetest Game is tagged with the version too.
When stable releases are made, Minetest Game is packaged and made available in
http://minetest.net/downloads/
and in case the repository has grown too much, it may be reset. In that sense,
this is not a "real" git repository. (Package maintainers please note!)
Licensing
---------
See LICENSE.txt

View File

@ -281,7 +281,7 @@ The mod that places chests with loot in dungeons provides an API to register add
name = "item:name",
chance = 0.5,
-- ^ chance value from 0.0 to 1.0 that the item will appear in the chest when chosen
-- due to an extra step in the selection process, 0.5 does not(!) mean that
-- Due to an extra step in the selection process, 0.5 does not(!) mean that
-- on average every second chest will have this item
count = {1, 4},
-- ^ table with minimum and maximum amounts of this item
@ -291,7 +291,8 @@ The mod that places chests with loot in dungeons provides an API to register add
-- optional, defaults to no height restrictions
types = {"desert"},
-- ^ table with types of dungeons this item can be found in
-- supported types: "normal" (the cobble/mossycobble one), "sandstone", "desert"
-- supported types: "normal" (the cobble/mossycobble one), "sandstone"
-- "desert" and "ice"
-- optional, defaults to no type restrictions
@ -363,6 +364,8 @@ The farming API allows you to easily register plants and hoes.
{
description = "", -- Description of seed item
harvest_description = "", -- Description of harvest item
-- (optional, derived automatically if not provided)
inventory_image = "unknown_item.png", -- Image to be used as seed's wield- and inventory image
steps = 8, -- How many steps the plant has to grow, until it can be harvested
-- ^ Always provide a plant texture for each step, format: modname_plantname_i.png (i = stepnumber)
@ -730,27 +733,29 @@ delivered with Minetest Game, to keep them compatible with other mods.
* `sounds`: See [#Default sounds]
* `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition]
`stairs.register_stair_inner(subname, recipeitem, groups, images, description, sounds, worldaligntex)`
`stairs.register_stair_inner(subname, recipeitem, groups, images, description, sounds, worldaligntex, full_description)`
* Registers an inner corner stair
* `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_inner_subname"
* `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil`
* `groups`: See [Known damage and digging time defining groups]
* `images`: See [Tile definition]
* `description`: Used for the description field in the stair's definition
* `description`: Used for the description field in the stair's definition with "Inner" prepended
* `sounds`: See [#Default sounds]
* `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition]
* `full_description`: Overrides the description, bypassing string concatenation. This is useful for translation. (optional)
`stairs.register_stair_outer(subname, recipeitem, groups, images, description, sounds, worldaligntex)`
`stairs.register_stair_outer(subname, recipeitem, groups, images, description, sounds, worldaligntex, full_description)`
* Registers an outer corner stair
* `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_outer_subname"
* `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil`
* `groups`: See [Known damage and digging time defining groups]
* `images`: See [Tile definition]
* `description`: Used for the description field in the stair's definition
* `description`: Used for the description field in the stair's definition with "Outer" prepended
* `sounds`: See [#Default sounds]
* `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition]
* `full_description`: Overrides the description, bypassing string concatenation. This is useful for translation. (optional)
`stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab, sounds, worldaligntex)`

View File

@ -60,7 +60,14 @@ default:torch 99,default:cobble 99
# Default value is true.
#enable_bed_night_skip = true
# If enabled, fences and walls cannot be jumped over.
#enable_fence_tall = false
# Whether the engine's spawn search, which does not check for a suitable
# starting biome, is used.
# Default value is false.
#engine_spawn = false
# Whether river water source nodes create flowing sounds.
# Helps rivers create more sound, especially on level sections.
#river_source_sounds = false

View File

@ -1,7 +1,12 @@
-- beds/beds.lua
-- support for MT game translation.
local S = beds.get_translator
-- Fancy shaped bed
beds.register_bed("beds:fancy_bed", {
description = "Fancy Bed",
description = S("Fancy Bed"),
inventory_image = "beds_bed_fancy.png",
wield_image = "beds_bed_fancy.png",
tiles = {
@ -52,7 +57,7 @@ beds.register_bed("beds:fancy_bed", {
-- Simple shaped bed
beds.register_bed("beds:bed", {
description = "Simple Bed",
description = S("Simple Bed"),
inventory_image = "beds_bed.png",
wield_image = "beds_bed.png",
tiles = {

View File

@ -1,2 +0,0 @@
default
wool

View File

@ -5,6 +5,9 @@ if enable_respawn == nil then
enable_respawn = true
end
-- support for MT game translation.
local S = beds.get_translator
-- Helper functions
local function get_look_yaw(pos)
@ -108,17 +111,19 @@ end
local function update_formspecs(finished)
local ges = #minetest.get_connected_players()
local form_n
local player_in_bed = get_player_in_bed_count()
local is_majority = (ges / 2) < player_in_bed
local form_n
local esc = minetest.formspec_escape
if finished then
form_n = beds.formspec .. "label[2.7,9; Good morning.]"
form_n = beds.formspec .. "label[2.7,9;" .. esc(S("Good morning.")) .. "]"
else
form_n = beds.formspec .. "label[2.2,9;" .. tostring(player_in_bed) ..
" of " .. tostring(ges) .. " players are in bed]"
form_n = beds.formspec .. "label[2.2,9;" ..
esc(S("@1 of @2 players are in bed", player_in_bed, ges)) .. "]"
if is_majority and is_night_skip_enabled() then
form_n = form_n .. "button_exit[2,6;4,0.75;force;Force night skip]"
form_n = form_n .. "button_exit[2,6;4,0.75;force;" ..
esc(S("Force night skip")) .. "]"
end
end
@ -150,7 +155,7 @@ function beds.on_rightclick(pos, player)
if beds.player[name] then
lay_down(player, nil, nil, false)
end
minetest.chat_send_player(name, "You can only sleep at night.")
minetest.chat_send_player(name, S("You can only sleep at night."))
return
end

View File

@ -1,13 +1,20 @@
-- beds/init.lua
-- Load support for MT game translation.
local S = minetest.get_translator("beds")
beds = {}
beds.player = {}
beds.bed_position = {}
beds.pos = {}
beds.spawn = {}
beds.get_translator = S
beds.formspec = "size[8,11;true]" ..
"no_prepend[]" ..
"bgcolor[#080808BB;true]" ..
"button_exit[2,10;4,0.75;leave;Leave Bed]"
"button_exit[2,10;4,0.75;leave;" .. S("Leave Bed") .. "]"
local modpath = minetest.get_modpath("beds")

View File

@ -0,0 +1,8 @@
# textdomain: beds
Fancy Bed=Schickes Bett
Simple Bed=Schlichtes Bett
Leave Bed=Bett verlassen
Good morning.=Guten Morgen.
@1 of @2 players are in bed=@1 von @2 Spielern sind im Bett
Force night skip=Überspringen der Nacht erzwingen
You can only sleep at night.=Sie können nur nachts schlafen.

View File

@ -0,0 +1,8 @@
# textdomain: beds
Fancy Bed=
Simple Bed=
Leave Bed=
Good morning.=
@1 of @2 players are in bed=
Force night skip=
You can only sleep at night.=

3
mods/beds/mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = beds
description = Minetest Game mod: beds
depends = default, wool

View File

@ -1,2 +0,0 @@
default
creative?

View File

@ -1,7 +1,12 @@
-- binoculars/init.lua
-- Mod global namespace
binoculars = {}
-- Load support for MT game translation.
local S = minetest.get_translator("binoculars")
-- Detect creative mod
local creative_mod = minetest.get_modpath("creative")
@ -54,7 +59,7 @@ minetest.after(4.7, cyclic_update)
-- Binoculars item
minetest.register_craftitem("binoculars:binoculars", {
description = "Binoculars\nUse with 'Zoom' key",
description = S("Binoculars") .. "\n" .. S("Use with 'Zoom' key"),
inventory_image = "binoculars_binoculars.png",
stack_max = 1,

View File

@ -0,0 +1,3 @@
# textdomain: binoculars
Binoculars=Fernglas
Use with 'Zoom' key=Mit „Zoom“-Taste benutzen

View File

@ -0,0 +1,3 @@
# textdomain: binoculars
Binoculars=
Use with 'Zoom' key=

4
mods/binoculars/mod.conf Normal file
View File

@ -0,0 +1,4 @@
name = binoculars
description = Minetest Game mod: binoculars
depends = default
optional_depends = creative

View File

@ -1,2 +0,0 @@
default
player_api

View File

@ -1,3 +1,8 @@
-- boats/init.lua
-- Load support for MT game translation.
local S = minetest.get_translator("boats")
--
-- Helper functions
--
@ -149,13 +154,13 @@ function boat.on_step(self, dtime)
if ctrl.up and ctrl.down then
if not self.auto then
self.auto = true
minetest.chat_send_player(self.driver, "[boats] Cruise on")
minetest.chat_send_player(self.driver, S("Boat cruise mode on"))
end
elseif ctrl.down then
self.v = self.v - dtime * 1.8
if self.auto then
self.auto = false
minetest.chat_send_player(self.driver, "[boats] Cruise off")
minetest.chat_send_player(self.driver, S("Boat cruise mode off"))
end
elseif ctrl.up or self.auto then
self.v = self.v + dtime * 1.8
@ -242,7 +247,7 @@ minetest.register_entity("boats:boat", boat)
minetest.register_craftitem("boats:boat", {
description = "Boat",
description = S("Boat"),
inventory_image = "boats_inventory.png",
wield_image = "boats_wield.png",
wield_scale = {x = 2, y = 2, z = 1},

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=Schneller Bootsmodus an
Boat cruise mode off=Schneller Bootsmodus aus
Boat=Boot

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=
Boat cruise mode off=
Boat=

3
mods/boats/mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = boats
description = Minetest Game mod: boats
depends = default, player_api

View File

@ -1 +0,0 @@
default

View File

@ -1,6 +1,11 @@
-- bones/init.lua
-- Minetest 0.4 mod: bones
-- See README.txt for licensing and other information.
-- Load support for MT game translation.
local S = minetest.get_translator("bones")
bones = {}
local function is_owner(pos, name)
@ -24,7 +29,7 @@ local share_bones_time = tonumber(minetest.settings:get("share_bones_time")) or
local share_bones_time_early = tonumber(minetest.settings:get("share_bones_time_early")) or share_bones_time / 4
minetest.register_node("bones:bones", {
description = "Bones",
description = S("Bones"),
tiles = {
"bones_top.png^[transform2",
"bones_bottom.png",
@ -116,7 +121,7 @@ minetest.register_node("bones:bones", {
local meta = minetest.get_meta(pos)
local time = meta:get_int("time") + elapsed
if time >= share_bones_time then
meta:set_string("infotext", meta:get_string("owner") .. "'s old bones")
meta:set_string("infotext", S("@1's old bones", meta:get_string("owner")))
meta:set_string("owner", "")
else
meta:set_int("time", time)
@ -194,7 +199,7 @@ minetest.register_on_dieplayer(function(player)
minetest.log("action", player_name .. " dies at " .. pos_string ..
". No bones placed")
if bones_position_message then
minetest.chat_send_player(player_name, player_name .. " died at " .. pos_string .. ".")
minetest.chat_send_player(player_name, S("@1 died at @2.", player_name, pos_string))
end
return
end
@ -204,7 +209,7 @@ minetest.register_on_dieplayer(function(player)
minetest.log("action", player_name .. " dies at " .. pos_string ..
". No bones placed")
if bones_position_message then
minetest.chat_send_player(player_name, player_name .. " died at " .. pos_string .. ".")
minetest.chat_send_player(player_name, S("@1 died at @2.", player_name, pos_string))
end
return
end
@ -230,8 +235,7 @@ minetest.register_on_dieplayer(function(player)
minetest.log("action", player_name .. " dies at " .. pos_string ..
". Inventory dropped")
if bones_position_message then
minetest.chat_send_player(player_name, player_name .. " died at " .. pos_string ..
", and dropped their inventory.")
minetest.chat_send_player(player_name, S("@1 died at @2, and dropped their inventory.", player_name, pos_string))
end
return
end
@ -242,8 +246,7 @@ minetest.register_on_dieplayer(function(player)
minetest.log("action", player_name .. " dies at " .. pos_string ..
". Bones placed")
if bones_position_message then
minetest.chat_send_player(player_name, player_name .. " died at " .. pos_string ..
", and bones were placed.")
minetest.chat_send_player(player_name, S("@1 died at @2, and bones were placed.", player_name, pos_string))
end
local meta = minetest.get_meta(pos)
@ -266,7 +269,7 @@ minetest.register_on_dieplayer(function(player)
meta:set_string("owner", player_name)
if share_bones_time ~= 0 then
meta:set_string("infotext", player_name .. "'s fresh bones")
meta:set_string("infotext", S("@1's fresh bones", player_name))
if share_bones_time_early == 0 or not minetest.is_protected(pos, player_name) then
meta:set_int("time", 0)
@ -276,6 +279,6 @@ minetest.register_on_dieplayer(function(player)
minetest.get_node_timer(pos):start(10)
else
meta:set_string("infotext", player_name.."'s bones")
meta:set_string("infotext", S("@1's bones", player_name))
end
end)

View File

@ -0,0 +1,8 @@
# textdomain: bones
Bones=Knochen
@1's old bones=Alte Knochen von @1
@1 died at @2.=@1 starb bei @2.
@1 died at @2, and dropped their inventory.=@1 starb bei @2 und ließ das Inventar fallen.
@1 died at @2, and bones were placed.=@1 starb bei @2 und Knochen wurden platziert.
@1's fresh bones=Frische Knochen von @1
@1's bones=Knochen von @1

View File

@ -0,0 +1,8 @@
# textdomain: bones
Bones=
@1's old bones=
@1 died at @2.=
@1 died at @2, and dropped their inventory.=
@1 died at @2, and bones were placed.=
@1's fresh bones=
@1's bones=

3
mods/bones/mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = bones
description = Minetest Game mod: bones
depends = default

View File

@ -1,2 +0,0 @@
default

View File

@ -1,15 +1,19 @@
-- Minetest 0.4 mod: bucket
-- See README.txt for licensing and other information.
-- Load support for MT game translation.
local S = minetest.get_translator("bucket")
minetest.register_alias("bucket", "bucket:bucket_empty")
minetest.register_alias("bucket_water", "bucket:bucket_water")
minetest.register_alias("bucket_lava", "bucket:bucket_lava")
minetest.register_craft({
output = 'bucket:bucket_empty 1',
output = "bucket:bucket_empty 1",
recipe = {
{'default:steel_ingot', '', 'default:steel_ingot'},
{'', 'default:steel_ingot', ''},
{"default:steel_ingot", "", "default:steel_ingot"},
{"", "default:steel_ingot", ""},
}
})
@ -111,9 +115,9 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
end
minetest.register_craftitem("bucket:bucket_empty", {
description = "Empty Bucket",
description = S("Empty Bucket"),
inventory_image = "bucket.png",
stack_max = 99,
groups = {tool = 1},
liquids_pointable = true,
on_use = function(itemstack, user, pointed_thing)
if pointed_thing.type == "object" then
@ -185,8 +189,8 @@ bucket.register_liquid(
"default:water_flowing",
"bucket:bucket_water",
"bucket_water.png",
"Water Bucket",
{water_bucket = 1}
S("Water Bucket"),
{tool = 1, water_bucket = 1}
)
-- River water source is 'liquid_renewable = false' to avoid horizontal spread
@ -200,8 +204,8 @@ bucket.register_liquid(
"default:river_water_flowing",
"bucket:bucket_river_water",
"bucket_river_water.png",
"River Water Bucket",
{water_bucket = 1},
S("River Water Bucket"),
{tool = 1, water_bucket = 1},
true
)
@ -210,7 +214,8 @@ bucket.register_liquid(
"default:lava_flowing",
"bucket:bucket_lava",
"bucket_lava.png",
"Lava Bucket"
S("Lava Bucket"),
{tool = 1}
)
minetest.register_craft({

View File

@ -0,0 +1,5 @@
# textdomain: bucket
Empty Bucket=Leerer Eimer
Water Bucket=Wassereimer
River Water Bucket=Flusswassereimer
Lava Bucket=Lavaeimer

View File

@ -0,0 +1,5 @@
# textdomain: bucket
Empty Bucket=
Water Bucket=
River Water Bucket=
Lava Bucket=

3
mods/bucket/mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = bucket
description = Minetest Game mod: bucket
depends = default

View File

@ -1,2 +0,0 @@
default
flowers

View File

@ -1,8 +1,13 @@
-- butterflies/init.lua
-- Load support for MT game translation.
local S = minetest.get_translator("butterflies")
-- register butterflies
local butter_list = {
{"white", "White"},
{"red", "Red"},
{"violet", "Violet"}
{"white", S("White Butterfly")},
{"red", S("Red Butterfly")},
{"violet", S("Violet Butterfly")}
}
for i in ipairs (butter_list) do
@ -10,7 +15,7 @@ for i in ipairs (butter_list) do
local desc = butter_list[i][2]
minetest.register_node("butterflies:butterfly_"..name, {
description = desc.." Butterfly",
description = desc,
drawtype = "plantlike",
tiles = {{
name = "butterflies_butterfly_"..name.."_animated.png",
@ -56,10 +61,9 @@ for i in ipairs (butter_list) do
})
minetest.register_node("butterflies:hidden_butterfly_"..name, {
description = "Hidden "..desc.." Butterfly",
drawtype = "airlike",
inventory_image = "insects_butterfly_"..name..".png",
wield_image = "insects_butterfly_"..name..".png",
inventory_image = "butterflies_butterfly_"..name..".png",
wield_image = "butterflies_butterfly_"..name..".png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,

View File

@ -0,0 +1,4 @@
# textdomain: butterflies
White Butterfly=Weißer Schmetterling
Red Butterfly=Roter Schmetterling
Violet Butterfly=Violetter Schmetterling

View File

@ -0,0 +1,4 @@
# textdomain: butterflies
White Butterfly=
Red Butterfly=
Violet Butterfly=

View File

@ -0,0 +1,3 @@
name = butterflies
description = Minetest Game mod: Butterflies
depends = default, flowers

View File

@ -1,3 +1,8 @@
-- carts/cart_entity.lua
-- support for MT game translation.
local S = carts.get_translator
local cart_entity = {
initial_properties = {
physical = false, -- otherwise going uphill breaks
@ -383,7 +388,7 @@ end
minetest.register_entity("carts:cart", cart_entity)
minetest.register_craftitem("carts:cart", {
description = "Cart (Sneak+Click to pick up)",
description = S("Cart") .. "\n" .. S("(Sneak+Click to pick up)"),
inventory_image = minetest.inventorycube("carts_cart_top.png", "carts_cart_side.png", "carts_cart_side.png"),
wield_image = "carts_cart_side.png",
on_place = function(itemstack, placer, pointed_thing)

View File

@ -1,2 +0,0 @@
default
player_api

View File

@ -1,7 +1,12 @@
-- carts/init.lua
-- Load support for MT game translation.
local S = minetest.get_translator("carts")
carts = {}
carts.modpath = minetest.get_modpath("carts")
carts.railparams = {}
carts.get_translator = S
-- Maximal speed of the cart in m/s (min = -1)
carts.speed_max = 7

View File

@ -0,0 +1,6 @@
# textdomain: carts
Cart=Lore
(Sneak+Click to pick up)=(Schleichen u. Klicken zum Aufheben)
Rail=Schiene
Powered Rail=Antriebsschiene
Brake Rail=Bremsschiene

View File

@ -0,0 +1,6 @@
# textdomain: carts
Cart=
(Sneak+Click to pick up)=
Rail=
Powered Rail=
Brake Rail=

3
mods/carts/mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = carts
description = Carts (formerly boost_cart)
depends = default, player_api

View File

@ -1,5 +1,10 @@
-- carts/rails.lua
-- support for MT game translation.
local S = carts.get_translator
carts:register_rail("carts:rail", {
description = "Rail",
description = S("Rail"),
tiles = {
"carts_rail_straight.png", "carts_rail_curved.png",
"carts_rail_t_junction.png", "carts_rail_crossing.png"
@ -22,7 +27,7 @@ minetest.register_alias("default:rail", "carts:rail")
carts:register_rail("carts:powerrail", {
description = "Powered Rail",
description = S("Powered Rail"),
tiles = {
"carts_rail_straight_pwr.png", "carts_rail_curved_pwr.png",
"carts_rail_t_junction_pwr.png", "carts_rail_crossing_pwr.png"
@ -41,7 +46,7 @@ minetest.register_craft({
carts:register_rail("carts:brakerail", {
description = "Brake Rail",
description = S("Brake Rail"),
tiles = {
"carts_rail_straight_brk.png", "carts_rail_curved_brk.png",
"carts_rail_t_junction_brk.png", "carts_rail_crossing_brk.png"

View File

@ -1,2 +0,0 @@
default
sfinv

View File

@ -1,4 +1,10 @@
-- creative/init.lua
-- Load support for MT game translation.
local S = minetest.get_translator("creative")
creative = {}
creative.get_translator = S
local function update_sfinv(name)
minetest.after(0, function()
@ -14,7 +20,7 @@ local function update_sfinv(name)
end
minetest.register_privilege("creative", {
description = "Allow player to use creative inventory",
description = S("Allow player to use creative inventory"),
give_to_singleplayer = false,
give_to_admin = false,
on_grant = update_sfinv,
@ -40,10 +46,8 @@ if creative_mode_cache then
local digtime = 42
local caps = {times = {digtime, digtime, digtime}, uses = 0, maxlevel = 256}
minetest.register_item(":", {
type = "none",
wield_image = "wieldhand.png",
wield_scale = {x = 1, y = 1, z = 2.5},
-- Override the hand tool
minetest.override_item("", {
range = 10,
tool_capabilities = {
full_punch_interval = 0.5,
@ -54,6 +58,9 @@ if creative_mode_cache then
snappy = caps,
choppy = caps,
oddly_breakable_by_hand = caps,
-- dig_immediate group doesn't use value 1. Value 3 is instant dig
dig_immediate =
{times = {[2] = digtime, [3] = 0}, uses = 0, maxlevel = 256},
},
damage_groups = {fleshy = 10},
}

View File

@ -1,3 +1,8 @@
-- creative/inventory.lua
-- support for MT game translation.
local S = creative.get_translator
local player_inventory = {}
local inventory_cache = {}
@ -103,30 +108,29 @@ function creative.register_tab(name, title, items)
local start_i = inv.start_i or 0
local pagenum = math.floor(start_i / (3*8) + 1)
local pagemax = math.ceil(inv.size / (3*8))
local esc = minetest.formspec_escape
return sfinv.make_formspec(player, context,
"label[6.2,3.35;" .. minetest.colorize("#FFFF00", tostring(pagenum)) .. " / " .. tostring(pagemax) .. "]" ..
[[
image[4.06,3.4;0.8,0.8;creative_trash_icon.png]
listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]
list[current_player;main;0,4.7;8,1;]
list[current_player;main;0,5.85;8,3;8]
list[detached:creative_trash;main;4,3.3;1,1;]
listring[]
image_button[5.4,3.25;0.8,0.8;creative_prev_icon.png;creative_prev;]
image_button[7.2,3.25;0.8,0.8;creative_next_icon.png;creative_next;]
image_button[2.1,3.25;0.8,0.8;creative_search_icon.png;creative_search;]
image_button[2.75,3.25;0.8,0.8;creative_clear_icon.png;creative_clear;]
tooltip[creative_search;Search]
tooltip[creative_clear;Reset]
tooltip[creative_prev;Previous page]
tooltip[creative_next;Next page]
listring[current_player;main]
field_close_on_enter[creative_filter;false]
]] ..
"field[0.3,3.5;2.2,1;creative_filter;;" .. minetest.formspec_escape(inv.filter) .. "]" ..
"tooltip[creative_search;" .. esc(S("Search")) .. "]" ..
"tooltip[creative_clear;" .. esc(S("Reset")) .. "]" ..
"tooltip[creative_prev;" .. esc(S("Previous page")) .. "]" ..
"tooltip[creative_next;" .. esc(S("Next page")) .. "]" ..
"listring[current_player;main]" ..
"field_close_on_enter[creative_filter;false]" ..
"field[0.3,3.5;2.2,1;creative_filter;;" .. esc(inv.filter) .. "]" ..
"listring[detached:creative_" .. player_name .. ";main]" ..
"list[detached:creative_" .. player_name .. ";main;0,0;8,3;" .. tostring(start_i) .. "]" ..
default.get_hotbar_bg(0,4.7) .. creative.formspec_add, false)
creative.formspec_add, true)
end,
on_enter = function(self, player, context)
local player_name = player:get_player_name()
@ -176,10 +180,10 @@ function creative.register_tab(name, title, items)
})
end
creative.register_tab("all", "All", minetest.registered_items)
creative.register_tab("nodes", "Nodes", minetest.registered_nodes)
creative.register_tab("tools", "Tools", minetest.registered_tools)
creative.register_tab("craftitems", "Items", minetest.registered_craftitems)
creative.register_tab("all", S("All"), minetest.registered_items)
creative.register_tab("nodes", S("Nodes"), minetest.registered_nodes)
creative.register_tab("tools", S("Tools"), minetest.registered_tools)
creative.register_tab("craftitems", S("Items"), minetest.registered_craftitems)
local old_homepage_name = sfinv.get_homepage_name
function sfinv.get_homepage_name(player)

View File

@ -0,0 +1,10 @@
# textdomain: creative
Allow player to use creative inventory=Spieler erlauben, das Kreativinventar zu benutzen
Search=Suchen
Reset=Zurücksetzen
Previous page=Vorherige Seite
Next page=Nächste Seite
All=Alles
Nodes=Blöcke
Tools=Werkzeuge
Items=Gegenstände

View File

@ -0,0 +1,10 @@
# textdomain: creative
Allow player to use creative inventory=
Search=
Reset=
Previous page=
Next page=
All=
Nodes=
Tools=
Items=

3
mods/creative/mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = creative
description = Minetest Game mod: creative
depends = default, sfinv

View File

@ -101,8 +101,7 @@ paramat (CC BY-SA 3.0):
default_dry_grass.png
default_dry_grass_side.png
default_dry_grass_*.png
default_grass.png
default_grass_side.png
default_grass_side.png -- Derived from a texture by TumeniNodes (CC-BY-SA 3.0)
default_mese_block.png
default_silver_sand.png
default_mese_post_light_side.png
@ -129,6 +128,8 @@ TumeniNodes (CC BY-SA 3.0):
default_desert_cobble.png -- Derived from a texture by brunob.santos (CC BY-SA 3.0)
default_coniferous_litter.png
default_coniferous_litter_side.png
default_grass.png
default_dry_dirt.png
BlockMen (CC BY-SA 3.0):
default_aspen_leaves.png -- Derived from Sofar's texture

View File

@ -1,5 +1,8 @@
default.chest = {}
-- support for MT game translation.
local S = default.get_translator
function default.chest.get_chest_formspec(pos)
local spos = pos.x .. "," .. pos.y .. "," .. pos.z
local formspec =
@ -84,7 +87,7 @@ function default.chest.register_chest(name, d)
if def.protected then
def.on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", "Locked Chest")
meta:set_string("infotext", S("Locked Chest"))
meta:set_string("owner", "")
local inv = meta:get_inventory()
inv:set_size("main", 8*4)
@ -92,8 +95,7 @@ function default.chest.register_chest(name, d)
def.after_place_node = function(pos, placer)
local meta = minetest.get_meta(pos)
meta:set_string("owner", placer:get_player_name() or "")
meta:set_string("infotext", "Locked Chest (owned by " ..
meta:get_string("owner") .. ")")
meta:set_string("infotext", S("Locked Chest (owned by @1)", meta:get_string("owner")))
end
def.can_dig = function(pos,player)
local meta = minetest.get_meta(pos);
@ -171,7 +173,7 @@ function default.chest.register_chest(name, d)
-- verify placer is owner of lockable chest
if owner ~= pn then
minetest.record_protection_violation(pos, pn)
minetest.chat_send_player(pn, "You do not own this chest.")
minetest.chat_send_player(pn, S("You do not own this chest."))
return nil
end
@ -181,12 +183,12 @@ function default.chest.register_chest(name, d)
meta:set_string("key_lock_secret", secret)
end
return secret, "a locked chest", owner
return secret, S("a locked chest"), owner
end
else
def.on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", "Chest")
meta:set_string("infotext", S("Chest"))
local inv = meta:get_inventory()
inv:set_size("main", 8*4)
end
@ -285,7 +287,7 @@ function default.chest.register_chest(name, d)
end
default.chest.register_chest("chest", {
description = "Chest",
description = S("Chest"),
tiles = {
"default_chest_top.png",
"default_chest_top.png",
@ -301,7 +303,7 @@ default.chest.register_chest("chest", {
})
default.chest.register_chest("chest_locked", {
description = "Locked Chest",
description = S("Locked Chest"),
tiles = {
"default_chest_top.png",
"default_chest_top.png",

View File

@ -1,51 +1,51 @@
-- mods/default/crafting.lua
minetest.register_craft({
output = 'default:wood 4',
output = "default:wood 4",
recipe = {
{'default:tree'},
{"default:tree"},
}
})
minetest.register_craft({
output = 'default:junglewood 4',
output = "default:junglewood 4",
recipe = {
{'default:jungletree'},
{"default:jungletree"},
}
})
minetest.register_craft({
output = 'default:pine_wood 4',
output = "default:pine_wood 4",
recipe = {
{'default:pine_tree'},
{"default:pine_tree"},
}
})
minetest.register_craft({
output = 'default:acacia_wood 4',
output = "default:acacia_wood 4",
recipe = {
{'default:acacia_tree'},
{"default:acacia_tree"},
}
})
minetest.register_craft({
output = 'default:aspen_wood 4',
output = "default:aspen_wood 4",
recipe = {
{'default:aspen_tree'},
{"default:aspen_tree"},
}
})
minetest.register_craft({
output = 'default:wood',
output = "default:wood",
recipe = {
{'default:bush_stem'},
{"default:bush_stem"},
}
})
minetest.register_craft({
output = 'default:acacia_wood',
output = "default:acacia_wood",
recipe = {
{'default:acacia_bush_stem'},
{"default:acacia_bush_stem"},
}
})
@ -57,143 +57,143 @@ minetest.register_craft({
})
minetest.register_craft({
output = 'default:stick 4',
output = "default:stick 4",
recipe = {
{'group:wood'},
{"group:wood"},
}
})
minetest.register_craft({
output = 'default:sign_wall_steel 3',
output = "default:sign_wall_steel 3",
recipe = {
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'', 'group:stick', ''},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"", "group:stick", ""},
}
})
minetest.register_craft({
output = 'default:sign_wall_wood 3',
output = "default:sign_wall_wood 3",
recipe = {
{'group:wood', 'group:wood', 'group:wood'},
{'group:wood', 'group:wood', 'group:wood'},
{'', 'group:stick', ''},
{"group:wood", "group:wood", "group:wood"},
{"group:wood", "group:wood", "group:wood"},
{"", "group:stick", ""},
}
})
minetest.register_craft({
output = 'default:torch 4',
output = "default:torch 4",
recipe = {
{'default:coal_lump'},
{'group:stick'},
{"default:coal_lump"},
{"group:stick"},
}
})
minetest.register_craft({
output = 'default:pick_wood',
output = "default:pick_wood",
recipe = {
{'group:wood', 'group:wood', 'group:wood'},
{'', 'group:stick', ''},
{'', 'group:stick', ''},
{"group:wood", "group:wood", "group:wood"},
{"", "group:stick", ""},
{"", "group:stick", ""},
}
})
minetest.register_craft({
output = 'default:pick_stone',
output = "default:pick_stone",
recipe = {
{'group:stone', 'group:stone', 'group:stone'},
{'', 'group:stick', ''},
{'', 'group:stick', ''},
{"group:stone", "group:stone", "group:stone"},
{"", "group:stick", ""},
{"", "group:stick", ""},
}
})
minetest.register_craft({
output = 'default:pick_steel',
output = "default:pick_steel",
recipe = {
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'', 'group:stick', ''},
{'', 'group:stick', ''},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"", "group:stick", ""},
{"", "group:stick", ""},
}
})
minetest.register_craft({
output = 'default:pick_bronze',
output = "default:pick_bronze",
recipe = {
{'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'},
{'', 'group:stick', ''},
{'', 'group:stick', ''},
{"default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot"},
{"", "group:stick", ""},
{"", "group:stick", ""},
}
})
minetest.register_craft({
output = 'default:pick_mese',
output = "default:pick_mese",
recipe = {
{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
{'', 'group:stick', ''},
{'', 'group:stick', ''},
{"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"},
{"", "group:stick", ""},
{"", "group:stick", ""},
}
})
minetest.register_craft({
output = 'default:pick_diamond',
output = "default:pick_diamond",
recipe = {
{'default:diamond', 'default:diamond', 'default:diamond'},
{'', 'group:stick', ''},
{'', 'group:stick', ''},
{"default:diamond", "default:diamond", "default:diamond"},
{"", "group:stick", ""},
{"", "group:stick", ""},
}
})
minetest.register_craft({
output = 'default:shovel_wood',
output = "default:shovel_wood",
recipe = {
{'group:wood'},
{'group:stick'},
{'group:stick'},
{"group:wood"},
{"group:stick"},
{"group:stick"},
}
})
minetest.register_craft({
output = 'default:shovel_stone',
output = "default:shovel_stone",
recipe = {
{'group:stone'},
{'group:stick'},
{'group:stick'},
{"group:stone"},
{"group:stick"},
{"group:stick"},
}
})
minetest.register_craft({
output = 'default:shovel_steel',
output = "default:shovel_steel",
recipe = {
{'default:steel_ingot'},
{'group:stick'},
{'group:stick'},
{"default:steel_ingot"},
{"group:stick"},
{"group:stick"},
}
})
minetest.register_craft({
output = 'default:shovel_bronze',
output = "default:shovel_bronze",
recipe = {
{'default:bronze_ingot'},
{'group:stick'},
{'group:stick'},
{"default:bronze_ingot"},
{"group:stick"},
{"group:stick"},
}
})
minetest.register_craft({
output = 'default:shovel_mese',
output = "default:shovel_mese",
recipe = {
{'default:mese_crystal'},
{'group:stick'},
{'group:stick'},
{"default:mese_crystal"},
{"group:stick"},
{"group:stick"},
}
})
minetest.register_craft({
output = 'default:shovel_diamond',
output = "default:shovel_diamond",
recipe = {
{'default:diamond'},
{'group:stick'},
{'group:stick'},
{"default:diamond"},
{"group:stick"},
{"group:stick"},
}
})
@ -201,135 +201,135 @@ minetest.register_craft({
-- Recipes face left to match appearence in textures and inventory
minetest.register_craft({
output = 'default:axe_wood',
output = "default:axe_wood",
recipe = {
{'group:wood', 'group:wood'},
{'group:wood', 'group:stick'},
{'', 'group:stick'},
{"group:wood", "group:wood"},
{"group:wood", "group:stick"},
{"", "group:stick"},
}
})
minetest.register_craft({
output = 'default:axe_stone',
output = "default:axe_stone",
recipe = {
{'group:stone', 'group:stone'},
{'group:stone', 'group:stick'},
{'', 'group:stick'},
{"group:stone", "group:stone"},
{"group:stone", "group:stick"},
{"", "group:stick"},
}
})
minetest.register_craft({
output = 'default:axe_steel',
output = "default:axe_steel",
recipe = {
{'default:steel_ingot', 'default:steel_ingot'},
{'default:steel_ingot', 'group:stick'},
{'', 'group:stick'},
{"default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "group:stick"},
{"", "group:stick"},
}
})
minetest.register_craft({
output = 'default:axe_bronze',
output = "default:axe_bronze",
recipe = {
{'default:bronze_ingot', 'default:bronze_ingot'},
{'default:bronze_ingot', 'group:stick'},
{'', 'group:stick'},
{"default:bronze_ingot", "default:bronze_ingot"},
{"default:bronze_ingot", "group:stick"},
{"", "group:stick"},
}
})
minetest.register_craft({
output = 'default:axe_mese',
output = "default:axe_mese",
recipe = {
{'default:mese_crystal', 'default:mese_crystal'},
{'default:mese_crystal', 'group:stick'},
{'', 'group:stick'},
{"default:mese_crystal", "default:mese_crystal"},
{"default:mese_crystal", "group:stick"},
{"", "group:stick"},
}
})
minetest.register_craft({
output = 'default:axe_diamond',
output = "default:axe_diamond",
recipe = {
{'default:diamond', 'default:diamond'},
{'default:diamond', 'group:stick'},
{'', 'group:stick'},
{"default:diamond", "default:diamond"},
{"default:diamond", "group:stick"},
{"", "group:stick"},
}
})
minetest.register_craft({
output = 'default:sword_wood',
output = "default:sword_wood",
recipe = {
{'group:wood'},
{'group:wood'},
{'group:stick'},
{"group:wood"},
{"group:wood"},
{"group:stick"},
}
})
minetest.register_craft({
output = 'default:sword_stone',
output = "default:sword_stone",
recipe = {
{'group:stone'},
{'group:stone'},
{'group:stick'},
{"group:stone"},
{"group:stone"},
{"group:stick"},
}
})
minetest.register_craft({
output = 'default:sword_steel',
output = "default:sword_steel",
recipe = {
{'default:steel_ingot'},
{'default:steel_ingot'},
{'group:stick'},
{"default:steel_ingot"},
{"default:steel_ingot"},
{"group:stick"},
}
})
minetest.register_craft({
output = 'default:sword_bronze',
output = "default:sword_bronze",
recipe = {
{'default:bronze_ingot'},
{'default:bronze_ingot'},
{'group:stick'},
{"default:bronze_ingot"},
{"default:bronze_ingot"},
{"group:stick"},
}
})
minetest.register_craft({
output = 'default:sword_mese',
output = "default:sword_mese",
recipe = {
{'default:mese_crystal'},
{'default:mese_crystal'},
{'group:stick'},
{"default:mese_crystal"},
{"default:mese_crystal"},
{"group:stick"},
}
})
minetest.register_craft({
output = 'default:sword_diamond',
output = "default:sword_diamond",
recipe = {
{'default:diamond'},
{'default:diamond'},
{'group:stick'},
{"default:diamond"},
{"default:diamond"},
{"group:stick"},
}
})
minetest.register_craft({
output = 'default:skeleton_key',
output = "default:skeleton_key",
recipe = {
{'default:gold_ingot'},
{"default:gold_ingot"},
}
})
minetest.register_craft({
output = 'default:chest',
output = "default:chest",
recipe = {
{'group:wood', 'group:wood', 'group:wood'},
{'group:wood', '', 'group:wood'},
{'group:wood', 'group:wood', 'group:wood'},
{"group:wood", "group:wood", "group:wood"},
{"group:wood", "", "group:wood"},
{"group:wood", "group:wood", "group:wood"},
}
})
minetest.register_craft({
output = 'default:chest_locked',
output = "default:chest_locked",
recipe = {
{'group:wood', 'group:wood', 'group:wood'},
{'group:wood', 'default:steel_ingot', 'group:wood'},
{'group:wood', 'group:wood', 'group:wood'},
{"group:wood", "group:wood", "group:wood"},
{"group:wood", "default:steel_ingot", "group:wood"},
{"group:wood", "group:wood", "group:wood"},
}
})
@ -340,59 +340,59 @@ minetest.register_craft( {
})
minetest.register_craft({
output = 'default:furnace',
output = "default:furnace",
recipe = {
{'group:stone', 'group:stone', 'group:stone'},
{'group:stone', '', 'group:stone'},
{'group:stone', 'group:stone', 'group:stone'},
{"group:stone", "group:stone", "group:stone"},
{"group:stone", "", "group:stone"},
{"group:stone", "group:stone", "group:stone"},
}
})
minetest.register_craft({
output = 'default:coalblock',
output = "default:coalblock",
recipe = {
{'default:coal_lump', 'default:coal_lump', 'default:coal_lump'},
{'default:coal_lump', 'default:coal_lump', 'default:coal_lump'},
{'default:coal_lump', 'default:coal_lump', 'default:coal_lump'},
{"default:coal_lump", "default:coal_lump", "default:coal_lump"},
{"default:coal_lump", "default:coal_lump", "default:coal_lump"},
{"default:coal_lump", "default:coal_lump", "default:coal_lump"},
}
})
minetest.register_craft({
output = 'default:coal_lump 9',
output = "default:coal_lump 9",
recipe = {
{'default:coalblock'},
{"default:coalblock"},
}
})
minetest.register_craft({
output = 'default:steelblock',
output = "default:steelblock",
recipe = {
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
}
})
minetest.register_craft({
output = 'default:steel_ingot 9',
output = "default:steel_ingot 9",
recipe = {
{'default:steelblock'},
{"default:steelblock"},
}
})
minetest.register_craft({
output = 'default:copperblock',
output = "default:copperblock",
recipe = {
{'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'},
{'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'},
{'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'},
{"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"},
{"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"},
{"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"},
}
})
minetest.register_craft({
output = 'default:copper_ingot 9',
output = "default:copper_ingot 9",
recipe = {
{'default:copperblock'},
{"default:copperblock"},
}
})
@ -422,50 +422,50 @@ minetest.register_craft({
})
minetest.register_craft({
output = 'default:bronzeblock',
output = "default:bronzeblock",
recipe = {
{'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'},
{'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'},
{'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'},
{"default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot"},
{"default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot"},
{"default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot"},
}
})
minetest.register_craft({
output = 'default:bronze_ingot 9',
output = "default:bronze_ingot 9",
recipe = {
{'default:bronzeblock'},
{"default:bronzeblock"},
}
})
minetest.register_craft({
output = 'default:goldblock',
output = "default:goldblock",
recipe = {
{'default:gold_ingot', 'default:gold_ingot', 'default:gold_ingot'},
{'default:gold_ingot', 'default:gold_ingot', 'default:gold_ingot'},
{'default:gold_ingot', 'default:gold_ingot', 'default:gold_ingot'},
{"default:gold_ingot", "default:gold_ingot", "default:gold_ingot"},
{"default:gold_ingot", "default:gold_ingot", "default:gold_ingot"},
{"default:gold_ingot", "default:gold_ingot", "default:gold_ingot"},
}
})
minetest.register_craft({
output = 'default:gold_ingot 9',
output = "default:gold_ingot 9",
recipe = {
{'default:goldblock'},
{"default:goldblock"},
}
})
minetest.register_craft({
output = 'default:diamondblock',
output = "default:diamondblock",
recipe = {
{'default:diamond', 'default:diamond', 'default:diamond'},
{'default:diamond', 'default:diamond', 'default:diamond'},
{'default:diamond', 'default:diamond', 'default:diamond'},
{"default:diamond", "default:diamond", "default:diamond"},
{"default:diamond", "default:diamond", "default:diamond"},
{"default:diamond", "default:diamond", "default:diamond"},
}
})
minetest.register_craft({
output = 'default:diamond 9',
output = "default:diamond 9",
recipe = {
{'default:diamondblock'},
{"default:diamondblock"},
}
})
@ -566,57 +566,57 @@ minetest.register_craft({
})
minetest.register_craft({
output = 'default:clay',
output = "default:clay",
recipe = {
{'default:clay_lump', 'default:clay_lump'},
{'default:clay_lump', 'default:clay_lump'},
{"default:clay_lump", "default:clay_lump"},
{"default:clay_lump", "default:clay_lump"},
}
})
minetest.register_craft({
output = 'default:clay_lump 4',
output = "default:clay_lump 4",
recipe = {
{'default:clay'},
{"default:clay"},
}
})
minetest.register_craft({
output = 'default:brick',
output = "default:brick",
recipe = {
{'default:clay_brick', 'default:clay_brick'},
{'default:clay_brick', 'default:clay_brick'},
{"default:clay_brick", "default:clay_brick"},
{"default:clay_brick", "default:clay_brick"},
}
})
minetest.register_craft({
output = 'default:clay_brick 4',
output = "default:clay_brick 4",
recipe = {
{'default:brick'},
{"default:brick"},
}
})
minetest.register_craft({
output = 'default:paper',
output = "default:paper",
recipe = {
{'default:papyrus', 'default:papyrus', 'default:papyrus'},
{"default:papyrus", "default:papyrus", "default:papyrus"},
}
})
minetest.register_craft({
output = 'default:book',
output = "default:book",
recipe = {
{'default:paper'},
{'default:paper'},
{'default:paper'},
{"default:paper"},
{"default:paper"},
{"default:paper"},
}
})
minetest.register_craft({
output = 'default:bookshelf',
output = "default:bookshelf",
recipe = {
{'group:wood', 'group:wood', 'group:wood'},
{'default:book', 'default:book', 'default:book'},
{'group:wood', 'group:wood', 'group:wood'},
{"group:wood", "group:wood", "group:wood"},
{"default:book", "default:book", "default:book"},
{"group:wood", "group:wood", "group:wood"},
}
})
@ -630,34 +630,34 @@ minetest.register_craft({
})
minetest.register_craft({
output = 'default:ladder_steel 15',
output = "default:ladder_steel 15",
recipe = {
{'default:steel_ingot', '', 'default:steel_ingot'},
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
{'default:steel_ingot', '', 'default:steel_ingot'},
{"default:steel_ingot", "", "default:steel_ingot"},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "", "default:steel_ingot"},
}
})
minetest.register_craft({
output = 'default:mese',
output = "default:mese",
recipe = {
{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
{"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"},
{"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"},
{"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"},
}
})
minetest.register_craft({
output = 'default:mese_crystal 9',
output = "default:mese_crystal 9",
recipe = {
{'default:mese'},
{"default:mese"},
}
})
minetest.register_craft({
output = 'default:mese_crystal_fragment 9',
output = "default:mese_crystal_fragment 9",
recipe = {
{'default:mese_crystal'},
{"default:mese_crystal"},
}
})
@ -671,10 +671,10 @@ minetest.register_craft({
})
minetest.register_craft({
output = 'default:meselamp',
output = "default:meselamp",
recipe = {
{'default:glass'},
{'default:mese_crystal'},
{"default:glass"},
{"default:mese_crystal"},
}
})
@ -688,85 +688,85 @@ minetest.register_craft({
})
minetest.register_craft({
output = 'default:obsidian_shard 9',
output = "default:obsidian_shard 9",
recipe = {
{'default:obsidian'}
{"default:obsidian"}
}
})
minetest.register_craft({
output = 'default:obsidian',
output = "default:obsidian",
recipe = {
{'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'},
{'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'},
{'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'},
{"default:obsidian_shard", "default:obsidian_shard", "default:obsidian_shard"},
{"default:obsidian_shard", "default:obsidian_shard", "default:obsidian_shard"},
{"default:obsidian_shard", "default:obsidian_shard", "default:obsidian_shard"},
}
})
minetest.register_craft({
output = 'default:obsidianbrick 4',
output = "default:obsidianbrick 4",
recipe = {
{'default:obsidian', 'default:obsidian'},
{'default:obsidian', 'default:obsidian'}
{"default:obsidian", "default:obsidian"},
{"default:obsidian", "default:obsidian"}
}
})
minetest.register_craft({
output = 'default:obsidian_block 9',
output = "default:obsidian_block 9",
recipe = {
{'default:obsidian', 'default:obsidian', 'default:obsidian'},
{'default:obsidian', 'default:obsidian', 'default:obsidian'},
{'default:obsidian', 'default:obsidian', 'default:obsidian'},
{"default:obsidian", "default:obsidian", "default:obsidian"},
{"default:obsidian", "default:obsidian", "default:obsidian"},
{"default:obsidian", "default:obsidian", "default:obsidian"},
}
})
minetest.register_craft({
output = 'default:stonebrick 4',
output = "default:stonebrick 4",
recipe = {
{'default:stone', 'default:stone'},
{'default:stone', 'default:stone'},
{"default:stone", "default:stone"},
{"default:stone", "default:stone"},
}
})
minetest.register_craft({
output = 'default:stone_block 9',
output = "default:stone_block 9",
recipe = {
{'default:stone', 'default:stone', 'default:stone'},
{'default:stone', 'default:stone', 'default:stone'},
{'default:stone', 'default:stone', 'default:stone'},
{"default:stone", "default:stone", "default:stone"},
{"default:stone", "default:stone", "default:stone"},
{"default:stone", "default:stone", "default:stone"},
}
})
minetest.register_craft({
output = 'default:desert_stonebrick 4',
output = "default:desert_stonebrick 4",
recipe = {
{'default:desert_stone', 'default:desert_stone'},
{'default:desert_stone', 'default:desert_stone'},
{"default:desert_stone", "default:desert_stone"},
{"default:desert_stone", "default:desert_stone"},
}
})
minetest.register_craft({
output = 'default:desert_stone_block 9',
output = "default:desert_stone_block 9",
recipe = {
{'default:desert_stone', 'default:desert_stone', 'default:desert_stone'},
{'default:desert_stone', 'default:desert_stone', 'default:desert_stone'},
{'default:desert_stone', 'default:desert_stone', 'default:desert_stone'},
{"default:desert_stone", "default:desert_stone", "default:desert_stone"},
{"default:desert_stone", "default:desert_stone", "default:desert_stone"},
{"default:desert_stone", "default:desert_stone", "default:desert_stone"},
}
})
minetest.register_craft({
output = 'default:snowblock',
output = "default:snowblock",
recipe = {
{'default:snow', 'default:snow', 'default:snow'},
{'default:snow', 'default:snow', 'default:snow'},
{'default:snow', 'default:snow', 'default:snow'},
{"default:snow", "default:snow", "default:snow"},
{"default:snow", "default:snow", "default:snow"},
{"default:snow", "default:snow", "default:snow"},
}
})
minetest.register_craft({
output = 'default:snow 9',
output = "default:snow 9",
recipe = {
{'default:snowblock'},
{"default:snowblock"},
}
})
@ -864,16 +864,16 @@ minetest.register_craft({
})
minetest.register_craft({
type = 'cooking',
output = 'default:gold_ingot',
recipe = 'default:skeleton_key',
type = "cooking",
output = "default:gold_ingot",
recipe = "default:skeleton_key",
cooktime = 5,
})
minetest.register_craft({
type = 'cooking',
output = 'default:gold_ingot',
recipe = 'default:key',
type = "cooking",
output = "default:gold_ingot",
recipe = "default:key",
cooktime = 5,
})

View File

@ -1,13 +1,16 @@
-- mods/default/craftitems.lua
-- support for MT game translation.
local S = default.get_translator
minetest.register_craftitem("default:stick", {
description = "Stick",
description = S("Stick"),
inventory_image = "default_stick.png",
groups = {stick = 1, flammable = 2},
})
minetest.register_craftitem("default:paper", {
description = "Paper",
description = S("Paper"),
inventory_image = "default_paper.png",
groups = {flammable = 3},
})
@ -49,23 +52,24 @@ local function book_on_use(itemstack, user)
end
local formspec
local esc = minetest.formspec_escape
if owner == player_name then
formspec = "size[8,8]" ..
"field[0.5,1;7.5,0;title;Title:;" ..
minetest.formspec_escape(title) .. "]" ..
"textarea[0.5,1.5;7.5,7;text;Contents:;" ..
minetest.formspec_escape(text) .. "]" ..
"button_exit[2.5,7.5;3,1;save;Save]"
"field[0.5,1;7.5,0;title;" .. esc(S("Title:")) .. ";" ..
esc(title) .. "]" ..
"textarea[0.5,1.5;7.5,7;text;" .. esc(S("Contents:")) .. ";" ..
esc(text) .. "]" ..
"button_exit[2.5,7.5;3,1;save;" .. esc(S("Save")) .. "]"
else
formspec = "size[8,8]" ..
"label[0.5,0.5;by " .. owner .. "]" ..
"label[0.5,0.5;" .. esc(S("by @1", owner)) .. "]" ..
"tablecolumns[color;text]" ..
"tableoptions[background=#00000000;highlight=#00000000;border=false]" ..
"table[0.4,0;7,0.5;title;#FFFF00," .. minetest.formspec_escape(title) .. "]" ..
"table[0.4,0;7,0.5;title;#FFFF00," .. esc(title) .. "]" ..
"textarea[0.5,1.5;7.5,7;;" ..
minetest.formspec_escape(string ~= "" and string or text) .. ";]" ..
"button[2.4,7.6;0.8,0.8;book_prev;<]" ..
"label[3.2,7.7;Page " .. page .. " of " .. page_max .. "]" ..
"label[3.2,7.7;" .. esc(S("Page @1 of @2", page, page_max)) .. "]" ..
"button[4.9,7.6;0.8,0.8;book_next;>]"
end
@ -108,7 +112,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
if #short_title > short_title_size + 3 then
short_title = short_title:sub(1, short_title_size) .. "..."
end
data.description = "\""..short_title.."\" by "..data.owner
data.description = S("\"@1\" by @2", short_title, data.owner)
data.text = fields.text:sub(1, max_text_size)
data.text = data.text:gsub("\r\n", "\n"):gsub("\r", "\n")
data.page = 1
@ -155,14 +159,14 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
end)
minetest.register_craftitem("default:book", {
description = "Book",
description = S("Book"),
inventory_image = "default_book.png",
groups = {book = 1, flammable = 3},
on_use = book_on_use,
})
minetest.register_craftitem("default:book_written", {
description = "Book With Text",
description = S("Book with Text"),
inventory_image = "default_book_written.png",
groups = {book = 1, not_in_creative_inventory = 1, flammable = 3},
stack_max = 1,
@ -199,7 +203,7 @@ minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv
end)
minetest.register_craftitem("default:skeleton_key", {
description = "Skeleton Key",
description = S("Skeleton Key"),
inventory_image = "default_key_skeleton.png",
groups = {key = 1},
on_use = function(itemstack, user, pointed_thing)
@ -238,8 +242,8 @@ minetest.register_craftitem("default:skeleton_key", {
local new_stack = ItemStack("default:key")
local meta = new_stack:get_meta()
meta:set_string("secret", secret)
meta:set_string("description", "Key to "..user:get_player_name().."'s "
..minetest.registered_nodes[node.name].description)
meta:set_string("description", S("Key to @1's @2", user:get_player_name(),
minetest.registered_nodes[node.name].description))
if itemstack:get_count() == 0 then
itemstack = new_stack
@ -255,93 +259,93 @@ minetest.register_craftitem("default:skeleton_key", {
})
minetest.register_craftitem("default:coal_lump", {
description = "Coal Lump",
description = S("Coal Lump"),
inventory_image = "default_coal_lump.png",
groups = {coal = 1, flammable = 1}
})
minetest.register_craftitem("default:iron_lump", {
description = "Iron Lump",
inventory_image = "default_iron_lump.png",
description = S("Iron Lump"),
inventory_image = "default_iron_lump.png"
})
minetest.register_craftitem("default:copper_lump", {
description = "Copper Lump",
inventory_image = "default_copper_lump.png",
description = S("Copper Lump"),
inventory_image = "default_copper_lump.png"
})
minetest.register_craftitem("default:tin_lump", {
description = "Tin Lump",
inventory_image = "default_tin_lump.png",
description = S("Tin Lump"),
inventory_image = "default_tin_lump.png"
})
minetest.register_craftitem("default:mese_crystal", {
description = "Mese Crystal",
description = S("Mese Crystal"),
inventory_image = "default_mese_crystal.png",
})
minetest.register_craftitem("default:gold_lump", {
description = "Gold Lump",
inventory_image = "default_gold_lump.png",
description = S("Gold Lump"),
inventory_image = "default_gold_lump.png"
})
minetest.register_craftitem("default:diamond", {
description = "Diamond",
description = S("Diamond"),
inventory_image = "default_diamond.png",
})
minetest.register_craftitem("default:clay_lump", {
description = "Clay Lump",
description = S("Clay Lump"),
inventory_image = "default_clay_lump.png",
})
minetest.register_craftitem("default:steel_ingot", {
description = "Steel Ingot",
inventory_image = "default_steel_ingot.png",
description = S("Steel Ingot"),
inventory_image = "default_steel_ingot.png"
})
minetest.register_craftitem("default:copper_ingot", {
description = "Copper Ingot",
inventory_image = "default_copper_ingot.png",
description = S("Copper Ingot"),
inventory_image = "default_copper_ingot.png"
})
minetest.register_craftitem("default:tin_ingot", {
description = "Tin Ingot",
inventory_image = "default_tin_ingot.png",
description = S("Tin Ingot"),
inventory_image = "default_tin_ingot.png"
})
minetest.register_craftitem("default:bronze_ingot", {
description = "Bronze Ingot",
inventory_image = "default_bronze_ingot.png",
description = S("Bronze Ingot"),
inventory_image = "default_bronze_ingot.png"
})
minetest.register_craftitem("default:gold_ingot", {
description = "Gold Ingot",
description = S("Gold Ingot"),
inventory_image = "default_gold_ingot.png"
})
minetest.register_craftitem("default:mese_crystal_fragment", {
description = "Mese Crystal Fragment",
description = S("Mese Crystal Fragment"),
inventory_image = "default_mese_crystal_fragment.png",
})
minetest.register_craftitem("default:clay_brick", {
description = "Clay Brick",
description = S("Clay Brick"),
inventory_image = "default_clay_brick.png",
})
minetest.register_craftitem("default:obsidian_shard", {
description = "Obsidian Shard",
description = S("Obsidian Shard"),
inventory_image = "default_obsidian_shard.png",
})
minetest.register_craftitem("default:flint", {
description = "Flint",
description = S("Flint"),
inventory_image = "default_flint.png"
})
minetest.register_craftitem("default:blueberries", {
description = "Blueberries",
description = S("Blueberries"),
inventory_image = "default_blueberries.png",
groups = {food_blueberries = 1, food_berry = 1},
on_use = minetest.item_eat(2),

View File

@ -1 +0,0 @@
player_api?

View File

@ -273,6 +273,7 @@ end
--
-- Fence registration helper
--
local fence_collision_extra = minetest.settings:get_bool("enable_fence_tall") and 3/8 or 0
function default.register_fence(name, def)
minetest.register_craft({
@ -291,17 +292,27 @@ function default.register_fence(name, def)
drawtype = "nodebox",
node_box = {
type = "connected",
fixed = {{-1/8, -1/2, -1/8, 1/8, 1/2, 1/8}},
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8},
-- connect_top =
-- connect_bottom =
connect_front = {{-1/16,3/16,-1/2,1/16,5/16,-1/8},
{-1/16,-5/16,-1/2,1/16,-3/16,-1/8}},
connect_left = {{-1/2,3/16,-1/16,-1/8,5/16,1/16},
{-1/2,-5/16,-1/16,-1/8,-3/16,1/16}},
connect_back = {{-1/16,3/16,1/8,1/16,5/16,1/2},
{-1/16,-5/16,1/8,1/16,-3/16,1/2}},
connect_right = {{1/8,3/16,-1/16,1/2,5/16,1/16},
{1/8,-5/16,-1/16,1/2,-3/16,1/16}},
connect_front = {{-1/16, 3/16, -1/2, 1/16, 5/16, -1/8 },
{-1/16, -5/16, -1/2, 1/16, -3/16, -1/8 }},
connect_left = {{-1/2, 3/16, -1/16, -1/8, 5/16, 1/16},
{-1/2, -5/16, -1/16, -1/8, -3/16, 1/16}},
connect_back = {{-1/16, 3/16, 1/8, 1/16, 5/16, 1/2 },
{-1/16, -5/16, 1/8, 1/16, -3/16, 1/2 }},
connect_right = {{ 1/8, 3/16, -1/16, 1/2, 5/16, 1/16},
{ 1/8, -5/16, -1/16, 1/2, -3/16, 1/16}}
},
collision_box = {
type = "connected",
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2 + fence_collision_extra, 1/8},
-- connect_top =
-- connect_bottom =
connect_front = {-1/8, -1/2, -1/2, 1/8, 1/2 + fence_collision_extra, -1/8},
connect_left = {-1/2, -1/2, -1/8, -1/8, 1/2 + fence_collision_extra, 1/8},
connect_back = {-1/8, -1/2, 1/8, 1/8, 1/2 + fence_collision_extra, 1/2},
connect_right = { 1/8, -1/2, -1/8, 1/2, 1/2 + fence_collision_extra, 1/8}
},
connects_to = {"group:fence", "group:wood", "group:tree", "group:wall"},
inventory_image = fence_texture,
@ -349,24 +360,28 @@ function default.register_fence_rail(name, def)
drawtype = "nodebox",
node_box = {
type = "connected",
fixed = {
{-1/16, 3/16, -1/16, 1/16, 5/16, 1/16},
{-1/16, -3/16, -1/16, 1/16, -5/16, 1/16}
},
fixed = {{-1/16, 3/16, -1/16, 1/16, 5/16, 1/16},
{-1/16, -3/16, -1/16, 1/16, -5/16, 1/16}},
-- connect_top =
-- connect_bottom =
connect_front = {
{-1/16, 3/16, -1/2, 1/16, 5/16, -1/16},
{-1/16, -5/16, -1/2, 1/16, -3/16, -1/16}},
connect_left = {
{-1/2, 3/16, -1/16, -1/16, 5/16, 1/16},
{-1/2, -5/16, -1/16, -1/16, -3/16, 1/16}},
connect_back = {
{-1/16, 3/16, 1/16, 1/16, 5/16, 1/2},
{-1/16, -5/16, 1/16, 1/16, -3/16, 1/2}},
connect_right = {
{1/16, 3/16, -1/16, 1/2, 5/16, 1/16},
{1/16, -5/16, -1/16, 1/2, -3/16, 1/16}},
connect_front = {{-1/16, 3/16, -1/2, 1/16, 5/16, -1/16},
{-1/16, -5/16, -1/2, 1/16, -3/16, -1/16}},
connect_left = {{-1/2, 3/16, -1/16, -1/16, 5/16, 1/16},
{-1/2, -5/16, -1/16, -1/16, -3/16, 1/16}},
connect_back = {{-1/16, 3/16, 1/16, 1/16, 5/16, 1/2 },
{-1/16, -5/16, 1/16, 1/16, -3/16, 1/2 }},
connect_right = {{ 1/16, 3/16, -1/16, 1/2, 5/16, 1/16},
{ 1/16, -5/16, -1/16, 1/2, -3/16, 1/16}}
},
collision_box = {
type = "connected",
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2 + fence_collision_extra, 1/8},
-- connect_top =
-- connect_bottom =
connect_front = {-1/8, -1/2, -1/2, 1/8, 1/2 + fence_collision_extra, -1/8},
connect_left = {-1/2, -1/2, -1/8, -1/8, 1/2 + fence_collision_extra, 1/8},
connect_back = {-1/8, -1/2, 1/8, 1/8, 1/2 + fence_collision_extra, 1/2},
connect_right = { 1/8, -1/2, -1/8, 1/2, 1/2 + fence_collision_extra, 1/8}
},
connects_to = {"group:fence", "group:wall"},
inventory_image = fence_rail_texture,
@ -412,7 +427,7 @@ local function leafdecay_after_destruct(pos, oldnode, def)
vector.add(pos, def.radius), def.leaves)) do
local node = minetest.get_node(v)
local timer = minetest.get_node_timer(v)
if node.param2 == 0 and not timer:is_started() then
if node.param2 ~= 1 and not timer:is_started() then
timer:start(math.random(20, 120) / 10)
end
end
@ -477,7 +492,6 @@ minetest.register_abm({
neighbors = {
"air",
"group:grass",
"group:dry_grass",
"default:snow",
},
interval = 6,
@ -504,11 +518,8 @@ minetest.register_abm({
-- Snow check is cheapest, so comes first
if name == "default:snow" then
minetest.set_node(pos, {name = "default:dirt_with_snow"})
-- Most likely case first
elseif minetest.get_item_group(name, "grass") ~= 0 then
minetest.set_node(pos, {name = "default:dirt_with_grass"})
elseif minetest.get_item_group(name, "dry_grass") ~= 0 then
minetest.set_node(pos, {name = "default:dirt_with_dry_grass"})
end
end
})
@ -520,7 +531,7 @@ minetest.register_abm({
minetest.register_abm({
label = "Grass covered",
nodenames = {"group:spreading_dirt_type"},
nodenames = {"group:spreading_dirt_type", "default:dry_dirt_with_dry_grass"},
interval = 8,
chance = 50,
catch_up = false,
@ -531,7 +542,11 @@ minetest.register_abm({
if name ~= "ignore" and nodedef and not ((nodedef.sunlight_propagates or
nodedef.paramtype == "light") and
nodedef.liquidtype == "none") then
minetest.set_node(pos, {name = "default:dirt"})
if node.name == "default:dry_dirt_with_dry_grass" then
minetest.set_node(pos, {name = "default:dry_dirt"})
else
minetest.set_node(pos, {name = "default:dirt"})
end
end
end
})
@ -560,7 +575,9 @@ minetest.register_abm({
catch_up = false,
action = function(pos, node)
node.name = moss_correspondences[node.name]
minetest.set_node(pos, node)
if node.name then
minetest.set_node(pos, node)
end
end
})
@ -571,7 +588,7 @@ minetest.register_abm({
--
function default.can_interact_with_node(player, pos)
if player then
if player and player:is_player() then
if minetest.check_player_privs(player, "protection_bypass") then
return true
end

View File

@ -1,3 +1,7 @@
-- default/furnace.lua
-- support for MT game translation.
local S = default.get_translator
--
-- Formspecs
@ -8,7 +12,7 @@ function default.get_furnace_active_formspec(fuel_percent, item_percent)
"list[context;src;2.75,0.5;1,1;]"..
"list[context;fuel;2.75,2.5;1,1;]"..
"image[2.75,1.5;1,1;default_furnace_fire_bg.png^[lowpart:"..
(100-fuel_percent)..":default_furnace_fire_fg.png]"..
(fuel_percent)..":default_furnace_fire_fg.png]"..
"image[3.75,1.5;1,1;gui_furnace_arrow_bg.png^[lowpart:"..
(item_percent)..":gui_furnace_arrow_fg.png^[transformR270]"..
"list[context;dst;4.75,0.96;2,2;]"..
@ -60,7 +64,7 @@ local function allow_metadata_inventory_put(pos, listname, index, stack, player)
if listname == "fuel" then
if minetest.get_craft_result({method="fuel", width=1, items={stack}}).time ~= 0 then
if inv:is_empty("src") then
meta:set_string("infotext", "Furnace is empty")
meta:set_string("infotext", S("Furnace is empty"))
end
return stack:get_count()
else
@ -98,7 +102,7 @@ end
local function furnace_node_timer(pos, elapsed)
--
-- Inizialize metadata
-- Initialize metadata
--
local meta = minetest.get_meta(pos)
local fuel_time = meta:get_float("fuel_time") or 0
@ -107,6 +111,7 @@ local function furnace_node_timer(pos, elapsed)
local inv = meta:get_inventory()
local srclist, fuellist
local dst_full = false
local cookable, cooked
local fuel
@ -146,6 +151,8 @@ local function furnace_node_timer(pos, elapsed)
inv:set_stack("src", 1, aftercooked.items[1])
src_time = src_time - cooked.time
update = true
else
dst_full = true
end
else
-- Item could not be cooked: probably missing fuel
@ -166,6 +173,16 @@ local function furnace_node_timer(pos, elapsed)
else
-- Take fuel from fuel list
inv:set_stack("fuel", 1, afterfuel.items[1])
-- Put replacements in dst list or drop them on the furnace.
local replacements = fuel.replacements
if replacements[1] then
local leftover = inv:add_item("dst", replacements[1])
if not leftover:is_empty() then
local above = vector.new(pos.x, pos.y + 1, pos.z)
local drop_pos = minetest.find_node_near(above, 1, {"air"}) or above
minetest.item_drop(replacements[1], nil, drop_pos)
end
end
update = true
fuel_totaltime = fuel.time + (fuel_totaltime - fuel_time)
end
@ -183,7 +200,7 @@ local function furnace_node_timer(pos, elapsed)
if fuel and fuel_totaltime > fuel.time then
fuel_totaltime = fuel.time
end
if srclist[1]:is_empty() then
if srclist and srclist[1]:is_empty() then
src_time = 0
end
@ -195,34 +212,34 @@ local function furnace_node_timer(pos, elapsed)
local item_percent = 0
if cookable then
item_percent = math.floor(src_time / cooked.time * 100)
if item_percent > 100 then
item_state = "100% (output full)"
if dst_full then
item_state = S("100% (output full)")
else
item_state = item_percent .. "%"
item_state = S("@1%", item_percent)
end
else
if srclist[1]:is_empty() then
item_state = "Empty"
if srclist and not srclist[1]:is_empty() then
item_state = S("Not cookable")
else
item_state = "Not cookable"
item_state = S("Empty")
end
end
local fuel_state = "Empty"
local active = "inactive"
local fuel_state = S("Empty")
local active = false
local result = false
if fuel_totaltime ~= 0 then
active = "active"
local fuel_percent = math.floor(fuel_time / fuel_totaltime * 100)
fuel_state = fuel_percent .. "%"
active = true
local fuel_percent = 100 - math.floor(fuel_time / fuel_totaltime * 100)
fuel_state = S("@1%", fuel_percent)
formspec = default.get_furnace_active_formspec(fuel_percent, item_percent)
swap_node(pos, "default:furnace_active")
-- make sure timer restarts automatically
result = true
else
if not fuellist[1]:is_empty() then
fuel_state = "0%"
if fuellist and not fuellist[1]:is_empty() then
fuel_state = S("@1%", 0)
end
formspec = default.get_furnace_inactive_formspec()
swap_node(pos, "default:furnace")
@ -230,8 +247,14 @@ local function furnace_node_timer(pos, elapsed)
minetest.get_node_timer(pos):stop()
end
local infotext = "Furnace " .. active .. "\n(Item: " .. item_state ..
"; Fuel: " .. fuel_state .. ")"
local infotext
if active then
infotext = S("Furnace active")
else
infotext = S("Furnace inactive")
end
infotext = infotext .. "\n" .. S("(Item: @1; Fuel: @2)", item_state, fuel_state)
--
-- Set meta values
@ -250,7 +273,7 @@ end
--
minetest.register_node("default:furnace", {
description = "Furnace",
description = S("Furnace"),
tiles = {
"default_furnace_top.png", "default_furnace_bottom.png",
"default_furnace_side.png", "default_furnace_side.png",
@ -268,11 +291,11 @@ minetest.register_node("default:furnace", {
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", default.get_furnace_inactive_formspec())
local inv = meta:get_inventory()
inv:set_size('src', 1)
inv:set_size('fuel', 1)
inv:set_size('dst', 4)
furnace_node_timer(pos, 0)
end,
on_metadata_inventory_move = function(pos)
@ -298,7 +321,7 @@ minetest.register_node("default:furnace", {
})
minetest.register_node("default:furnace_active", {
description = "Furnace",
description = S("Furnace"),
tiles = {
"default_furnace_top.png", "default_furnace_bottom.png",
"default_furnace_side.png", "default_furnace_side.png",

View File

@ -3,16 +3,21 @@
-- The API documentation in here was moved into game_api.txt
-- Load support for MT game translation.
local S = minetest.get_translator("default")
-- Definitions made by this mod that other mods can use too
default = {}
default.LIGHT_MAX = 14
default.get_translator = S
-- GUI related stuff
minetest.register_on_joinplayer(function(player)
player:set_formspec_prepend([[
bgcolor[#080808BB;true]
background[5,5;1,1;gui_formbg.png;true]
background[5,5;1,1;gui_formbg.png;true;10]
listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF] ]])
end)

View File

@ -45,5 +45,5 @@ default.register_chest = default.chest.register_chest
function default.intersects_protection(minp, maxp, player_name, interval)
minetest.log("warning", "default.intersects_protection() is " ..
"deprecated, use minetest.is_area_protected() instead.")
minetest.is_area_protected(minp, maxp, player_name, interval)
return minetest.is_area_protected(minp, maxp, player_name, interval)
end

View File

@ -0,0 +1,211 @@
# textdomain: default
Locked Chest=Abgeschlossene Truhe
Locked Chest (owned by @1)=Abgeschlossene Truhe (Eigentum von @1)
You do not own this chest.=Ihnen gehört diese Truhe nicht.
a locked chest=eine abgeschlossene Truhe
Chest=Truhe
Stick=Stock
Paper=Papier
"@1" by @2=„@1“ von @2
Book=Buch
Book with Text=Buch mit Text
Skeleton Key=Skelettschlüssel
Key to @1's @2=Schlüssel für @2 von @1
Coal Lump=Kohleklumpen
Iron Lump=Eisenklumpen
Copper Lump=Kupferklumpen
Tin Lump=Zinnklumpen
Mese Crystal=Mesekristall
Gold Lump=Goldklumpen
Diamond=Diamant
Clay Lump=Tonklumpen
Steel Ingot=Stahlbarren
Copper Ingot=Kupferbarren
Tin Ingot=Zinnbarren
Bronze Ingot=Bronzebarren
Gold Ingot=Goldbarren
Mese Crystal Fragment=Mesekristallfragment
Clay Brick=Tonziegel
Obsidian Shard=Obsidianscherbe
Flint=Feuerstein
Blueberries=Blaubeeren
Furnace is empty=Ofen ist leer
100% (output full)=100% (Ausgabe voll)
@1%=@1%
Empty=Leer
Not cookable=Nicht kochbar
Furnace active=Ofen aktiv
Furnace inactive=Ofen inaktiv
(Item: @1; Fuel: @2)=(Gegenstand: @1; Brennstoff: @2)
Furnace=Ofen
Stone=Stein
Cobblestone=Kopfsteinpflaster
Stone Brick=Steinziegel
Stone Block=Steinblock
Mossy Cobblestone=Mosiges Kopfsteinpflaster
Desert Stone=Wüstenstein
Desert Cobblestone=Wüstenkopfsteinpflaster
Desert Stone Brick=Wüstensteinziegel
Desert Stone Block=Wüstensteinblock
Sandstone=Sandstein
Sandstone Brick=Sandsteinziegel
Sandstone Block=Sandsteinblock
Desert Sandstone=Wüstensandstein
Desert Sandstone Brick=Wüstensandsteinziegel
Desert Sandstone Block=Wüstensandsteinblock
Silver Sandstone=Silbersandstein
Silver Sandstone Brick=Silbersandsteinziegel
Silver Sandstone Block=Silbersandsteinblock
Obsidian=Obsidian
Obsidian Brick=Obsidianziegel
Obsidian Block=Obsidianblock
Dirt=Erde
Dirt with Grass=Erde mit Gras
Dirt with Grass and Footsteps=Erde mit Gras und Fußstapfen
Dirt with Dry Grass=Erde mit trockenem Gras
Dirt with Snow=Erde mit Schnee
Dirt with Rainforest Litter=Erde mit Regenwaldboden
Dirt with Coniferous Litter=Erde mit Nadelwaldboden
Dry Dirt=Trockene Erde
Dry Dirt with Dry Grass=Trockene Erde mit trockenem Gras
Permafrost=Permafrost
Permafrost with Stones=Permafrost mit Steinen
Permafrost with Moss=Permafrost mit Moos
Sand=Sand
Desert Sand=Wüstensand
Silver Sand=Silbersand
Gravel=Kies
Clay=Ton
Snow=Schnee
Snow Block=Schneeblock
Ice=Eis
Cave Ice=Höhleneis
Apple Tree=Apfelbaum
Apple Wood Planks=Apfelbaumplanken
Apple Tree Sapling=Apfelbaumsetzling
Apple Tree Leaves=Apfelbaumblätter
Apple=Apfel
Apple Marker=Apfelmarkierung
Jungle Tree=Dschungelbaum
Jungle Wood Planks=Dschungelholzplanken
Jungle Tree Leaves=Dschungelbaumblätter
Jungle Tree Sapling=Dschungelbaumsetzling
Emergent Jungle Tree Sapling=Hervorstehender Dschungelbaumsetzling
Pine Tree=Kiefernbaum
Pine Wood Planks=Kiefernholzplanken
Pine Needles=Kiefernnadeln
Pine Tree Sapling=Kiefernbaumsetzling
Acacia Tree=Akazienbaum
Acacia Wood Planks=Akazienholzplanken
Acacia Tree Leaves=Akazienbaumblätter
Acacia Tree Sapling=Akazienbaumsetzling
Aspen Tree=Espenbaum
Aspen Wood Planks=Espenholzplanken
Aspen Tree Leaves=Espenbaumblätter
Aspen Tree Sapling=Esepenbaumsetzling
Coal Ore=Kohleerz
Coal Block=Kohleblock
Iron Ore=Eisenerz
Steel Block=Stahlblock
Copper Ore=Kupfererz
Copper Block=Kupferblock
Tin Ore=Zinnerz
Tin Block=Zinnblock
Bronze Block=Bronzeblock
Mese Ore=Meseerz
Mese Block=Meseblock
Gold Ore=Golderz
Gold Block=Goldblock
Diamond Ore=Diamanterz
Diamond Block=Diamantblock
Cactus=Kaktus
Large Cactus Seedling=Großer Kaktussämling
Papyrus=Papyrus
Dry Shrub=Trockener Busch
Jungle Grass=Dschungelgras
Grass=Gras
Dry Grass=Trockenes Gras
Fern=Farn
Marram Grass=Dünengras
Bush Stem=Buschstamm
Bush Leaves=Buschblätter
Bush Sapling=Buschsetzling
Blueberry Bush Leaves with Berries=Blaubeerbuschblätter mit Beeren
Blueberry Bush Leaves=Blaubeerbuschblätter
Blueberry Bush Sapling=Blaubeerbuschsetzling
Acacia Bush Stem=Akazienbuschstamm
Acacia Bush Leaves=Akazienbuschblätter
Acacia Bush Sapling=Akazienbuschsetzling
Pine Bush Stem=Kiefernbuschstamm
Pine Bush Needles=Kiefernbuschnadeln
Pine Bush Sapling=Kiefernbuschsetzling
Kelp=Seetang
Green Coral=Grüne Koralle
Pink Coral=Rosa Koralle
Cyan Coral=Türkise Koralle
Brown Coral=Braune Koralle
Orange Coral=Orange Koralle
Coral Skeleton=Korallenskelett
Water Source=Wasserquelle
Flowing Water=Fließendes Wasser
River Water Source=Flusswasserquelle
Flowing River Water=Fließendes Flusswasser
Lava Source=Lavaquelle
Flowing Lava=Fließende Lava
Empty Bookshelf=Leeres Bücherregal
Bookshelf (@1 written, @2 empty books)=Bücherregal (@1 beschriebene, @2 leere Bücher)
Bookshelf=Bücherregal
Text too long=Text zu lang
Wooden Sign=Holzschild
Steel Sign=Stahlschild
Wooden Ladder=Holzleiter
Steel Ladder=Stahlleiter
Apple Wood Fence=Apfelholzzaun
Acacia Wood Fence=Akazienholzzaun
Jungle Wood Fence=Dschungelholzzaun
Pine Wood Fence=Kiefernholzzaun
Aspen Wood Fence=Espenholzzaun
Apple Wood Fence Rail=Apfelholzzaungeländer
Acacia Wood Fence Rail=Akazienholzzaungeländer
Jungle Wood Fence Rail=Dschungelholzzaungeländer
Pine Wood Fence Rail=Kiefernholzzaungeländer
Aspen Wood Fence Rail=Espenholzzaungeländer
Glass=Glas
Obsidian Glass=Obsidianglas
Brick Block=Ziegelblock
Mese Lamp=Meselampe
Mese Post Light=Mesestandlampe
Cloud=Wolke
Wooden Pickaxe=Holzspitzhacke
Stone Pickaxe=Steinspitzhacke
Bronze Pickaxe=Bronzespitzhacke
Steel Pickaxe=Stahlspitzhacke
Mese Pickaxe=Mesespitzhacke
Diamond Pickaxe=Diamantspitzhacke
Wooden Shovel=Holzschaufel
Stone Shovel=Steinschaufel
Bronze Shovel=Bronzeschaufel
Steel Shovel=Stahlschaufel
Mese Shovel=Meseschaufel
Diamond Shovel=Diamantschaufel
Wooden Axe=Holzaxt
Stone Axe=Steinaxt
Bronze Axe=Bronzeaxt
Steel Axe=Stahlaxt
Mese Axe=Meseaxt
Diamond Axe=Diamantaxt
Wooden Sword=Holzschwert
Stone Sword=Steinschwert
Bronze Sword=Bronzeschwert
Steel Sword=Stahlschwert
Mese Sword=Meseschwert
Diamond Sword=Diamantschwert
Key=Schlüssel
Torch=Fackel
@1 will intersect protection on growth.=@1 wird bei Wachstum mit geschützter Zone überlappen.
Title:=Titel:
Contents:=Inhalt:
Save=Speichern
by @1=von @1
Page @1 of @2=Seite @1 von @2
"@1"=„@1“

View File

@ -0,0 +1,211 @@
# textdomain: default
Locked Chest=
Locked Chest (owned by @1)=
You do not own this chest.=
a locked chest=
Chest=
Stick=
Paper=
"@1" by @2=
Book=
Book with Text=
Skeleton Key=
Key to @1's @2=
Coal Lump=
Iron Lump=
Copper Lump=
Tin Lump=
Mese Crystal=
Gold Lump=
Diamond=
Clay Lump=
Steel Ingot=
Copper Ingot=
Tin Ingot=
Bronze Ingot=
Gold Ingot=
Mese Crystal Fragment=
Clay Brick=
Obsidian Shard=
Flint=
Blueberries=
Furnace is empty=
100% (output full)=
@1%=
Empty=
Not cookable=
Furnace active=
Furnace inactive=
(Item: @1; Fuel: @2)=
Furnace=
Stone=
Cobblestone=
Stone Brick=
Stone Block=
Mossy Cobblestone=
Desert Stone=
Desert Cobblestone=
Desert Stone Brick=
Desert Stone Block=
Sandstone=
Sandstone Brick=
Sandstone Block=
Desert Sandstone=
Desert Sandstone Brick=
Desert Sandstone Block=
Silver Sandstone=
Silver Sandstone Brick=
Silver Sandstone Block=
Obsidian=
Obsidian Brick=
Obsidian Block=
Dirt=
Dirt with Grass=
Dirt with Grass and Footsteps=
Dirt with Dry Grass=
Dirt with Snow=
Dirt with Rainforest Litter=
Dirt with Coniferous Litter=
Dry Dirt=
Dry Dirt with Dry Grass=
Permafrost=
Permafrost with Stones=
Permafrost with Moss=
Sand=
Desert Sand=
Silver Sand=
Gravel=
Clay=
Snow=
Snow Block=
Ice=
Cave Ice=
Apple Tree=
Apple Wood Planks=
Apple Tree Sapling=
Apple Tree Leaves=
Apple=
Apple Marker=
Jungle Tree=
Jungle Wood Planks=
Jungle Tree Leaves=
Jungle Tree Sapling=
Emergent Jungle Tree Sapling=
Pine Tree=
Pine Wood Planks=
Pine Needles=
Pine Tree Sapling=
Acacia Tree=
Acacia Wood Planks=
Acacia Tree Leaves=
Acacia Tree Sapling=
Aspen Tree=
Aspen Wood Planks=
Aspen Tree Leaves=
Aspen Tree Sapling=
Coal Ore=
Coal Block=
Iron Ore=
Steel Block=
Copper Ore=
Copper Block=
Tin Ore=
Tin Block=
Bronze Block=
Mese Ore=
Mese Block=
Gold Ore=
Gold Block=
Diamond Ore=
Diamond Block=
Cactus=
Large Cactus Seedling=
Papyrus=
Dry Shrub=
Jungle Grass=
Grass=
Dry Grass=
Fern=
Marram Grass=
Bush Stem=
Bush Leaves=
Bush Sapling=
Blueberry Bush Leaves with Berries=
Blueberry Bush Leaves=
Blueberry Bush Sapling=
Acacia Bush Stem=
Acacia Bush Leaves=
Acacia Bush Sapling=
Pine Bush Stem=
Pine Bush Needles=
Pine Bush Sapling=
Kelp=
Green Coral=
Pink Coral=
Cyan Coral=
Brown Coral=
Orange Coral=
Coral Skeleton=
Water Source=
Flowing Water=
River Water Source=
Flowing River Water=
Lava Source=
Flowing Lava=
Empty Bookshelf=
Bookshelf (@1 written, @2 empty books)=
Bookshelf=
Text too long=
Wooden Sign=
Steel Sign=
Wooden Ladder=
Steel Ladder=
Apple Wood Fence=
Acacia Wood Fence=
Jungle Wood Fence=
Pine Wood Fence=
Aspen Wood Fence=
Apple Wood Fence Rail=
Acacia Wood Fence Rail=
Jungle Wood Fence Rail=
Pine Wood Fence Rail=
Aspen Wood Fence Rail=
Glass=
Obsidian Glass=
Brick Block=
Mese Lamp=
Mese Post Light=
Cloud=
Wooden Pickaxe=
Stone Pickaxe=
Bronze Pickaxe=
Steel Pickaxe=
Mese Pickaxe=
Diamond Pickaxe=
Wooden Shovel=
Stone Shovel=
Bronze Shovel=
Steel Shovel=
Mese Shovel=
Diamond Shovel=
Wooden Axe=
Stone Axe=
Bronze Axe=
Steel Axe=
Mese Axe=
Diamond Axe=
Wooden Sword=
Stone Sword=
Bronze Sword=
Steel Sword=
Mese Sword=
Diamond Sword=
Key=
Torch=
@1 will intersect protection on growth.=
Title:=
Contents:=
Save=
by @1=
Page @1 of @2=
"@1"=

View File

@ -2,13 +2,18 @@
-- Aliases for map generators
--
-- All mapgens
minetest.register_alias("mapgen_stone", "default:stone")
minetest.register_alias("mapgen_water_source", "default:water_source")
minetest.register_alias("mapgen_river_water_source", "default:river_water_source")
-- Additional aliases needed for mapgen v6
minetest.register_alias("mapgen_lava_source", "default:lava_source")
minetest.register_alias("mapgen_dirt", "default:dirt")
minetest.register_alias("mapgen_dirt_with_grass", "default:dirt_with_grass")
minetest.register_alias("mapgen_sand", "default:sand")
minetest.register_alias("mapgen_water_source", "default:water_source")
minetest.register_alias("mapgen_river_water_source", "default:river_water_source")
minetest.register_alias("mapgen_lava_source", "default:lava_source")
minetest.register_alias("mapgen_gravel", "default:gravel")
minetest.register_alias("mapgen_desert_stone", "default:desert_stone")
minetest.register_alias("mapgen_desert_sand", "default:desert_sand")
@ -16,9 +21,6 @@ minetest.register_alias("mapgen_dirt_with_snow", "default:dirt_with_snow")
minetest.register_alias("mapgen_snowblock", "default:snowblock")
minetest.register_alias("mapgen_snow", "default:snow")
minetest.register_alias("mapgen_ice", "default:ice")
minetest.register_alias("mapgen_sandstone", "default:sandstone")
-- Flora
minetest.register_alias("mapgen_tree", "default:tree")
minetest.register_alias("mapgen_leaves", "default:leaves")
@ -29,14 +31,10 @@ minetest.register_alias("mapgen_junglegrass", "default:junglegrass")
minetest.register_alias("mapgen_pine_tree", "default:pine_tree")
minetest.register_alias("mapgen_pine_needles", "default:pine_needles")
-- Dungeons
minetest.register_alias("mapgen_cobble", "default:cobble")
minetest.register_alias("mapgen_stair_cobble", "stairs:stair_cobble")
minetest.register_alias("mapgen_mossycobble", "default:mossycobble")
minetest.register_alias("mapgen_stair_desert_stone", "stairs:stair_desert_stone")
minetest.register_alias("mapgen_sandstonebrick", "default:sandstonebrick")
minetest.register_alias("mapgen_stair_sandstone_block", "stairs:stair_sandstone_block")
--
@ -577,8 +575,8 @@ function default.register_ores()
},
-- Only where default:dirt is present as surface material
biomes = {"taiga", "snowy_grassland", "grassland", "coniferous_forest",
"deciduous_forest", "deciduous_forest_shore", "savanna", "savanna_shore",
"rainforest", "rainforest_swamp", "floatland_coniferous_forest"}
"deciduous_forest", "deciduous_forest_shore", "rainforest",
"rainforest_swamp", "floatland_coniferous_forest"}
})
-- Gravel
@ -909,6 +907,8 @@ function default.register_biomes(upper_limit)
node_river_water = "default:ice",
node_riverbed = "default:gravel",
depth_riverbed = 2,
node_dungeon = "default:ice",
node_dungeon_stair = "stairs:stair_ice",
y_max = upper_limit,
y_min = -8,
heat_point = 0,
@ -925,6 +925,9 @@ function default.register_biomes(upper_limit)
node_water_top = "default:ice",
depth_water_top = 10,
node_cave_liquid = "default:water_source",
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = -9,
y_min = -255,
heat_point = 0,
@ -934,6 +937,9 @@ function default.register_biomes(upper_limit)
minetest.register_biome({
name = "icesheet_under",
node_cave_liquid = {"default:water_source", "default:lava_source"},
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = -256,
y_min = -31000,
heat_point = 0,
@ -947,6 +953,9 @@ function default.register_biomes(upper_limit)
node_dust = "default:snow",
node_riverbed = "default:gravel",
depth_riverbed = 2,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = upper_limit,
y_min = 47,
heat_point = 0,
@ -961,6 +970,9 @@ function default.register_biomes(upper_limit)
depth_filler = 1,
node_riverbed = "default:gravel",
depth_riverbed = 2,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
vertical_blend = 4,
y_max = 46,
y_min = 2,
@ -976,6 +988,9 @@ function default.register_biomes(upper_limit)
depth_filler = 2,
node_riverbed = "default:gravel",
depth_riverbed = 2,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
vertical_blend = 1,
y_max = 1,
y_min = -3,
@ -992,6 +1007,9 @@ function default.register_biomes(upper_limit)
node_riverbed = "default:gravel",
depth_riverbed = 2,
node_cave_liquid = "default:water_source",
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
vertical_blend = 1,
y_max = -4,
y_min = -255,
@ -1002,6 +1020,9 @@ function default.register_biomes(upper_limit)
minetest.register_biome({
name = "tundra_under",
node_cave_liquid = {"default:water_source", "default:lava_source"},
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = -256,
y_min = -31000,
heat_point = 0,
@ -1019,6 +1040,9 @@ function default.register_biomes(upper_limit)
depth_filler = 3,
node_riverbed = "default:sand",
depth_riverbed = 2,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = upper_limit,
y_min = 4,
heat_point = 25,
@ -1035,6 +1059,9 @@ function default.register_biomes(upper_limit)
node_riverbed = "default:sand",
depth_riverbed = 2,
node_cave_liquid = "default:water_source",
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
vertical_blend = 1,
y_max = 3,
y_min = -255,
@ -1045,6 +1072,9 @@ function default.register_biomes(upper_limit)
minetest.register_biome({
name = "taiga_under",
node_cave_liquid = {"default:water_source", "default:lava_source"},
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = -256,
y_min = -31000,
heat_point = 25,
@ -1062,6 +1092,9 @@ function default.register_biomes(upper_limit)
depth_filler = 1,
node_riverbed = "default:sand",
depth_riverbed = 2,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = upper_limit,
y_min = 4,
heat_point = 20,
@ -1078,6 +1111,9 @@ function default.register_biomes(upper_limit)
node_riverbed = "default:sand",
depth_riverbed = 2,
node_cave_liquid = "default:water_source",
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
vertical_blend = 1,
y_max = 3,
y_min = -255,
@ -1088,6 +1124,9 @@ function default.register_biomes(upper_limit)
minetest.register_biome({
name = "snowy_grassland_under",
node_cave_liquid = {"default:water_source", "default:lava_source"},
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = -256,
y_min = -31000,
heat_point = 20,
@ -1104,6 +1143,9 @@ function default.register_biomes(upper_limit)
depth_filler = 1,
node_riverbed = "default:sand",
depth_riverbed = 2,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = upper_limit,
y_min = 6,
heat_point = 50,
@ -1118,6 +1160,9 @@ function default.register_biomes(upper_limit)
depth_filler = 2,
node_riverbed = "default:sand",
depth_riverbed = 2,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
vertical_blend = 1,
y_max = 5,
y_min = 4,
@ -1134,6 +1179,9 @@ function default.register_biomes(upper_limit)
node_riverbed = "default:sand",
depth_riverbed = 2,
node_cave_liquid = "default:water_source",
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = 3,
y_min = -255,
heat_point = 50,
@ -1143,6 +1191,9 @@ function default.register_biomes(upper_limit)
minetest.register_biome({
name = "grassland_under",
node_cave_liquid = {"default:water_source", "default:lava_source"},
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = -256,
y_min = -31000,
heat_point = 50,
@ -1159,6 +1210,9 @@ function default.register_biomes(upper_limit)
depth_filler = 3,
node_riverbed = "default:sand",
depth_riverbed = 2,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = upper_limit,
y_min = 6,
heat_point = 45,
@ -1173,6 +1227,9 @@ function default.register_biomes(upper_limit)
depth_filler = 3,
node_riverbed = "default:sand",
depth_riverbed = 2,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
vertical_blend = 1,
y_max = 5,
y_min = 4,
@ -1189,6 +1246,9 @@ function default.register_biomes(upper_limit)
node_riverbed = "default:sand",
depth_riverbed = 2,
node_cave_liquid = "default:water_source",
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = 3,
y_min = -255,
heat_point = 45,
@ -1198,6 +1258,9 @@ function default.register_biomes(upper_limit)
minetest.register_biome({
name = "coniferous_forest_under",
node_cave_liquid = {"default:water_source", "default:lava_source"},
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = -256,
y_min = -31000,
heat_point = 45,
@ -1214,6 +1277,9 @@ function default.register_biomes(upper_limit)
depth_filler = 3,
node_riverbed = "default:sand",
depth_riverbed = 2,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = upper_limit,
y_min = 1,
heat_point = 60,
@ -1228,6 +1294,9 @@ function default.register_biomes(upper_limit)
depth_filler = 3,
node_riverbed = "default:sand",
depth_riverbed = 2,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = 0,
y_min = -1,
heat_point = 60,
@ -1243,6 +1312,9 @@ function default.register_biomes(upper_limit)
node_riverbed = "default:sand",
depth_riverbed = 2,
node_cave_liquid = "default:water_source",
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
vertical_blend = 1,
y_max = -2,
y_min = -255,
@ -1253,6 +1325,9 @@ function default.register_biomes(upper_limit)
minetest.register_biome({
name = "deciduous_forest_under",
node_cave_liquid = {"default:water_source", "default:lava_source"},
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = -256,
y_min = -31000,
heat_point = 60,
@ -1270,6 +1345,8 @@ function default.register_biomes(upper_limit)
node_stone = "default:desert_stone",
node_riverbed = "default:sand",
depth_riverbed = 2,
node_dungeon = "default:desert_stone",
node_dungeon_stair = "stairs:stair_desert_stone",
y_max = upper_limit,
y_min = 4,
heat_point = 92,
@ -1286,6 +1363,8 @@ function default.register_biomes(upper_limit)
node_riverbed = "default:sand",
depth_riverbed = 2,
node_cave_liquid = "default:water_source",
node_dungeon = "default:desert_stone",
node_dungeon_stair = "stairs:stair_desert_stone",
vertical_blend = 1,
y_max = 3,
y_min = -255,
@ -1296,6 +1375,9 @@ function default.register_biomes(upper_limit)
minetest.register_biome({
name = "desert_under",
node_cave_liquid = {"default:water_source", "default:lava_source"},
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = -256,
y_min = -31000,
heat_point = 92,
@ -1313,6 +1395,8 @@ function default.register_biomes(upper_limit)
node_stone = "default:sandstone",
node_riverbed = "default:sand",
depth_riverbed = 2,
node_dungeon = "default:sandstonebrick",
node_dungeon_stair = "stairs:stair_sandstone_block",
y_max = upper_limit,
y_min = 4,
heat_point = 60,
@ -1329,6 +1413,8 @@ function default.register_biomes(upper_limit)
node_riverbed = "default:sand",
depth_riverbed = 2,
node_cave_liquid = "default:water_source",
node_dungeon = "default:sandstonebrick",
node_dungeon_stair = "stairs:stair_sandstone_block",
y_max = 3,
y_min = -255,
heat_point = 60,
@ -1338,6 +1424,9 @@ function default.register_biomes(upper_limit)
minetest.register_biome({
name = "sandstone_desert_under",
node_cave_liquid = {"default:water_source", "default:lava_source"},
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = -256,
y_min = -31000,
heat_point = 60,
@ -1354,6 +1443,9 @@ function default.register_biomes(upper_limit)
depth_filler = 1,
node_riverbed = "default:sand",
depth_riverbed = 2,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = upper_limit,
y_min = 4,
heat_point = 40,
@ -1369,6 +1461,9 @@ function default.register_biomes(upper_limit)
node_riverbed = "default:sand",
depth_riverbed = 2,
node_cave_liquid = "default:water_source",
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
vertical_blend = 1,
y_max = 3,
y_min = -255,
@ -1379,6 +1474,9 @@ function default.register_biomes(upper_limit)
minetest.register_biome({
name = "cold_desert_under",
node_cave_liquid = {"default:water_source", "default:lava_source"},
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = -256,
y_min = -31000,
heat_point = 40,
@ -1389,12 +1487,15 @@ function default.register_biomes(upper_limit)
minetest.register_biome({
name = "savanna",
node_top = "default:dirt_with_dry_grass",
node_top = "default:dry_dirt_with_dry_grass",
depth_top = 1,
node_filler = "default:dirt",
node_filler = "default:dry_dirt",
depth_filler = 1,
node_riverbed = "default:sand",
depth_riverbed = 2,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = upper_limit,
y_min = 1,
heat_point = 89,
@ -1403,12 +1504,15 @@ function default.register_biomes(upper_limit)
minetest.register_biome({
name = "savanna_shore",
node_top = "default:dirt",
node_top = "default:dry_dirt",
depth_top = 1,
node_filler = "default:dirt",
node_filler = "default:dry_dirt",
depth_filler = 3,
node_riverbed = "default:sand",
depth_riverbed = 2,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = 0,
y_min = -1,
heat_point = 89,
@ -1424,6 +1528,9 @@ function default.register_biomes(upper_limit)
node_riverbed = "default:sand",
depth_riverbed = 2,
node_cave_liquid = "default:water_source",
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
vertical_blend = 1,
y_max = -2,
y_min = -255,
@ -1434,6 +1541,9 @@ function default.register_biomes(upper_limit)
minetest.register_biome({
name = "savanna_under",
node_cave_liquid = {"default:water_source", "default:lava_source"},
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = -256,
y_min = -31000,
heat_point = 89,
@ -1450,6 +1560,9 @@ function default.register_biomes(upper_limit)
depth_filler = 3,
node_riverbed = "default:sand",
depth_riverbed = 2,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = upper_limit,
y_min = 1,
heat_point = 86,
@ -1464,6 +1577,9 @@ function default.register_biomes(upper_limit)
depth_filler = 3,
node_riverbed = "default:sand",
depth_riverbed = 2,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = 0,
y_min = -1,
heat_point = 86,
@ -1479,6 +1595,9 @@ function default.register_biomes(upper_limit)
node_riverbed = "default:sand",
depth_riverbed = 2,
node_cave_liquid = "default:water_source",
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
vertical_blend = 1,
y_max = -2,
y_min = -255,
@ -1489,6 +1608,9 @@ function default.register_biomes(upper_limit)
minetest.register_biome({
name = "rainforest_under",
node_cave_liquid = {"default:water_source", "default:lava_source"},
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = -256,
y_min = -31000,
heat_point = 86,
@ -1509,6 +1631,9 @@ function default.register_floatland_biomes(floatland_level, shadow_limit)
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 1,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = 31000,
y_min = floatland_level + 2,
heat_point = 50,
@ -1521,6 +1646,9 @@ function default.register_floatland_biomes(floatland_level, shadow_limit)
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 3,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = 31000,
y_min = floatland_level + 2,
heat_point = 50,
@ -1533,6 +1661,9 @@ function default.register_floatland_biomes(floatland_level, shadow_limit)
depth_top = 1,
node_filler = "default:sand",
depth_filler = 3,
node_dungeon = "default:cobble",
node_dungeon_alt = "default:mossycobble",
node_dungeon_stair = "stairs:stair_cobble",
y_max = floatland_level + 1,
y_min = shadow_limit,
heat_point = 50,
@ -1667,7 +1798,7 @@ local function register_dry_grass_decoration(offset, scale, length)
minetest.register_decoration({
name = "default:dry_grass_" .. length,
deco_type = "simple",
place_on = {"default:dirt_with_dry_grass"},
place_on = {"default:dry_dirt_with_dry_grass"},
sidelen = 16,
noise_params = {
offset = offset,
@ -1707,6 +1838,30 @@ end
function default.register_decorations()
-- Savanna bare dirt patches.
-- Must come before all savanna decorations that are placed on dry grass.
-- Noise is similar to long dry grass noise, but scale inverted, to appear
-- where long dry grass is least dense and shortest.
minetest.register_decoration({
deco_type = "simple",
place_on = {"default:dry_dirt_with_dry_grass"},
sidelen = 4,
noise_params = {
offset = -1.5,
scale = -1.5,
spread = {x = 200, y = 200, z = 200},
seed = 329,
octaves = 4,
persist = 1.0
},
biomes = {"savanna"},
y_max = 31000,
y_min = 1,
decoration = "default:dry_dirt",
place_offset_y = -1,
flags = "force_placement",
})
-- Apple tree and log
@ -1881,7 +2036,7 @@ function default.register_decorations()
minetest.register_decoration({
name = "default:acacia_tree",
deco_type = "schematic",
place_on = {"default:dirt_with_dry_grass"},
place_on = {"default:dry_dirt_with_dry_grass"},
sidelen = 16,
noise_params = {
offset = 0,
@ -1902,7 +2057,7 @@ function default.register_decorations()
minetest.register_decoration({
name = "default:acacia_log",
deco_type = "schematic",
place_on = {"default:dirt_with_dry_grass"},
place_on = {"default:dry_dirt_with_dry_grass"},
place_offset_y = 1,
sidelen = 16,
noise_params = {
@ -1919,7 +2074,7 @@ function default.register_decorations()
schematic = minetest.get_modpath("default") .. "/schematics/acacia_log.mts",
flags = "place_center_x",
rotation = "random",
spawn_by = "default:dirt_with_dry_grass",
spawn_by = "default:dry_dirt_with_dry_grass",
num_spawn_by = 8,
})
@ -2087,7 +2242,7 @@ function default.register_decorations()
minetest.register_decoration({
name = "default:acacia_bush",
deco_type = "schematic",
place_on = {"default:dirt_with_dry_grass"},
place_on = {"default:dry_dirt_with_dry_grass"},
sidelen = 16,
noise_params = {
offset = -0.004,
@ -2193,13 +2348,13 @@ function default.register_decorations()
place_on = {"default:sand"},
sidelen = 4,
noise_params = {
offset = -0.4,
scale = 3.0,
offset = -0.7,
scale = 4.0,
spread = {x = 16, y = 16, z = 16},
seed = 513337,
octaves = 1,
persist = 0.5,
flags = "absvalue"
persist = 0.0,
flags = "absvalue, eased"
},
biomes = {"coniferous_forest_dunes", "grassland_dunes"},
y_max = 6,

3
mods/default/mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = default
description = Minetest Game mod: default
optional_depends = player_api

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 B

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 779 B

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 B

After

Width:  |  Height:  |  Size: 269 B

View File

@ -1,5 +1,8 @@
-- mods/default/tools.lua
-- support for MT game translation.
local S = default.get_translator
-- The hand
minetest.register_item(":", {
type = "none",
@ -22,7 +25,7 @@ minetest.register_item(":", {
--
minetest.register_tool("default:pick_wood", {
description = "Wooden Pickaxe",
description = S("Wooden Pickaxe"),
inventory_image = "default_tool_woodpick.png",
tool_capabilities = {
full_punch_interval = 1.2,
@ -32,12 +35,12 @@ minetest.register_tool("default:pick_wood", {
},
damage_groups = {fleshy=2},
},
groups = {flammable = 2},
sound = {breaks = "default_tool_breaks"},
groups = {pickaxe = 1, flammable = 2}
})
minetest.register_tool("default:pick_stone", {
description = "Stone Pickaxe",
description = S("Stone Pickaxe"),
inventory_image = "default_tool_stonepick.png",
tool_capabilities = {
full_punch_interval = 1.3,
@ -48,10 +51,11 @@ minetest.register_tool("default:pick_stone", {
damage_groups = {fleshy=3},
},
sound = {breaks = "default_tool_breaks"},
groups = {pickaxe = 1}
})
minetest.register_tool("default:pick_bronze", {
description = "Bronze Pickaxe",
description = S("Bronze Pickaxe"),
inventory_image = "default_tool_bronzepick.png",
tool_capabilities = {
full_punch_interval = 1.0,
@ -62,10 +66,11 @@ minetest.register_tool("default:pick_bronze", {
damage_groups = {fleshy=4},
},
sound = {breaks = "default_tool_breaks"},
groups = {pickaxe = 1}
})
minetest.register_tool("default:pick_steel", {
description = "Steel Pickaxe",
description = S("Steel Pickaxe"),
inventory_image = "default_tool_steelpick.png",
tool_capabilities = {
full_punch_interval = 1.0,
@ -76,10 +81,11 @@ minetest.register_tool("default:pick_steel", {
damage_groups = {fleshy=4},
},
sound = {breaks = "default_tool_breaks"},
groups = {pickaxe = 1}
})
minetest.register_tool("default:pick_mese", {
description = "Mese Pickaxe",
description = S("Mese Pickaxe"),
inventory_image = "default_tool_mesepick.png",
tool_capabilities = {
full_punch_interval = 0.9,
@ -90,10 +96,11 @@ minetest.register_tool("default:pick_mese", {
damage_groups = {fleshy=5},
},
sound = {breaks = "default_tool_breaks"},
groups = {pickaxe = 1}
})
minetest.register_tool("default:pick_diamond", {
description = "Diamond Pickaxe",
description = S("Diamond Pickaxe"),
inventory_image = "default_tool_diamondpick.png",
tool_capabilities = {
full_punch_interval = 0.9,
@ -104,6 +111,7 @@ minetest.register_tool("default:pick_diamond", {
damage_groups = {fleshy=5},
},
sound = {breaks = "default_tool_breaks"},
groups = {pickaxe = 1}
})
--
@ -111,7 +119,7 @@ minetest.register_tool("default:pick_diamond", {
--
minetest.register_tool("default:shovel_wood", {
description = "Wooden Shovel",
description = S("Wooden Shovel"),
inventory_image = "default_tool_woodshovel.png",
wield_image = "default_tool_woodshovel.png^[transformR90",
tool_capabilities = {
@ -122,12 +130,12 @@ minetest.register_tool("default:shovel_wood", {
},
damage_groups = {fleshy=2},
},
groups = {flammable = 2},
sound = {breaks = "default_tool_breaks"},
groups = {shovel = 1, flammable = 2}
})
minetest.register_tool("default:shovel_stone", {
description = "Stone Shovel",
description = S("Stone Shovel"),
inventory_image = "default_tool_stoneshovel.png",
wield_image = "default_tool_stoneshovel.png^[transformR90",
tool_capabilities = {
@ -139,10 +147,11 @@ minetest.register_tool("default:shovel_stone", {
damage_groups = {fleshy=2},
},
sound = {breaks = "default_tool_breaks"},
groups = {shovel = 1}
})
minetest.register_tool("default:shovel_bronze", {
description = "Bronze Shovel",
description = S("Bronze Shovel"),
inventory_image = "default_tool_bronzeshovel.png",
wield_image = "default_tool_bronzeshovel.png^[transformR90",
tool_capabilities = {
@ -154,10 +163,11 @@ minetest.register_tool("default:shovel_bronze", {
damage_groups = {fleshy=3},
},
sound = {breaks = "default_tool_breaks"},
groups = {shovel = 1}
})
minetest.register_tool("default:shovel_steel", {
description = "Steel Shovel",
description = S("Steel Shovel"),
inventory_image = "default_tool_steelshovel.png",
wield_image = "default_tool_steelshovel.png^[transformR90",
tool_capabilities = {
@ -169,10 +179,11 @@ minetest.register_tool("default:shovel_steel", {
damage_groups = {fleshy=3},
},
sound = {breaks = "default_tool_breaks"},
groups = {shovel = 1}
})
minetest.register_tool("default:shovel_mese", {
description = "Mese Shovel",
description = S("Mese Shovel"),
inventory_image = "default_tool_meseshovel.png",
wield_image = "default_tool_meseshovel.png^[transformR90",
tool_capabilities = {
@ -184,10 +195,11 @@ minetest.register_tool("default:shovel_mese", {
damage_groups = {fleshy=4},
},
sound = {breaks = "default_tool_breaks"},
groups = {shovel = 1}
})
minetest.register_tool("default:shovel_diamond", {
description = "Diamond Shovel",
description = S("Diamond Shovel"),
inventory_image = "default_tool_diamondshovel.png",
wield_image = "default_tool_diamondshovel.png^[transformR90",
tool_capabilities = {
@ -199,6 +211,7 @@ minetest.register_tool("default:shovel_diamond", {
damage_groups = {fleshy=4},
},
sound = {breaks = "default_tool_breaks"},
groups = {shovel = 1}
})
--
@ -206,7 +219,7 @@ minetest.register_tool("default:shovel_diamond", {
--
minetest.register_tool("default:axe_wood", {
description = "Wooden Axe",
description = S("Wooden Axe"),
inventory_image = "default_tool_woodaxe.png",
tool_capabilities = {
full_punch_interval = 1.0,
@ -216,12 +229,12 @@ minetest.register_tool("default:axe_wood", {
},
damage_groups = {fleshy=2},
},
groups = {flammable = 2},
sound = {breaks = "default_tool_breaks"},
groups = {axe = 1, flammable = 2}
})
minetest.register_tool("default:axe_stone", {
description = "Stone Axe",
description = S("Stone Axe"),
inventory_image = "default_tool_stoneaxe.png",
tool_capabilities = {
full_punch_interval = 1.2,
@ -232,10 +245,11 @@ minetest.register_tool("default:axe_stone", {
damage_groups = {fleshy=3},
},
sound = {breaks = "default_tool_breaks"},
groups = {axe = 1}
})
minetest.register_tool("default:axe_bronze", {
description = "Bronze Axe",
description = S("Bronze Axe"),
inventory_image = "default_tool_bronzeaxe.png",
tool_capabilities = {
full_punch_interval = 1.0,
@ -246,10 +260,11 @@ minetest.register_tool("default:axe_bronze", {
damage_groups = {fleshy=4},
},
sound = {breaks = "default_tool_breaks"},
groups = {axe = 1}
})
minetest.register_tool("default:axe_steel", {
description = "Steel Axe",
description = S("Steel Axe"),
inventory_image = "default_tool_steelaxe.png",
tool_capabilities = {
full_punch_interval = 1.0,
@ -260,10 +275,11 @@ minetest.register_tool("default:axe_steel", {
damage_groups = {fleshy=4},
},
sound = {breaks = "default_tool_breaks"},
groups = {axe = 1}
})
minetest.register_tool("default:axe_mese", {
description = "Mese Axe",
description = S("Mese Axe"),
inventory_image = "default_tool_meseaxe.png",
tool_capabilities = {
full_punch_interval = 0.9,
@ -274,10 +290,11 @@ minetest.register_tool("default:axe_mese", {
damage_groups = {fleshy=6},
},
sound = {breaks = "default_tool_breaks"},
groups = {axe = 1}
})
minetest.register_tool("default:axe_diamond", {
description = "Diamond Axe",
description = S("Diamond Axe"),
inventory_image = "default_tool_diamondaxe.png",
tool_capabilities = {
full_punch_interval = 0.9,
@ -288,6 +305,7 @@ minetest.register_tool("default:axe_diamond", {
damage_groups = {fleshy=7},
},
sound = {breaks = "default_tool_breaks"},
groups = {axe = 1}
})
--
@ -295,7 +313,7 @@ minetest.register_tool("default:axe_diamond", {
--
minetest.register_tool("default:sword_wood", {
description = "Wooden Sword",
description = S("Wooden Sword"),
inventory_image = "default_tool_woodsword.png",
tool_capabilities = {
full_punch_interval = 1,
@ -305,12 +323,12 @@ minetest.register_tool("default:sword_wood", {
},
damage_groups = {fleshy=2},
},
groups = {flammable = 2},
sound = {breaks = "default_tool_breaks"},
groups = {sword = 1, flammable = 2}
})
minetest.register_tool("default:sword_stone", {
description = "Stone Sword",
description = S("Stone Sword"),
inventory_image = "default_tool_stonesword.png",
tool_capabilities = {
full_punch_interval = 1.2,
@ -321,10 +339,11 @@ minetest.register_tool("default:sword_stone", {
damage_groups = {fleshy=4},
},
sound = {breaks = "default_tool_breaks"},
groups = {sword = 1}
})
minetest.register_tool("default:sword_bronze", {
description = "Bronze Sword",
description = S("Bronze Sword"),
inventory_image = "default_tool_bronzesword.png",
tool_capabilities = {
full_punch_interval = 0.8,
@ -335,10 +354,11 @@ minetest.register_tool("default:sword_bronze", {
damage_groups = {fleshy=6},
},
sound = {breaks = "default_tool_breaks"},
groups = {sword = 1}
})
minetest.register_tool("default:sword_steel", {
description = "Steel Sword",
description = S("Steel Sword"),
inventory_image = "default_tool_steelsword.png",
tool_capabilities = {
full_punch_interval = 0.8,
@ -349,10 +369,11 @@ minetest.register_tool("default:sword_steel", {
damage_groups = {fleshy=6},
},
sound = {breaks = "default_tool_breaks"},
groups = {sword = 1}
})
minetest.register_tool("default:sword_mese", {
description = "Mese Sword",
description = S("Mese Sword"),
inventory_image = "default_tool_mesesword.png",
tool_capabilities = {
full_punch_interval = 0.7,
@ -363,10 +384,11 @@ minetest.register_tool("default:sword_mese", {
damage_groups = {fleshy=7},
},
sound = {breaks = "default_tool_breaks"},
groups = {sword = 1}
})
minetest.register_tool("default:sword_diamond", {
description = "Diamond Sword",
description = S("Diamond Sword"),
inventory_image = "default_tool_diamondsword.png",
tool_capabilities = {
full_punch_interval = 0.7,
@ -377,10 +399,11 @@ minetest.register_tool("default:sword_diamond", {
damage_groups = {fleshy=8},
},
sound = {breaks = "default_tool_breaks"},
groups = {sword = 1}
})
minetest.register_tool("default:key", {
description = "Key",
description = S("Key"),
inventory_image = "default_key.png",
groups = {key = 1, not_in_creative_inventory = 1},
stack_max = 1,

View File

@ -1,3 +1,8 @@
-- default/torch.lua
-- support for MT game translation.
local S = default.get_translator
local function on_flood(pos, oldnode, newnode)
minetest.add_item(pos, ItemStack("default:torch 1"))
-- Play flame-extinguish sound if liquid is not an 'igniter'
@ -14,7 +19,7 @@ local function on_flood(pos, oldnode, newnode)
end
minetest.register_node("default:torch", {
description = "Torch",
description = S("Torch"),
drawtype = "mesh",
mesh = "torch_floor.obj",
inventory_image = "default_torch_on_floor.png",

View File

@ -1,3 +1,8 @@
-- default/trees.lua
-- support for MT game translation.
local S = default.get_translator
local random = math.random
--
@ -560,9 +565,12 @@ function default.sapling_on_place(itemstack, placer, pointed_thing,
interval) then
minetest.record_protection_violation(pos, player_name)
-- Print extra information to explain
-- minetest.chat_send_player(player_name,
-- itemstack:get_definition().description .. " will intersect protection " ..
-- "on growth")
minetest.chat_send_player(player_name,
itemstack:get_definition().description .. " will intersect protection " ..
"on growth")
S("@1 will intersect protection on growth.",
itemstack:get_definition().description))
return itemstack
end

View File

@ -1,2 +0,0 @@
default
screwdriver?

View File

@ -1,9 +1,15 @@
-- doors/init.lua
-- our API object
doors = {}
doors.registered_doors = {}
doors.registered_trapdoors = {}
-- Load support for MT game translation.
local S = minetest.get_translator("doors")
local function replace_old_owner_information(pos)
local meta = minetest.get_meta(pos)
local owner = meta:get_string("doors_owner")
@ -71,7 +77,7 @@ end
-- this hidden node is placed on top of the bottom, and prevents
-- nodes from being placed in the top half of the door.
minetest.register_node("doors:hidden", {
description = "Hidden Door Segment",
description = S("Hidden Door Segment"),
-- can't use airlike otherwise falling nodes will turn to entities
-- and will be forever stuck until door is removed.
drawtype = "nodebox",
@ -327,7 +333,7 @@ function doors.register(name, def)
if def.protected then
meta:set_string("owner", pn)
meta:set_string("infotext", "Owned by " .. pn)
meta:set_string("infotext", def.description .. "\n" .. S("Owned by @1", pn))
end
if not (creative and creative.is_enabled_for and creative.is_enabled_for(pn)) then
@ -401,7 +407,7 @@ function doors.register(name, def)
-- verify placer is owner of lockable door
if owner ~= pname then
minetest.record_protection_violation(pos, pname)
minetest.chat_send_player(pname, "You do not own this locked door.")
minetest.chat_send_player(pname, S("You do not own this locked door."))
return nil
end
@ -411,7 +417,7 @@ function doors.register(name, def)
meta:set_string("key_lock_secret", secret)
end
return secret, "a locked door", owner
return secret, S("a locked door"), owner
end
def.node_dig_prediction = ""
else
@ -449,8 +455,8 @@ function doors.register(name, def)
end
doors.register("door_wood", {
tiles = {{name = "doors_door_wood.png", backface_culling = true}},
description = "Wooden Door",
tiles = {{ name = "doors_door_wood.png", backface_culling = true }},
description = S("Wooden Door"),
inventory_image = "doors_item_wood.png",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
recipe = {
@ -462,7 +468,7 @@ doors.register("door_wood", {
doors.register("door_steel", {
tiles = {{name = "doors_door_steel.png", backface_culling = true}},
description = "Steel Door",
description = S("Steel Door"),
inventory_image = "doors_item_steel.png",
protected = true,
groups = {cracky = 1, level = 2},
@ -478,7 +484,7 @@ doors.register("door_steel", {
doors.register("door_glass", {
tiles = {"doors_door_glass.png"},
description = "Glass Door",
description = S("Glass Door"),
inventory_image = "doors_item_glass.png",
groups = {cracky=3, oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(),
@ -493,7 +499,7 @@ doors.register("door_glass", {
doors.register("door_obsidian_glass", {
tiles = {"doors_door_obsidian_glass.png"},
description = "Obsidian Glass Door",
description = S("Obsidian Glass Door"),
inventory_image = "doors_item_obsidian_glass.png",
groups = {cracky=3},
sounds = default.node_sound_glass_defaults(),
@ -581,7 +587,7 @@ function doors.register_trapdoor(name, def)
local pn = placer:get_player_name()
local meta = minetest.get_meta(pos)
meta:set_string("owner", pn)
meta:set_string("infotext", "Owned by "..pn)
meta:set_string("infotext", def.description .. "\n" .. S("Owned by @1", pn))
return (creative and creative.is_enabled_for and creative.is_enabled_for(pn))
end
@ -600,7 +606,7 @@ function doors.register_trapdoor(name, def)
-- verify placer is owner of lockable door
if owner ~= pname then
minetest.record_protection_violation(pos, pname)
minetest.chat_send_player(pname, "You do not own this trapdoor.")
minetest.chat_send_player(pname, S("You do not own this trapdoor."))
return nil
end
@ -610,7 +616,7 @@ function doors.register_trapdoor(name, def)
meta:set_string("key_lock_secret", secret)
end
return secret, "a locked trapdoor", owner
return secret, S("a locked trapdoor"), owner
end
def.node_dig_prediction = ""
else
@ -688,7 +694,7 @@ function doors.register_trapdoor(name, def)
end
doors.register_trapdoor("doors:trapdoor", {
description = "Wooden Trapdoor",
description = S("Wooden Trapdoor"),
inventory_image = "doors_trapdoor.png",
wield_image = "doors_trapdoor.png",
tile_front = "doors_trapdoor.png",
@ -697,7 +703,7 @@ doors.register_trapdoor("doors:trapdoor", {
})
doors.register_trapdoor("doors:trapdoor_steel", {
description = "Steel Trapdoor",
description = S("Steel Trapdoor"),
inventory_image = "doors_trapdoor_steel.png",
wield_image = "doors_trapdoor_steel.png",
tile_front = "doors_trapdoor_steel.png",
@ -710,24 +716,25 @@ doors.register_trapdoor("doors:trapdoor_steel", {
})
minetest.register_craft({
output = 'doors:trapdoor 2',
output = "doors:trapdoor 2",
recipe = {
{'group:wood', 'group:wood', 'group:wood'},
{'group:wood', 'group:wood', 'group:wood'},
{'', '', ''},
{"group:wood", "group:wood", "group:wood"},
{"group:wood", "group:wood", "group:wood"},
{"", "", ""},
}
})
minetest.register_craft({
output = 'doors:trapdoor_steel',
output = "doors:trapdoor_steel",
recipe = {
{'default:steel_ingot', 'default:steel_ingot'},
{'default:steel_ingot', 'default:steel_ingot'},
{"default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "default:steel_ingot"},
}
})
----fence gate----
local fence_collision_extra = minetest.settings:get_bool("enable_fence_tall") and 3/8 or 0
function doors.register_fencegate(name, def)
local fence = {
@ -751,7 +758,7 @@ function doors.register_fencegate(name, def)
end,
selection_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/4, 1/2, 1/2, 1/4},
fixed = {-1/2, -1/2, -1/4, 1/2, 1/2, 1/4}
},
}
@ -777,7 +784,7 @@ function doors.register_fencegate(name, def)
fence_closed.sound = "doors_fencegate_open"
fence_closed.collision_box = {
type = "fixed",
fixed = {-1/2, -1/2, -1/4, 1/2, 1/2, 1/4},
fixed = {-1/2, -1/2, -1/8, 1/2, 1/2 + fence_collision_extra, 1/8}
}
local fence_open = table.copy(fence)
@ -787,8 +794,8 @@ function doors.register_fencegate(name, def)
fence_open.groups.not_in_creative_inventory = 1
fence_open.collision_box = {
type = "fixed",
fixed = {{-1/2, -1/2, -1/4, -3/8, 1/2, 1/4},
{-1/2, -3/8, -1/2, -3/8, 3/8, 0}},
fixed = {{-1/2, -1/2, -1/8, -3/8, 1/2 + fence_collision_extra, 1/8},
{-1/2, -3/8, -1/2, -3/8, 3/8, 0 }}
}
minetest.register_node(":" .. name .. "_closed", fence_closed)
@ -804,35 +811,35 @@ function doors.register_fencegate(name, def)
end
doors.register_fencegate("doors:gate_wood", {
description = "Apple Wood Fence Gate",
description = S("Apple Wood Fence Gate"),
texture = "default_wood.png",
material = "default:wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("doors:gate_acacia_wood", {
description = "Acacia Wood Fence Gate",
description = S("Acacia Wood Fence Gate"),
texture = "default_acacia_wood.png",
material = "default:acacia_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("doors:gate_junglewood", {
description = "Jungle Wood Fence Gate",
description = S("Jungle Wood Fence Gate"),
texture = "default_junglewood.png",
material = "default:junglewood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}
})
doors.register_fencegate("doors:gate_pine_wood", {
description = "Pine Wood Fence Gate",
description = S("Pine Wood Fence Gate"),
texture = "default_pine_wood.png",
material = "default:pine_wood",
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}
})
doors.register_fencegate("doors:gate_aspen_wood", {
description = "Aspen Wood Fence Gate",
description = S("Aspen Wood Fence Gate"),
texture = "default_aspen_wood.png",
material = "default:aspen_wood",
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}

View File

@ -0,0 +1,18 @@
# textdomain: doors
Hidden Door Segment=Verborgenes Türsegment
Owned by @1=Eigentum von @1
You do not own this locked door.=Diese abgeschlossene Tür gehört Ihnen nicht.
a locked door=eine abgeschlossene Tür
Wooden Door=Holztür
Steel Door=Stahltür
Glass Door=Glastür
Obsidian Glass Door=Obsidianglastür
You do not own this trapdoor.=Diese Falltür gehört Ihnen nicht.
a locked trapdoor=eine abgeschlossene Falltür
Wooden Trapdoor=Holzfalltür
Steel Trapdoor=Stahlfalltür
Apple Wood Fence Gate=Apfelholzzauntor
Acacia Wood Fence Gate=Akazienholzzauntor
Jungle Wood Fence Gate=Dschungelholzzauntor
Pine Wood Fence Gate=Kiefernholzzauntor
Aspen Wood Fence Gate=Espenholzzauntor

View File

@ -0,0 +1,18 @@
# textdomain: doors
Hidden Door Segment=
Owned by @1=
You do not own this locked door.=
a locked door=
Wooden Door=
Steel Door=
Glass Door=
Obsidian Glass Door=
You do not own this trapdoor.=
a locked trapdoor=
Wooden Trapdoor=
Steel Trapdoor=
Apple Wood Fence Gate=
Acacia Wood Fence Gate=
Jungle Wood Fence Gate=
Pine Wood Fence Gate=
Aspen Wood Fence Gate=

4
mods/doors/mod.conf Normal file
View File

@ -0,0 +1,4 @@
name = doors
description = Minetest Game mod: doors
depends = default
optional_depends = screwdriver

View File

@ -1 +0,0 @@
default

View File

@ -1,10 +1,13 @@
dungeon_loot.registered_loot = {
-- buckets
{name = "bucket:bucket_empty", chance = 0.55},
-- water in deserts or above ground, lava otherwise
{name = "bucket:bucket_water", chance = 0.45, types = {"sandstone", "desert"}},
{name = "bucket:bucket_water", chance = 0.45, y = {0, 32768}, types = {"normal"}},
{name = "bucket:bucket_lava", chance = 0.45, y = {-32768, -1}, types = {"normal"}},
-- water in deserts/ice or above ground, lava otherwise
{name = "bucket:bucket_water", chance = 0.45,
types = {"sandstone", "desert", "ice"}},
{name = "bucket:bucket_water", chance = 0.45, y = {0, 32768},
types = {"normal"}},
{name = "bucket:bucket_lava", chance = 0.45, y = {-32768, -1},
types = {"normal"}},
-- various items
{name = "default:stick", chance = 0.6, count = {3, 6}},
@ -16,8 +19,10 @@ dungeon_loot.registered_loot = {
{name = "farming:string", chance = 0.5, count = {1, 8}},
{name = "farming:wheat", chance = 0.5, count = {2, 5}},
{name = "default:apple", chance = 0.4, count = {1, 4}},
{name = "farming:seed_cotton", chance = 0.4, count = {1, 4}, types = {"normal"}},
{name = "default:cactus", chance = 0.4, count = {1, 4}, types = {"sandstone", "desert"}},
{name = "farming:seed_cotton", chance = 0.4, count = {1, 4},
types = {"normal"}},
{name = "default:cactus", chance = 0.4, count = {1, 4},
types = {"sandstone", "desert"}},
-- minerals
{name = "default:coal_lump", chance = 0.9, count = {1, 12}},
@ -31,10 +36,16 @@ dungeon_loot.registered_loot = {
{name = "default:axe_diamond", chance = 0.05},
-- natural materials
{name = "default:sand", chance = 0.8, count = {4, 32}, y = {-64, 32768}, types = {"normal"}},
{name = "default:desert_sand", chance = 0.8, count = {4, 32}, y = {-64, 32768}, types = {"sandstone"}},
{name = "default:desert_cobble", chance = 0.8, count = {4, 32}, types = {"desert"}},
{name = "default:dirt", chance = 0.6, count = {2, 16}, y = {-64, 32768}},
{name = "default:sand", chance = 0.8, count = {4, 32}, y = {-64, 32768},
types = {"normal"}},
{name = "default:desert_sand", chance = 0.8, count = {4, 32}, y = {-64, 32768},
types = {"sandstone"}},
{name = "default:desert_cobble", chance = 0.8, count = {4, 32},
types = {"desert"}},
{name = "default:snow", chance = 0.8, count = {8, 64}, y = {-64, 32768},
types = {"ice"}},
{name = "default:dirt", chance = 0.6, count = {2, 16}, y = {-64, 32768},
types = {"normal", "sandstone", "desert"}},
{name = "default:obsidian", chance = 0.25, count = {1, 3}, y = {-32768, -512}},
{name = "default:mese", chance = 0.15, y = {-32768, -512}},
}

View File

@ -15,12 +15,8 @@ local function random_sample(rand, list, count)
end
local function find_walls(cpos)
local wall = minetest.registered_aliases["mapgen_cobble"]
local wall_alt = minetest.registered_aliases["mapgen_mossycobble"]
local wall_ss = minetest.registered_aliases["mapgen_sandstonebrick"]
local wall_ds = minetest.registered_aliases["mapgen_desert_stone"]
local is_wall = function(node)
return table.indexof({wall, wall_alt, wall_ss, wall_ds}, node.name) ~= -1
return node.name ~= "air" and node.name ~= "ignore"
end
local dirs = {{x=1, z=0}, {x=-1, z=0}, {x=0, z=1}, {x=0, z=-1}}
@ -29,7 +25,6 @@ local function find_walls(cpos)
local ret = {}
local mindist = {x=0, z=0}
local min = function(a, b) return a ~= 0 and math.min(a, b) or b end
local wallnode
for _, dir in ipairs(dirs) do
for i = 1, 9 do -- 9 = max room size / 2
local pos = vector.add(cpos, {x=dir.x*i, y=0, z=dir.z*i})
@ -50,7 +45,6 @@ local function find_walls(cpos)
else
mindist.z = min(mindist.z, i-1)
end
wallnode = node.name
end
-- abort even if it wasn't a wall cause something is in the way
break
@ -58,14 +52,21 @@ local function find_walls(cpos)
end
end
local mapping = {
[wall_ss] = "sandstone",
[wall_ds] = "desert"
}
local biome = minetest.get_biome_data(cpos)
biome = biome and minetest.get_biome_name(biome.biome) or ""
local type = "normal"
if biome:find("desert") == 1 then
type = "desert"
elseif biome:find("sandstone_desert") == 1 then
type = "sandstone"
elseif biome:find("icesheet") == 1 then
type = "ice"
end
return {
walls = ret,
size = {x=mindist.x*2, z=mindist.z*2},
type = mapping[wallnode] or "normal"
type = type,
}
end
@ -75,8 +76,8 @@ local function populate_chest(pos, rand, dungeontype)
local item_list = dungeon_loot._internal_get_loot(pos.y, dungeontype)
-- take random (partial) sample of all possible items
assert(#item_list >= dungeon_loot.STACKS_PER_CHEST_MAX)
item_list = random_sample(rand, item_list, dungeon_loot.STACKS_PER_CHEST_MAX)
local sample_n = math.min(#item_list, dungeon_loot.STACKS_PER_CHEST_MAX)
item_list = random_sample(rand, item_list, sample_n)
-- apply chances / randomized amounts and collect resulting items
local items = {}

View File

@ -0,0 +1,3 @@
name = dungeon_loot
description = Minetest Game mod: dungeon_loot
depends = default

View File

View File

@ -1,16 +1,21 @@
-- dye/init.lua
dye = {}
-- Load support for MT game translation.
local S = minetest.get_translator("dye")
-- Make dye names and descriptions available globally
dye.dyes = {
{"white", "White"},
{"grey", "Grey"},
{"dark_grey", "Dark grey"},
{"dark_grey", "Dark Grey"},
{"black", "Black"},
{"violet", "Violet"},
{"blue", "Blue"},
{"cyan", "Cyan"},
{"dark_green", "Dark green"},
{"dark_green", "Dark Green"},
{"green", "Green"},
{"yellow", "Yellow"},
{"brown", "Brown"},
@ -30,7 +35,7 @@ for _, row in ipairs(dye.dyes) do
minetest.register_craftitem("dye:" .. name, {
inventory_image = "dye_" .. name .. ".png",
description = description .. " Dye",
description = S(description .. " Dye"),
groups = groups
})
@ -94,7 +99,29 @@ local dye_recipes = {
for _, mix in pairs(dye_recipes) do
minetest.register_craft({
type = "shapeless",
output = 'dye:' .. mix[3] .. ' 2',
recipe = {'dye:' .. mix[1], 'dye:' .. mix[2]},
output = "dye:" .. mix[3] .. " 2",
recipe = {"dye:" .. mix[1], "dye:" .. mix[2]},
})
end
-- Dummy calls to S() to allow translation scripts to detect the strings.
-- To update this run:
-- for _,e in ipairs(dye.dyes) do print(("S(%q)"):format(e[2].." Dye")) end
--[[
S("White Dye")
S("Grey Dye")
S("Dark Grey Dye")
S("Black Dye")
S("Violet Dye")
S("Blue Dye")
S("Cyan Dye")
S("Dark Green Dye")
S("Green Dye")
S("Yellow Dye")
S("Brown Dye")
S("Orange Dye")
S("Red Dye")
S("Magenta Dye")
S("Pink Dye")
--]]

16
mods/dye/locale/dye.de.tr Normal file
View File

@ -0,0 +1,16 @@
# textdomain: dye
White Dye=Weißer Farbstoff
Grey Dye=Grauer Farbstoff
Dark Grey Dye=Dunkelgrauer Farbstoff
Black Dye=Schwarzer Farbstoff
Violet Dye=Violetter Farbstoff
Blue Dye=Blauer Farbstoff
Cyan Dye=Türkiser Farbstoff
Dark Green Dye=Dunkelgrüner Farbstoff
Green Dye=Grüner Farbstoff
Yellow Dye=Gelber Farbstoff
Brown Dye=Brauner Farbstoff
Orange Dye=Orange Farbstoff
Red Dye=Roter Farbstoff
Magenta Dye=Magenta Farbstoff
Pink Dye=Rosa Farbstoff

View File

@ -0,0 +1,16 @@
# textdomain: dye
White Dye=
Grey Dye=
Dark Grey Dye=
Black Dye=
Violet Dye=
Blue Dye=
Cyan Dye=
Dark Green Dye=
Green Dye=
Yellow Dye=
Brown Dye=
Orange Dye=
Red Dye=
Magenta Dye=
Pink Dye=

2
mods/dye/mod.conf Normal file
View File

@ -0,0 +1,2 @@
name = dye
description = Minetest Game mod: dye

View File

@ -0,0 +1,13 @@
Minetest Game mod: env_sounds
=============================
See license.txt for license information.
Authors of source code
----------------------
paramat (MIT)
Authors of media (sounds)
-------------------------
Yuval (CC0 1.0)
https://freesound.org/people/Yuval/sounds/197023/
env_sounds_water.*.ogg

64
mods/env_sounds/init.lua Normal file
View File

@ -0,0 +1,64 @@
-- Parameters
local radius = 8 -- Water node search radius around player
-- End of parameters
local river_source_sounds = minetest.settings:get_bool("river_source_sounds")
-- Update sound for player
local function update_sound(player)
local player_name = player:get_player_name()
local ppos = player:get_pos()
local areamin = vector.subtract(ppos, radius)
local areamax = vector.add(ppos, radius)
local water_nodes = {"default:water_flowing", "default:river_water_flowing"}
if river_source_sounds then
table.insert(water_nodes, "default:river_water_source")
end
local wpos, _ = minetest.find_nodes_in_area(areamin, areamax, water_nodes)
local waters = #wpos
if waters == 0 then
return
end
-- Find average position of water positions
local wposav = vector.new()
for _, pos in ipairs(wpos) do
wposav.x = wposav.x + pos.x
wposav.y = wposav.y + pos.y
wposav.z = wposav.z + pos.z
end
wposav = vector.divide(wposav, waters)
minetest.sound_play(
"env_sounds_water",
{
pos = wposav,
to_player = player_name,
gain = math.min(0.04 + waters * 0.004, 0.4),
}
)
end
-- Update sound 'on joinplayer'
minetest.register_on_joinplayer(function(player)
update_sound(player)
end)
-- Cyclic sound update
local function cyclic_update()
for _, player in pairs(minetest.get_connected_players()) do
update_sound(player)
end
minetest.after(3.5, cyclic_update)
end
minetest.after(0, cyclic_update)

View File

@ -0,0 +1,57 @@
License of source code
----------------------
The MIT License (MIT)
Copyright (C) 2019 paramat
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.
For more details:
https://opensource.org/licenses/MIT
Licenses of media (sounds)
--------------------------
CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
Yuval
No Copyright
The person who associated a work with this deed has dedicated the work to the
public domain by waiving all of his or her rights to the work worldwide under
copyright law, including all related and neighboring rights, to the extent
allowed by law.
You can copy, modify, distribute and perform the work, even for commercial
purposes, all without asking permission. See Other Information below.
Other Information:
In no way are the patent or trademark rights of any person affected by CC0, nor
are the rights that other persons may have in the work or in how the work is
used, such as publicity or privacy rights.
Unless expressly stated otherwise, the person who associated a work with this
deed makes no warranties about the work, and disclaims liability for all uses
of the work, to the fullest extent permitted by applicable law.
When using or citing the work, you should not imply endorsement by the author
or the affirmer.
For more details:
https://creativecommons.org/publicdomain/zero/1.0/

3
mods/env_sounds/mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = env_sounds
description = Minetest Game mod: env_sounds
depends = default

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +1,7 @@
-- farming/api.lua
-- support for MT game translation.
local S = farming.get_translator
-- Wear out hoes, place soil
-- TODO Ignore group:flower
@ -78,7 +82,7 @@ farming.register_hoe = function(name, def)
end
-- Check def table
if def.description == nil then
def.description = "Hoe"
def.description = S("Hoe")
end
if def.inventory_image == nil then
def.inventory_image = "unknown_item.png"
@ -251,7 +255,10 @@ farming.register_plant = function(name, def)
-- Check def table
if not def.description then
def.description = "Seed"
def.description = S("Seed")
end
if not def.harvest_description then
def.harvest_description = pname:gsub("^%l", string.upper)
end
if not def.inventory_image then
def.inventory_image = "unknown_item.png"
@ -321,7 +328,7 @@ farming.register_plant = function(name, def)
-- Register harvest
minetest.register_craftitem(":" .. mname .. ":" .. pname, {
description = pname:gsub("^%l", string.upper),
description = def.harvest_description,
inventory_image = mname .. "_" .. pname .. ".png",
groups = def.groups or {flammable = 2},
})

View File

@ -1,3 +0,0 @@
default
wool
stairs

View File

@ -1,23 +1,30 @@
-- farming/hoes.lua
-- support for MT game translation.
local S = farming.get_translator
farming.register_hoe(":farming:hoe_wood", {
description = "Wooden Hoe",
description = S("Wooden Hoe"),
inventory_image = "farming_tool_woodhoe.png",
max_uses = 30,
material = "group:wood",
groups = {flammable = 2},
groups = {hoe = 1, flammable = 2},
})
farming.register_hoe(":farming:hoe_stone", {
description = "Stone Hoe",
description = S("Stone Hoe"),
inventory_image = "farming_tool_stonehoe.png",
max_uses = 90,
material = "group:stone"
material = "group:stone",
groups = {hoe = 1}
})
farming.register_hoe(":farming:hoe_steel", {
description = "Steel Hoe",
description = S("Steel Hoe"),
inventory_image = "farming_tool_steelhoe.png",
max_uses = 500,
material = "default:steel_ingot"
material = "default:steel_ingot",
groups = {hoe = 1}
})
-- The following are deprecated by removing the 'material' field to prevent
@ -26,22 +33,22 @@ farming.register_hoe(":farming:hoe_steel", {
-- release.
farming.register_hoe(":farming:hoe_bronze", {
description = "Bronze Hoe",
description = S("Bronze Hoe"),
inventory_image = "farming_tool_bronzehoe.png",
max_uses = 220,
groups = {not_in_creative_inventory = 1},
groups = {hoe = 1, not_in_creative_inventory = 1},
})
farming.register_hoe(":farming:hoe_mese", {
description = "Mese Hoe",
description = S("Mese Hoe"),
inventory_image = "farming_tool_mesehoe.png",
max_uses = 350,
groups = {not_in_creative_inventory = 1},
groups = {hoe = 1, not_in_creative_inventory = 1},
})
farming.register_hoe(":farming:hoe_diamond", {
description = "Diamond Hoe",
description = S("Diamond Hoe"),
inventory_image = "farming_tool_diamondhoe.png",
max_uses = 500,
groups = {not_in_creative_inventory = 1},
groups = {hoe = 1, not_in_creative_inventory = 1},
})

View File

@ -1,8 +1,13 @@
-- farming/init.lua
-- Load support for MT game translation.
local S = minetest.get_translator("farming")
-- Global farming namespace
farming = {}
farming.path = minetest.get_modpath("farming")
farming.get_translator = S
-- Load files
@ -14,7 +19,8 @@ dofile(farming.path .. "/hoes.lua")
-- WHEAT
farming.register_plant("farming:wheat", {
description = "Wheat Seed",
description = S("Wheat Seed"),
harvest_description = S("Wheat"),
paramtype2 = "meshoptions",
inventory_image = "farming_wheat_seed.png",
steps = 8,
@ -26,13 +32,13 @@ farming.register_plant("farming:wheat", {
})
minetest.register_craftitem("farming:flour", {
description = "Flour",
description = S("Flour"),
inventory_image = "farming_flour.png",
groups = {food_flour = 1, flammable = 1},
})
minetest.register_craftitem("farming:bread", {
description = "Bread",
description = S("Bread"),
inventory_image = "farming_bread.png",
on_use = minetest.item_eat(5),
groups = {food_bread = 1, flammable = 2},
@ -55,7 +61,8 @@ minetest.register_craft({
-- Cotton
farming.register_plant("farming:cotton", {
description = "Cotton Seed",
description = S("Cotton Seed"),
harvest_description = S("Cotton"),
inventory_image = "farming_cotton_seed.png",
steps = 8,
minlight = 13,
@ -65,7 +72,7 @@ farming.register_plant("farming:cotton", {
})
minetest.register_craftitem("farming:string", {
description = "String",
description = S("String"),
inventory_image = "farming_string.png",
groups = {flammable = 2},
})

View File

@ -0,0 +1,25 @@
# textdomain: farming
Wooden Hoe=Holzhacke
Stone Hoe=Steinhacke
Steel Hoe=Stahlhacke
Bronze Hoe=Bronzehacke
Mese Hoe=Mesehacke
Diamond Hoe=Diamanthacke
Wheat Seed=Weizensamen
Flour=Mehl
Bread=Brot
Cotton Seed=Baumwollsamen
String=Faden
Soil=Ackerboden
Wet Soil=Nasser Ackerboden
Dry Soil=Trockener Ackerboden
Wet Dry Soil=Nasser trockener Ackerboden
Desert Sand Soil=Wüsensandackerboden
Wet Desert Sand Soil=Nasser Wüstensandackerboden
Straw=Stroh
Straw Stair=Strohtreppe
Straw Slab=Strohplatte
Inner Straw Stair=Innere Strohtreppe
Outer Straw Stair=Äußere Strohtreppe
Wheat=Weizen
Cotton=Baumwolle

View File

@ -0,0 +1,25 @@
# textdomain: farming
Wooden Hoe=
Stone Hoe=
Steel Hoe=
Bronze Hoe=
Mese Hoe=
Diamond Hoe=
Wheat Seed=
Flour=
Bread=
Cotton Seed=
String=
Soil=
Wet Soil=
Dry Soil=
Wet Dry Soil=
Desert Sand Soil=
Wet Desert Sand Soil=
Straw=
Straw Stair=
Inner Straw Stair=
Outer Straw Stair=
Straw Slab=
Wheat=
Cotton=

Some files were not shown because too many files have changed in this diff Show More