From 596b824074942615ead9c7681f1c3add7b5e1206 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 14 Feb 2015 00:50:14 +0100 Subject: [PATCH] Remove commends in init.lua, they are redundant --- init.lua | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/init.lua b/init.lua index e867821..b59176d 100644 --- a/init.lua +++ b/init.lua @@ -18,9 +18,6 @@ mana.playerlist = {} API functions ]===] ---[[ Sets the mana reserves of the specified player -It is ensured that the resulting value will always be within the bounds of [0, maxmana] -]] function mana.set(playername, value) if value < 0 then minetest.log("info", "[mana] Warning: mana.set was called with negative value!") @@ -35,9 +32,6 @@ function mana.set(playername, value) end end ---[[ Sets the maximum mana of the specified player. The value must be positive or 0. - The player's mana reserves will be capped at the new maximum, if neccessary. -]] function mana.setmax(playername, value) if value < 0 then value = 0 @@ -52,26 +46,14 @@ function mana.setmax(playername, value) end end --- Returns the current mana of the specified player function mana.get(playername) return mana.playerlist[playername].mana end --- Returns the maximum mana of the specified player function mana.getmax(playername) return mana.playerlist[playername].maxmana end ---[[ -Adds up to the specified amount of mana to the player. -If the sum would be greater than the maximum, the new -mana amount will be capped at the maximum. - -returns: -- true, excess on success, where excess is the amount of mana which - was no -- false on failure -]] function mana.add_up_to(playername, value) local t = mana.playerlist[playername] if(t ~= nil and value >= 0) then @@ -90,15 +72,6 @@ function mana.add_up_to(playername, value) end end - ---[[ -Adds the specified amount of mana to the player, -iff it would not exceed the maximum. - -returns: -- true on success, all mana has been added -- false on failure, no mana has been added -]] function mana.add(playername, value) local t = mana.playerlist[playername] if(t ~= nil and ((t.mana + value) <= t.maxmana) and value >= 0) then @@ -110,14 +83,6 @@ function mana.add(playername, value) end end ---[[ -Subtracts the specified amount of mana from the player, -iff the player has enough mana reserves. - -returns: -- true on success, all mana has been subtracted -- false on failure, no mana has been subtracted -]] function mana.subtract(playername, value) local t = mana.playerlist[playername] if(t ~= nil and t.mana >= value and value >= 0) then @@ -129,14 +94,6 @@ function mana.subtract(playername, value) end end - ---[[ -Subtracts up to the specified amount of mana from the player. - -returns: -- true, missing on success, where missing is the amount of mana which could not been subtracted -- false on failure, no mana has been subtracted -]] function mana.subtract_up_to(playername, value) local t = mana.playerlist[playername] if(t ~= nil and value >= 0) then