mirror of
git://repo.or.cz/minetest_mana.git
synced 2025-06-29 05:30:23 +02:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
6d36fc9526 | |||
d63422eef3 | |||
3e7f533bee | |||
ba42cf3e38 | |||
7efd3064bb | |||
f4a0c31301 |
4
API.md
4
API.md
@ -1,5 +1,5 @@
|
||||
API documentation for Mana 1.2.0
|
||||
================================
|
||||
API documentation for Mana mod
|
||||
==============================
|
||||
|
||||
## Introduction
|
||||
The API of the Mana mod allows you to set and receive
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Mana [mana]
|
||||
|
||||
* Version: 1.2.0
|
||||
* Version: 1.3.0
|
||||
* Note: This mod uses semantic versioning, as defined by version 2.0.0 of the SemVer standard. See: <http://semver.org/>
|
||||
|
||||
## Description
|
||||
@ -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`.
|
||||
|
||||
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.
|
||||
|
||||
@ -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_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.
|
||||
* Everything else: WTFPL.
|
||||
* `textures/mana_bar.png`: [MIT License](https://opensource.org/licenses/MIT) by Wuzzy.
|
||||
* Everything else: MIT License.
|
||||
|
@ -1,2 +0,0 @@
|
||||
hudbars?
|
||||
intllib?
|
@ -1 +0,0 @@
|
||||
Adds a mana attribute to players, can be used as energy source for magical items, etc.
|
15
init.lua
15
init.lua
@ -2,19 +2,14 @@
|
||||
Mana
|
||||
This mod adds mana to players, a special attribute
|
||||
|
||||
License: WTFPL
|
||||
License: MIT License
|
||||
]]
|
||||
|
||||
--[===[
|
||||
Initialization
|
||||
]===]
|
||||
|
||||
local S
|
||||
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
|
||||
local S = minetest.get_translator("mana")
|
||||
|
||||
mana = {}
|
||||
mana.playerlist = {}
|
||||
@ -25,17 +20,17 @@ mana.settings.default_regen = 1
|
||||
mana.settings.regen_timer = 0.2
|
||||
|
||||
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
|
||||
mana.settings.default_max = default_max
|
||||
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
|
||||
mana.settings.default_regen = default_regen
|
||||
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
|
||||
mana.settings.regen_timer = regen_timer
|
||||
end
|
||||
|
@ -1,2 +0,0 @@
|
||||
Mana = Mana
|
||||
Mana: @1/@2 = Mana: @1/@2
|
3
locale/mana.de.tr
Normal file
3
locale/mana.de.tr
Normal file
@ -0,0 +1,3 @@
|
||||
# textdomain:mana
|
||||
Mana=Mana
|
||||
Mana: @1/@2=Mana: @1/@2
|
@ -1,2 +1,3 @@
|
||||
Mana =
|
||||
Mana: @1/@2 =
|
||||
# textdomain:mana
|
||||
Mana=
|
||||
Mana: @1/@2=
|
||||
|
3
mod.conf
Normal file
3
mod.conf
Normal file
@ -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
screenshot.png
Normal file
BIN
screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Reference in New Issue
Block a user