Merge branch 'master' into fir

This commit is contained in:
Wuzzy 2024-06-28 19:10:00 +02:00
commit c4dfbd58b2
337 changed files with 10342 additions and 1686 deletions

View File

@ -39,8 +39,11 @@ They must be followed at all times:
* Crafting recipes (except cooking and fuel recipes) **MUST** be registered through `rp_crafting`.
* Modifying player physics (like running speed) **MUST** be done via `rp_player_effects`.
Calling `set_physics_override` directly is **FORBIDDEN**.
* If you attach or detach the player, you **MUST** update `rp_player.player_attached`.
* Modifying HUD flags (like `"wielditem"`) **MUST** be done via `rp_hud`.
Calling `hud_set_flags` directly is **FORBIDDEN**.
* Changing the sky (`set_sky`, `set_sun`, `set_moon`, `set_clouds`, `set_stars`)
outside of the `rp_sky` mod is **FORBIDDEN**.
## Mod APIs
@ -49,6 +52,7 @@ file named `API.md`.
Mods with documented APIs:
* `player_api`: Player model handling, model animation, textures (see also `rp_player`)
* `rp_armor`: Armor information and registration
* `rp_achievements`: Add and trigger achievements
* `rp_bed`: Get, set and unset (re)spawn position; query bed info
@ -74,7 +78,9 @@ Mods with documented APIs:
* `rp_paint`: Add paintable nodes; set/remove paint of node
* `rp_partialblocks`: Register partial blocks (slabs, stairs)
* `rp_pathfinder`: Advanced pathfinding
* `rp_player`: Player model handling, model animation, textures
* `rp_player`: Same as `player_api`, but with extra features specific to Repixture. Only use this if
you need those extra features or for internal Repixture development.
Otherwise, use `player_api`.
* `rp_player_effects`: Add player effects (required if you want to modify player physics)
* `rp_sounds`: Node sounds
* `rp_spyglass`: Spyglass

View File

@ -183,6 +183,7 @@ Unlike `attached_node`, they also work if the node is not `walkable`. Use these
* `door_state`: Door segment, internal state (1 or 2) (see `rp_door` mod)
* `door_position`: Door segment, position (1 = bottom, 2 = top)
* `fence`: Fence. Fence nodes MUST have a collisionbox height of 1.5
* `fence_gate`: Fence gate (1 = closed, 2 = open). Fence gate nodes MUST have a collisionbox height of 1.5
* `sign`: Sign
* `bed`: Bed segment
* `torch`: Torch

View File

@ -9,7 +9,7 @@ the world.
## Version
3.15.1
3.16.0
Designed for use with Minetest 5.8.0 or later.

View File

@ -3,4 +3,4 @@ title = Repixture
description = A simple and beautiful sandbox construction game focusing on low-tech.
textdomain = rp_game_meta
disallowed_mapgens = v6
min_minetest_version = 5.6
min_minetest_version = 5.8

View File

@ -111,15 +111,16 @@ On the game screen you see the following things:
![Game screen](./assets/images/screenshots/screen.png)
1. **Crosshair** (in the center): Shows where youre looking at. Normally, the crosshair is white, but if youre looking at a dynamic object or living being, the crosshair will turn black
1. **Crosshair**: Shows where youre looking at. Normally, the crosshair is white, but if youre looking at a dynamic object or living being, the crosshair will turn black
2. **Health bar** (heart symbols): Indicates your health points
3. **Food bar** (bread symbols): Indicates your food points
4. **Breath bar** (bubble symbols above the food bar, not shown): Indicates your breath while diving. Not shown when you have full breath
5. **Hotbar** (slots at the bottom): Shows items from your inventory that you can wield. A square marks the wielded item
6. **Wielded item** (bottom right): This is your hand or the item youre currently wielding
7. **Minimap** (top right): A map of the world. Hidden by default, so you must enable with the <kbd>Minimap</kbd> key. This only works if you have a <span class="item">map</span> in your inventory or youre in Creative Mode
8. **Item name** (above the bars, not shown): At this position the short name of the wielded item is shown. It appears briefly when you switch items
9. **Info text** (left side): If youre pointing something special or something that has some text associated with it, a short text will appear here
4. **Breath bar** (bubble symbols, not shown): Indicates your breath while diving. Not shown when you have full breath
5. **Hotbar**: Shows items from your inventory that you can wield. A square marks the wielded item
6. **Wielded item**: This is your hand or the item youre currently wielding
7. **Minimap**: A map of the world. Hidden by default, so you must enable with the <kbd>Minimap</kbd> key. This only works if you have a <span class="item">map</span> in your inventory or youre in Creative Mode
8. **Item name**: At this position the short name of the wielded item is shown. It appears briefly when you switch items
9. **Info text**: If youre pointing something special or something that has some text associated with it, a short text will appear here
10. **Armor icons**: Your equipped armor pieces will appear here
### Inventory screen
@ -464,7 +465,9 @@ Repixture supports the protection system of Minetest but it doesnt enforce pr
Whatever you do with your Repixture server is up to you, of course, just keep the gameplay implications in mind.
In multiplayer, you can see the name as well as the health bar of every player above their head. The health bar can be disabled in the settings.
In multiplayer, you can see the name as well as the health bar of every player above their head as a white text. But when a player is sneaking, their nametag becomes near-invisible.
The health bar can be disabled in the settings.
### Modding support

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 580 KiB

After

Width:  |  Height:  |  Size: 1012 KiB

BIN
menu/overlay.10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

BIN
menu/overlay.11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

BIN
menu/overlay.12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 KiB

BIN
menu/overlay.13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

BIN
menu/overlay.14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

BIN
menu/overlay.15.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 KiB

BIN
menu/overlay.16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 KiB

BIN
menu/overlay.17.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 KiB

BIN
menu/overlay.18.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 KiB

After

Width:  |  Height:  |  Size: 376 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 308 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 KiB

After

Width:  |  Height:  |  Size: 356 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

After

Width:  |  Height:  |  Size: 588 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 KiB

After

Width:  |  Height:  |  Size: 313 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 KiB

After

Width:  |  Height:  |  Size: 481 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 KiB

After

Width:  |  Height:  |  Size: 377 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 299 KiB

After

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 198 KiB

91
mods/player_api/API.md Normal file
View File

@ -0,0 +1,91 @@
# `player_api` Compability Layer API
The player API can register player models and update the player's appearance.
## Should I use this mod?
If you want to handle player stuff from external mods, the answer is usually yes.
If you need some advanced Repixture-specific features, you may depend
on `rp_player` instead.
This mod is the Repixture implementation of `player_api` originally from Minetest Game.
It is API-compatible with Minetest Game's `player_api` from Minetest Game 5.8.0.
Technically, it is just a wrapper around `rp_player`, provided for compability.
## Function reference
The following functions are available:
* `player_api.globalstep(dtime, ...)`
* The function called by the globalstep that controls player animations.
You can override this to replace the globalstep with your own implementation.
* Receives all args that `minetest.register_globalstep()` passes
* `player_api.register_model(name, def)`
* Register a new model to be used by players
* `name`: model filename such as "character.x", "foo.b3d", etc.
* `def`: see [#Model definition]
* Saved to `player_api.registered_models`
* `player_api.registered_models[name]`
* Get a model's definition
* `name`: model filename
* See [#Model definition]
* `player_api.set_model(player, model_name)`
* Change a player's model
* `player`: PlayerRef
* `model_name`: model registered with `player_api.register_model`
* `player_api.set_animation(player, anim_name, speed)`
* Applies an animation to a player if speed or `anim_name` differ from the currently playing animation
* `player`: PlayerRef
* `anim_name`: name of the animation
* `speed`: keyframes per second. If nil, the default from the model def is used
* `player_api.set_textures(player, textures)`
* Sets player textures
* `player`: PlayerRef
* `textures`: array of textures. If nil, the default from the model def is used
* `player_api.set_textures(player, index, texture)`
* Sets one of the player textures
* `player`: PlayerRef
* `index`: Index into array of all textures
* `texture`: the texture string
* `player_api.get_animation(player)`
* Returns a table containing fields `model`, `textures` and `animation`
* Any of the fields of the returned table may be nil
* `player`: PlayerRef
* `player_api.player_attached`
* A table that maps a player name to a boolean
* If the value for a given player is set to true, the default player animations
(walking, digging, ...) will no longer be updated, and knockback from damage is
prevented for that player
* Example of usage: A mod sets a player's value to true when attached to a vehicle
## Model definition
{
animation_speed = 30, -- Default animation speed, in keyframes per second
textures = {"character.png"}, -- Default array of textures
animations = {
-- [anim_name] = {
-- x = <start_frame>,
-- y = <end_frame>,
-- collisionbox = <model collisionbox>, -- (optional)
-- eye_height = <model eye height>, -- (optional)
-- -- suspend client side animations while this one is active (optional)
-- override_local = <true/false>
-- },
stand = ..., lay = ..., walk = ..., mine = ..., walk_mine = ..., -- required animations
sit = ... -- used by boats and other MTG mods
},
-- Default object properties, see lua_api.txt
visual_size = {x = 1, y = 1},
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3},
stepheight = 0.6,
eye_height = 1.47
}

19
mods/player_api/README.md Normal file
View File

@ -0,0 +1,19 @@
# `player_api` compability layer for Repixture
This mod is the Repixture implementation of `player_api` originally from Minetest Game.
It is API-compatible with Minetest Game's `player_api` from Minetest Game 5.8.0.
Technically, it is just a wrapper around `rp_player`, provided for compability.
Mod developers can use this mod to handle player-related stuff and should be enough
for most purposes.
For advanced player model features specific to Repixture, you may use `rp_player` instead
## Credits
The API documentation is copied from from Minetest Game 5.8.0.
originally by celeron55, Perttu Ahola <celeron55@gmail.com> (LGPLv2.1+),
continued by Minetest developers and contributors (LGPLv2.1+),
changed for Repixture by Wuzzy (LGPLv2.1+).
Everything else written by Wuzzy (LGBPLv2.1+).

13
mods/player_api/init.lua Normal file
View File

@ -0,0 +1,13 @@
player_api = {}
player_api.register_model = rp_player.player_register_model
player_api.set_model = rp_player.player_set_model
player_api.get_animation = rp_player.player_get_animation
player_api.set_animation = rp_player.player_set_animation
player_api.get_textures = rp_player.player_get_textures
player_api.set_textures = rp_player.player_set_textures
player_api.globalstep = rp_player.globalstep
player_api.player_attached = rp_player.player_attached
player_api.registered_models = rp_player.registered_models

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

@ -0,0 +1,3 @@
name = player_api
depends = rp_player
description = Compability layer for player API mod from Minetest Game

View File

@ -1232,7 +1232,13 @@ minetest.register_chatcommand("achievement", {
for a=1, #achievements.registered_achievements_list do
local aname = achievements.registered_achievements_list[a]
local ach = achievements.registered_achievements[aname]
local str = BULLET_PRE .. S("@1: @2 (@3)", aname, ach.title, ach.difficulty or S("unset"))
local difficulty
if ach.difficulty then
difficulty = loc.num(ach.difficulty)
else
difficulty = S("unset")
end
local str = BULLET_PRE .. S("@1: @2 (@3)", aname, ach.title, difficulty)
table.insert(strs, str)
end
local output = table.concat(strs, "\n")

View File

@ -88,12 +88,12 @@ msgstr "(list [<Spieler>]) | ((give | remove) <Spieler> (<Errungenschaft> | all)
msgid "List, give or remove achievements of player"
msgstr "Errungenschaft einem Spieler geben oder wegnehmen, oder Errungenschaften auflisten"
msgid "@1: @2 (@3)"
msgstr "@1: @2 (@3)"
msgid "unset"
msgstr "nicht gesetzt"
msgid "@1: @2 (@3)"
msgstr "@1: @2 (@3)"
msgid "No achievements."
msgstr "Keine Errungenschaften."

View File

@ -0,0 +1,117 @@
msgid ""
msgstr ""
"Project-Id-Version: Minetest textdomain rp_achievements x.x.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: eo\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: mtt_convert 0.1.0\n"
msgid "You have earned the achievement “@1”."
msgstr ""
msgid "@1 has earned the achievement “@2”."
msgstr ""
msgid "Achievement gotten!"
msgstr ""
msgid "You have gotten all achievements!"
msgstr ""
msgid "@1 has gotten all achievements!"
msgstr ""
msgid "All achievements gotten!"
msgstr ""
msgid "You have lost all achievements!"
msgstr ""
msgid "@1 has lost all achievements!"
msgstr ""
msgid "All achievements lost!"
msgstr ""
msgid "You have lost the achievement “@1”."
msgstr ""
msgid "@1 has lost the achievement “@2”."
msgstr ""
msgid "Achievement lost!"
msgstr ""
msgid "The achievement “@1” has new goals."
msgstr ""
msgid "Achievements"
msgstr ""
msgid "Gotten"
msgstr ""
msgid "@1/@2"
msgstr ""
msgid "Missing"
msgstr ""
msgid ", "
msgstr ""
msgid "Completed: @1"
msgstr ""
msgid "Status: @1"
msgstr ""
msgid "@1 of @2 achievements gotten, @3 in progress"
msgstr ""
msgid "Show symbols"
msgstr ""
msgid "Show list"
msgstr ""
msgid "(list [<player>]) | ((give | remove) <player> (<achievement> | all))"
msgstr ""
msgid "List, give or remove achievements of player"
msgstr ""
msgid "unset"
msgstr ""
msgid "@1: @2 (@3)"
msgstr ""
msgid "No achievements."
msgstr ""
msgid "List of achievements (difficulty rating in brackets):"
msgstr ""
msgid "Player is not online!"
msgstr ""
msgid "@1: Gotten"
msgstr ""
msgid "@1: In progress (@2/@3)"
msgstr ""
msgid "Achievements of @1:"
msgstr ""
msgid "Unknown achievement! Use “/achievement list” to list valid achievement names."
msgstr ""

View File

@ -88,12 +88,12 @@ msgstr "(list [<joueur>]) | ((give | remove) <joueur> (<réalisation> | all))"
msgid "List, give or remove achievements of player"
msgstr "Liste, donne ou enlève les réalisations du joueur"
msgid "@1: @2 (@3)"
msgstr "@1 : @2 (@3)"
msgid "unset"
msgstr "non défini"
msgid "@1: @2 (@3)"
msgstr "@1 : @2 (@3)"
msgid "No achievements."
msgstr "Pas de réalisations."

View File

@ -88,10 +88,10 @@ msgstr ""
msgid "List, give or remove achievements of player"
msgstr ""
msgid "@1: @2 (@3)"
msgid "unset"
msgstr ""
msgid "unset"
msgid "@1: @2 (@3)"
msgstr ""
msgid "No achievements."

View File

@ -20,7 +20,7 @@ msgid "@1 has earned the achievement “@2”."
msgstr "@1 выполнил достижение \"@2\"."
msgid "Achievement gotten!"
msgstr ""
msgstr "Достижение получено!"
msgid "You have gotten all achievements!"
msgstr "Ты выполнил все достижения!"
@ -29,7 +29,7 @@ msgid "@1 has gotten all achievements!"
msgstr "@1 выполнил все достижения!"
msgid "All achievements gotten!"
msgstr ""
msgstr "Все достижения получены!"
msgid "You have lost all achievements!"
msgstr "Ты потерял все достижения!"
@ -38,7 +38,7 @@ msgid "@1 has lost all achievements!"
msgstr "@1 потерял все достижения!"
msgid "All achievements lost!"
msgstr ""
msgstr "Все достижения потеряны!"
msgid "You have lost the achievement “@1”."
msgstr "Ты потерял достижение \"@1\"."
@ -47,7 +47,7 @@ msgid "@1 has lost the achievement “@2”."
msgstr "@1 потерял достижение \"@2\"."
msgid "Achievement lost!"
msgstr ""
msgstr "Достижение потеряно!"
msgid "The achievement “@1” has new goals."
msgstr "Достижение \"@1\" получило новые цели."
@ -71,7 +71,7 @@ msgid "Completed: @1"
msgstr "Выполнено: @1"
msgid "Status: @1"
msgstr ""
msgstr "Статус: @1"
msgid "@1 of @2 achievements gotten, @3 in progress"
msgstr "@1 из @2 достижений выполнено, @3 в процессе"
@ -80,7 +80,7 @@ msgid "Show symbols"
msgstr ""
msgid "Show list"
msgstr ""
msgstr "Показать список"
msgid "(list [<player>]) | ((give | remove) <player> (<achievement> | all))"
msgstr "(list [<игрок>]) | ((give | remove) <игрок> (<достижение> | all))"
@ -88,12 +88,12 @@ msgstr "(list [<игрок>]) | ((give | remove) <игрок> (<достижен
msgid "List, give or remove achievements of player"
msgstr "Просмотреть, выдать или убрать достижения игрока"
msgid "@1: @2 (@3)"
msgstr "@1: @2 (@3)"
msgid "unset"
msgstr "н/д"
msgid "@1: @2 (@3)"
msgstr "@1: @2 (@3)"
msgid "No achievements."
msgstr "Нету достижений."

View File

@ -88,10 +88,10 @@ msgstr ""
msgid "List, give or remove achievements of player"
msgstr ""
msgid "@1: @2 (@3)"
msgid "unset"
msgstr ""
msgid "unset"
msgid "@1: @2 (@3)"
msgstr ""
msgid "No achievements."

View File

@ -24,8 +24,8 @@ Show symbols=Symbole anzeigen
Show list=Liste anzeigen
(list [<player>]) | ((give | remove) <player> (<achievement> | all))=(list [<Spieler>]) | ((give | remove) <Spieler> (<Errungenschaft> | all))
List, give or remove achievements of player=Errungenschaft einem Spieler geben oder wegnehmen, oder Errungenschaften auflisten
@1: @2 (@3)=@1: @2 (@3)
unset=nicht gesetzt
@1: @2 (@3)=@1: @2 (@3)
No achievements.=Keine Errungenschaften.
List of achievements (difficulty rating in brackets):=Liste der Errungenschaften (Schwierigkeitswertung in Klammern):
Player is not online!=Spieler ist nicht online!

View File

@ -0,0 +1,35 @@
# textdomain: rp_achievements
You have earned the achievement “@1”.=
@1 has earned the achievement “@2”.=
Achievement gotten!=
You have gotten all achievements!=
@1 has gotten all achievements!=
All achievements gotten!=
You have lost all achievements!=
@1 has lost all achievements!=
All achievements lost!=
You have lost the achievement “@1”.=
@1 has lost the achievement “@2”.=
Achievement lost!=
The achievement “@1” has new goals.=
Achievements=
Gotten=
@1/@2=
Missing=
, =
Completed: @1=
Status: @1=
@1 of @2 achievements gotten, @3 in progress=
Show symbols=
Show list=
(list [<player>]) | ((give | remove) <player> (<achievement> | all))=
List, give or remove achievements of player=
unset=
@1: @2 (@3)=
No achievements.=
List of achievements (difficulty rating in brackets):=
Player is not online!=
@1: Gotten=
@1: In progress (@2/@3)=
Achievements of @1:=
Unknown achievement! Use “/achievement list” to list valid achievement names.=

View File

@ -24,8 +24,8 @@ Show symbols=
Show list=
(list [<player>]) | ((give | remove) <player> (<achievement> | all))=(list [<joueur>]) | ((give | remove) <joueur> (<réalisation> | all))
List, give or remove achievements of player=Liste, donne ou enlève les réalisations du joueur
@1: @2 (@3)=@1 : @2 (@3)
unset=non défini
@1: @2 (@3)=@1 : @2 (@3)
No achievements.=Pas de réalisations.
List of achievements (difficulty rating in brackets):=Liste les réalisations (note de difficulté entre parenthèses)
Player is not online!=Le joueur n'est pas en ligne !

View File

@ -24,8 +24,8 @@ Show symbols=
Show list=
(list [<player>]) | ((give | remove) <player> (<achievement> | all))=
List, give or remove achievements of player=
@1: @2 (@3)=
unset=
@1: @2 (@3)=
No achievements.=
List of achievements (difficulty rating in brackets):=
Player is not online!=

View File

@ -1,16 +1,16 @@
# textdomain: rp_achievements
You have earned the achievement “@1”.=Ты выполнил достижение "@1".
@1 has earned the achievement “@2”.=@1 выполнил достижение "@2".
Achievement gotten!=
Achievement gotten!=Достижение получено!
You have gotten all achievements!=Ты выполнил все достижения!
@1 has gotten all achievements!=@1 выполнил все достижения!
All achievements gotten!=
All achievements gotten!=Все достижения получены!
You have lost all achievements!=Ты потерял все достижения!
@1 has lost all achievements!=@1 потерял все достижения!
All achievements lost!=
All achievements lost!=Все достижения потеряны!
You have lost the achievement “@1”.=Ты потерял достижение "@1".
@1 has lost the achievement “@2”.=@1 потерял достижение "@2".
Achievement lost!=
Achievement lost!=Достижение потеряно!
The achievement “@1” has new goals.=Достижение "@1" получило новые цели.
Achievements=Достижения
Gotten=Выполнено
@ -18,14 +18,14 @@ Gotten=Выполнено
Missing=Отсутствует
, =,
Completed: @1=Выполнено: @1
Status: @1=
Status: @1=Статус: @1
@1 of @2 achievements gotten, @3 in progress=@1 из @2 достижений выполнено, @3 в процессе
Show symbols=
Show list=
Show list=Показать список
(list [<player>]) | ((give | remove) <player> (<achievement> | all))=(list [<игрок>]) | ((give | remove) <игрок> (<достижение> | all))
List, give or remove achievements of player=Просмотреть, выдать или убрать достижения игрока
@1: @2 (@3)=@1: @2 (@3)
unset=н/д
@1: @2 (@3)=@1: @2 (@3)
No achievements.=Нету достижений.
List of achievements (difficulty rating in brackets):=Список достижений (уровень сложности в скобках):
Player is not online!=Игрок вне сети!

View File

@ -24,8 +24,8 @@ Show symbols=
Show list=
(list [<player>]) | ((give | remove) <player> (<achievement> | all))=
List, give or remove achievements of player=
@1: @2 (@3)=
unset=
@1: @2 (@3)=
No achievements.=
List of achievements (difficulty rating in brackets):=
Player is not online!=

View File

@ -1,2 +1,2 @@
name = rp_achievements
depends = rp_formspec, rp_crafting
depends = rp_formspec, rp_crafting, rp_localize

View File

@ -25,9 +25,9 @@ if ambiance.weather_available() then
ambiance.get_weather_lagged = function()
local time = weather.weather_last_changed_before()
if time and time < WEATHER_CONDITION_DELAY then
return weather.previous_weather
return weather.get_previous_weather()
else
return weather.weather
return weather.get_weather()
end
end
end

View File

@ -0,0 +1,102 @@
msgid ""
msgstr ""
"Project-Id-Version: Minetest textdomain rp_armor x.x.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: eo\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: mtt_convert 0.1.0\n"
msgid "Helmet"
msgstr ""
msgid "Chestplate"
msgstr ""
msgid "Boots"
msgstr ""
msgid "Protection"
msgstr ""
msgid "@1%"
msgstr ""
msgid "Protection bonus for full set"
msgstr ""
msgid "+@1%"
msgstr ""
msgid "Armor"
msgstr ""
msgid "Armored"
msgstr ""
msgid "Craft a piece of armor."
msgstr ""
msgid "Protection: +@1%"
msgstr ""
msgid "Wooden Helmet"
msgstr ""
msgid "Wooden Chestplate"
msgstr ""
msgid "Wooden Boots"
msgstr ""
msgid "Steel Helmet"
msgstr ""
msgid "Steel Chestplate"
msgstr ""
msgid "Steel Boots"
msgstr ""
msgid "Chainmail Helmet"
msgstr ""
msgid "Chainmail Chestplate"
msgstr ""
msgid "Chainmail Boots"
msgstr ""
msgid "Carbon Steel Helmet"
msgstr ""
msgid "Carbon Steel Chestplate"
msgstr ""
msgid "Carbon Steel Boots"
msgstr ""
msgid "Bronze Helmet"
msgstr ""
msgid "Bronze Chestplate"
msgstr ""
msgid "Bronze Boots"
msgstr ""
msgid "Chainmail Sheet"
msgstr ""
msgid "Skin of Bronze"
msgstr ""
msgid "Equip a full suit of bronze armor."
msgstr ""

View File

@ -0,0 +1,30 @@
# textdomain: rp_armor
Helmet=
Chestplate=
Boots=
Protection=
@1%=
Protection bonus for full set=
+@1%=
Armor=
Armored=
Craft a piece of armor.=
Protection: +@1%=
Wooden Helmet=
Wooden Chestplate=
Wooden Boots=
Steel Helmet=
Steel Chestplate=
Steel Boots=
Chainmail Helmet=
Chainmail Chestplate=
Chainmail Boots=
Carbon Steel Helmet=
Carbon Steel Chestplate=
Carbon Steel Boots=
Bronze Helmet=
Bronze Chestplate=
Bronze Boots=
Chainmail Sheet=
Skin of Bronze=
Equip a full suit of bronze armor.=

View File

@ -34,3 +34,20 @@ A bed is valid if:
* Both nodes have the same `param2`
Single 'bed' nodes (without a matching other piece) count as invalid.
### `bed.get_bed_segment(pos, node, segment)`
Returns the pos of the specified bed segment of the bed at pos
or nil if there is no bed at pos.
For example, if `segment` is `"foot"`, the position of that segment
will be returned (which may or may not be equal to `pos`).
Arguments:
* `pos`: Position of bed segment
* `node`: Node table of the node at pos
* `segment`: Segment to get position for. One of:
* `"foot"`: lower segment
* `"head"`: upper segment
* `"other"`: lower segment if pos is the upper segment and vice-versa

View File

@ -8,7 +8,6 @@ local S = minetest.get_translator("rp_bed")
bed = {}
local DEFAULT_BED_COLOR = rp_paint.COLOR_AZURE_BLUE
local BED_EYE_OFFSET_Y = -13
-- Per-user data table
@ -71,6 +70,25 @@ bed.is_valid_bed = function(pos)
return false
end
bed.get_bed_segment = function(pos, node, segment)
local dir = minetest.fourdir_to_dir(node.param2)
if node.name == "rp_bed:bed_head" then
if segment == "head" then
return pos
elseif segment == "foot" or segment == "other" then
return vector.subtract(pos, dir)
end
elseif node.name == "rp_bed:bed_foot" then
if segment == "head" or segment == "other" then
return vector.add(pos, dir)
elseif segment == "foot" then
return pos
end
else
return nil
end
end
-- Savefile
local bed_file = minetest.get_worldpath() .. "/bed.dat"
@ -125,17 +143,8 @@ local function put_player_in_bed(player)
player_effects.apply_effect(player, "inbed")
player:set_eye_offset(vector.new(0, BED_EYE_OFFSET_Y, 0), vector.new(0, BED_EYE_OFFSET_Y, 0))
player:set_local_animation(
{x=162, y=166},
{x=162, y=166},
{x=162, y=166},
{x=162, y=168},
rp_player.player_animation_speed)
rp_player.player_set_animation(player, "lay", rp_player.player_animation_speed)
rp_player.player_attached[name] = true
rp_player.player_set_animation(player, "lay")
minetest.log("action", "[rp_bed] "..name.." was put into bed")
end
@ -154,17 +163,8 @@ local function clear_bed_status(player)
player_effects.remove_effect(player, "inbed")
player:set_eye_offset(vector.new(0, 0, 0), vector.new(0, 0, 0))
player:set_local_animation(
{x=0, y=79},
{x=168, y=187},
{x=189, y=198},
{x=200, y=219},
rp_player.player_animation_speed)
rp_player.player_set_animation(player, "stand", rp_player.player_animation_speed)
rp_player.player_attached[name] = false
rp_player.player_set_animation(player, "stand")
end
local function take_player_from_bed(player)
@ -552,7 +552,10 @@ local on_rightclick_bed_foot = function(pos, node, clicker, itemstack)
end
bed_userdata.temp[clicker_name].node_pos = pos
-- Put player slightly away from the bed middle
local sleep_pos = vector.add(pos, vector.multiply(minetest.fourdir_to_dir(node.param2), 0.49))
-- Increase player Y to reach exact position of bed top
sleep_pos = vector.offset(sleep_pos, 0, 0.125, 0)
bed_userdata.temp[clicker_name].sleep_pos = sleep_pos
set_bed_occupier(pos, clicker_name)

View File

@ -0,0 +1,63 @@
msgid ""
msgstr ""
"Project-Id-Version: Minetest textdomain rp_bed x.x.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: eo\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: mtt_convert 0.1.0\n"
msgid "Your respawn position was blocked or dangerous. Youve lost your old respawn position."
msgstr ""
msgid "You have slept, rise and shine!"
msgstr ""
msgid "Players have slept, rise and shine!"
msgstr ""
msgid "Sleeping is disabled."
msgstr ""
msgid "Its too painful to sleep here!"
msgstr ""
msgid "You cant sleep while holding your breath!"
msgstr ""
msgid "Not enough space to sleep!"
msgstr ""
msgid "You cant sleep here!"
msgstr ""
msgid "You have to stop moving before going to bed!"
msgstr ""
msgid "Respawn position set!"
msgstr ""
msgid "Bed"
msgstr ""
msgid "Sets the respawn position and allows to pass the night"
msgstr ""
msgid "In bed"
msgstr ""
msgid "You're in a bed"
msgstr ""
msgid "Bed Time"
msgstr ""
msgid "Craft a bed."
msgstr ""

View File

@ -0,0 +1,17 @@
# textdomain: rp_bed
Your respawn position was blocked or dangerous. Youve lost your old respawn position.=
You have slept, rise and shine!=
Players have slept, rise and shine!=
Sleeping is disabled.=
Its too painful to sleep here!=
You cant sleep while holding your breath!=
Not enough space to sleep!=
You cant sleep here!=
You have to stop moving before going to bed!=
Respawn position set!=
Bed=
Sets the respawn position and allows to pass the night=
In bed=
You're in a bed=
Bed Time=
Craft a bed.=

View File

@ -42,6 +42,7 @@ end
-- * original: Original texture definition table (to overlay the punch texture)
-- * punches: Number of punches or -1 to reset to original (unpunched) texture
-- * max_punches: Number of max. punches at which the boat will die
-- (1 damage counts as 1 punch)
local set_damage_texture = function(self, original, punches, max_punches)
if punches == -1 then
self.object:set_properties({textures=original})
@ -55,14 +56,15 @@ local set_damage_texture = function(self, original, punches, max_punches)
end
end
local set_driver = function(self, driver, orig_collisionbox)
local set_driver = function(self, driver, orig_collisionbox, player_y_overlap)
self._driver = driver
local colbox = table.copy(orig_collisionbox)
-- Add player height to boat collisionbox top Y
-- so the player will also collide.
local dcolbox = driver:get_properties().collisionbox
colbox[5] = colbox[5] + (dcolbox[5] - dcolbox[2])
local dheight = dcolbox[5] - dcolbox[2]
colbox[5] = colbox[5] + math.max(0, dheight - (player_y_overlap or 0))
local props = self.object:get_properties()
props.collisionbox = colbox
self.object:set_properties(props)
@ -435,22 +437,13 @@ local register_boat = function(name, def)
return
end
minetest.log("action", "[rp_boats] "..cname.." attaches to boat at "..minetest.pos_to_string(self.object:get_pos(),1))
set_driver(self, clicker, def.collisionbox)
rp_player.player_attached[cname] = true
self._driver:set_attach(self.object, "", def.attach_offset, {x=0,y=0,z=0}, true)
-- Make player sit down
minetest.after(0.1, function(param)
-- Check if player still exists and is still attached to the boat
if not (param.sitter and param.sitter:is_player()) then
return
end
if (not param.boat) or (param.sitter:get_attach() ~= param.boat.object) then
return
end
rp_player.player_set_animation(param.sitter, "sit", rp_player.player_animation_speed)
end, {sitter=self._driver, boat=self})
rp_player.player_attached[cname] = true
rp_player.player_set_animation(clicker, "sit")
set_driver(self, clicker, def.collisionbox, def.player_collisionbox_y_overlap)
self._driver:set_attach(self.object, "", def.attach_offset, {x=0,y=0,z=0}, true)
end
end
end
@ -459,7 +452,7 @@ local register_boat = function(name, def)
if child and child == self._driver then
local cname = child:get_player_name()
minetest.log("action", "[rp_boats] "..cname.." detaches from boat at "..minetest.pos_to_string(self.object:get_pos(),1))
rp_player.player_set_animation(self._driver, "stand", rp_player.player_animation_speed)
rp_player.player_set_animation(self._driver, "stand")
rp_player.player_attached[cname] = false
unset_driver(self, def.collisionbox)
end
@ -477,16 +470,25 @@ local register_boat = function(name, def)
-- Use engine punch handling for non-player puncher (like TNT)
return false
end
-- Negative damage won't do anything to the boat
if damage < 0 then
return true
end
-- Damage of 0 or 1 counts as a single valid punch
-- and increases punch counter by 1.
-- Damage higher than 1 counts as multiple punches.
damage = math.max(1, damage)
-- If there were def.max_punches consecutive punches on the boat,
-- each punch faster than RESET_PUNCH_TIMER, the boat dies.
minetest.sound_play(def.sound_punch or {name="rp_sounds_dig_hard", gain=0.3}, {pos=self.object:get_pos()}, true)
if time_from_last_punch == nil or time_from_last_punch < RESET_PUNCH_TIMER then
-- Increase punch counter if first punch, it it was fast enough
self._punches = self._punches + 1
self._punches = self._punches + damage
self._punch_timer = 0
else
-- Reset punch counter, but count this punch again
self._punches = 1
self._punches = damage
self._punch_timer = 0
end
set_damage_texture(self, def.textures, self._punches, def.max_punches)
@ -628,6 +630,7 @@ for l=1, #log_boats do
speed_change_rate = 1.5,
yaw_change_rate = 0.6,
detach_offset_y = 0.8,
player_collisionbox_y_overlap = 0.89,
sound_punch = {name = "rp_sounds_dig_wood", gain=0.3, pitch=1.05},
sound_break = {name = "rp_sounds_dug_wood", gain=0.5, pitch=1.05},
@ -677,6 +680,7 @@ for r=1, #rafts do
speed_change_rate = 1.5,
yaw_change_rate = 0.3,
detach_offset_y = 0.2,
player_collisionbox_y_overlap = 0.38,
check_boat_space = function(place_pos, on_liquid)
local ymin = 0
if on_liquid then

View File

@ -0,0 +1,39 @@
msgid ""
msgstr ""
"Project-Id-Version: Minetest textdomain rp_boats x.x.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: eo\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: mtt_convert 0.1.0\n"
msgid "Not enough space to enter!"
msgstr ""
msgid "Wooden Log Boat"
msgstr ""
msgid "Birch Log Boat"
msgstr ""
msgid "Oak Log Boat"
msgstr ""
msgid "Water vehicle"
msgstr ""
msgid "Wooden Raft"
msgstr ""
msgid "Birch Raft"
msgstr ""
msgid "Oak Raft"
msgstr ""

View File

@ -0,0 +1,9 @@
# textdomain: rp_boats
Not enough space to enter!=
Wooden Log Boat=
Birch Log Boat=
Oak Log Boat=
Water vehicle=
Wooden Raft=
Birch Raft=
Oak Raft=

View File

@ -51,6 +51,7 @@ local function get_bookshelf_formspec(pos)
form = form .. rp_formspec.image_button(xstart+xoff, ystart + 1.15, 1, 1, "open_"..i, "ui_icon_view.png", S("Read book"))
end
end
form = form .. rp_label.container_label_formspec_element(meta)
return form
end
@ -109,8 +110,14 @@ local bookshelf_def = {
minetest.show_formspec(pname, "rp_default:bookshelf", get_bookshelf_formspec(pos))
end
end,
write_name = function(pos, text)
-- TODO: Bring back container naming
_rp_write_name = function(pos, text)
local meta = minetest.get_meta(pos)
meta:set_string("name", text)
local infotext = S("Bookshelf")
if text ~= "" then
infotext = infotext .. "\n" .. S("“@1”", text)
end
meta:set_string("infotext", infotext)
end,
_rp_blast_resistance = 2,
}

View File

@ -0,0 +1,5 @@
The locale textdomain for the "rp_book" mod is "book", not "rp_book".
This is intentional. "book" must be used for legacy reasons
to support some translatable strings of the book description
in item metadata.

View File

@ -8,6 +8,7 @@ Book: “@1”=Buch: „@1“
Unnamed Book=Namenloses Buch
Read book=Buch lesen
Bookshelf=Bücherregal
Provides 8 inventory slots=Enthält 8 Inventarplätze
Provides 8 inventory slots=Bietet 8 Inventarplätze
“@1”=„@1“
Painted Bookshelf=Gefärbtes Bücherregal
Return=Zurück

View File

@ -0,0 +1,14 @@
# textdomain: book
Title:=
Contents:=
Write=
Book=
Write down some notes=
Book: “@1”=
Unnamed Book=
Read book=
Bookshelf=
Provides 8 inventory slots=
“@1”=
Painted Bookshelf=
Return=

View File

@ -9,5 +9,6 @@ Unnamed Book=Livre sans nom
Read book=Lire le livre
Bookshelf=Étagère à livres
Provides 8 inventory slots=Fournit 8 emplacements d'inventaire
“@1”=
Painted Bookshelf=
Return=Retour

View File

@ -9,5 +9,6 @@ Unnamed Book=Libro senza nome
Read book=
Bookshelf=Libreria
Provides 8 inventory slots=
“@1”=
Painted Bookshelf=
Return=

View File

@ -9,5 +9,6 @@ Unnamed Book=Безымянная книга
Read book=Прочитать книгу
Bookshelf=Книжная полка
Provides 8 inventory slots=Содержит 8 слотов
“@1”=
Painted Bookshelf=Окрашенная Книжная полка
Return=Вернуться

View File

@ -41,7 +41,10 @@ msgid "Bookshelf"
msgstr "Bücherregal"
msgid "Provides 8 inventory slots"
msgstr "Enthält 8 Inventarplätze"
msgstr "Bietet 8 Inventarplätze"
msgid "“@1”"
msgstr "„@1“"
msgid "Painted Bookshelf"
msgstr "Gefärbtes Bücherregal"

View File

@ -0,0 +1,54 @@
msgid ""
msgstr ""
"Project-Id-Version: Minetest textdomain rp_book x.x.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: eo\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: mtt_convert 0.1.0\n"
msgid "Title:"
msgstr ""
msgid "Contents:"
msgstr ""
msgid "Write"
msgstr ""
msgid "Book"
msgstr ""
msgid "Write down some notes"
msgstr ""
msgid "Book: “@1”"
msgstr ""
msgid "Unnamed Book"
msgstr ""
msgid "Read book"
msgstr ""
msgid "Bookshelf"
msgstr ""
msgid "Provides 8 inventory slots"
msgstr ""
msgid "“@1”"
msgstr ""
msgid "Painted Bookshelf"
msgstr ""
msgid "Return"
msgstr ""

View File

@ -43,6 +43,9 @@ msgstr "Étagère à livres"
msgid "Provides 8 inventory slots"
msgstr "Fournit 8 emplacements d'inventaire"
msgid "“@1”"
msgstr ""
msgid "Painted Bookshelf"
msgstr ""

View File

@ -43,6 +43,9 @@ msgstr "Libreria"
msgid "Provides 8 inventory slots"
msgstr ""
msgid "“@1”"
msgstr ""
msgid "Painted Bookshelf"
msgstr ""

View File

@ -43,6 +43,9 @@ msgstr "Книжная полка"
msgid "Provides 8 inventory slots"
msgstr "Содержит 8 слотов"
msgid "“@1”"
msgstr ""
msgid "Painted Bookshelf"
msgstr "Окрашенная Книжная полка"

View File

@ -43,6 +43,9 @@ msgstr ""
msgid "Provides 8 inventory slots"
msgstr ""
msgid "“@1”"
msgstr ""
msgid "Painted Bookshelf"
msgstr ""

View File

@ -9,5 +9,6 @@ Unnamed Book=
Read book=
Bookshelf=
Provides 8 inventory slots=
“@1”=
Painted Bookshelf=
Return=

View File

@ -1,4 +1,4 @@
name = rp_book
description = Writable books, bookshelf
depends = rp_crafting, rp_default, rp_formspec, rp_paint
depends = rp_crafting, rp_default, rp_formspec, rp_paint, rp_label
optional_depends = rp_itemdef_defaults

View File

@ -28,3 +28,9 @@ msgstr "Spieler @1 existiert nicht."
msgid "Invalid health!"
msgstr "Ungültige Gesundheit!"
msgid "You suicided."
msgstr "Sie haben sich selbst getötet."
msgid "You were killed by a higher power."
msgstr "Sie wurden von einer höheren Macht getötet."

View File

@ -0,0 +1,36 @@
msgid ""
msgstr ""
"Project-Id-Version: Minetest textdomain rp_commands x.x.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: eo\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: mtt_convert 0.1.0\n"
msgid "[<player>] <value>"
msgstr ""
msgid "Set health points of player or yourself"
msgstr ""
msgid "Not possible, damage is disabled."
msgstr ""
msgid "Player @1 does not exist."
msgstr ""
msgid "Invalid health!"
msgstr ""
msgid "You suicided."
msgstr ""
msgid "You were killed by a higher power."
msgstr ""

View File

@ -28,3 +28,9 @@ msgstr "Le joueur @1 n'existe pas."
msgid "Invalid health!"
msgstr "Santé invalide !"
msgid "You suicided."
msgstr ""
msgid "You were killed by a higher power."
msgstr ""

View File

@ -28,3 +28,9 @@ msgstr ""
msgid "Invalid health!"
msgstr ""
msgid "You suicided."
msgstr ""
msgid "You were killed by a higher power."
msgstr ""

View File

@ -28,3 +28,9 @@ msgstr "Игрок @1 не существует."
msgid "Invalid health!"
msgstr "Недопустимое здоровье!"
msgid "You suicided."
msgstr ""
msgid "You were killed by a higher power."
msgstr ""

View File

@ -28,3 +28,9 @@ msgstr ""
msgid "Invalid health!"
msgstr ""
msgid "You suicided."
msgstr ""
msgid "You were killed by a higher power."
msgstr ""

View File

@ -0,0 +1,8 @@
# textdomain: rp_commands
[<player>] <value>=
Set health points of player or yourself=
Not possible, damage is disabled.=
Player @1 does not exist.=
Invalid health!=
You suicided.=
You were killed by a higher power.=

View File

@ -0,0 +1,30 @@
msgid ""
msgstr ""
"Project-Id-Version: Minetest textdomain rp_crafting x.x.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: eo\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: mtt_convert 0.1.0\n"
msgid "Craft once"
msgstr ""
msgid "Craft 10 times"
msgstr ""
msgid "Show only craftable recipes"
msgstr ""
msgid "Show all recipes"
msgstr ""
msgid "Crafting"
msgstr ""

View File

@ -0,0 +1,6 @@
# textdomain: rp_crafting
Craft once=
Craft 10 times=
Show only craftable recipes=
Show all recipes=
Crafting=

View File

@ -0,0 +1,33 @@
msgid ""
msgstr ""
"Project-Id-Version: Minetest textdomain rp_creative x.x.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: eo\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: mtt_convert 0.1.0\n"
msgid "No items."
msgstr ""
msgid "@1/@2"
msgstr ""
msgid "Search"
msgstr ""
msgid "Stop search"
msgstr ""
msgid "Submit"
msgstr ""
msgid "Creative Inventory"
msgstr ""

View File

@ -14,19 +14,19 @@ msgstr ""
"X-Generator: mtt_convert 0.1.0\n"
msgid "No items."
msgstr ""
msgstr "Пусто."
msgid "@1/@2"
msgstr "@1/@2"
msgid "Search"
msgstr ""
msgstr "Поиск"
msgid "Stop search"
msgstr ""
msgstr "Остановить поиск"
msgid "Submit"
msgstr ""
msgstr "Готово"
msgid "Creative Inventory"
msgstr "Творческий инвентарь"

View File

@ -0,0 +1,7 @@
# textdomain: rp_creative
No items.=
@1/@2=
Search=
Stop search=
Submit=
Creative Inventory=

View File

@ -1,7 +1,7 @@
# textdomain: rp_creative
No items.=
No items.=Пусто.
@1/@2=@1/@2
Search=
Stop search=
Submit=
Search=Поиск
Stop search=Остановить поиск
Submit=Готово
Creative Inventory=Творческий инвентарь

View File

@ -20,6 +20,9 @@ local msgs = {
["mob_kill_any"] = {
NS("You were killed by a hostile creature."),
},
["mob_kill_named"] = {
NS("You were killed by a hostile creature named @1."),
},
["fall"] = {
NS("You fell to your death."),
},
@ -29,29 +32,45 @@ local msgs = {
}
local mobkills = {
["rp_mobs_mobs:walker"] = NS("You were kicked to death by a walker."),
["rp_mobs_mobs:boar"] = NS("You were killed by a boar."),
["rp_mobs_mobs:skunk"] = NS("You were killed by a skunk."),
["rp_mobs_mobs:villager"] = NS("You were killed by a villager."),
["rp_mobs_mobs:mineturtle"] = NS("You were exploded by a mine turtle."),
["rp_mobs_mobs:walker"] = {
NS("You were kicked to death by a walker."),
NS("You were kicked to death by @1, a walker."),
},
["rp_mobs_mobs:boar"] = {
NS("You were killed by a boar."),
NS("You were killed by @1, a boar."),
},
["rp_mobs_mobs:skunk"] = {
NS("You were killed by a skunk."),
NS("You were killed by @1, a skunk."),
},
["rp_mobs_mobs:villager"] = {
NS("You were killed by a villager."),
NS("You were killed by @1, a villager."),
},
["rp_mobs_mobs:mineturtle"] = {
NS("You were killed by a mine turtle."),
NS("You were killed by @1, a mine turtle."),
},
}
-- Select death message
local smsg = function(msg)
return S("@1", msg)
end
local dmsg = function(mtype, ...)
local r = math.random(1, #msgs[mtype])
return S("@1", S(msgs[mtype][r], ...))
return S(msgs[mtype][r], ...)
end
-- Select death message for death by mob
local mmsg = function(mtype, ...)
if mobkills[mtype] then
return S("@1", S(mobkills[mtype], ...))
local mmsg = function(mtype, mname)
if mtype and mobkills[mtype] then
if mname and mname ~= "" then
return S(mobkills[mtype][2], mname)
else
return S(mobkills[mtype][1])
end
elseif mname and mname ~= "" then
return dmsg("mob_kill_named", mname)
else
return dmsg("mob_kill")
return dmsg("mob_kill_any")
end
end
@ -71,7 +90,7 @@ minetest.register_on_dieplayer(function(player, reason)
local msg
if last_damages[name] then
-- custom message
msg = smsg(last_damages[name].message)
msg = last_damages[name].message
elseif reason.type == "node_damage" then
local pos = player:get_pos()
local node = reason.node
@ -92,7 +111,7 @@ minetest.register_on_dieplayer(function(player, reason)
end
-- We assume the textdomain of the death message in the node definition
-- equals the modname.
msg = smsg(minetest.translate(textdomain, field_msg))
msg = minetest.translate(textdomain, field_msg)
else
msg = dmsg("node")
end
@ -108,7 +127,7 @@ minetest.register_on_dieplayer(function(player, reason)
local hittername, hittertype, hittersubtype, shooter
-- Custom message
if last_damages[name] then
msg = smsg(last_damages[name].message)
msg = last_damages[name].message
-- Unknown hitter
elseif hitter == nil then
msg = dmsg("murder_any")
@ -121,17 +140,14 @@ minetest.register_on_dieplayer(function(player, reason)
msg = dmsg("murder_any")
end
-- Mob (according to Common Mob Interface)
elseif hitter:get_luaentity()._cmi_is_mob then
if hitter:get_luaentity().nametag and hitter:get_luaentity().nametag ~= "" then
hittername = hitter:get_luaentity().nametag
end
hittersubtype = hitter:get_luaentity().name
if hittername then
msg = dmsg("murder", hittername)
elseif hittersubtype ~= nil and hittersubtype ~= "" then
msg = mmsg(hittersubtype)
elseif hitter:get_luaentity() and hitter:get_luaentity()._cmi_is_mob then
local lua = hitter:get_luaentity()
hittername = rp_mobs.get_nametag(lua)
hittersubtype = lua.name
if hittername and hittername ~= "" then
msg = mmsg(hittersubtype, hittername)
else
msg = dmsg("murder_any")
msg = mmsg(hittersubtype)
end
end
-- Falling
@ -140,7 +156,7 @@ minetest.register_on_dieplayer(function(player, reason)
-- Other
elseif reason.type == "set_hp" then
if last_damages[name] then
msg = smsg(last_damages[name].message)
msg = last_damages[name].message
end
end
if not msg then

View File

@ -0,0 +1,72 @@
msgid ""
msgstr ""
"Project-Id-Version: Minetest textdomain rp_death_messages x.x.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
"X-Generator: mtt_convert 0.1.0\n"
msgid "You drowned."
msgstr ""
msgid "You took fatal damage from a block."
msgstr ""
msgid "You were killed by @1."
msgstr ""
msgid "You were killed."
msgstr ""
msgid "You were killed by a hostile creature."
msgstr ""
msgid "You were killed by a hostile creature named @1."
msgstr ""
msgid "You fell to your death."
msgstr ""
msgid "You died."
msgstr ""
msgid "You were kicked to death by a walker."
msgstr ""
msgid "You were kicked to death by @1, a walker."
msgstr ""
msgid "You were killed by a boar."
msgstr ""
msgid "You were killed by @1, a boar."
msgstr ""
msgid "You were killed by a skunk."
msgstr ""
msgid "You were killed by @1, a skunk."
msgstr ""
msgid "You were killed by a villager."
msgstr ""
msgid "You were killed by @1, a villager."
msgstr ""
msgid "You were killed by a mine turtle."
msgstr ""
msgid "You were killed by @1, a mine turtle."
msgstr ""
msgid "@1"
msgstr ""

View File

@ -0,0 +1,72 @@
msgid ""
msgstr ""
"Project-Id-Version: Minetest textdomain rp_death_messages x.x.x\n"
"Report-Msgid-Bugs-To: Wuzzy@disroot.org\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2024-06-03 08:53+0000\n"
"Last-Translator: Wuzzy <Wuzzy@users.noreply.translate.codeberg.org>\n"
"Language-Team: German <https://translate.codeberg.org/projects/repixture/"
"rp_death_messages/de/>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.5.5\n"
msgid "You drowned."
msgstr "Sie sind ertrunken."
msgid "You took fatal damage from a block."
msgstr "Sie haben tödlichen Schaden von einen Block erhalten."
msgid "You were killed by @1."
msgstr "Sie wurden von @1 getötet."
msgid "You were killed."
msgstr "Sie wurden getötet."
msgid "You were killed by a hostile creature."
msgstr "Sie wurden von einer feindlichen Kreatur getötet."
msgid "You were killed by a hostile creature named @1."
msgstr "Sie wurden von einer feindlichen Kreatur namens @1 getötet."
msgid "You fell to your death."
msgstr "Sie sind in den Tod gestürzt."
msgid "You died."
msgstr "Sie sind gestorben."
msgid "You were kicked to death by a walker."
msgstr "Sie wurden von einem Läufer zu Tode getreten."
msgid "You were kicked to death by @1, a walker."
msgstr "Sie wurden von @1, einem Läufer, zu Tode getreten."
msgid "You were killed by a boar."
msgstr "Sie wurden von einem Wildschwein getötet."
msgid "You were killed by @1, a boar."
msgstr "Sie wurden von @1, einem Wildschwein, getötet."
msgid "You were killed by a skunk."
msgstr "Sie wurden von einem Stinktier getötet."
msgid "You were killed by @1, a skunk."
msgstr "Sie wurden von @1, einem Stinktier, getötet."
msgid "You were killed by a villager."
msgstr "Sie wurden von einem Dorfbewohner getötet."
msgid "You were killed by @1, a villager."
msgstr "Sie wurden von @1, einem Dorfbewohner, getötet."
msgid "You were killed by a mine turtle."
msgstr "Sie wurden von einer Minenschildkröte getötet."
msgid "You were killed by @1, a mine turtle."
msgstr "Sie wurden von @1, einer Minenschildkröte, getötet."
msgid "@1"
msgstr "@1"

View File

@ -0,0 +1,72 @@
msgid ""
msgstr ""
"Project-Id-Version: Minetest textdomain rp_death_messages x.x.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: eo\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: mtt_convert 0.1.0\n"
msgid "You drowned."
msgstr ""
msgid "You took fatal damage from a block."
msgstr ""
msgid "You were killed by @1."
msgstr ""
msgid "You were killed."
msgstr ""
msgid "You were killed by a hostile creature."
msgstr ""
msgid "You were killed by a hostile creature named @1."
msgstr ""
msgid "You fell to your death."
msgstr ""
msgid "You died."
msgstr ""
msgid "You were kicked to death by a walker."
msgstr ""
msgid "You were kicked to death by @1, a walker."
msgstr ""
msgid "You were killed by a boar."
msgstr ""
msgid "You were killed by @1, a boar."
msgstr ""
msgid "You were killed by a skunk."
msgstr ""
msgid "You were killed by @1, a skunk."
msgstr ""
msgid "You were killed by a villager."
msgstr ""
msgid "You were killed by @1, a villager."
msgstr ""
msgid "You were killed by a mine turtle."
msgstr ""
msgid "You were killed by @1, a mine turtle."
msgstr ""
msgid "@1"
msgstr ""

View File

@ -0,0 +1,72 @@
msgid ""
msgstr ""
"Project-Id-Version: Minetest textdomain rp_death_messages x.x.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: mtt_convert 0.1.0\n"
msgid "You drowned."
msgstr ""
msgid "You took fatal damage from a block."
msgstr ""
msgid "You were killed by @1."
msgstr ""
msgid "You were killed."
msgstr ""
msgid "You were killed by a hostile creature."
msgstr ""
msgid "You were killed by a hostile creature named @1."
msgstr ""
msgid "You fell to your death."
msgstr ""
msgid "You died."
msgstr ""
msgid "You were kicked to death by a walker."
msgstr ""
msgid "You were kicked to death by @1, a walker."
msgstr ""
msgid "You were killed by a boar."
msgstr ""
msgid "You were killed by @1, a boar."
msgstr ""
msgid "You were killed by a skunk."
msgstr ""
msgid "You were killed by @1, a skunk."
msgstr ""
msgid "You were killed by a villager."
msgstr ""
msgid "You were killed by @1, a villager."
msgstr ""
msgid "You were killed by a mine turtle."
msgstr ""
msgid "You were killed by @1, a mine turtle."
msgstr ""
msgid "@1"
msgstr ""

View File

@ -0,0 +1,72 @@
msgid ""
msgstr ""
"Project-Id-Version: Minetest textdomain rp_death_messages x.x.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: mtt_convert 0.1.0\n"
msgid "You drowned."
msgstr ""
msgid "You took fatal damage from a block."
msgstr ""
msgid "You were killed by @1."
msgstr ""
msgid "You were killed."
msgstr ""
msgid "You were killed by a hostile creature."
msgstr ""
msgid "You were killed by a hostile creature named @1."
msgstr ""
msgid "You fell to your death."
msgstr ""
msgid "You died."
msgstr ""
msgid "You were kicked to death by a walker."
msgstr ""
msgid "You were kicked to death by @1, a walker."
msgstr ""
msgid "You were killed by a boar."
msgstr ""
msgid "You were killed by @1, a boar."
msgstr ""
msgid "You were killed by a skunk."
msgstr ""
msgid "You were killed by @1, a skunk."
msgstr ""
msgid "You were killed by a villager."
msgstr ""
msgid "You were killed by @1, a villager."
msgstr ""
msgid "You were killed by a mine turtle."
msgstr ""
msgid "You were killed by @1, a mine turtle."
msgstr ""
msgid "@1"
msgstr ""

View File

@ -0,0 +1,72 @@
msgid ""
msgstr ""
"Project-Id-Version: Minetest textdomain rp_death_messages x.x.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: mtt_convert 0.1.0\n"
msgid "You drowned."
msgstr ""
msgid "You took fatal damage from a block."
msgstr ""
msgid "You were killed by @1."
msgstr ""
msgid "You were killed."
msgstr ""
msgid "You were killed by a hostile creature."
msgstr ""
msgid "You were killed by a hostile creature named @1."
msgstr ""
msgid "You fell to your death."
msgstr ""
msgid "You died."
msgstr ""
msgid "You were kicked to death by a walker."
msgstr ""
msgid "You were kicked to death by @1, a walker."
msgstr ""
msgid "You were killed by a boar."
msgstr ""
msgid "You were killed by @1, a boar."
msgstr ""
msgid "You were killed by a skunk."
msgstr ""
msgid "You were killed by @1, a skunk."
msgstr ""
msgid "You were killed by a villager."
msgstr ""
msgid "You were killed by @1, a villager."
msgstr ""
msgid "You were killed by a mine turtle."
msgstr ""
msgid "You were killed by @1, a mine turtle."
msgstr ""
msgid "@1"
msgstr ""

View File

@ -0,0 +1,72 @@
msgid ""
msgstr ""
"Project-Id-Version: Minetest textdomain rp_death_messages x.x.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: mtt_convert 0.1.0\n"
msgid "You drowned."
msgstr ""
msgid "You took fatal damage from a block."
msgstr ""
msgid "You were killed by @1."
msgstr ""
msgid "You were killed."
msgstr ""
msgid "You were killed by a hostile creature."
msgstr ""
msgid "You were killed by a hostile creature named @1."
msgstr ""
msgid "You fell to your death."
msgstr ""
msgid "You died."
msgstr ""
msgid "You were kicked to death by a walker."
msgstr ""
msgid "You were kicked to death by @1, a walker."
msgstr ""
msgid "You were killed by a boar."
msgstr ""
msgid "You were killed by @1, a boar."
msgstr ""
msgid "You were killed by a skunk."
msgstr ""
msgid "You were killed by @1, a skunk."
msgstr ""
msgid "You were killed by a villager."
msgstr ""
msgid "You were killed by @1, a villager."
msgstr ""
msgid "You were killed by a mine turtle."
msgstr ""
msgid "You were killed by @1, a mine turtle."
msgstr ""
msgid "@1"
msgstr ""

View File

@ -4,11 +4,17 @@ You took fatal damage from a block.=Sie haben tödlichen Schaden von einen Block
You were killed by @1.=Sie wurden von @1 getötet.
You were killed.=Sie wurden getötet.
You were killed by a hostile creature.=Sie wurden von einer feindlichen Kreatur getötet.
You were killed by a hostile creature named @1.=Sie wurden von einer feindlichen Kreatur namens @1 getötet.
You fell to your death.=Sie sind in den Tod gestürzt.
You died.=Sie sind gestorben.
You were kicked to death by a walker.=Sie wurden von einem Läufer zu Tode getreten.
You were kicked to death by @1, a walker.=Sie wurden von @1, einem Läufer, zu Tode getreten.
You were killed by a boar.=Sie wurden von einem Wildschwein getötet.
You were killed by @1, a boar.=Sie wurden von @1, einem Wildschwein, getötet.
You were killed by a skunk.=Sie wurden von einem Stinktier getötet.
You were killed by @1, a skunk.=Sie wurden von @1, einem Stinktier, getötet.
You were killed by a villager.=Sie wurden von einem Dorfbewohner getötet.
You were exploded by a mine turtle.=Sie wurden von einer Minenschildkröte in die Luft gejagt.
You were killed by @1, a villager.=Sie wurden von @1, einem Dorfbewohner, getötet.
You were killed by a mine turtle.=Sie wurden von einer Minenschildkröte getötet.
You were killed by @1, a mine turtle.=Sie wurden von @1, einer Minenschildkröte, getötet.
@1=@1

View File

@ -0,0 +1,20 @@
# textdomain: rp_death_messages
You drowned.=
You took fatal damage from a block.=
You were killed by @1.=
You were killed.=
You were killed by a hostile creature.=
You were killed by a hostile creature named @1.=
You fell to your death.=
You died.=
You were kicked to death by a walker.=
You were kicked to death by @1, a walker.=
You were killed by a boar.=
You were killed by @1, a boar.=
You were killed by a skunk.=
You were killed by @1, a skunk.=
You were killed by a villager.=
You were killed by @1, a villager.=
You were killed by a mine turtle.=
You were killed by @1, a mine turtle.=
@1=

View File

@ -0,0 +1,20 @@
# textdomain: rp_death_messages
You drowned.=
You took fatal damage from a block.=
You were killed by @1.=
You were killed.=
You were killed by a hostile creature.=
You were killed by a hostile creature named @1.=
You fell to your death.=
You died.=
You were kicked to death by a walker.=
You were kicked to death by @1, a walker.=
You were killed by a boar.=
You were killed by @1, a boar.=
You were killed by a skunk.=
You were killed by @1, a skunk.=
You were killed by a villager.=
You were killed by @1, a villager.=
You were killed by a mine turtle.=
You were killed by @1, a mine turtle.=
@1=

View File

@ -0,0 +1,20 @@
# textdomain: rp_death_messages
You drowned.=
You took fatal damage from a block.=
You were killed by @1.=
You were killed.=
You were killed by a hostile creature.=
You were killed by a hostile creature named @1.=
You fell to your death.=
You died.=
You were kicked to death by a walker.=
You were kicked to death by @1, a walker.=
You were killed by a boar.=
You were killed by @1, a boar.=
You were killed by a skunk.=
You were killed by @1, a skunk.=
You were killed by a villager.=
You were killed by @1, a villager.=
You were killed by a mine turtle.=
You were killed by @1, a mine turtle.=
@1=

View File

@ -0,0 +1,20 @@
# textdomain: rp_death_messages
You drowned.=
You took fatal damage from a block.=
You were killed by @1.=
You were killed.=
You were killed by a hostile creature.=
You were killed by a hostile creature named @1.=
You fell to your death.=
You died.=
You were kicked to death by a walker.=
You were kicked to death by @1, a walker.=
You were killed by a boar.=
You were killed by @1, a boar.=
You were killed by a skunk.=
You were killed by @1, a skunk.=
You were killed by a villager.=
You were killed by @1, a villager.=
You were killed by a mine turtle.=
You were killed by @1, a mine turtle.=
@1=

View File

@ -4,11 +4,17 @@ You took fatal damage from a block.=
You were killed by @1.=
You were killed.=
You were killed by a hostile creature.=
You were killed by a hostile creature named @1.=
You fell to your death.=
You died.=
You were kicked to death by a walker.=
You were kicked to death by @1, a walker.=
You were killed by a boar.=
You were killed by @1, a boar.=
You were killed by a skunk.=
You were killed by @1, a skunk.=
You were killed by a villager.=
You were exploded by a mine turtle.=
You were killed by @1, a villager.=
You were killed by a mine turtle.=
You were killed by @1, a mine turtle.=
@1=

View File

@ -0,0 +1,18 @@
msgid ""
msgstr ""
"Project-Id-Version: Minetest textdomain rp_decor x.x.x\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: eo\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: mtt_convert 0.1.0\n"
msgid "Barrel"
msgstr ""

View File

@ -0,0 +1,2 @@
# textdomain: rp_decor
Barrel=

View File

@ -1,9 +1,4 @@
-- Functions/ABMs
### `default.write_name(pos, text)`
This function is currently unused.
## Functions
### `default.is_sapling_growing(pos)`
@ -17,12 +12,14 @@ Returns true on success or false if it was not a sapling.
### `default.grow_sapling(pos)`
If there's a sapling node at `pos`, will grow it into
a tree instantly, if it has enough space.
Returns true on successs.
Returns true on success.
### `default.is_dry_biome(biomename)`
Returns true if the given biome is considered to be
a 'dry' biome (e.g. for dry grass). Custom or unknown
biomes are never dry.
### `default.toggle_fence_gate(pos)`
If there's a fence gate node at `pos`,
it will be opened when it's closed, or
it will be closed when it's opened.
Returns true on success.
## Functions for builtin biomes
@ -46,7 +43,8 @@ Returns metadata for a builtin biome. Returns a table with these fields:
* `main_biome`: Name of the main biome (useful if you have an underwater or beach biome variant)
* `layer`: "main" for the core biome, "underwater" and "beach" for the special Underwater and Beach variants
* `class`: Biome class that was assigned (see above)
* `class`: Biome class. A rough categorization of this biome. One of:
`"grassy"`, `"savannic"`, `"drylandic"`, `"swampy"`, `"desertic"`, `"undergroundy"`
* `is_dry`: True if biome is considered dry (e.g. for dry grass)
* `dirt_blob`: Name of dirt ore node or nil to suppress generation
* `sand_blob`: Name of sand ore node or nil to suppress generation
@ -55,3 +53,10 @@ Returns metadata for a builtin biome. Returns a table with these fields:
Note: `dirt_blob`, `sand_blob` and `gravel_blob` are used to create ores after all builtin
biomes were created. These fields are useless for biomes from
external mods.
### `default.is_dry_biome(biomename)`
Returns true if the given biome is considered to be
a 'dry' biome (e.g. for dry grass). Custom or unknown
biomes are never dry.

View File

@ -82,6 +82,14 @@ File credits and individual file licenses:
* Derived by Wuzzy from sound by sifujordan
* Source: <https://freesound.org/people/sifujordan/sounds/506160/>
* License: CC0
* `rp_default_fence_gate_wood_open.ogg`
* By Iwan 'qubodup' Gabovitch <qubodup@gmail.com> <qubodup.net>
* Source: <https://opengameart.org/content/door-open-door-close-set>
* License: CC0
* `rp_default_fence_gate_wood_close.ogg`
* By Iwan 'qubodup' Gabovitch <qubodup@gmail.com> <qubodup.net>
* Source: <https://opengameart.org/content/door-open-door-close-set>
* License: CC0
* rp_default_footstep_cactus.*.ogg
* rp_default_dig_cactus.*.ogg

View File

@ -21,6 +21,27 @@ end
-- Chest
local get_chest_formspec = function(meta)
local form = rp_formspec.get_page("rp_default:chest")
form = form .. rp_label.container_label_formspec_element(meta)
return form
end
local get_chest_infotext = function(meta)
local name = meta:get_string("name")
if name ~= "" then
return S("Chest") .. "\n" .. S('“@1”', name)
else
return S("Chest")
end
end
local chest_write_name = function(pos, text)
local meta = minetest.get_meta(pos)
meta:set_string("name", text)
meta:set_string("infotext", get_chest_infotext(meta))
meta:set_string("formspec", get_chest_formspec(meta))
end
minetest.register_node(
"rp_default:chest",
{
@ -35,8 +56,8 @@ minetest.register_node(
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", rp_formspec.get_page("rp_default:chest"))
meta:set_string("infotext", S("Chest"))
meta:set_string("formspec", get_chest_formspec(meta))
meta:set_string("infotext", get_chest_infotext(meta))
local inv = meta:get_inventory()
@ -45,17 +66,7 @@ minetest.register_node(
on_destruct = function(pos)
item_drop.drop_items_from_container(pos, {"main"})
end,
write_name = function(pos, text)
--[[ TODO: Bring back container naming
local meta = minetest.get_meta(pos)
if text ~= "" then
meta:set_string("infotext", text)
else
meta:set_string("infotext", S("Chest"))
end
]]
end,
_rp_write_name = chest_write_name,
_rp_blast_resistance = 2,
})
minetest.register_node(
@ -82,6 +93,7 @@ minetest.register_node(
on_destruct = function(pos)
item_drop.drop_items_from_container(pos, {"main"})
end,
_rp_write_name = chest_write_name,
drop = "rp_default:chest",
_rp_blast_resistance = 2,
})
@ -102,9 +114,10 @@ minetest.register_lbm({
name = "rp_default:update_chest_formspec_3_14_0",
nodenames = { "rp_default:chest", "rp_default:chest_painted" },
action = function(pos, node)
local def = minetest.registered_nodes[node.name]
if def and def.on_construct then
def.on_construct(pos)
end
local meta = minetest.get_meta(pos)
local formspec = get_chest_formspec(meta)
local infotext = get_chest_infotext(meta)
meta:set_string("formspec", formspec)
meta:set_string("infotext", infotext)
end,
})

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