Compare commits

..

4 Commits

Author SHA1 Message Date
Zweihorn 25e71fe3ca
copy from intllib 2019-05-10 12:46:39 +02:00
Zweihorn b1ec85d8ef
fork of the stable-5 branch for game_intllib
This is a fork of the 5.0.1 version i.e. stable-5 branch for the limited purpose of the game_intllib project. This project is aiming at LUA-code translation in compliance to the GNU gettext toolchain and intentionally has the limited scope of a 'one-lamguage' server solution. This means the server 'language=' settings chooses one main language and both the translation of S(string") tags in the LUA-code is server driven.
2019-05-10 12:43:10 +02:00
Paramat 8678265125 Dungeon loot: Avoid empty 'if' branch to satisfy lua check 2019-03-31 22:26:33 +02:00
sfan5 df387e2394 Dungeon loot: Don't crash on unknown items
fixes #2228
2019-03-31 22:26:32 +02:00
878 changed files with 1141 additions and 58796 deletions

View File

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

View File

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

28
README.txt Normal file
View File

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

View File

@ -1,3 +1,3 @@
name = Minetest Game
author = Minetest
author = minetest
description = Bundled by default with Minetest, and aims to be lightweight, moddable, and fairly playable without mods.

View File

@ -214,8 +214,6 @@ The doors mod allows modders to register custom doors and trapdoors.
inventory_image = "mod_door_inv.png",
groups = {choppy = 2},
tiles = {"mod_door.png"}, -- UV map.
-- The front and back of the door must be identical in appearence as they swap on
-- open/close.
recipe = craftrecipe,
sounds = default.node_sound_wood_defaults(), -- optional
sound_open = sound play for open door, -- optional
@ -230,12 +228,7 @@ The doors mod allows modders to register custom doors and trapdoors.
inventory_image = "mod_trapdoor_inv.png",
groups = {choppy = 2},
tile_front = "doors_trapdoor.png", -- the texture for the front and back of the trapdoor
tile_side = "doors_trapdoor_side.png",
-- The texture for the four sides of the trapdoor.
-- The texture should have the trapdoor side drawn twice, in the lowest and highest
-- 1/8ths of the texture, both upright. The area between is not used.
-- The lower 1/8th will be used for the closed trapdoor, the higher 1/8th will be used
-- for the open trapdoor.
tile_side = "doors_trapdoor_side.png", -- the tiles of the four side parts of the trapdoor
sounds = default.node_sound_wood_defaults(), -- optional
sound_open = sound play for open door, -- optional
sound_close = sound play for close door, -- optional
@ -276,7 +269,7 @@ The mod that places chests with loot in dungeons provides an API to register add
name = "item:name",
chance = 0.5,
-- ^ chance value from 0.0 to 1.0 that the item will appear in the chest when chosen
-- Due to an extra step in the selection process, 0.5 does not(!) mean that
-- due to an extra step in the selection process, 0.5 does not(!) mean that
-- on average every second chest will have this item
count = {1, 4},
-- ^ table with minimum and maximum amounts of this item
@ -286,8 +279,7 @@ The mod that places chests with loot in dungeons provides an API to register add
-- optional, defaults to no height restrictions
types = {"desert"},
-- ^ table with types of dungeons this item can be found in
-- supported types: "normal" (the cobble/mossycobble one), "sandstone"
-- "desert" and "ice"
-- supported types: "normal" (the cobble/mossycobble one), "sandstone", "desert"
-- optional, defaults to no type restrictions
@ -370,8 +362,6 @@ The farming API allows you to easily register plants and hoes.
Fire API
--------
Add group flammable when registering a node to make fire seek for it.
Add it to an item to make it burn up when dropped in lava or fire.
New node def property:
`on_burn(pos)`

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,63 +0,0 @@
# Transforms the generic po file produced by weblate into a series of
# locale/[modname].ja.tr files.
# TODO: make it work for all languages!
import os
import re
from collections import defaultdict
strings=dict()
modstr=defaultdict(list)
for modname in os.listdir("../mods/"):
for fn in os.listdir("../mods/"+modname):
if fn.endswith(".lua"):
s=open("../mods/"+modname+"/"+fn).read()
for gtstring in re.findall("S\(.*\)", s):
k=gtstring[3:-2]
strings[k]=modname
modstr[modname].append(k)
"""
for m in modstr.keys():
print(m)
for v in modstr[m]:
print("\t"+v)
"""
locales = list()
for fn in os.listdir("."):
if fn .endswith(".po"):
locales.append(fn[:-3])
print(locales)
notused=set()
for loc in locales:
matches = 0
nom = 0
msgid = None
translation = dict()
for line in open(loc+".po"):
match = re.match('[^#]*msgstr[ \t]+"(.*)"', line)
if match and msgid is not None:
translation[msgid]=match.group(1)
match = re.match('[^#]*msgid[ \t]+"(.*)"', line)
if match:
msgid = match.group(1)
if msgid in strings:
matches+=1
else:
nom+=1
notused.add(msgid)
else:
msgid=None
print("{}: {}/{}".format(loc, matches, matches+nom))
for modname in os.listdir("../mods/"):
os.makedirs("../mods/{0}/locale".format(modname), exist_ok=True)
localefile = open("../mods/{0}/locale/{0}.{1}.tr".format(modname, loc), "w")
localefile.write("# textdomain: "+modname+"\n\n")
for k in modstr[modname]:
if k in translation:
localefile.write("{}={}\n\n".format(k,translation[k]))
localefile.close()
print(notused)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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

2
mods/beds/depends.txt Normal file
View File

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

View File

@ -1,4 +1,5 @@
local pi = math.pi
local player_in_bed = 0
local is_sp = minetest.is_singleplayer()
local enable_respawn = minetest.settings:get_bool("enable_bed_respawn")
if enable_respawn == nil then
@ -58,8 +59,11 @@ local function lay_down(player, pos, bed_pos, state, skip)
-- stand up
if state ~= nil and not state then
local p = beds.pos[name] or nil
if beds.player[name] ~= nil then
beds.player[name] = nil
beds.bed_position[name] = nil
player_in_bed = player_in_bed - 1
end
-- skip here to prevent sending player specific changes (used for leaving players)
if skip then
return
@ -78,9 +82,10 @@ local function lay_down(player, pos, bed_pos, state, skip)
-- lay down
else
beds.player[name] = 1
beds.pos[name] = pos
beds.bed_position[name] = bed_pos
beds.player[name] = 1
player_in_bed = player_in_bed + 1
-- physics, eye_offset, etc
player:set_eye_offset({x = 0, y = -13, z = 0}, {x = 0, y = 0, z = 0})
@ -98,18 +103,9 @@ local function lay_down(player, pos, bed_pos, state, skip)
player:hud_set_flags(hud_flags)
end
local function get_player_in_bed_count()
local c = 0
for _, _ in pairs(beds.player) do
c = c + 1
end
return c
end
local function update_formspecs(finished)
local ges = #minetest.get_connected_players()
local form_n
local player_in_bed = get_player_in_bed_count()
local is_majority = (ges / 2) < player_in_bed
if finished then
@ -227,7 +223,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
-- Because "Force night skip" button is a button_exit, it will set fields.quit
-- and lay_down call will change value of player_in_bed, so it must be taken
-- earlier.
local last_player_in_bed = get_player_in_bed_count()
local last_player_in_bed = player_in_bed
if fields.quit or fields.leave then
lay_down(player, nil, nil, false)

View File

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

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Незвычайны ложак
Simple Bed=Просты ложак

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Zdobená postel
Simple Bed=Prostá postel

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Schönes Bett
Simple Bed=Schlichtes Bett

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=
Simple Bed=

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Luksa lito
Simple Bed=Simpla lito

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Cama sofisticada
Simple Bed=Cama sencilla

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Lit fantaisie
Simple Bed=Lit Simple

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Csinos ágy
Simple Bed=Egyszerű ágy

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Dipan Mewah
Simple Bed=Dipan Sederhana

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Letto elegante
Simple Bed=Letto semplice

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=お洒落なベッド
Simple Bed=簡素なベッド

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=se jadni ckana
Simple Bed=sampu ckana

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Katil Beragam
Simple Bed=Katil Biasa

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Mooi Bed
Simple Bed=Simpel bed

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Łóżko ozdobne
Simple Bed=Proste łóżko

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Cama com Cabeceira
Simple Bed=Cama Simples

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Cama com Cabeceira
Simple Bed=Cama Simples

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Pat Luxos
Simple Bed=Pat Simplu

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Необычная кровать
Simple Bed=Обычная кровать

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Китњаст кревет
Simple Bed=Једноставан кревет

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Süslü Yatak
Simple Bed=Basit Yatak

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=Чепурне Ліжко
Simple Bed=Просте Ліжко

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=豪华大床
Simple Bed=简单的床

View File

@ -1,6 +0,0 @@
# textdomain: beds
Fancy Bed=
Simple Bed=

View File

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

View File

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

View File

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

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

@ -1,2 +0,0 @@
# textdomain: binoculars

View File

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

2
mods/boats/depends.txt Normal file
View File

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

View File

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

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Човен

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Loďka

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Boot

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Boato

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Bote

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Bateau

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Csónak

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=Kapal

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=zattera

View File

@ -1,4 +0,0 @@
# textdomain: boats
Boat=ボート

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