Merge remote branch 'origin/master'

This commit is contained in:
Weblate
2013-04-07 13:39:28 +02:00
59 changed files with 3414 additions and 470 deletions

1
.gitignore vendored
View File

@@ -37,6 +37,7 @@ src/jthread/Makefile
src/jthread/cmake_config.h
src/jthread/cmake_install.cmake
src/jthread/libjthread.a
src/json/libjson.a
src/lua/build/
src/lua/CMakeFiles/
src/cguittfont/CMakeFiles/

View File

@@ -12,7 +12,7 @@ set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
# Also remember to set PROTOCOL_VERSION in clientserver.h when releasing
set(VERSION_MAJOR 0)
set(VERSION_MINOR 4)
set(VERSION_PATCH 5)
set(VERSION_PATCH 6)
if(VERSION_EXTRA)
set(VERSION_PATCH ${VERSION_PATCH}-${VERSION_EXTRA})
endif()
@@ -144,6 +144,18 @@ if(EXISTS ${MINETEST_GAME_SOURCE} AND IS_DIRECTORY ${MINETEST_GAME_SOURCE})
install(FILES ${MINETEST_GAME_SOURCE}/README.txt DESTINATION "${SHAREDIR}/games/minetest_game/")
install(DIRECTORY ${MINETEST_GAME_SOURCE}/mods DESTINATION "${SHAREDIR}/games/minetest_game")
endif()
set(MINETEST_BUILD_GAME_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/games/build")
if(EXISTS ${MINETEST_BUILD_GAME_SOURCE} AND IS_DIRECTORY ${MINETEST_BUILD_GAME_SOURCE})
install(FILES ${MINETEST_BUILD_GAME_SOURCE}/game.conf DESTINATION "${SHAREDIR}/games/build/")
install(FILES ${MINETEST_BUILD_GAME_SOURCE}/README.txt DESTINATION "${SHAREDIR}/games/build/")
install(DIRECTORY ${MINETEST_BUILD_GAME_SOURCE}/mods DESTINATION "${SHAREDIR}/games/build")
endif()
set(MINETEST_SURVIVAL_GAME_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/games/survival")
if(EXISTS ${MINETEST_SURVIVAL_GAME_SOURCE} AND IS_DIRECTORY ${MINETEST_SURVIVAL_GAME_SOURCE})
install(FILES ${MINETEST_SURVIVAL_GAME_SOURCE}/game.conf DESTINATION "${SHAREDIR}/games/survival/")
install(FILES ${MINETEST_SURVIVAL_GAME_SOURCE}/README.txt DESTINATION "${SHAREDIR}/games/survival/")
install(DIRECTORY ${MINETEST_SURVIVAL_GAME_SOURCE}/mods DESTINATION "${SHAREDIR}/games/survival")
endif()
if(BUILD_CLIENT)
#install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/sounds/base/pack" DESTINATION "${SHAREDIR}/sounds/base")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/textures/base/pack" DESTINATION "${SHAREDIR}/textures/base")

View File

@@ -665,3 +665,23 @@ minetest.register_chatcommand("clearobjects", {
minetest.chat_send_all("*** Cleared all objects.")
end,
})
minetest.register_chatcommand("msg", {
params = "<name> <message>",
description = "Send a private message",
privs = {shout=true},
func = function(name, param)
local found, _, sendto, message = param:find("^([^%s]+)%s(.+)$")
if found then
if minetest.env:get_player_by_name(sendto) then
minetest.log("action", "PM from "..name.." to "..sendto..": "..message)
minetest.chat_send_player(sendto, "PM from "..name..": "..message)
minetest.chat_send_player(name, "Message sent")
else
minetest.chat_send_player(name, "The player "..sendto.." is not online")
end
else
minetest.chat_send_player(name, "Invalid usage, see /help msg")
end
end,
})

View File

@@ -142,7 +142,7 @@ end
-- Some common functions
--
function nodeupdate_single(p)
function nodeupdate_single(p, delay)
n = minetest.env:get_node(p)
if minetest.get_node_group(n.name, "falling_node") ~= 0 then
p_bottom = {x=p.x, y=p.y-1, z=p.z}
@@ -151,9 +151,13 @@ function nodeupdate_single(p)
if minetest.registered_nodes[n_bottom.name] and
(not minetest.registered_nodes[n_bottom.name].walkable or
minetest.registered_nodes[n_bottom.name].buildable_to) then
minetest.env:remove_node(p)
spawn_falling_node(p, n.name)
nodeupdate(p)
if delay then
minetest.after(0.1, nodeupdate_single, {x=p.x, y=p.y, z=p.z}, false)
else
minetest.env:remove_node(p)
spawn_falling_node(p, n.name)
nodeupdate(p)
end
end
end
@@ -174,8 +178,7 @@ function nodeupdate(p)
for x = -1,1 do
for y = -1,1 do
for z = -1,1 do
p2 = {x=p.x+x, y=p.y+y, z=p.z+z}
nodeupdate_single(p2)
nodeupdate_single({x=p.x+x, y=p.y+y, z=p.z+z}, not (x==0 and y==0 and z==0))
end
end
end

View File

@@ -103,6 +103,10 @@ function minetest.register_item(name, itemdef)
-- Apply defaults and add to registered_* table
if itemdef.type == "node" then
-- Use the nodebox as selection box if it's not set manually
if itemdef.drawtype == "nodebox" and not itemdef.selection_box then
itemdef.selection_box = itemdef.node_box
end
setmetatable(itemdef, {__index = minetest.nodedef_default})
minetest.registered_nodes[itemdef.name] = itemdef
elseif itemdef.type == "craft" then
@@ -249,8 +253,8 @@ minetest.register_item(":unknown", {
minetest.register_node(":air", {
description = "Air (you hacker you!)",
inventory_image = "unknown_block.png",
wield_image = "unknown_block.png",
inventory_image = "unknown_node.png",
wield_image = "unknown_node.png",
drawtype = "airlike",
paramtype = "light",
sunlight_propagates = true,
@@ -265,8 +269,8 @@ minetest.register_node(":air", {
minetest.register_node(":ignore", {
description = "Ignore (you hacker you!)",
inventory_image = "unknown_block.png",
wield_image = "unknown_block.png",
inventory_image = "unknown_node.png",
wield_image = "unknown_node.png",
drawtype = "airlike",
paramtype = "none",
sunlight_propagates = false,

View File

@@ -1,5 +1,5 @@
Minetest Lua Modding API Reference 0.4.5
==========================================
Minetest Lua Modding API Reference 0.4.6
========================================
More information at http://c55.me/minetest/
Introduction
@@ -1185,7 +1185,21 @@ methods:
- get_perlin(seeddiff, octaves, persistence, scale)
^ Return world-specific perlin noise (int(worldseed)+seeddiff)
- clear_objects()
^ clear all objects in the environments
^ clear all objects in the environments
- line_of_sight(pos1,pos2,stepsize) ->true/false
^ checkif there is a direct line of sight between pos1 and pos2
^ pos1 First position
^ pos2 Second position
^ stepsize smaller gives more accurate results but requires more computing
time. Default is 1.
-find_path(pos1,pos2,searchdistance,max_jump,max_drop,algorithm) -> table containing path
^ returns a table of 3d points representing a path from pos1 to pos2 or nil
^ pos1: start position
^ pos2: end position
^ searchdistance: number of blocks to search in each direction
^ max_jump: maximum height difference to consider walkable
^ max_drop: maximum height difference to consider droppable
^ algorithm: A*_noprefetch(default), A*, Dijkstra
- spawn_tree (pos, {treedef})
^ spawns L-System tree at given pos with definition in treedef table
treedef={
@@ -1348,6 +1362,10 @@ Player-only: (no-op for other objects)
{jump=bool,right=bool,left=bool,LMB=bool,RMB=bool,sneak=bool,aux1=bool,down=bool,up=bool}
- get_player_control_bits(): returns integer with bit packed player pressed keys
bit nr/meaning: 0/up ,1/down ,2/left ,3/right ,4/jump ,5/aux1 ,6/sneak ,7/LMB ,8/RMB
- set_physics_override(speed, jump, gravity)
modifies per-player walking speed, jump height, and gravity.
Values default to 1 and act as offsets to the physics settings
in minetest.conf. nil will keep the current setting.
InvRef: Reference to an inventory
methods:
@@ -1585,6 +1603,7 @@ Node definition (register_node)
damage_per_second = 0, -- If player is inside node, this damage is caused
node_box = {type="regular"}, -- See "Node boxes"
selection_box = {type="regular"}, -- See "Node boxes"
^ If drawtype "nodebox" is used and selection_box is nil, then node_box is used
legacy_facedir_simple = false, -- Support maps made in and before January 2012
legacy_wallmounted = false, -- Support maps made in and before January 2012
sounds = {

View File

@@ -1588,99 +1588,6 @@ minetest.register_alias("mapgen_stone_with_coal", "default:stone_with_coal")
minetest.register_alias("mapgen_stone_with_iron", "default:stone_with_iron")
minetest.register_alias("mapgen_mese", "default:mese")
minetest.register_biome_groups({
0.35, 0.10, 0.30
})
--
-- Register the biomes for the map generator
--
minetest.register_biome({
group_id = 0,
name = "Ocean",
terrain_type = "liquid",
node_top = "default:gravel",
node_filler = "default:stone",
num_top_nodes = 4,
height_min = -3000,
height_max = 3000,
heat_min = -20.0,
heat_max = 100.0,
humidity_min = 0.0,
humidity_max = 100.0,
scale = 10.0,
offset = -10.0,
})
minetest.register_biome({
group_id = 1,
name = "Beach",
terrain_type = "normal",
node_top = "default:sand",
node_filler = "default:stone",
num_top_nodes = 5,
height_min = -3000,
height_max = 3000,
heat_min = 5.0,
heat_max = 100.0,
humidity_min = 0.0,
humidity_max = 100.0,
scale = 5.0,
offset = 5.0,
})
minetest.register_biome({
group_id = 1,
name = "Gravel Beach",
terrain_type = "normal",
node_top = "default:gravel",
node_filler = "default:cobble",
num_top_nodes = 5,
height_min = -3000,
height_max = 3000,
heat_min = -50.0,
heat_max = 5.0,
humidity_min = 0.0,
humidity_max = 100.0,
scale = 5.0,
offset = 5.0,
})
minetest.register_biome({
group_id = 2,
name = "Land",
terrain_type = "normal",
node_top = "default:dirt_with_grass",
node_filler = "default:stone",
num_top_nodes = 5,
height_min = -3000,
height_max = 3000,
heat_min = -50.0,
heat_max = 100.0,
humidity_min = 0.0,
humidity_max = 100.0,
scale = 12.0,
offset = 20.0,
})
minetest.register_biome({
group_id = 3,
name = "Hills",
terrain_type = "normal",
node_top = "default:dirt",
node_filler = "default:stone",
num_top_nodes = 3,
height_min = -3000,
height_max = 3000,
heat_min = -50.0,
heat_max = 100.0,
humidity_min = 0.0,
humidity_max = 100.0,
scale = 60.0,
offset = 20.0,
})
-- Support old code
function default.spawn_falling_node(p, nodename)
spawn_falling_node(p, nodename)

View File

@@ -28,10 +28,10 @@ minetest.after(1.0, switch_player_visual)
]]
minetest.register_node("experimental:soundblock", {
tile_images = {"unknown_block.png", "default_tnt_bottom.png",
tile_images = {"unknown_node.png", "default_tnt_bottom.png",
"default_tnt_side.png", "default_tnt_side.png",
"default_tnt_side.png", "default_tnt_side.png"},
inventory_image = minetest.inventorycube("unknown_block.png",
inventory_image = minetest.inventorycube("unknown_node.png",
"default_tnt_side.png", "default_tnt_side.png"),
groups = {dig_immediate=3},
})

757
po/uk/minetest.po Normal file
View File

@@ -0,0 +1,757 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: minetest\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-03-30 19:56+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/guiConfigureWorld.cpp:125
msgid ""
"Warning: Some mods are not configured yet.\n"
"They will be enabled by default when you save the configuration. "
msgstr ""
#: src/guiConfigureWorld.cpp:144
msgid ""
"Warning: Some configured mods are missing.\n"
"Their setting will be removed when you save the configuration. "
msgstr ""
#: src/guiConfigureWorld.cpp:208
msgid "enabled"
msgstr ""
#: src/guiConfigureWorld.cpp:215
msgid "Enable All"
msgstr ""
#: src/guiConfigureWorld.cpp:222
msgid "Disable All"
msgstr ""
#: src/guiConfigureWorld.cpp:228
msgid "depends on:"
msgstr ""
#: src/guiConfigureWorld.cpp:240
msgid "is required by:"
msgstr ""
#: src/guiConfigureWorld.cpp:262 src/guiCreateWorld.cpp:165
#: src/guiKeyChangeMenu.cpp:179 src/keycode.cpp:223
msgid "Cancel"
msgstr ""
#: src/guiConfigureWorld.cpp:268 src/guiKeyChangeMenu.cpp:173
msgid "Save"
msgstr ""
#: src/guiConfigureWorld.cpp:394
msgid "Configuration saved. "
msgstr ""
#: src/guiConfigureWorld.cpp:402
msgid "Warning: Configuration not consistent. "
msgstr ""
#: src/guiConfirmMenu.cpp:120
msgid "Yes"
msgstr ""
#: src/guiConfirmMenu.cpp:126
msgid "No"
msgstr ""
#: src/guiCreateWorld.cpp:116
msgid "World name"
msgstr ""
#: src/guiCreateWorld.cpp:135
msgid "Game"
msgstr ""
#: src/guiCreateWorld.cpp:159
msgid "Create"
msgstr ""
#: src/guiDeathScreen.cpp:96
msgid "You died."
msgstr ""
#: src/guiDeathScreen.cpp:104
msgid "Respawn"
msgstr ""
#: src/guiFormSpecMenu.cpp:582
msgid "Left click: Move all items, Right click: Move single item"
msgstr ""
#: src/guiFormSpecMenu.cpp:607 src/guiMessageMenu.cpp:109
#: src/guiTextInputMenu.cpp:131
msgid "Proceed"
msgstr ""
#: src/guiKeyChangeMenu.cpp:114
msgid "Keybindings. (If this menu screws up, remove stuff from minetest.conf)"
msgstr ""
#: src/guiKeyChangeMenu.cpp:151
msgid "\"Use\" = climb down"
msgstr ""
#: src/guiKeyChangeMenu.cpp:164
msgid "Double tap \"jump\" to toggle fly"
msgstr ""
#: src/guiKeyChangeMenu.cpp:269
msgid "Key already in use"
msgstr ""
#: src/guiKeyChangeMenu.cpp:347
msgid "press key"
msgstr ""
#: src/guiKeyChangeMenu.cpp:372
msgid "Forward"
msgstr ""
#: src/guiKeyChangeMenu.cpp:373
msgid "Backward"
msgstr ""
#: src/guiKeyChangeMenu.cpp:374 src/keycode.cpp:228
msgid "Left"
msgstr ""
#: src/guiKeyChangeMenu.cpp:375 src/keycode.cpp:228
msgid "Right"
msgstr ""
#: src/guiKeyChangeMenu.cpp:376
msgid "Use"
msgstr ""
#: src/guiKeyChangeMenu.cpp:377
msgid "Jump"
msgstr ""
#: src/guiKeyChangeMenu.cpp:378
msgid "Sneak"
msgstr ""
#: src/guiKeyChangeMenu.cpp:379
msgid "Drop"
msgstr ""
#: src/guiKeyChangeMenu.cpp:380
msgid "Inventory"
msgstr ""
#: src/guiKeyChangeMenu.cpp:381
msgid "Chat"
msgstr ""
#: src/guiKeyChangeMenu.cpp:382
msgid "Command"
msgstr ""
#: src/guiKeyChangeMenu.cpp:383
msgid "Console"
msgstr ""
#: src/guiKeyChangeMenu.cpp:384
msgid "Toggle fly"
msgstr ""
#: src/guiKeyChangeMenu.cpp:385
msgid "Toggle fast"
msgstr ""
#: src/guiKeyChangeMenu.cpp:386
msgid "Toggle noclip"
msgstr ""
#: src/guiKeyChangeMenu.cpp:387
msgid "Range select"
msgstr ""
#: src/guiKeyChangeMenu.cpp:388
msgid "Print stacks"
msgstr ""
#: src/guiMainMenu.cpp:92
msgid "Cannot create world: Name contains invalid characters"
msgstr ""
#: src/guiMainMenu.cpp:101
msgid "Cannot create world: A world by this name already exists"
msgstr ""
#: src/guiMainMenu.cpp:283
msgid "Singleplayer"
msgstr ""
#: src/guiMainMenu.cpp:284
msgid "Multiplayer"
msgstr ""
#: src/guiMainMenu.cpp:285
msgid "Advanced"
msgstr ""
#: src/guiMainMenu.cpp:286
msgid "Settings"
msgstr ""
#: src/guiMainMenu.cpp:287
msgid "Credits"
msgstr ""
#: src/guiMainMenu.cpp:317
msgid "Select World:"
msgstr ""
#: src/guiMainMenu.cpp:339 src/guiMainMenu.cpp:511 src/keycode.cpp:229
msgid "Delete"
msgstr ""
#: src/guiMainMenu.cpp:346
msgid "New"
msgstr ""
#: src/guiMainMenu.cpp:354
msgid "Configure"
msgstr ""
#: src/guiMainMenu.cpp:369 src/keycode.cpp:248
msgid "Play"
msgstr ""
#: src/guiMainMenu.cpp:380 src/guiMainMenu.cpp:619
msgid "Creative Mode"
msgstr ""
#: src/guiMainMenu.cpp:386 src/guiMainMenu.cpp:625
msgid "Enable Damage"
msgstr ""
#: src/guiMainMenu.cpp:406 src/guiMainMenu.cpp:541
msgid "Name/Password"
msgstr ""
#: src/guiMainMenu.cpp:442 src/guiMainMenu.cpp:459 src/guiMainMenu.cpp:1184
msgid "Favorites:"
msgstr ""
#: src/guiMainMenu.cpp:450 src/guiMainMenu.cpp:1194
msgid "Public Server List:"
msgstr ""
#: src/guiMainMenu.cpp:470 src/guiMainMenu.cpp:568
msgid "Address/Port"
msgstr ""
#: src/guiMainMenu.cpp:497 src/guiMainMenu.cpp:1183
msgid "Show Public"
msgstr ""
#: src/guiMainMenu.cpp:501 src/guiMainMenu.cpp:1193
msgid "Show Favorites"
msgstr ""
#: src/guiMainMenu.cpp:521
msgid "Connect"
msgstr ""
#: src/guiMainMenu.cpp:591
msgid "Leave address blank to start a local server."
msgstr ""
#: src/guiMainMenu.cpp:600
msgid "Start Game / Connect"
msgstr ""
#: src/guiMainMenu.cpp:632
msgid "Public"
msgstr ""
#: src/guiMainMenu.cpp:640 src/guiMainMenu.cpp:1113
msgid "Delete world"
msgstr ""
#: src/guiMainMenu.cpp:647
msgid "Create world"
msgstr ""
#: src/guiMainMenu.cpp:681
msgid "Fancy trees"
msgstr ""
#: src/guiMainMenu.cpp:687
msgid "Smooth Lighting"
msgstr ""
#: src/guiMainMenu.cpp:693
msgid "3D Clouds"
msgstr ""
#: src/guiMainMenu.cpp:699
msgid "Opaque water"
msgstr ""
#: src/guiMainMenu.cpp:709
msgid "Mip-Mapping"
msgstr ""
#: src/guiMainMenu.cpp:716
msgid "Anisotropic Filtering"
msgstr ""
#: src/guiMainMenu.cpp:723
msgid "Bi-Linear Filtering"
msgstr ""
#: src/guiMainMenu.cpp:730
msgid "Tri-Linear Filtering"
msgstr ""
#: src/guiMainMenu.cpp:738
msgid "Shaders"
msgstr ""
#: src/guiMainMenu.cpp:745
msgid "Preload item visuals"
msgstr ""
#: src/guiMainMenu.cpp:752
msgid "Enable Particles"
msgstr ""
#: src/guiMainMenu.cpp:759
msgid "Finite liquid"
msgstr ""
#: src/guiMainMenu.cpp:769
msgid "Change keys"
msgstr ""
#: src/guiMainMenu.cpp:1084
msgid "Address required."
msgstr ""
#: src/guiMainMenu.cpp:1102
msgid "Cannot delete world: Nothing selected"
msgstr ""
#: src/guiMainMenu.cpp:1117
msgid "Files to be deleted"
msgstr ""
#: src/guiMainMenu.cpp:1133
msgid "Cannot create world: No games found"
msgstr ""
#: src/guiMainMenu.cpp:1149
msgid "Cannot configure world: Nothing selected"
msgstr ""
#: src/guiMainMenu.cpp:1256
msgid "Failed to delete all world files"
msgstr ""
#: src/guiPasswordChange.cpp:108
msgid "Old Password"
msgstr ""
#: src/guiPasswordChange.cpp:125
msgid "New Password"
msgstr ""
#: src/guiPasswordChange.cpp:141
msgid "Confirm Password"
msgstr ""
#: src/guiPasswordChange.cpp:158
msgid "Change"
msgstr ""
#: src/guiPasswordChange.cpp:167
msgid "Passwords do not match!"
msgstr ""
#: src/guiPauseMenu.cpp:123
msgid "Continue"
msgstr ""
#: src/guiPauseMenu.cpp:132
msgid "Change Password"
msgstr ""
#: src/guiPauseMenu.cpp:140
msgid "Sound Volume"
msgstr ""
#: src/guiPauseMenu.cpp:147
msgid "Exit to Menu"
msgstr ""
#: src/guiPauseMenu.cpp:154
msgid "Exit to OS"
msgstr ""
#: src/guiPauseMenu.cpp:161
msgid ""
"Default Controls:\n"
"- WASD: Walk\n"
"- Mouse left: dig/hit\n"
"- Mouse right: place/use\n"
"- Mouse wheel: select item\n"
"- 0...9: select item\n"
"- Shift: sneak\n"
"- R: Toggle viewing all loaded chunks\n"
"- I: Inventory menu\n"
"- ESC: This menu\n"
"- T: Chat\n"
msgstr ""
#: src/guiVolumeChange.cpp:108
msgid "Sound Volume: "
msgstr ""
#: src/guiVolumeChange.cpp:121
msgid "Exit"
msgstr ""
#: src/keycode.cpp:223
msgid "Left Button"
msgstr ""
#: src/keycode.cpp:223
msgid "Middle Button"
msgstr ""
#: src/keycode.cpp:223
msgid "Right Button"
msgstr ""
#: src/keycode.cpp:223
msgid "X Button 1"
msgstr ""
#: src/keycode.cpp:224
msgid "Back"
msgstr ""
#: src/keycode.cpp:224
msgid "Clear"
msgstr ""
#: src/keycode.cpp:224
msgid "Return"
msgstr ""
#: src/keycode.cpp:224
msgid "Tab"
msgstr ""
#: src/keycode.cpp:224
msgid "X Button 2"
msgstr ""
#: src/keycode.cpp:225
msgid "Capital"
msgstr ""
#: src/keycode.cpp:225
msgid "Control"
msgstr ""
#: src/keycode.cpp:225
msgid "Kana"
msgstr ""
#: src/keycode.cpp:225
msgid "Menu"
msgstr ""
#: src/keycode.cpp:225
msgid "Pause"
msgstr ""
#: src/keycode.cpp:225
msgid "Shift"
msgstr ""
#: src/keycode.cpp:226
msgid "Convert"
msgstr ""
#: src/keycode.cpp:226
msgid "Escape"
msgstr ""
#: src/keycode.cpp:226
msgid "Final"
msgstr ""
#: src/keycode.cpp:226
msgid "Junja"
msgstr ""
#: src/keycode.cpp:226
msgid "Kanji"
msgstr ""
#: src/keycode.cpp:226
msgid "Nonconvert"
msgstr ""
#: src/keycode.cpp:227
msgid "Accept"
msgstr ""
#: src/keycode.cpp:227
msgid "End"
msgstr ""
#: src/keycode.cpp:227
msgid "Home"
msgstr ""
#: src/keycode.cpp:227
msgid "Mode Change"
msgstr ""
#: src/keycode.cpp:227
msgid "Next"
msgstr ""
#: src/keycode.cpp:227
msgid "Prior"
msgstr ""
#: src/keycode.cpp:227
msgid "Space"
msgstr ""
#: src/keycode.cpp:228
msgid "Down"
msgstr ""
#: src/keycode.cpp:228
msgid "Execute"
msgstr ""
#: src/keycode.cpp:228
msgid "Print"
msgstr ""
#: src/keycode.cpp:228
msgid "Select"
msgstr ""
#: src/keycode.cpp:228
msgid "Up"
msgstr ""
#: src/keycode.cpp:229
msgid "Help"
msgstr ""
#: src/keycode.cpp:229
msgid "Insert"
msgstr ""
#: src/keycode.cpp:229
msgid "Snapshot"
msgstr ""
#: src/keycode.cpp:232
msgid "Left Windows"
msgstr ""
#: src/keycode.cpp:233
msgid "Apps"
msgstr ""
#: src/keycode.cpp:233
msgid "Numpad 0"
msgstr ""
#: src/keycode.cpp:233
msgid "Numpad 1"
msgstr ""
#: src/keycode.cpp:233
msgid "Right Windows"
msgstr ""
#: src/keycode.cpp:233
msgid "Sleep"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 2"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 3"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 4"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 5"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 6"
msgstr ""
#: src/keycode.cpp:234
msgid "Numpad 7"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad *"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad +"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad -"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad /"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad 8"
msgstr ""
#: src/keycode.cpp:235
msgid "Numpad 9"
msgstr ""
#: src/keycode.cpp:239
msgid "Num Lock"
msgstr ""
#: src/keycode.cpp:239
msgid "Scroll Lock"
msgstr ""
#: src/keycode.cpp:240
msgid "Left Shift"
msgstr ""
#: src/keycode.cpp:240
msgid "Right Shift"
msgstr ""
#: src/keycode.cpp:241
msgid "Left Control"
msgstr ""
#: src/keycode.cpp:241
msgid "Left Menu"
msgstr ""
#: src/keycode.cpp:241
msgid "Right Control"
msgstr ""
#: src/keycode.cpp:241
msgid "Right Menu"
msgstr ""
#: src/keycode.cpp:243
msgid "Comma"
msgstr ""
#: src/keycode.cpp:243
msgid "Minus"
msgstr ""
#: src/keycode.cpp:243
msgid "Period"
msgstr ""
#: src/keycode.cpp:243
msgid "Plus"
msgstr ""
#: src/keycode.cpp:247
msgid "Attn"
msgstr ""
#: src/keycode.cpp:247
msgid "CrSel"
msgstr ""
#: src/keycode.cpp:248
msgid "Erase OEF"
msgstr ""
#: src/keycode.cpp:248
msgid "ExSel"
msgstr ""
#: src/keycode.cpp:248
msgid "OEM Clear"
msgstr ""
#: src/keycode.cpp:248
msgid "PA1"
msgstr ""
#: src/keycode.cpp:248
msgid "Zoom"
msgstr ""
#: src/main.cpp:1506
msgid "Main Menu"
msgstr ""
#: src/main.cpp:1830
msgid "Failed to initialize world"
msgstr ""
#: src/main.cpp:1842
msgid "No world selected and no address provided. Nothing to do."
msgstr ""
#: src/main.cpp:1850
msgid "Could not find or load game \""
msgstr ""
#: src/main.cpp:1864
msgid "Invalid gamespec."
msgstr ""
#: src/main.cpp:1904
msgid "Connection error (timed out?)"
msgstr ""
#: src/main.cpp:1915
msgid ""
"\n"
"Check debug.txt for details."
msgstr ""

View File

@@ -227,6 +227,7 @@ set(common_SRCS
emerge.cpp
mapgen.cpp
mapgen_v6.cpp
mapgen_v7.cpp
mapgen_indev.cpp
mapgen_singlenode.cpp
treegen.cpp
@@ -264,6 +265,7 @@ set(common_SRCS
clientserver.cpp
staticobject.cpp
serverlist.cpp
pathfinder.cpp
util/serialize.cpp
util/directiontables.cpp
util/numeric.cpp

View File

@@ -1,6 +1,6 @@
/*
Minetest
Copyright (C) 2010-2013 kwolekr, Ryan Kwolek <kwolekr2@cs.scranton.edu>
Copyright (C) 2010-2013 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -23,68 +23,50 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "log.h"
#include "main.h"
#define BT_NONE 0
#define BT_OCEAN 1
#define BT_LAKE 2
#define BT_SBEACH 3
#define BT_GBEACH 4
#define BT_PLAINS 5
#define BT_HILLS 6
#define BT_EXTREMEHILLS 7
#define BT_MOUNTAINS 8
#define BT_DESERT 9
#define BT_DESERTHILLS 10
#define BT_HELL 11
#define BT_AETHER 12
#define BT_BTMASK 0x3F
#define BTF_SNOW 0x40
#define BTF_FOREST 0x80
#define BGFREQ_1 ( 0.40)
#define BGFREQ_2 (BGFREQ_1 + 0.05)
#define BGFREQ_3 (BGFREQ_2 + 0.08)
#define BGFREQ_4 (BGFREQ_3 + 0.35)
#define BGFREQ_5 (BGFREQ_4 + 0.18)
//BGFREQ_5 is not checked as an upper bound; it ought to sum up to 1.00, but it's okay if it doesn't.
NoiseParams nparams_biome_def_heat =
{50, 50, v3f(500.0, 500.0, 500.0), 5349, 3, 0.70};
NoiseParams nparams_biome_def_humidity =
{50, 50, v3f(500.0, 500.0, 500.0), 842, 3, 0.55};
/*float bg1_temps[] = {0.0};
int bg1_biomes[] = {BT_OCEAN};
BiomeDefManager::BiomeDefManager() {
biome_registration_finished = false;
np_heat = &nparams_biome_def_heat;
np_humidity = &nparams_biome_def_humidity;
float bg2_temps[] = {10.0};
int bg2_biomes[] = {BT_GBEACH, BT_SBEACH};
// Create default biome to be used in case none exist
Biome *b = new Biome;
b->id = 0;
b->name = "Default";
b->flags = 0;
float bg3_temps[] = {30.0, 40.0};
int bg3_biomes[] = {BT_HILLS, BT_EXTREMEHILLS, BT_MOUNTAINS};
b->c_top = CONTENT_AIR;
b->top_depth = 0;
b->c_filler = b->c_top;
b->filler_height = MAP_GENERATION_LIMIT;
float bg4_temps[] = {25.0, 30.0, 35.0, 40.0};
int bg4_biomes[] = {BT_HILLS, BT_EXTREMEHILLS, BT_MOUNTAINS, BT_DESERT, BT_DESERTHILLS};
b->height_min = -MAP_GENERATION_LIMIT;
b->height_max = MAP_GENERATION_LIMIT;
b->heat_point = 0.0;
b->humidity_point = 0.0;
float bg5_temps[] = {5.0, 40.0};
int bg5_biomes[] = {BT_LAKE, BT_PLAINS, BT_DESERT};*/
NoiseParams np_default = {20.0, 15.0, v3f(250., 250., 250.), 82341, 5, 0.6};
BiomeDefManager::BiomeDefManager(IGameDef *gamedef) {
this->m_gamedef = gamedef;
this->ndef = gamedef->ndef();
//the initial biome group
bgroups.push_back(new std::vector<Biome *>);
biomes.push_back(b);
}
BiomeDefManager::~BiomeDefManager() {
for (unsigned int i = 0; i != bgroups.size(); i++)
delete bgroups[i];
//if (biomecache)
// delete[] biomecache;
for (size_t i = 0; i != biomes.size(); i++)
delete biomes[i];
}
Biome *BiomeDefManager::createBiome(BiomeTerrainType btt) {
switch (btt) {
/*switch (btt) {
case BIOME_TERRAIN_NORMAL:
return new Biome;
case BIOME_TERRAIN_LIQUID:
@@ -92,142 +74,97 @@ Biome *BiomeDefManager::createBiome(BiomeTerrainType btt) {
case BIOME_TERRAIN_NETHER:
return new BiomeHell;
case BIOME_TERRAIN_AETHER:
return new BiomeAether;
return new BiomeSky;
case BIOME_TERRAIN_FLAT:
return new BiomeSuperflat;
}
return NULL;
return NULL;*/
return new Biome;
}
void BiomeDefManager::addBiomeGroup(float freq) {
int size = bgroup_freqs.size();
float newfreq = freq;
// just a PoC, obviously needs optimization later on (precalculate this)
void BiomeDefManager::calcBiomes(BiomeNoiseInput *input, u8 *biomeid_map) {
int i = 0;
for (int y = 0; y != input->mapsize.Y; y++) {
for (int x = 0; x != input->mapsize.X; x++, i++) {
float heat = (input->heat_map[i] + 1) * 50;
float humidity = (input->humidity_map[i] + 1) * 50;
biomeid_map[i] = getBiome(heat, humidity, input->height_map[i])->id;
}
}
}
if (size)
newfreq += bgroup_freqs[size - 1];
bgroup_freqs.push_back(newfreq);
bgroups.push_back(new std::vector<Biome *>);
verbosestream << "BiomeDefManager: added biome group with frequency " <<
newfreq << std::endl;
void BiomeDefManager::resolveNodeNames(INodeDefManager *ndef) {
Biome *b;
biome_registration_finished = true;
for (size_t i = 0; i != biomes.size(); i++) {
b = biomes[i];
if (b->c_top == CONTENT_IGNORE) {
b->c_top = ndef->getId(b->top_nodename);
if (b->c_top == CONTENT_IGNORE) {
errorstream << "BiomeDefManager::resolveNodeNames: node '"
<< b->top_nodename << "' not defined" << std::endl;
b->c_top = CONTENT_AIR;
b->top_depth = 0;
}
}
if (b->c_filler == CONTENT_IGNORE) {
b->c_filler = ndef->getId(b->filler_nodename);
if (b->c_filler == CONTENT_IGNORE) {
errorstream << "BiomeDefManager::resolveNodeNames: node '"
<< b->filler_nodename << "' not defined" << std::endl;
b->c_filler = CONTENT_AIR;
b->filler_height = MAP_GENERATION_LIMIT;
}
}
}
}
void BiomeDefManager::addBiome(Biome *b) {
std::vector<Biome *> *bgroup;
if ((unsigned int)b->groupid >= bgroups.size()) {
errorstream << "BiomeDefManager: attempted to add biome '" << b->name
<< "' to nonexistent biome group " << b->groupid << std::endl;
if (biome_registration_finished) {
errorstream << "BIomeDefManager: biome registration already finished, dropping " << b->name <<std::endl;
delete b;
return;
}
size_t nbiomes = biomes.size();
if (nbiomes >= 0xFF) {
errorstream << "BiomeDefManager: too many biomes, dropping " << b->name << std::endl;
delete b;
return;
}
bgroup = bgroups[b->groupid];
bgroup->push_back(b);
verbosestream << "BiomeDefManager: added biome '" << b->name <<
"' to biome group " << (int)b->groupid << std::endl;
b->id = (u8)nbiomes;
biomes.push_back(b);
verbosestream << "BiomeDefManager: added biome " << b->name << std::endl;
}
void BiomeDefManager::addDefaultBiomes() {
Biome *b;
Biome *BiomeDefManager::getBiome(float heat, float humidity, s16 y) {
Biome *b, *biome_closest = NULL;
float dist_min = FLT_MAX;
b = new Biome;
b->name = "Default";
b->n_top = MapNode(ndef->getId("mapgen_stone"));
b->n_filler = b->n_top;
b->ntopnodes = 0;
b->height_min = -MAP_GENERATION_LIMIT;
b->height_max = MAP_GENERATION_LIMIT;
b->heat_min = FLT_MIN;
b->heat_max = FLT_MAX;
b->humidity_min = FLT_MIN;
b->humidity_max = FLT_MAX;
b->np = &np_default;
biome_default = b;
}
for (size_t i = 1; i < biomes.size(); i++) {
b = biomes[i];
if (y > b->height_max || y < b->height_min)
continue;
Biome *BiomeDefManager::getBiome(float bgfreq, float heat, float humidity) {
std::vector<Biome *> *bgroup;
Biome *b;
int i;
int ngroups = bgroup_freqs.size();
if (!ngroups)
return biome_default;
for (i = 0; (i != ngroups) && (bgfreq > bgroup_freqs[i]); i++);
bgroup = bgroups[i];
int nbiomes = bgroup->size();
for (i = 0; i != nbiomes; i++) {
b = bgroup->operator[](i);
if (heat >= b->heat_min && heat <= b->heat_max &&
humidity >= b->humidity_min && humidity <= b->humidity_max)
return b;
float d_heat = heat - b->heat_point;
float d_humidity = humidity - b->humidity_point;
float dist = (d_heat * d_heat) +
(d_humidity * d_humidity);
if (dist < dist_min) {
dist_min = dist;
biome_closest = b;
}
}
return biome_default;
}
//////////////////////////// [ Generic biome ] ////////////////////////////////
int Biome::getSurfaceHeight(float noise_terrain) {
return np->offset + np->scale * noise_terrain;
}
void Biome::genColumn(Mapgen *mapgen, int x, int z, int y1, int y2) {
}
///////////////////////////// [ Ocean biome ] /////////////////////////////////
void BiomeLiquid::genColumn(Mapgen *mapgen, int x, int z, int y1, int y2) {
}
///////////////////////////// [ Nether biome ] /////////////////////////////////
int BiomeHell::getSurfaceHeight(float noise_terrain) {
return np->offset + np->scale * noise_terrain;
}
void BiomeHell::genColumn(Mapgen *mapgen, int x, int z, int y1, int y2) {
}
///////////////////////////// [ Aether biome ] ////////////////////////////////
int BiomeAether::getSurfaceHeight(float noise_terrain) {
return np->offset + np->scale * noise_terrain;
}
void BiomeAether::genColumn(Mapgen *mapgen, int x, int z, int y1, int y2) {
}
/////////////////////////// [ Superflat biome ] ///////////////////////////////
int BiomeSuperflat::getSurfaceHeight(float noise_terrain) {
return ntopnodes;
}
void BiomeSuperflat::genColumn(Mapgen *mapgen, int x, int z, int y1, int y2) {
return biome_closest ? biome_closest : biomes[0];
}

View File

@@ -1,6 +1,6 @@
/*
Minetest
Copyright (C) 2010-2013 kwolekr, Ryan Kwolek <kwolekr2@cs.scranton.edu>
Copyright (C) 2010-2013 kwolekr, Ryan Kwolek <kwolekr@minetest.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -27,7 +27,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "noise.h"
#include "mapgen.h"
enum BiomeTerrainType
{
BIOME_TERRAIN_NORMAL,
@@ -37,62 +36,54 @@ enum BiomeTerrainType
BIOME_TERRAIN_FLAT
};
extern NoiseParams nparams_biome_def_heat;
extern NoiseParams nparams_biome_def_humidity;
class Biome {
public:
MapNode n_top;
MapNode n_filler;
s16 ntopnodes;
s8 groupid;
s8 flags;
u8 id;
std::string name;
u32 flags;
std::string top_nodename;
std::string filler_nodename;
content_t c_top;
s16 top_depth;
content_t c_filler;
s16 filler_height;
s16 height_min;
s16 height_max;
float heat_min;
float heat_max;
float humidity_min;
float humidity_max;
std::string name;
NoiseParams *np;
virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2);
virtual int getSurfaceHeight(float noise_terrain);
float heat_point;
float humidity_point;
};
class BiomeLiquid : public Biome {
virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2);
};
class BiomeHell : public Biome {
virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2);
virtual int getSurfaceHeight(float noise_terrain);
};
class BiomeAether : public Biome {
virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2);
virtual int getSurfaceHeight(float noise_terrain);
};
class BiomeSuperflat : public Biome {
virtual void genColumn(Mapgen *mg, int x, int z, int y1, int y2);
virtual int getSurfaceHeight(float noise_terrain);
struct BiomeNoiseInput {
v2s16 mapsize;
float *heat_map;
float *humidity_map;
s16 *height_map;
};
class BiomeDefManager {
public:
std::vector<float> bgroup_freqs;
std::vector<std::vector<Biome *> *> bgroups;
Biome *biome_default;
IGameDef *m_gamedef;
INodeDefManager *ndef;
std::vector<Biome *> biomes;
BiomeDefManager(IGameDef *gamedef);
bool biome_registration_finished;
NoiseParams *np_heat;
NoiseParams *np_humidity;
BiomeDefManager();
~BiomeDefManager();
Biome *createBiome(BiomeTerrainType btt);
Biome *getBiome(float bgfreq, float heat, float humidity);
void calcBiomes(BiomeNoiseInput *input, u8 *biomeid_map);
Biome *getBiome(float heat, float humidity, s16 y);
void addBiomeGroup(float freq);
void addBiome(Biome *b);
void addDefaultBiomes();
void resolveNodeNames(INodeDefManager *ndef);
};
#endif

View File

@@ -218,6 +218,8 @@ void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize,
// Smooth the movement when walking up stairs
v3f old_player_position = m_playernode->getPosition();
v3f player_position = player->getPosition();
if (player->isAttached && player->parent)
player_position = player->parent->getPosition();
//if(player->touching_ground && player_position.Y > old_player_position.Y)
if(player->touching_ground &&
player_position.Y > old_player_position.Y)

View File

@@ -464,7 +464,7 @@ void ChatPrompt::historyNext()
}
}
void ChatPrompt::nickCompletion(const std::list<std::wstring>& names, bool backwards)
void ChatPrompt::nickCompletion(const std::list<std::string>& names, bool backwards)
{
// Two cases:
// (a) m_nick_completion_start == m_nick_completion_end == 0
@@ -493,13 +493,13 @@ void ChatPrompt::nickCompletion(const std::list<std::wstring>& names, bool backw
// find all names that start with the selected prefix
std::vector<std::wstring> completions;
for (std::list<std::wstring>::const_iterator
for (std::list<std::string>::const_iterator
i = names.begin();
i != names.end(); ++i)
{
if (str_starts_with(*i, prefix, true))
if (str_starts_with(narrow_to_wide(*i), prefix, true))
{
std::wstring completion = *i;
std::wstring completion = narrow_to_wide(*i);
if (prefix_start == 0)