Merge branch 'master' of https://git.minetest.land/Wuzzy/MineClone2 into master

This commit is contained in:
Brandon 2020-08-08 17:51:09 -04:00
commit d6c7c9dcd0
15 changed files with 315 additions and 312 deletions

View file

@ -231,7 +231,6 @@ local function brewing_stand_timer(pos, elapsed)
meta:set_float("fuel_timer", fuel_timer)
meta:set_float("stand_timer", stand_timer)
meta:set_float("fuel", fuel)
-- meta:set_list("stand_items", stand_list)
meta:set_string("formspec", formspec)
return result
@ -313,7 +312,7 @@ local doc_string =
S("To use a brewing stand, rightclick it.").."\n"..
S("To brew, you need blaze powder as fuel, a brewing material and at least 1 glass bottle filled with a liquid.").."\n"..
S("Place the blaze powder in the left slot, the brewing material in the middle slot and 1-3 bottles in the remaining slots.").."\n"..
S("When you have found a good comination, the brewing will commence automatically and steam starts to appear, using up the fuel and brewing material. The potions will soon be ready.").."\n"..
S("When you have found a good combination, the brewing will commence automatically and steam starts to appear, using up the fuel and brewing material. The potions will soon be ready.").."\n"..
S("Different combinations of brewing materials and liquids will give different results. Try to experiment!")
local tiles = {"mcl_brewing_top.png", --top
@ -856,7 +855,6 @@ minetest.register_node("mcl_brewing:stand_011", {
_mcl_blast_resistance = 1,
_mcl_hardness = 1,
on_destruct = on_destruct,
-- after_dig_node = after_dig,
allow_metadata_inventory_take = allow_take,
allow_metadata_inventory_put = allow_put,
on_metadata_inventory_put = on_put,

View file

@ -4,7 +4,7 @@ Inventory=Inventar
To use a brewing stand, rightclick it.=Um einen Braustand zu benutzen, rechtsklicken Sie ihn.
To brew, you need blaze powder as fuel, a brewing material and at least 1 glass bottle filled with a liquid.=Zum Brauen benötigt man Lohenstaub als Brennstoff, ein Braumaterial und mindestens 1 Glasflasche, die mit einer Flüssigkeit gefüllt ist.
Place the blaze powder in the left slot, the brewing material in the middle slot and 1-3 bottles in the remaining slots.=Platzieren Sie den Lohenstaub in den linken Plartz, das Braumaterial in den mittleren Platz und 1-3 Glasflaschen in die übrigen Plätze.
When you have found a good comination, the brewing will commence automatically and steam starts to appear, using up the fuel and brewing material. The potions will soon be ready.=Wenn Sie eine gute Kombination gefunden haben, beginnt der Brauvorgang automatisch, und es entsteht Dampf. Der Brennstoff und das Brühmaterial wird aufbraucht. Die Tränke werden bald fertig sein.
When you have found a good combination, the brewing will commence automatically and steam starts to appear, using up the fuel and brewing material. The potions will soon be ready.=Wenn Sie eine gute Kombination gefunden haben, beginnt der Brauvorgang automatisch, und es entsteht Dampf. Der Brennstoff und das Brühmaterial wird aufbraucht. Die Tränke werden bald fertig sein.
Different combinations of brewing materials and liquids will give different results. Try to experiment!=Unterschiedliche Kombinationen von Braumaterialien und Flüssigkeiten werden zu unterschiedlichen Ergebnissen führen. Experimentieren Sie!
The stand allows you to brew potions!=Der Stand ermöglicht das Brauen von Tränken.
Brew Potions=Tränke brauen

View file

@ -4,7 +4,7 @@ Inventory=Инвентарь
To use a brewing stand, rightclick it.=Кликните правой, чтобы использовать варочный стенд.
To brew, you need blaze powder as fuel, a brewing material and at least 1 glass bottle filled with a liquid.=Для приготовления зелья вам понадобится огненный порошок в качестве топлива, исходный материал и как минимум 1 стеклянная бутылка, наполненная жидкостью.
Place the blaze powder in the left slot, the brewing material in the middle slot and 1-3 bottles in the remaining slots.=Поместите огненный порошок в левый отсек, исходный материал в средний отсек и 1-3 бутылки в оставшиеся отсеки.
When you have found a good comination, the brewing will commence automatically and steam starts to appear, using up the fuel and brewing material. The potions will soon be ready.=Когда вы подберёте хорошее сочетание, приготовление зелья начнётся автоматически — появится пар и начнётся расход топлива и исходного материала. Зелья вскоре будут готовы.
When you have found a good combination, the brewing will commence automatically and steam starts to appear, using up the fuel and brewing material. The potions will soon be ready.=Когда вы подберёте хорошее сочетание, приготовление зелья начнётся автоматически — появится пар и начнётся расход топлива и исходного материала. Зелья вскоре будут готовы.
Different combinations of brewing materials and liquids will give different results. Try to experiment!=Разные сочетания варочных материалов и жидкостей будут давать разные результаты. Поэкспериментируйте!
The stand allows you to brew potions!=Стенд позволяет вам варить зелья!
Brew Potions=Зельеварение

View file

@ -4,7 +4,7 @@ Inventory=
To use a brewing stand, rightclick it.=
To brew, you need blaze powder as fuel, a brewing material and at least 1 glass bottle filled with a liquid.=
Place the blaze powder in the left slot, the brewing material in the middle slot and 1-3 bottles in the remaining slots.=
When you have found a good comination, the brewing will commence automatically and steam starts to appear, using up the fuel and brewing material. The potions will soon be ready.=
When you have found a good combination, the brewing will commence automatically and steam starts to appear, using up the fuel and brewing material. The potions will soon be ready.=
Different combinations of brewing materials and liquids will give different results. Try to experiment!=
The stand allows you to brew potions!=
Brew Potions=

View file

@ -1,3 +1,5 @@
local S = minetest.get_translator("mcl_potions")
local is_invisible = {}
local is_poisoned = {}
local is_regenerating = {}
@ -303,7 +305,8 @@ local is_fire_node = { ["mcl_core:lava_flowing"]=true,
["mcl_nether:magma"]=true,
["mcl_nether:nether_lava_source"]=true,
["mcl_nether:nether_lava_flowing"]=true,
["mcl_nether:nether_lava_source"]=true}
["mcl_nether:nether_lava_source"]=true
}
-- Prevent damage to player with Fire Resistance enabled
minetest.register_on_player_hpchange(function(player, hp_change, reason)
@ -314,8 +317,6 @@ minetest.register_on_player_hpchange(function(player, hp_change, reason)
-- it's worth noting that you don't take damage from players in this case...
local player_info = mcl_playerinfo[player:get_player_name()]
-- if reason.type == "drown" then return hp_change
if is_fire_node[player_info.node_head] or is_fire_node[player_info.node_feet] or is_fire_node[player_info.node_stand] then
return 0
else
@ -347,7 +348,9 @@ end, true)
function mcl_potions._reset_player_effects(player)
if not player:is_player() then return end
if not player:is_player() then
return
end
meta = player:get_meta()
mcl_potions.make_invisible(player, false)
@ -375,7 +378,9 @@ end
function mcl_potions._save_player_effects(player)
if not player:is_player() then return end
if not player:is_player() then
return
end
meta = player:get_meta()
meta:set_string("_is_invisible", minetest.serialize(is_invisible[player]))
@ -393,7 +398,9 @@ end
function mcl_potions._load_player_effects(player)
if not player:is_player() then return end
if not player:is_player() then
return
end
meta = player:get_meta()
if minetest.deserialize(meta:get_string("_is_invisible")) then
@ -487,7 +494,9 @@ function mcl_potions.is_obj_hit(self, pos)
if entity and entity.name ~= self.object:get_luaentity().name then
if entity._cmi_is_mob then return true end
if entity._cmi_is_mob then
return true
end
elseif object:is_player() and self._thrower ~= object:get_player_name() then
return true
@ -500,7 +509,9 @@ end
function mcl_potions.make_invisible(player, toggle)
if not player then return false end
if not player then
return false
end
local is_player = player:is_player()
local entity = player:get_luaentity()
@ -633,7 +644,9 @@ end
function mcl_potions.swiftness_func(player, factor, duration)
if not player:get_meta() then return false end
if not player:get_meta() then
return false
end
if not is_swift[player] then
@ -654,7 +667,9 @@ end
function mcl_potions.leaping_func(player, factor, duration)
if not player:get_meta() then return false end
if not player:get_meta() then
return false
end
if not is_leaping[player] then
@ -889,27 +904,36 @@ get_chat_function["leaping"] = mcl_potions.leaping_func
get_chat_function["swiftness"] = mcl_potions.swiftness_func
get_chat_function["heal"] = mcl_potions.healing_func
minetest.register_chatcommand("potion",{
params = "<params>",
description = "Set player potion effects -- arguments <effect (e.g. poison or night_vision)> <factor (1 = 100%)> <duration (sec)>",
minetest.register_chatcommand("effect",{
params = S("<effect> <duration> [<factor>]"),
description = S("Add a status effect to yourself. Arguments: <effect>: name of potion effect, e.g. poison. <duration>: duration in seconds. <factor>: effect strength multiplier (1 = 100%)"),
privs = {server = true},
func = function(name, params)
P = {}
i = 0
local P = {}
local i = 0
for str in string.gmatch(params, "([^ ]+)") do
i = i + 1
P[i] = str
end
if not P[1] then
return false, S("Missing effect parameter!")
elseif not tonumber(P[2]) then
return false, S("Missing or invalid duration parameter!")
elseif P[3] and not tonumber(P[3]) then
return false, S("Invalid factor parameter!")
end
-- Default factor = 1
if not P[3] then
P[3] = P[2]
P[3] = 1.0
end
if get_chat_function[P[1]] then
get_chat_function[P[1]](minetest.get_player_by_name(name), tonumber(P[2]), tonumber(P[3]))
get_chat_function[P[1]](minetest.get_player_by_name(name), tonumber(P[3]), tonumber(P[2]))
return true
else
minetest.chat_send_player(name, P[1].." is not an available potion effect. Use /help potion as needed.")
return false, S("@1 is not an available potion effect.", P[1])
end
end,

View file

@ -71,7 +71,9 @@ minetest.register_globalstep(function(dtime)
end
end
if vals.timer <= 0 then lingering_effect_at[pos] = nil end
if vals.timer <= 0 then
lingering_effect_at[pos] = nil
end
end
lingering_timer = 0

View file

@ -100,15 +100,10 @@ Grants limitless breath underwater.=Gibt unbegrenzten Atem im Wasser.
Fire Resistance=Feuerresistenz
Grants immunity to damage from heat sources like fire.=Gibt Immunität gegenüber Schaden von Hitzequellen wie Feuer.
Weakness=Schwäche
-4 HP damage | 1:30=-4 HP Schaden | 1:30
Weakness +=Schwäche +
-4 HP damage | 4:00=-4 HP Schaden | 4:00
Strength=Stärke
+3 HP damage | 3:00=+3 HP Schaden | 3:00
Strength II=Stärke II
+6 HP damage | 1:30=+6 HP Schaden | 1:30
Strength +=Stärke +
+3 HP damage | 8:00=+3 HP Schaden | 8:00
Try different combinations to create potions.=Probieren Sie Kombinationen aus, um Tränke herzustellen.
No effect=Keine Wirkung

View file

@ -99,15 +99,10 @@ Grants limitless breath underwater.=
Fire Resistance=
Grants immunity to damage from heat sources like fire.=
Weakness=
-4 HP damage | 1:30=
Weakness +=
-4 HP damage | 4:00=
Strength=
+3 HP damage | 3:00=
Strength II=
+6 HP damage | 1:30=
Strength +=
+3 HP damage | 8:00=
Try different combinations to create potions.=
No effect=

View file

@ -99,15 +99,10 @@ Grants limitless breath underwater.=
Fire Resistance=
Grants immunity to damage from heat sources like fire.=
Weakness=
-4 HP damage | 1:30=
Weakness +=
-4 HP damage | 4:00=
Strength=
+3 HP damage | 3:00=
Strength II=
+6 HP damage | 1:30=
Strength +=
+3 HP damage | 8:00=
Try different combinations to create potions.=
No effect=Aucun effet

View file

@ -99,15 +99,10 @@ Grants limitless breath underwater.=Даёт возможность неогра
Fire Resistance=Огнестойкость
Grants immunity to damage from heat sources like fire.=Делает невосприимчивым к урону от источников тепла, например, от огня.
Weakness=Слабость
-4 HP damage | 1:30=Урон -4 HP | 1:30
Weakness +=Слабость +
-4 HP damage | 4:00=Урон -4 HP | 4:00
Strength=Сила
+3 HP damage | 3:00=Урон +3 HP | 3:00
Strength II=Сила II
+6 HP damage | 1:30=Урон +6 HP | 1:30
Strength +=Сила +
+3 HP damage | 8:00=Урон +3 HP | 8:00
Try different combinations to create potions.=Пробуйте разные сочетания для приготовления зелий.
No effect=Не оказывает эффекта

View file

@ -99,15 +99,10 @@ Grants limitless breath underwater.=
Fire Resistance=
Grants immunity to damage from heat sources like fire.=
Weakness=
-4 HP damage | 1:30=
Weakness +=
-4 HP damage | 4:00=
Strength=
+3 HP damage | 3:00=
Strength II=
+6 HP damage | 1:30=
Strength +=
+3 HP damage | 8:00=
Try different combinations to create potions.=
No effect=

View file

@ -12,7 +12,9 @@ local how_to_drink = S("Use the “Place” key to drink it.")
local potion_intro = S("Drinking a potion gives you a particular effect.")
local function time_string(dur)
if not dur then return nil end
if not dur then
return nil
end
return math.floor(dur/60)..string.format(":%02d",math.floor(dur % 60))
end
local function perc_string(num)
@ -584,7 +586,7 @@ end
-- minetest.register_craftitem("mcl_potions:weakness", {
-- description = S("Weakness"),
-- _tt_help = S("-4 HP damage | 1:30"),
-- _tt_help = TODO,
-- _doc_items_longdesc = brewhelp,
-- wield_image = potion_image("#6600AA"),
-- inventory_image = potion_image("#6600AA"),
@ -608,7 +610,7 @@ end
--
-- minetest.register_craftitem("mcl_potions:weakness_plus", {
-- description = S("Weakness +"),
-- _tt_help = S("-4 HP damage | 4:00"),
-- _tt_help = TODO,
-- _doc_items_longdesc = brewhelp,
-- wield_image = potion_image("#7700BB"),
-- inventory_image = potion_image("#7700BB"),
@ -632,7 +634,7 @@ end
--
-- minetest.register_craftitem("mcl_potions:strength", {
-- description = S("Strength"),
-- _tt_help = S("+3 HP damage | 3:00"),
-- _tt_help = TODO,
-- _doc_items_longdesc = brewhelp,
-- wield_image = potion_image("#D444D4"),
-- inventory_image = potion_image("#D444D4"),
@ -656,7 +658,7 @@ end
--
-- minetest.register_craftitem("mcl_potions:strength_2", {
-- description = S("Strength II"),
-- _tt_help = S("+6 HP damage | 1:30"),
-- _tt_help = TODO,
-- _doc_items_longdesc = brewhelp,
-- wield_image = potion_image("#D444E4"),
-- inventory_image = potion_image("#D444E4"),
@ -680,7 +682,7 @@ end
--
-- minetest.register_craftitem("mcl_potions:strength_plus", {
-- description = S("Strength +"),
-- _tt_help = S("+3 HP damage | 8:00"),
-- _tt_help = TODO,
-- _doc_items_longdesc = brewhelp,
-- wield_image = potion_image("#D444F4"),
-- inventory_image = potion_image("#D444F4"),

View file

@ -103,8 +103,11 @@ function mcl_potions.register_splash(name, descr, color, def)
local pos2 = obj:get_pos()
local rad = math.floor(math.sqrt((pos2.x-pos.x)^2 + (pos2.y-pos.y)^2 + (pos2.z-pos.z)^2))
if rad > 0 then def.potion_fun(obj, redux_map[rad]) else def.potion_fun(obj, 1) end
if rad > 0 then
def.potion_fun(obj, redux_map[rad])
else
def.potion_fun(obj, 1)
end
end
end

View file

@ -24,7 +24,6 @@ local function arrow_image(colorstring, opacity)
"mcl_bows_arrow_front.png^[colorize:"..colorstring..":"..tostring(opacity),
"mcl_bows_arrow.png^(mcl_bows_arrow_overlay.png^[colorize:"..colorstring..":"..tostring(opacity)..")",
"mcl_bows_arrow.png^[transformFX^(mcl_bows_arrow_overlay.png^[transformFX^[colorize:"..colorstring..":"..tostring(opacity)..")"}
end
local how_to_shoot = minetest.registered_items["mcl_bows:arrow"]._doc_items_usagehelp