1
0
zrcadlo git://repo.or.cz/minetest_mana.git synchronizováno 2025-12-31 02:55:28 +01:00

11 Commity

Autor SHA1 Zpráva Datum
2bd45528ec Merge branch 'master' of yunohost.local:mtcontrib/minetest_mana into nalc-1.2-dev 2019-12-22 13:41:53 +01:00
Wuzzy
31250df93e Version 1.3.1 2019-03-22 16:27:42 +01:00
Wuzzy
f1e6d37614 Remove word “subgame” 2019-03-22 16:27:25 +01:00
Wuzzy
6d36fc9526 Version 1.3.0 2019-03-22 16:23:27 +01:00
Wuzzy
d63422eef3 Add screenshot 2019-03-22 12:31:38 +01:00
Wuzzy
3e7f533bee Use new 5.0.0 mod.conf file 2019-03-22 12:24:16 +01:00
Wuzzy
ba42cf3e38 Change license to MIT 2019-03-22 12:23:10 +01:00
Wuzzy
7efd3064bb Use new 5.0.0 translation system 2019-03-22 12:19:57 +01:00
sys4-fr
45eb047016 Change la manabar par la version MFF 2019-01-19 15:47:48 +01:00
sys4-fr
b152b04601 Ajoute message de chargement du mod dans le journal "action" 2018-12-26 21:18:19 +01:00
Wuzzy
f4a0c31301 Update for 0.4.16 settings syntax 2017-06-20 16:57:11 +02:00
16 změnil soubory, kde provedl 23 přidání a 25 odebrání

4
API.md
Zobrazit soubor

@@ -1,5 +1,5 @@
API documentation for Mana 1.2.0 API documentation for Mana mod
================================ ==============================
## Introduction ## Introduction
The API of the Mana mod allows you to set and receive The API of the Mana mod allows you to set and receive

Zobrazit soubor

@@ -1,6 +1,6 @@
# Mana [mana] # Mana [mana]
* Version: 1.2.0 * Version: 1.3.1
* Note: This mod uses semantic versioning, as defined by version 2.0.0 of the SemVer standard. See: <http://semver.org/> * Note: This mod uses semantic versioning, as defined by version 2.0.0 of the SemVer standard. See: <http://semver.org/>
## Description ## Description
@@ -14,7 +14,7 @@ Each player will have an additional attribute: Mana. To be precise:
By default, each player spawns with 0/200 mana, and regenerates 1 mana per fifth of a second. All By default, each player spawns with 0/200 mana, and regenerates 1 mana per fifth of a second. All
these values can be configured with the server settings (`minetest.conf`) and it is highly advised to do these values can be configured with the server settings (`minetest.conf`) and it is highly advised to do
so if you plan to integrate this mod into a subgame. so if you plan to integrate this mod into a game.
The mana regeneration rate (the “mana tick”) is a global setting and is *not* configured on a The mana regeneration rate (the “mana tick”) is a global setting and is *not* configured on a
per-player basis. per-player basis.
@@ -26,7 +26,6 @@ way. You should install other mods which use the Mana mod as a dependency.
The API documentation is in the file `API.md`. The API documentation is in the file `API.md`.
If the mod “HUD bars” [`hudbars`] is installed, a blue bar will be added to the HUD showing the player's mana reserves. If the mod “HUD bars” [`hudbars`] is installed, a blue bar will be added to the HUD showing the player's mana reserves.
It currently only works with version 0.3.0 of this mod.
Otherwise, the mana is just shown as text. Otherwise, the mana is just shown as text.
@@ -44,5 +43,5 @@ License information
=================== ===================
* `textures/mana_icon.png`: [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/) by [Buch](http://opengameart.org/users/Buch). * `textures/mana_icon.png`: [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/) by [Buch](http://opengameart.org/users/Buch).
* `textures/mana_bgicon.png`: CC BY 3.0, originally by Buch, modified by Wuzzy. * `textures/mana_bgicon.png`: CC BY 3.0, originally by Buch, modified by Wuzzy.
* `textures/mana_bar.png`: [WTFPL](http://www.wtfpl.net/txt/copying/) by Wuzzy. * `textures/mana_bar.png`: [MIT License](https://opensource.org/licenses/MIT) by Wuzzy.
* Everything else: WTFPL. * Everything else: MIT License.

Zobrazit soubor

@@ -1,2 +0,0 @@
hudbars?
intllib?

Zobrazit soubor

@@ -1 +0,0 @@
Adds a mana attribute to players, can be used as energy source for magical items, etc.

Zobrazit soubor

@@ -2,19 +2,14 @@
Mana Mana
This mod adds mana to players, a special attribute This mod adds mana to players, a special attribute
License: WTFPL License: MIT License
]] ]]
--[===[ --[===[
Initialization Initialization
]===] ]===]
local S local S = minetest.get_translator("mana")
if (minetest.get_modpath("intllib")) then
S = intllib.Getter()
else
S = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end
end
mana = {} mana = {}
mana.playerlist = {} mana.playerlist = {}
@@ -25,17 +20,17 @@ mana.settings.default_regen = 1
mana.settings.regen_timer = 0.2 mana.settings.regen_timer = 0.2
do do
local default_max = tonumber(minetest.setting_get("mana_default_max")) local default_max = tonumber(minetest.settings:get("mana_default_max"))
if default_max ~= nil then if default_max ~= nil then
mana.settings.default_max = default_max mana.settings.default_max = default_max
end end
local default_regen = tonumber(minetest.setting_get("mana_default_regen")) local default_regen = tonumber(minetest.settings:get("mana_default_regen"))
if default_regen ~= nil then if default_regen ~= nil then
mana.settings.default_regen = default_regen mana.settings.default_regen = default_regen
end end
local regen_timer = tonumber(minetest.setting_get("mana_regen_timer")) local regen_timer = tonumber(minetest.settings:get("mana_regen_timer"))
if regen_timer ~= nil then if regen_timer ~= nil then
mana.settings.regen_timer = regen_timer mana.settings.regen_timer = regen_timer
end end
@@ -276,7 +271,7 @@ end)
]===] ]===]
if minetest.get_modpath("hudbars") ~= nil then if minetest.get_modpath("hudbars") ~= nil then
hb.register_hudbar("mana", 0xFFFFFF, S("Mana"), { bar = "mana_bar.png", icon = "mana_icon.png", bgicon = "mana_bgicon.png" }, 0, mana.settings.default_max, false) hb.register_hudbar("mana", 0xFFFFFF, S("Mana"), { bar = "mana_bar_purple.png", icon = "mana_icon_purple.png", bgicon = "mana_icon_bg_empty.png" }, 0, mana.settings.default_max, false)
function mana.hud_update(playername) function mana.hud_update(playername)
local player = minetest.get_player_by_name(playername) local player = minetest.get_player_by_name(playername)
@@ -326,3 +321,5 @@ end
mana.round = function(x) mana.round = function(x)
return math.ceil(math.floor(x+0.5)) return math.ceil(math.floor(x+0.5))
end end
minetest.log("action", "[mana] loaded.")

Zobrazit soubor

@@ -1,2 +0,0 @@
Mana = Mana
Mana: @1/@2 = Mana: @1/@2

3
locale/mana.de.tr Normální soubor
Zobrazit soubor

@@ -0,0 +1,3 @@
# textdomain:mana
Mana=Mana
Mana: @1/@2=Mana: @1/@2

Zobrazit soubor

@@ -1,2 +1,3 @@
# textdomain:mana
Mana= Mana=
Mana: @1/@2= Mana: @1/@2=

3
mod.conf Normální soubor
Zobrazit soubor

@@ -0,0 +1,3 @@
name = mana
description = Adds a mana attribute to players, can be used as energy source for magical items, etc.
optional_depends = hudbars

binární
screenshot.png Normální soubor

Binární soubor nebyl zobrazen.

Za

Šířka:  |  Výška:  |  Velikost: 10 KiB

Binární soubor nebyl zobrazen.

Před

Šířka:  |  Výška:  |  Velikost: 80 B

binární
textures/mana_bar_purple.png Spustitelný soubor

Binární soubor nebyl zobrazen.

Za

Šířka:  |  Výška:  |  Velikost: 82 B

Binární soubor nebyl zobrazen.

Před

Šířka:  |  Výška:  |  Velikost: 2.9 KiB

Binární soubor nebyl zobrazen.

Před

Šířka:  |  Výška:  |  Velikost: 2.9 KiB

binární
textures/mana_icon_bg_empty.png Spustitelný soubor

Binární soubor nebyl zobrazen.

Za

Šířka:  |  Výška:  |  Velikost: 635 B

binární
textures/mana_icon_purple.png Spustitelný soubor

Binární soubor nebyl zobrazen.

Za

Šířka:  |  Výška:  |  Velikost: 600 B