mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-07-17 15:50:28 +02:00
Compare commits
19 Commits
469e35d6e0
...
d12576f0c8
Author | SHA1 | Date | |
---|---|---|---|
d12576f0c8 | |||
7f4d473fee | |||
f7a1b27ea4 | |||
f14050ad3c | |||
b6fb1948e8 | |||
67e4ede31b | |||
3009da0efe | |||
bd8be0905a | |||
89523195d5 | |||
c6dffd1390 | |||
499d43a9aa | |||
39002cf4e7 | |||
477148962f | |||
497ff7241f | |||
9f02777f14 | |||
ae62b1410d | |||
81b5e40d09 | |||
565c0851eb | |||
cb465559a1 |
425
api.lua
425
api.lua
@ -1,24 +1,18 @@
|
|||||||
|
-- Load support for intllib.
|
||||||
-- Intllib and CMI support check
|
|
||||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||||
local S, NS = dofile(MP .. "/intllib.lua")
|
local S = minetest.get_translator and minetest.get_translator("mobs_redo") or
|
||||||
|
dofile(MP .. "/intllib.lua")
|
||||||
|
|
||||||
|
-- CMI support check
|
||||||
local use_cmi = minetest.global_exists("cmi")
|
local use_cmi = minetest.global_exists("cmi")
|
||||||
|
|
||||||
mobs = {
|
mobs = {
|
||||||
mod = "redo",
|
mod = "redo",
|
||||||
version = "20200723",
|
version = "20201029",
|
||||||
intllib = S,
|
intllib = S,
|
||||||
invis = minetest.global_exists("invisibility") and invisibility or {}
|
invis = minetest.global_exists("invisibility") and invisibility or {}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- creative check
|
|
||||||
local creative_cache = minetest.settings:get_bool("creative_mode")
|
|
||||||
function mobs.is_creative(name)
|
|
||||||
return creative_cache or minetest.check_player_privs(name,
|
|
||||||
{creative = true})
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- localize math functions
|
-- localize math functions
|
||||||
local pi = math.pi
|
local pi = math.pi
|
||||||
local square = math.sqrt
|
local square = math.sqrt
|
||||||
@ -40,24 +34,36 @@ local atan = function(x)
|
|||||||
return atann(x)
|
return atann(x)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local table_copy = table.copy
|
||||||
|
local table_remove = table.remove
|
||||||
|
local vadd = vector.add
|
||||||
|
local vdirection = vector.direction
|
||||||
|
local vmultiply = vector.multiply
|
||||||
|
local vsubtract = vector.subtract
|
||||||
|
local settings = minetest.settings
|
||||||
|
|
||||||
|
-- creative check
|
||||||
|
local creative_cache = minetest.settings:get_bool("creative_mode")
|
||||||
|
function mobs.is_creative(name)
|
||||||
|
return creative_cache or minetest.check_player_privs(name,
|
||||||
|
{creative = true})
|
||||||
|
end
|
||||||
|
|
||||||
-- Load settings
|
-- Load settings
|
||||||
local damage_enabled = minetest.settings:get_bool("enable_damage")
|
local damage_enabled = settings:get_bool("enable_damage")
|
||||||
local mobs_spawn = minetest.settings:get_bool("mobs_spawn") ~= false
|
local mobs_spawn = settings:get_bool("mobs_spawn") ~= false
|
||||||
local peaceful_only = minetest.settings:get_bool("only_peaceful_mobs")
|
local peaceful_only = settings:get_bool("only_peaceful_mobs")
|
||||||
local disable_blood = minetest.settings:get_bool("mobs_disable_blood")
|
local disable_blood = settings:get_bool("mobs_disable_blood")
|
||||||
local mobs_drop_items = minetest.settings:get_bool("mobs_drop_items") ~= false
|
local mobs_drop_items = settings:get_bool("mobs_drop_items") ~= false
|
||||||
local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
|
local mobs_griefing = settings:get_bool("mobs_griefing") ~= false
|
||||||
local spawn_protected = minetest.settings:get_bool("mobs_spawn_protected") ~= false
|
local spawn_protected = settings:get_bool("mobs_spawn_protected") ~= false
|
||||||
local remove_far = minetest.settings:get_bool("remove_far_mobs") ~= false
|
local remove_far = settings:get_bool("remove_far_mobs") ~= false
|
||||||
local difficulty = tonumber(minetest.settings:get("mob_difficulty")) or 1.0
|
local difficulty = tonumber(settings:get("mob_difficulty")) or 1.0
|
||||||
local show_health = minetest.settings:get_bool("mob_show_health") ~= false
|
local show_health = settings:get_bool("mob_show_health") ~= false
|
||||||
local max_per_block = tonumber(minetest.settings:get("max_objects_per_block") or 99)
|
local max_per_block = tonumber(settings:get("max_objects_per_block") or 99)
|
||||||
local mob_nospawn_range = tonumber(minetest.settings:get("mob_nospawn_range") or 12)
|
local mob_nospawn_range = tonumber(settings:get("mob_nospawn_range") or 12)
|
||||||
local active_limit = tonumber(minetest.settings:get("mob_active_limit") or 0)
|
local active_limit = tonumber(settings:get("mob_active_limit") or 0)
|
||||||
local mob_chance_multiplier =
|
local mob_chance_multiplier = tonumber(settings:get("mob_chance_multiplier") or 1)
|
||||||
tonumber(minetest.settings:get("mob_chance_multiplier") or 1)
|
|
||||||
local active_mobs = 0
|
local active_mobs = 0
|
||||||
|
|
||||||
|
|
||||||
@ -70,7 +76,7 @@ if peaceful_only then
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- calculate aoc range for mob count
|
-- calculate aoc range for mob count
|
||||||
local aoc_range = tonumber(minetest.settings:get("active_block_range")) * 16
|
local aoc_range = tonumber(settings:get("active_block_range")) * 16
|
||||||
|
|
||||||
-- pathfinding settings
|
-- pathfinding settings
|
||||||
local enable_pathfinding = true
|
local enable_pathfinding = true
|
||||||
@ -196,7 +202,7 @@ end
|
|||||||
-- calculate distance
|
-- calculate distance
|
||||||
local get_distance = function(a, b)
|
local get_distance = function(a, b)
|
||||||
|
|
||||||
-- if not a or not b then return 50 end -- nil check
|
if not a or not b then return 50 end -- nil check
|
||||||
|
|
||||||
local x, y, z = a.x - b.x, a.y - b.y, a.z - b.z
|
local x, y, z = a.x - b.x, a.y - b.y, a.z - b.z
|
||||||
|
|
||||||
@ -230,7 +236,7 @@ function mob_class:collision()
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- check string against another string or table
|
-- check if string exists in another string or table
|
||||||
local check_for = function(look_for, look_inside)
|
local check_for = function(look_for, look_inside)
|
||||||
|
|
||||||
if type(look_inside) == "string" and look_inside == look_for then
|
if type(look_inside) == "string" and look_inside == look_for then
|
||||||
@ -291,8 +297,7 @@ function mob_class:set_velocity(v)
|
|||||||
local new_vel = {
|
local new_vel = {
|
||||||
x = (sin(yaw) * -v) + c_x,
|
x = (sin(yaw) * -v) + c_x,
|
||||||
y = vel.y,
|
y = vel.y,
|
||||||
z = (cos(yaw) * v) + c_y
|
z = (cos(yaw) * v) + c_y}
|
||||||
}
|
|
||||||
|
|
||||||
self.object:set_velocity(new_vel)
|
self.object:set_velocity(new_vel)
|
||||||
end
|
end
|
||||||
@ -353,9 +358,9 @@ function mob_class:set_animation(anim, force)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- check for more than one animation
|
|
||||||
local num = 0
|
local num = 0
|
||||||
|
|
||||||
|
-- check for more than one animation (max 4)
|
||||||
for n = 1, 4 do
|
for n = 1, 4 do
|
||||||
|
|
||||||
if self.animation[anim .. n .. "_start"]
|
if self.animation[anim .. n .. "_start"]
|
||||||
@ -388,7 +393,7 @@ end
|
|||||||
|
|
||||||
-- above function exported for mount.lua
|
-- above function exported for mount.lua
|
||||||
function mobs:set_animation(entity, anim)
|
function mobs:set_animation(entity, anim)
|
||||||
mob_class.set_animation(entity, anim)
|
entity.set_animation(entity, anim)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -468,7 +473,7 @@ local new_line_of_sight = function(self, pos1, pos2, stepsize)
|
|||||||
|
|
||||||
stepsize = stepsize or 1
|
stepsize = stepsize or 1
|
||||||
|
|
||||||
local stepv = vector.multiply(vector.direction(pos1, pos2), stepsize)
|
local stepv = vmultiply(vdirection(pos1, pos2), stepsize)
|
||||||
|
|
||||||
local s, pos = minetest.line_of_sight(pos1, pos2, stepsize)
|
local s, pos = minetest.line_of_sight(pos1, pos2, stepsize)
|
||||||
|
|
||||||
@ -491,7 +496,7 @@ local new_line_of_sight = function(self, pos1, pos2, stepsize)
|
|||||||
while minetest.registered_nodes[nn]
|
while minetest.registered_nodes[nn]
|
||||||
and (minetest.registered_nodes[nn].walkable == false) do
|
and (minetest.registered_nodes[nn].walkable == false) do
|
||||||
|
|
||||||
npos1 = vector.add(npos1, stepv)
|
npos1 = vadd(npos1, stepv)
|
||||||
|
|
||||||
if get_distance(npos1, pos2) < stepsize then return true end
|
if get_distance(npos1, pos2) < stepsize then return true end
|
||||||
|
|
||||||
@ -571,10 +576,10 @@ function mob_class:attempt_flight_correction(override)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local escape_target = flyable_nodes[random(#flyable_nodes)]
|
local escape_target = flyable_nodes[random(#flyable_nodes)]
|
||||||
local escape_direction = vector.direction(pos, escape_target)
|
local escape_direction = vdirection(pos, escape_target)
|
||||||
|
|
||||||
self.object:set_velocity(
|
self.object:set_velocity(
|
||||||
vector.multiply(escape_direction, 1)) --self.run_velocity))
|
vmultiply(escape_direction, 1)) --self.run_velocity))
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@ -635,7 +640,7 @@ function mob_class:do_stay_near()
|
|||||||
local searchnodes = self.stay_near[1]
|
local searchnodes = self.stay_near[1]
|
||||||
local chance = self.stay_near[2] or 10
|
local chance = self.stay_near[2] or 10
|
||||||
|
|
||||||
if random(chance) > 1 then
|
if not pos or random(chance) > 1 then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -750,7 +755,7 @@ function mob_class:item_drop()
|
|||||||
-- was mob killed by player?
|
-- was mob killed by player?
|
||||||
local death_by_player = self.cause_of_death
|
local death_by_player = self.cause_of_death
|
||||||
and self.cause_of_death.puncher
|
and self.cause_of_death.puncher
|
||||||
and self.cause_of_death.puncher:is_player() or nil
|
and self.cause_of_death.puncher:is_player()
|
||||||
|
|
||||||
local obj, item, num
|
local obj, item, num
|
||||||
|
|
||||||
@ -970,12 +975,11 @@ function mob_class:is_at_cliff()
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
-- if object no longer exists then return
|
-- get yaw but if nil returned object no longer exists
|
||||||
if not self.object:get_luaentity() then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
local yaw = self.object:get_yaw()
|
local yaw = self.object:get_yaw()
|
||||||
|
|
||||||
|
if not yaw then return false end
|
||||||
|
|
||||||
local dir_x = -sin(yaw) * (self.collisionbox[4] + 0.5)
|
local dir_x = -sin(yaw) * (self.collisionbox[4] + 0.5)
|
||||||
local dir_z = cos(yaw) * (self.collisionbox[4] + 0.5)
|
local dir_z = cos(yaw) * (self.collisionbox[4] + 0.5)
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
@ -1035,24 +1039,6 @@ function mob_class:do_env_damage()
|
|||||||
-- particle appears at random mob height
|
-- particle appears at random mob height
|
||||||
pos.y = pos.y + random(self.collisionbox[2], self.collisionbox[5])
|
pos.y = pos.y + random(self.collisionbox[2], self.collisionbox[5])
|
||||||
|
|
||||||
-- is mob light sensative, or scared of the dark :P
|
|
||||||
if self.light_damage ~= 0 then
|
|
||||||
|
|
||||||
local light = minetest.get_node_light(pos) or 0
|
|
||||||
|
|
||||||
if light >= self.light_damage_min
|
|
||||||
and light <= self.light_damage_max then
|
|
||||||
|
|
||||||
self.health = self.health - self.light_damage
|
|
||||||
|
|
||||||
effect(pos, 5, "tnt_smoke.png")
|
|
||||||
|
|
||||||
if self:check_for_death({type = "light"}) then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local nodef = minetest.registered_nodes[self.standing_in]
|
local nodef = minetest.registered_nodes[self.standing_in]
|
||||||
|
|
||||||
-- water
|
-- water
|
||||||
@ -1098,6 +1084,24 @@ function mob_class:do_env_damage()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- is mob light sensative, or scared of the dark :P
|
||||||
|
if self.light_damage ~= 0 then
|
||||||
|
|
||||||
|
local light = minetest.get_node_light(pos) or 0
|
||||||
|
|
||||||
|
if light >= self.light_damage_min
|
||||||
|
and light <= self.light_damage_max then
|
||||||
|
|
||||||
|
self.health = self.health - self.light_damage
|
||||||
|
|
||||||
|
effect(pos, 5, "tnt_smoke.png")
|
||||||
|
|
||||||
|
if self:check_for_death({type = "light"}) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--- suffocation inside solid node
|
--- suffocation inside solid node
|
||||||
if (self.suffocation and self.suffocation ~= 0)
|
if (self.suffocation and self.suffocation ~= 0)
|
||||||
and (nodef.walkable == nil or nodef.walkable == true)
|
and (nodef.walkable == nil or nodef.walkable == true)
|
||||||
@ -1545,7 +1549,6 @@ local height_switcher = false
|
|||||||
function mob_class:smart_mobs(s, p, dist, dtime)
|
function mob_class:smart_mobs(s, p, dist, dtime)
|
||||||
|
|
||||||
local s1 = self.path.lastpos
|
local s1 = self.path.lastpos
|
||||||
-- local target_pos = self.attack:get_pos()
|
|
||||||
local target_pos = p
|
local target_pos = p
|
||||||
|
|
||||||
|
|
||||||
@ -1620,7 +1623,7 @@ local target_pos = p
|
|||||||
end, self)
|
end, self)
|
||||||
end
|
end
|
||||||
|
|
||||||
if abs(vector.subtract(s,target_pos).y) > self.stepheight then
|
if abs(vsubtract(s,target_pos).y) > self.stepheight then
|
||||||
|
|
||||||
if height_switcher then
|
if height_switcher then
|
||||||
use_pathfind = true
|
use_pathfind = true
|
||||||
@ -1785,7 +1788,6 @@ end
|
|||||||
minetest.add_item(p1, ItemStack(node1))
|
minetest.add_item(p1, ItemStack(node1))
|
||||||
minetest.set_node(p1, {name = "air"})
|
minetest.set_node(p1, {name = "air"})
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -1803,6 +1805,7 @@ if self.attack then
|
|||||||
else
|
else
|
||||||
self:mob_sound(self.sounds.random)
|
self:mob_sound(self.sounds.random)
|
||||||
end
|
end
|
||||||
|
|
||||||
self:set_velocity(self.walk_velocity)
|
self:set_velocity(self.walk_velocity)
|
||||||
|
|
||||||
-- follow path now that it has it
|
-- follow path now that it has it
|
||||||
@ -1812,26 +1815,6 @@ end
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- specific attacks
|
|
||||||
local specific_attack = function(list, what)
|
|
||||||
|
|
||||||
-- no list so attack default (player, animals etc.)
|
|
||||||
if list == nil then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
-- found entity on list to attack?
|
|
||||||
for no = 1, #list do
|
|
||||||
|
|
||||||
if list[no] == what then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- general attack function for all mobs
|
-- general attack function for all mobs
|
||||||
function mob_class:general_attack()
|
function mob_class:general_attack()
|
||||||
|
|
||||||
@ -1859,7 +1842,8 @@ function mob_class:general_attack()
|
|||||||
or self.attack_players == false
|
or self.attack_players == false
|
||||||
or (self.owner and self.type ~= "monster")
|
or (self.owner and self.type ~= "monster")
|
||||||
or mobs.invis[objs[n]:get_player_name()]
|
or mobs.invis[objs[n]:get_player_name()]
|
||||||
or not specific_attack(self.specific_attack, "player") then
|
or (self.specific_attack
|
||||||
|
and not check_for("player", self.specific_attack)) then
|
||||||
objs[n] = nil
|
objs[n] = nil
|
||||||
--print("- pla", n)
|
--print("- pla", n)
|
||||||
end
|
end
|
||||||
@ -1872,7 +1856,8 @@ function mob_class:general_attack()
|
|||||||
or (not self.attack_animals and ent.type == "animal")
|
or (not self.attack_animals and ent.type == "animal")
|
||||||
or (not self.attack_monsters and ent.type == "monster")
|
or (not self.attack_monsters and ent.type == "monster")
|
||||||
or (not self.attack_npcs and ent.type == "npc")
|
or (not self.attack_npcs and ent.type == "npc")
|
||||||
or not specific_attack(self.specific_attack, ent.name) then
|
or (self.specific_attack
|
||||||
|
and not check_for(ent.name, self.specific_attack)) then
|
||||||
objs[n] = nil
|
objs[n] = nil
|
||||||
--print("- mob", n, self.name, ent.name)
|
--print("- mob", n, self.name, ent.name)
|
||||||
end
|
end
|
||||||
@ -1915,26 +1900,6 @@ function mob_class:general_attack()
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- specific runaway
|
|
||||||
local specific_runaway = function(list, what)
|
|
||||||
|
|
||||||
-- no list so do not run
|
|
||||||
if list == nil then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- found entity on list to attack?
|
|
||||||
for no = 1, #list do
|
|
||||||
|
|
||||||
if list[no] == what then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- find someone to runaway from
|
-- find someone to runaway from
|
||||||
function mob_class:do_runaway_from()
|
function mob_class:do_runaway_from()
|
||||||
|
|
||||||
@ -1942,7 +1907,7 @@ function mob_class:do_runaway_from()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos() ; if not s then return end
|
||||||
local p, sp, dist, pname
|
local p, sp, dist, pname
|
||||||
local player, obj, min_player, name
|
local player, obj, min_player, name
|
||||||
local min_dist = self.view_range + 1
|
local min_dist = self.view_range + 1
|
||||||
@ -1973,7 +1938,7 @@ function mob_class:do_runaway_from()
|
|||||||
|
|
||||||
-- find specific mob to runaway from
|
-- find specific mob to runaway from
|
||||||
if name ~= "" and name ~= self.name
|
if name ~= "" and name ~= self.name
|
||||||
and specific_runaway(self.runaway_from, name) then
|
and (self.runaway_from and check_for(name, self.runaway_from)) then
|
||||||
|
|
||||||
sp = s
|
sp = s
|
||||||
p = player and player:get_pos() or s
|
p = player and player:get_pos() or s
|
||||||
@ -2298,7 +2263,7 @@ function mob_class:do_states(dtime)
|
|||||||
|
|
||||||
-- get mob and enemy positions and distance between
|
-- get mob and enemy positions and distance between
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
local p = self.attack:get_pos()
|
local p = self.attack and self.attack:get_pos()
|
||||||
local dist = p and get_distance(p, s) or 500
|
local dist = p and get_distance(p, s) or 500
|
||||||
|
|
||||||
-- stop attacking if player out of range or invisible
|
-- stop attacking if player out of range or invisible
|
||||||
@ -2508,7 +2473,7 @@ function mob_class:do_states(dtime)
|
|||||||
|
|
||||||
if abs(p1.x - s.x) + abs(p1.z - s.z) < 0.6 then
|
if abs(p1.x - s.x) + abs(p1.z - s.z) < 0.6 then
|
||||||
-- reached waypoint, remove it from queue
|
-- reached waypoint, remove it from queue
|
||||||
table.remove(self.path.way, 1)
|
table_remove(self.path.way, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- set new temporary target
|
-- set new temporary target
|
||||||
@ -2664,9 +2629,9 @@ function mob_class:falling(pos)
|
|||||||
|
|
||||||
-- in water then use liquid viscosity for float/sink speed
|
-- in water then use liquid viscosity for float/sink speed
|
||||||
if (self.standing_in
|
if (self.standing_in
|
||||||
and minetest.registered_nodes[self.standing_in].groups.liquid) --water)
|
and minetest.registered_nodes[self.standing_in].groups.liquid)
|
||||||
or (self.standing_on
|
or (self.standing_on
|
||||||
and minetest.registered_nodes[self.standing_in].groups.liquid) then -- water) then
|
and minetest.registered_nodes[self.standing_in].groups.liquid) then
|
||||||
|
|
||||||
local visc = min(
|
local visc = min(
|
||||||
minetest.registered_nodes[self.standing_in].liquid_viscosity, 7)
|
minetest.registered_nodes[self.standing_in].liquid_viscosity, 7)
|
||||||
@ -2723,20 +2688,20 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir, damage)
|
|||||||
|
|
||||||
-- mob health check
|
-- mob health check
|
||||||
if self.health <= 0 then
|
if self.health <= 0 then
|
||||||
return
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
-- custom punch function
|
-- custom punch function
|
||||||
if self.do_punch
|
if self.do_punch
|
||||||
and self:do_punch(hitter, tflp, tool_capabilities, dir) == false then
|
and self:do_punch(hitter, tflp, tool_capabilities, dir) == false then
|
||||||
return
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
-- error checking when mod profiling is enabled
|
-- error checking when mod profiling is enabled
|
||||||
if not tool_capabilities then
|
if not tool_capabilities then
|
||||||
minetest.log("warning",
|
minetest.log("warning",
|
||||||
"[mobs] Mod profiling enabled, damage not enabled")
|
"[mobs] Mod profiling enabled, damage not enabled")
|
||||||
return
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
-- is mob protected?
|
-- is mob protected?
|
||||||
@ -2747,7 +2712,7 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir, damage)
|
|||||||
minetest.chat_send_player(hitter:get_player_name(),
|
minetest.chat_send_player(hitter:get_player_name(),
|
||||||
S("Mob has been protected!"))
|
S("Mob has been protected!"))
|
||||||
|
|
||||||
return
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
local weapon = hitter:get_wielded_item()
|
local weapon = hitter:get_wielded_item()
|
||||||
@ -2808,7 +2773,7 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir, damage)
|
|||||||
if use_cmi
|
if use_cmi
|
||||||
and cmi.notify_punch(
|
and cmi.notify_punch(
|
||||||
self.object, hitter, tflp, tool_capabilities, dir, damage) then
|
self.object, hitter, tflp, tool_capabilities, dir, damage) then
|
||||||
return
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
-- add weapon wear
|
-- add weapon wear
|
||||||
@ -2913,7 +2878,7 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir, damage)
|
|||||||
local v = self.object:get_velocity()
|
local v = self.object:get_velocity()
|
||||||
|
|
||||||
-- sanity check
|
-- sanity check
|
||||||
if not v then return end
|
if not v then return true end
|
||||||
|
|
||||||
local kb = damage or 1
|
local kb = damage or 1
|
||||||
local up = 2
|
local up = 2
|
||||||
@ -2928,7 +2893,7 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir, damage)
|
|||||||
dir = dir or {x = 0, y = 0, z = 0}
|
dir = dir or {x = 0, y = 0, z = 0}
|
||||||
|
|
||||||
-- use tool knockback value or default
|
-- use tool knockback value or default
|
||||||
kb = tool_capabilities.damage_groups["knockback"] or kb -- (kb * 1.5)
|
kb = tool_capabilities.damage_groups["knockback"] or kb
|
||||||
|
|
||||||
self.object:set_velocity({
|
self.object:set_velocity({
|
||||||
x = dir.x * kb,
|
x = dir.x * kb,
|
||||||
@ -3180,7 +3145,7 @@ function mob_class:mob_activate(staticdata, def, dtime)
|
|||||||
-- Armor groups (immortal = 1 for custom damage handling)
|
-- Armor groups (immortal = 1 for custom damage handling)
|
||||||
local armor
|
local armor
|
||||||
if type(self.armor) == "table" then
|
if type(self.armor) == "table" then
|
||||||
armor = table.copy(self.armor)
|
armor = table_copy(self.armor)
|
||||||
-- armor.immortal = 1
|
-- armor.immortal = 1
|
||||||
else
|
else
|
||||||
-- armor = {immortal = 1, fleshy = self.armor}
|
-- armor = {immortal = 1, fleshy = self.armor}
|
||||||
@ -3629,6 +3594,68 @@ local count_mobs = function(pos, type)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- do we have enough space to spawn mob? (thanks wuzzy)
|
||||||
|
local can_spawn = function(pos, name)
|
||||||
|
|
||||||
|
local ent = minetest.registered_entities[name]
|
||||||
|
local width_x = max(1, ceil(ent.collisionbox[4] - ent.collisionbox[1]))
|
||||||
|
local min_x, max_x
|
||||||
|
|
||||||
|
if width_x % 2 == 0 then
|
||||||
|
max_x = floor(width_x / 2)
|
||||||
|
min_x = -(max_x - 1)
|
||||||
|
else
|
||||||
|
max_x = floor(width_x / 2)
|
||||||
|
min_x = -max_x
|
||||||
|
end
|
||||||
|
|
||||||
|
local width_z = max(1, ceil(ent.collisionbox[6] - ent.collisionbox[3]))
|
||||||
|
local min_z, max_z
|
||||||
|
|
||||||
|
if width_z % 2 == 0 then
|
||||||
|
max_z = floor(width_z / 2)
|
||||||
|
min_z = -(max_z - 1)
|
||||||
|
else
|
||||||
|
max_z = floor(width_z / 2)
|
||||||
|
min_z = -max_z
|
||||||
|
end
|
||||||
|
|
||||||
|
local max_y = max(0, ceil(ent.collisionbox[5] - ent.collisionbox[2]) - 1)
|
||||||
|
local pos2
|
||||||
|
|
||||||
|
for y = 0, max_y do
|
||||||
|
for x = min_x, max_x do
|
||||||
|
for z = min_z, max_z do
|
||||||
|
|
||||||
|
pos2 = {x = pos.x + x, y = pos.y + y, z = pos.z + z}
|
||||||
|
|
||||||
|
if minetest.registered_nodes[node_ok(pos2).name].walkable == true then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- spawn mob 1/2 node above ground
|
||||||
|
pos.y = pos.y + 0.5
|
||||||
|
|
||||||
|
-- tweak X/Z spawn pos
|
||||||
|
if width_x % 2 == 0 then
|
||||||
|
pos.x = pos.x + 0.5
|
||||||
|
end
|
||||||
|
|
||||||
|
if width_z % 2 == 0 then
|
||||||
|
pos.z = pos.z + 0.5
|
||||||
|
end
|
||||||
|
|
||||||
|
return pos
|
||||||
|
end
|
||||||
|
|
||||||
|
function mobs:can_spawn(pos, name)
|
||||||
|
return can_spawn(pos, name)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- global functions
|
-- global functions
|
||||||
|
|
||||||
function mobs:add_mob(pos, def)
|
function mobs:add_mob(pos, def)
|
||||||
@ -3737,16 +3764,17 @@ function mobs:spawn_abm_check(pos, node, name)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light,
|
function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light, interval,
|
||||||
interval, chance, aoc, min_height, max_height, day_toggle, on_spawn)
|
chance, aoc, min_height, max_height, day_toggle, on_spawn, map_load)
|
||||||
|
|
||||||
-- Do mobs spawn at all?
|
-- Do mobs spawn at all?
|
||||||
if not mobs_spawn or not mobs.spawning_mobs[name] then
|
if not mobs_spawn or not mobs.spawning_mobs[name] then
|
||||||
|
--print ("--- spawning not registered for " .. name)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- chance/spawn number override in minetest.conf for registered mob
|
-- chance/spawn number override in minetest.conf for registered mob
|
||||||
local numbers = minetest.settings:get(name)
|
local numbers = settings:get(name)
|
||||||
|
|
||||||
if numbers then
|
if numbers then
|
||||||
numbers = numbers:split(",")
|
numbers = numbers:split(",")
|
||||||
@ -3762,23 +3790,24 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light,
|
|||||||
minetest.log("action", string.format(
|
minetest.log("action", string.format(
|
||||||
"[mobs] Chance setting for %s changed to %s (total: %s)",
|
"[mobs] Chance setting for %s changed to %s (total: %s)",
|
||||||
name, chance, aoc))
|
name, chance, aoc))
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
mobs.spawning_mobs[name].aoc = aoc
|
mobs.spawning_mobs[name].aoc = aoc
|
||||||
|
|
||||||
minetest.register_abm({
|
local spawn_action = function(pos, node, active_object_count,
|
||||||
|
|
||||||
label = name .. " spawning",
|
|
||||||
nodenames = nodes,
|
|
||||||
neighbors = neighbors,
|
|
||||||
interval = interval,
|
|
||||||
chance = max(1, (chance * mob_chance_multiplier)),
|
|
||||||
catch_up = false,
|
|
||||||
|
|
||||||
action = function(pos, node, active_object_count,
|
|
||||||
active_object_count_wider)
|
active_object_count_wider)
|
||||||
|
|
||||||
|
-- use instead of abm's chance setting when using lbm
|
||||||
|
if map_load and random(max(1, (chance * mob_chance_multiplier))) > 1 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- use instead of abm's neighbor setting when using lbm
|
||||||
|
if map_load and not minetest.find_node_near(pos, 1, neighbors) then
|
||||||
|
--print("--- lbm neighbors not found")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- is mob actually registered?
|
-- is mob actually registered?
|
||||||
if not mobs.spawning_mobs[name]
|
if not mobs.spawning_mobs[name]
|
||||||
or not minetest.registered_entities[name] then
|
or not minetest.registered_entities[name] then
|
||||||
@ -3798,7 +3827,8 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light,
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- do not spawn if too many entities in area
|
-- do not spawn if too many entities in area
|
||||||
if active_object_count_wider >= max_per_block then
|
if active_object_count_wider
|
||||||
|
and active_object_count_wider >= max_per_block then
|
||||||
--print("--- too many entities in area", active_object_count_wider)
|
--print("--- too many entities in area", active_object_count_wider)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -3863,8 +3893,7 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light,
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- only spawn a set distance away from player
|
-- only spawn a set distance away from player
|
||||||
local objs = minetest.get_objects_inside_radius(
|
local objs = minetest.get_objects_inside_radius(pos, mob_nospawn_range)
|
||||||
pos, mob_nospawn_range)
|
|
||||||
|
|
||||||
for n = 1, #objs do
|
for n = 1, #objs do
|
||||||
|
|
||||||
@ -3874,64 +3903,10 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light,
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- do we have enough space to spawn mob? (thanks wuzzy)
|
-- returns position if we have enough space to spawn mob
|
||||||
local ent = minetest.registered_entities[name]
|
pos = can_spawn(pos, name)
|
||||||
local width_x = max(1,
|
|
||||||
ceil(ent.collisionbox[4] - ent.collisionbox[1]))
|
|
||||||
local min_x, max_x
|
|
||||||
|
|
||||||
if width_x % 2 == 0 then
|
if pos then
|
||||||
max_x = floor(width_x / 2)
|
|
||||||
min_x = -(max_x - 1)
|
|
||||||
else
|
|
||||||
max_x = floor(width_x / 2)
|
|
||||||
min_x = -max_x
|
|
||||||
end
|
|
||||||
|
|
||||||
local width_z = max(1,
|
|
||||||
ceil(ent.collisionbox[6] - ent.collisionbox[3]))
|
|
||||||
local min_z, max_z
|
|
||||||
|
|
||||||
if width_z % 2 == 0 then
|
|
||||||
max_z = floor(width_z / 2)
|
|
||||||
min_z = -(max_z - 1)
|
|
||||||
else
|
|
||||||
max_z = floor(width_z / 2)
|
|
||||||
min_z = -max_z
|
|
||||||
end
|
|
||||||
|
|
||||||
local max_y = max(0,
|
|
||||||
ceil(ent.collisionbox[5] - ent.collisionbox[2]) - 1)
|
|
||||||
|
|
||||||
for y = 0, max_y do
|
|
||||||
for x = min_x, max_x do
|
|
||||||
for z = min_z, max_z do
|
|
||||||
|
|
||||||
local pos2 = {
|
|
||||||
x = pos.x + x,
|
|
||||||
y = pos.y + y,
|
|
||||||
z = pos.z + z}
|
|
||||||
|
|
||||||
if minetest.registered_nodes[
|
|
||||||
node_ok(pos2).name].walkable == true then
|
|
||||||
--print("--- not enough space to spawn", name)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- spawn mob 1/2 node above ground
|
|
||||||
pos.y = pos.y + 0.5
|
|
||||||
|
|
||||||
-- tweak X/Z spawn pos
|
|
||||||
if width_x % 2 == 0 then
|
|
||||||
pos.x = pos.x + 0.5
|
|
||||||
end
|
|
||||||
|
|
||||||
if width_z % 2 == 0 then
|
|
||||||
pos.z = pos.z + 0.5
|
|
||||||
end
|
|
||||||
|
|
||||||
local mob = minetest.add_entity(pos, name)
|
local mob = minetest.add_entity(pos, name)
|
||||||
|
|
||||||
@ -3940,13 +3915,43 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light,
|
|||||||
-- .. node.name .. " near " .. neighbors[1])
|
-- .. node.name .. " near " .. neighbors[1])
|
||||||
|
|
||||||
if on_spawn then
|
if on_spawn then
|
||||||
|
on_spawn(mob:get_luaentity(), pos)
|
||||||
local ent = mob:get_luaentity()
|
|
||||||
|
|
||||||
on_spawn(ent, pos)
|
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
--print("--- not enough space to spawn", name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- are we registering an abm or lbm?
|
||||||
|
if map_load == true then
|
||||||
|
|
||||||
|
minetest.register_lbm({
|
||||||
|
name = name .. "_spawning",
|
||||||
|
label = name .. " spawning",
|
||||||
|
nodenames = nodes,
|
||||||
|
run_at_every_load = false,
|
||||||
|
|
||||||
|
action = function(pos, node)
|
||||||
|
spawn_action(pos, node)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
minetest.register_abm({
|
||||||
|
label = name .. " spawning",
|
||||||
|
nodenames = nodes,
|
||||||
|
neighbors = neighbors,
|
||||||
|
interval = interval,
|
||||||
|
chance = max(1, (chance * mob_chance_multiplier)),
|
||||||
|
catch_up = false,
|
||||||
|
|
||||||
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
|
spawn_action(pos, node, active_object_count, active_object_count_wider)
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -3959,7 +3964,7 @@ function mobs:register_spawn(name, nodes, max_light, min_light, chance,
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- MarkBu's spawn function
|
-- MarkBu's spawn function (USE this one please)
|
||||||
function mobs:spawn(def)
|
function mobs:spawn(def)
|
||||||
|
|
||||||
mobs:spawn_specific(
|
mobs:spawn_specific(
|
||||||
@ -3974,7 +3979,8 @@ function mobs:spawn(def)
|
|||||||
def.min_height or -31000,
|
def.min_height or -31000,
|
||||||
def.max_height or 31000,
|
def.max_height or 31000,
|
||||||
def.day_toggle,
|
def.day_toggle,
|
||||||
def.on_spawn)
|
def.on_spawn,
|
||||||
|
def.on_map_load)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -4592,14 +4598,17 @@ function mobs:feed_tame(self, clicker, feed_count, breed, tame)
|
|||||||
mob_sta[name] = item
|
mob_sta[name] = item
|
||||||
|
|
||||||
local tag = self.nametag or ""
|
local tag = self.nametag or ""
|
||||||
|
local esc = minetest.formspec_escape
|
||||||
|
|
||||||
minetest.show_formspec(name, "mobs_nametag",
|
minetest.show_formspec(name, "mobs_nametag",
|
||||||
"size[8,4]"
|
"size[8,4]" ..
|
||||||
.. "field[0.5,1;7.5,0;name;"
|
"field[0.5,1;7.5,0;name;" ..
|
||||||
.. minetest.formspec_escape(S("Enter name:"))
|
esc(S("Enter name:")) ..
|
||||||
.. ";" .. tag .. "]"
|
";" .. tag .. "]" ..
|
||||||
.. "button_exit[2.5,3.5;3,1;mob_rename;"
|
"button_exit[2.5,3.5;3,1;mob_rename;" ..
|
||||||
.. minetest.formspec_escape(S("Rename")) .. "]")
|
esc(S("Rename")) .. "]")
|
||||||
|
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
return false
|
return false
|
||||||
|
26
api.txt
26
api.txt
@ -199,7 +199,8 @@ functions needed for the mob to work properly which contains the following:
|
|||||||
'double_melee_attack' when true has the api choose between 'punch' and
|
'double_melee_attack' when true has the api choose between 'punch' and
|
||||||
'punch2' animations. [DEPRECATED]
|
'punch2' animations. [DEPRECATED]
|
||||||
|
|
||||||
'animation' holds a table containing animation names and settings for use with mesh models:
|
'animation' holds a table containing animation names and settings for use with
|
||||||
|
mesh models:
|
||||||
'stand_start' start frame for when mob stands still.
|
'stand_start' start frame for when mob stands still.
|
||||||
'stand_end' end frame of stand animation.
|
'stand_end' end frame of stand animation.
|
||||||
'stand_speed' speed of animation in frames per second.
|
'stand_speed' speed of animation in frames per second.
|
||||||
@ -344,6 +345,15 @@ Adding Mobs in World
|
|||||||
Returns false if mob could not be added, returns mob object if spawned ok.
|
Returns false if mob could not be added, returns mob object if spawned ok.
|
||||||
|
|
||||||
|
|
||||||
|
Removing Mob from World
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
mobs:remove(self, decrease)
|
||||||
|
|
||||||
|
Removes mob 'self' from the world and if 'decrease' is true then the mob counter
|
||||||
|
will also be decreased by one.
|
||||||
|
|
||||||
|
|
||||||
Spawning Mobs in World
|
Spawning Mobs in World
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
@ -373,6 +383,9 @@ default setting and can be omitted:
|
|||||||
anytime
|
anytime
|
||||||
'on_spawn' is a custom function which runs after mob has spawned
|
'on_spawn' is a custom function which runs after mob has spawned
|
||||||
and gives self and pos values.
|
and gives self and pos values.
|
||||||
|
'on_map_load' when true mobs will have a chance of spawning only
|
||||||
|
when new areas of map are loaded, interval will not be
|
||||||
|
used.
|
||||||
|
|
||||||
The older spawn functions are still active and working but have no defaults like
|
The older spawn functions are still active and working but have no defaults like
|
||||||
the mobs:spawn, so it is recommended to use the above instead.
|
the mobs:spawn, so it is recommended to use the above instead.
|
||||||
@ -647,6 +660,13 @@ Use this instead:
|
|||||||
mob_class:line_of_sight(pos1, pos2, stepsize)
|
mob_class:line_of_sight(pos1, pos2, stepsize)
|
||||||
|
|
||||||
|
|
||||||
|
mobs:can_spawn(pos, name)
|
||||||
|
|
||||||
|
This function checks the surrounding area at [pos] to see if there is enough empty
|
||||||
|
space to spawn mob [name], if so then a new position is returned for use,
|
||||||
|
otherwise nil is returned.
|
||||||
|
|
||||||
|
|
||||||
External Settings for "minetest.conf"
|
External Settings for "minetest.conf"
|
||||||
------------------------------------
|
------------------------------------
|
||||||
|
|
||||||
@ -688,8 +708,8 @@ mobs_monster:sand_monster 100
|
|||||||
...you can also change how many of a certain mob appear in an active mapblock by
|
...you can also change how many of a certain mob appear in an active mapblock by
|
||||||
adding a comma and then a new value e.g.
|
adding a comma and then a new value e.g.
|
||||||
|
|
||||||
mobs_animal:cow 8000,4 <-- 4 cows per mapblock at 8000 spawn chance
|
mobs_animal:cow = 8000,4 <-- 4 cows per mapblock at 8000 spawn chance
|
||||||
mobs_monster:dirt_monster ,20 <-- 20 dirt monsters per mapblock
|
mobs_monster:dirt_monster = ,20 <-- 20 dirt monsters per mapblock
|
||||||
|
|
||||||
|
|
||||||
Rideable Horse Example Mob
|
Rideable Horse Example Mob
|
||||||
|
22
crafts.lua
22
crafts.lua
@ -331,3 +331,25 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
tex_obj = nil
|
tex_obj = nil
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
-- Meat Block (thanks to painterlypack.net for allowing me to use these textures)
|
||||||
|
minetest.register_node("mobs:meatblock", {
|
||||||
|
description = S("Meat Block"),
|
||||||
|
tiles = {"mobs_meat_top.png", "mobs_meat_bottom.png", "mobs_meat_side.png"},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {choppy = 1, oddly_breakable_by_hand = 1, flammable = 2},
|
||||||
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
|
on_place = minetest.rotate_node,
|
||||||
|
on_use = minetest.item_eat(20),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "mobs:meatblock",
|
||||||
|
type = "shapeless",
|
||||||
|
recipe = {
|
||||||
|
"group:food_meat", "group:food_meat", "group:food_meat",
|
||||||
|
"group:food_meat", "group:food_meat", "group:food_meat",
|
||||||
|
"group:food_meat", "group:food_meat", "group:food_meat"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
46
intllib.lua
46
intllib.lua
@ -1,45 +1,3 @@
|
|||||||
|
-- Support for the old multi-load method
|
||||||
|
dofile(minetest.get_modpath("intllib").."/init.lua")
|
||||||
|
|
||||||
-- Fallback functions for when `intllib` is not installed.
|
|
||||||
-- Code released under Unlicense <http://unlicense.org>.
|
|
||||||
|
|
||||||
-- Get the latest version of this file at:
|
|
||||||
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
|
|
||||||
|
|
||||||
local function format(str, ...)
|
|
||||||
local args = { ... }
|
|
||||||
local function repl(escape, open, num, close)
|
|
||||||
if escape == "" then
|
|
||||||
local replacement = tostring(args[tonumber(num)])
|
|
||||||
if open == "" then
|
|
||||||
replacement = replacement..close
|
|
||||||
end
|
|
||||||
return replacement
|
|
||||||
else
|
|
||||||
return "@"..open..num..close
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
|
|
||||||
end
|
|
||||||
|
|
||||||
local gettext, ngettext
|
|
||||||
if minetest.get_modpath("intllib") then
|
|
||||||
if intllib.make_gettext_pair then
|
|
||||||
-- New method using gettext.
|
|
||||||
gettext, ngettext = intllib.make_gettext_pair()
|
|
||||||
else
|
|
||||||
-- Old method using text files.
|
|
||||||
gettext = intllib.Getter()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Fill in missing functions.
|
|
||||||
|
|
||||||
gettext = gettext or function(msgid, ...)
|
|
||||||
return format(msgid, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
|
|
||||||
return format(n==1 and msgid or msgid_plural, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
return gettext, ngettext
|
|
||||||
|
23
locale/fr.po
23
locale/fr.po
@ -3,20 +3,19 @@
|
|||||||
# This file is distributed under the same license as the PACKAGE package.
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
#
|
#
|
||||||
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2017-07-29 09:13+0200\n"
|
"POT-Creation-Date: 2017-07-29 09:13+0200\n"
|
||||||
"PO-Revision-Date: 2017-07-29 09:20+0200\n"
|
"PO-Revision-Date: 2020-08-13 21:20+0500\n"
|
||||||
|
"Last-Translator: Olivier Dragon <odragon@protonmail.com>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
|
"Language: fr\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Generator: Poedit 1.8.12\n"
|
|
||||||
"Last-Translator: fat115 <fat115@framasoft.org>\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
|
||||||
"Language: fr\n"
|
|
||||||
|
|
||||||
#: api.lua
|
#: api.lua
|
||||||
msgid "** Peaceful Mode Active - No Monsters Will Spawn"
|
msgid "** Peaceful Mode Active - No Monsters Will Spawn"
|
||||||
@ -64,7 +63,7 @@ msgstr "Renommer"
|
|||||||
|
|
||||||
#: crafts.lua
|
#: crafts.lua
|
||||||
msgid "Name Tag"
|
msgid "Name Tag"
|
||||||
msgstr "Étiquette pour collier"
|
msgstr "Étiquette de collier"
|
||||||
|
|
||||||
#: crafts.lua
|
#: crafts.lua
|
||||||
msgid "Leather"
|
msgid "Leather"
|
||||||
@ -102,18 +101,26 @@ msgstr "Selle"
|
|||||||
msgid "Mob Fence"
|
msgid "Mob Fence"
|
||||||
msgstr "Clôture à animaux"
|
msgstr "Clôture à animaux"
|
||||||
|
|
||||||
|
#: crafts.lua
|
||||||
|
msgid "Mob Fence Top"
|
||||||
|
msgstr "Haut de clôture à animaux"
|
||||||
|
|
||||||
#: spawner.lua
|
#: spawner.lua
|
||||||
msgid "Mob Spawner"
|
msgid "Mob Spawner"
|
||||||
msgstr "Générateur de mob"
|
msgstr "Générateur de mob"
|
||||||
|
|
||||||
#: spawner.lua
|
#: spawner.lua
|
||||||
msgid "Mob MinLight MaxLight Amount PlayerDist"
|
msgid "(mob name) (min light) (max light) (amount) (player distance) (Y offset)"
|
||||||
msgstr "Mob MinLumière MaxLumière Quantité DistanceJoueur"
|
msgstr "(Nom) (MinLumière) (MaxLumière) (Quantité) (Distance du Joueur) (Décalage en Y)"
|
||||||
|
|
||||||
#: spawner.lua
|
#: spawner.lua
|
||||||
msgid "Spawner Not Active (enter settings)"
|
msgid "Spawner Not Active (enter settings)"
|
||||||
msgstr "Générateur non actif (entrez les paramètres)"
|
msgstr "Générateur non actif (entrez les paramètres)"
|
||||||
|
|
||||||
|
#: spawner.lua
|
||||||
|
msgid "Command:"
|
||||||
|
msgstr "Commande:"
|
||||||
|
|
||||||
#: spawner.lua
|
#: spawner.lua
|
||||||
msgid "Spawner Active (@1)"
|
msgid "Spawner Active (@1)"
|
||||||
msgstr "Générateur actif (@1)"
|
msgstr "Générateur actif (@1)"
|
||||||
|
34
locale/mobs.de_DE.tr
Normal file
34
locale/mobs.de_DE.tr
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# textdomain:mobs
|
||||||
|
#** Peaceful Mode Active - No Monsters Will Spawn=
|
||||||
|
@1 (Tamed)=@1 (Gezähmt)
|
||||||
|
@1 at full health (@2)=@1 bei voller Gesundheit (@2)
|
||||||
|
@1 has been tamed!=@1 wurde gezähmt!
|
||||||
|
@1 is owner!=@1 ist der Besitzer!
|
||||||
|
#Active Mob Limit Reached!=
|
||||||
|
Already protected!=Bereits geschützt!
|
||||||
|
#Change=
|
||||||
|
#Command:=
|
||||||
|
Enter name:=Namen eingeben:
|
||||||
|
#Enter texture:=
|
||||||
|
Lasso (right-click animal to put in inventory)=Lasso (Rechtsklick auf Tier, um es zu nehmen)
|
||||||
|
Leather=Leder
|
||||||
|
Meat=Fleisch
|
||||||
|
Missed!=Daneben!
|
||||||
|
Mob Fence=Kreaturen Zaun
|
||||||
|
#Mob Fence Top=
|
||||||
|
Mob Protection Rune=Kreaturschutzrune
|
||||||
|
#Mob Reset Stick=
|
||||||
|
#Mob Spawner=
|
||||||
|
Mob Spawner settings failed!=Kreaturenspawner-Einstellungen gescheitert!
|
||||||
|
Mob has been protected!=Kreatur wurde geschützt!
|
||||||
|
Name Tag=Namensschild
|
||||||
|
Net (right-click animal to put in inventory)=Netz (Rechtsklick auf Tier, um es zu nehmen)
|
||||||
|
Not tamed!=Nicht gezähmt!
|
||||||
|
Raw Meat=Rohes Fleisch
|
||||||
|
Rename=Umbenennen
|
||||||
|
Saddle=Sattel
|
||||||
|
Spawner Active (@1)=Spawner aktiv (@1)
|
||||||
|
Spawner Not Active (enter settings)=Nicht aktiv (Einstellungen eingeben)
|
||||||
|
Steel Shears (right-click to shear)=Stahlschere (Rechtsklick zum Scheren)
|
||||||
|
#Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] player_distance[1-20] y_offset[-10 to 10]”=
|
||||||
|
#lifetimer expired, removed @1=
|
34
locale/mobs.en.tr
Normal file
34
locale/mobs.en.tr
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# textdomain:mobs
|
||||||
|
#** Peaceful Mode Active - No Monsters Will Spawn=
|
||||||
|
#@1 (Tamed)=
|
||||||
|
#@1 at full health (@2)=
|
||||||
|
#@1 has been tamed!=
|
||||||
|
#@1 is owner!=
|
||||||
|
#Active Mob Limit Reached!=
|
||||||
|
#Already protected!=
|
||||||
|
#Change=
|
||||||
|
#Command:=
|
||||||
|
#Enter name:=
|
||||||
|
#Enter texture:=
|
||||||
|
#Lasso (right-click animal to put in inventory)=
|
||||||
|
#Leather=
|
||||||
|
#Meat=
|
||||||
|
#Missed!=
|
||||||
|
#Mob Fence=
|
||||||
|
#Mob Fence Top=
|
||||||
|
#Mob Protection Rune=
|
||||||
|
#Mob Reset Stick=
|
||||||
|
#Mob Spawner=
|
||||||
|
#Mob Spawner settings failed!=
|
||||||
|
#Mob has been protected!=
|
||||||
|
#Name Tag=
|
||||||
|
#Net (right-click animal to put in inventory)=
|
||||||
|
#Not tamed!=
|
||||||
|
#Raw Meat=
|
||||||
|
#Rename=
|
||||||
|
#Saddle=
|
||||||
|
#Spawner Active (@1)=
|
||||||
|
#Spawner Not Active (enter settings)=
|
||||||
|
#Steel Shears (right-click to shear)=
|
||||||
|
#Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] player_distance[1-20] y_offset[-10 to 10]”=
|
||||||
|
#lifetimer expired, removed @1=
|
34
locale/mobs.es.tr
Normal file
34
locale/mobs.es.tr
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# textdomain:mobs
|
||||||
|
#** Peaceful Mode Active - No Monsters Will Spawn=
|
||||||
|
@1 (Tamed)=@1 (Domesticado)
|
||||||
|
@1 at full health (@2)=@1 con salud llena (@2)
|
||||||
|
@1 has been tamed!=@1 ha sido domesticado!
|
||||||
|
@1 is owner!=@1 es el dueño!
|
||||||
|
#Active Mob Limit Reached!=
|
||||||
|
Already protected!=Ya está protegido!
|
||||||
|
#Change=
|
||||||
|
#Command:=
|
||||||
|
Enter name:=Ingrese nombre:
|
||||||
|
#Enter texture:=
|
||||||
|
Lasso (right-click animal to put in inventory)=Lazo (click derecho en animal para colocar en inventario)
|
||||||
|
Leather=Cuero
|
||||||
|
Meat=Carne
|
||||||
|
Missed!=Perdido!
|
||||||
|
#Mob Fence=
|
||||||
|
#Mob Fence Top=
|
||||||
|
Mob Protection Rune=Runa de protección de Mob
|
||||||
|
#Mob Reset Stick=
|
||||||
|
#Mob Spawner=
|
||||||
|
Mob Spawner settings failed!=Configuracion de generador de Mob falló!
|
||||||
|
Mob has been protected!=El mob ha sido protegido!
|
||||||
|
Name Tag=Nombrar etiqueta
|
||||||
|
Net (right-click animal to put in inventory)=Red (click derecho en animal para colocar en inventario)
|
||||||
|
Not tamed!=No domesticado!
|
||||||
|
Raw Meat=Carne cruda
|
||||||
|
Rename=Renombrar
|
||||||
|
Saddle=Montura
|
||||||
|
Spawner Active (@1)=Generador activo (@1)
|
||||||
|
Spawner Not Active (enter settings)=Generador no activo (ingrese config)
|
||||||
|
Steel Shears (right-click to shear)=Tijera de acero (click derecho para esquilar)
|
||||||
|
#Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] player_distance[1-20] y_offset[-10 to 10]”=
|
||||||
|
#lifetimer expired, removed @1=
|
34
locale/mobs.fr.tr
Normal file
34
locale/mobs.fr.tr
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# textdomain:mobs
|
||||||
|
** Peaceful Mode Active - No Monsters Will Spawn=** Mode pacifique activé - aucun monstre ne sera généré
|
||||||
|
@1 (Tamed)=@1 (apprivoisé)
|
||||||
|
@1 at full health (@2)=@1 est en pleine forme (@2)
|
||||||
|
@1 has been tamed!=@1 a été apprivoisé !
|
||||||
|
@1 is owner!=Appartient à @1 !
|
||||||
|
Active Mob Limit Reached!=Limite atteinte du nombre des êtres vivants actifs !
|
||||||
|
Already protected!=Déjà protégé !
|
||||||
|
Change=Changer
|
||||||
|
Command:=Commande :
|
||||||
|
Enter name:=Saisissez un nom :
|
||||||
|
Enter texture:=Saisissez une texture :
|
||||||
|
Lasso (right-click animal to put in inventory)=Lasso (clic droit sur l'animal pour le mettre dans l'inventaire)
|
||||||
|
Leather=Cuir
|
||||||
|
Meat=Viande
|
||||||
|
Missed!=Raté !
|
||||||
|
Mob Fence= Clôture à animaux
|
||||||
|
Mob Fence Top=Haut de clôture à animaux
|
||||||
|
Mob Protection Rune=Rune de protection des animaux
|
||||||
|
Mob Reset Stick=Baguette de réinitialisation des êtres vivants
|
||||||
|
Mob Spawner=Créateur d'êtres vivants
|
||||||
|
Mob Spawner settings failed!=Échec des paramètres du créateur d'être vivants !
|
||||||
|
Mob has been protected!=L'animal a été protégé !
|
||||||
|
Name Tag=Étiquette de collier
|
||||||
|
Net (right-click animal to put in inventory)=Filet (clic droit sur l'animal pour le mettre dans l'inventaire)
|
||||||
|
Not tamed!=Non-apprivoisé !
|
||||||
|
Raw Meat=Viande crue
|
||||||
|
Rename=Renommer
|
||||||
|
Saddle=Selle
|
||||||
|
Spawner Active (@1)=Créateur actif (@1)
|
||||||
|
Spawner Not Active (enter settings)=Créateur non actif (entrez les paramètres)
|
||||||
|
Steel Shears (right-click to shear)=Ciseaux à laine (clic droit pour tondre)
|
||||||
|
Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] player_distance[1-20] y_offset[-10 to 10]”=Syntaxe : «name min_lumière[0-14] max_lumière[0-14] max_être_vivant_dans_région[0 pour désactiver] distance_joueur[1-20] décalage_y[-10 to 10]»
|
||||||
|
lifetimer expired, removed @1=Être immortel expiré ; @1 retiré
|
34
locale/mobs.it.tr
Normal file
34
locale/mobs.it.tr
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# textdomain:mobs
|
||||||
|
** Peaceful Mode Active - No Monsters Will Spawn=** Modalità pacifica attiva - non comparirà nessun mostro
|
||||||
|
@1 (Tamed)=@1 (Addomesticato)
|
||||||
|
@1 at full health (@2)=@1 in piena salute (@2)
|
||||||
|
@1 has been tamed!=@1 è stato addomesticato!
|
||||||
|
@1 is owner!=Il padrone è @1!
|
||||||
|
#Active Mob Limit Reached!=
|
||||||
|
Already protected!=Già protetto!
|
||||||
|
#Change=
|
||||||
|
#Command:=
|
||||||
|
Enter name:=Inserire il nome:
|
||||||
|
#Enter texture:=
|
||||||
|
Lasso (right-click animal to put in inventory)=Lazo (click di destro per mettere l'animale nell'inventario)
|
||||||
|
Leather=Pelle
|
||||||
|
Meat=Carne
|
||||||
|
Missed!=Mancato!
|
||||||
|
Mob Fence=Recinzione per mob
|
||||||
|
#Mob Fence Top=
|
||||||
|
Mob Protection Rune=Runa di protezione per mob
|
||||||
|
#Mob Reset Stick=
|
||||||
|
#Mob Spawner=
|
||||||
|
Mob Spawner settings failed!=Impostazioni del generatore di mob fallite!
|
||||||
|
Mob has been protected!=Il mob è stato protetto!
|
||||||
|
Name Tag=Targhetta
|
||||||
|
Net (right-click animal to put in inventory)=Rete (click destro per mettere l'animale nell'inventario)
|
||||||
|
Not tamed!=Non addomesticato!
|
||||||
|
Raw Meat=Carne cruda
|
||||||
|
Rename=Rinomina
|
||||||
|
Saddle=Sella
|
||||||
|
Spawner Active (@1)=Generatore attivo (@1)
|
||||||
|
Spawner Not Active (enter settings)=Generatore inattivo (inserire le impostazioni)
|
||||||
|
Steel Shears (right-click to shear)=Cesoie d'acciaio (click destro per tosare)
|
||||||
|
#Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] player_distance[1-20] y_offset[-10 to 10]”=
|
||||||
|
#lifetimer expired, removed @1=
|
34
locale/mobs.ms.tr
Normal file
34
locale/mobs.ms.tr
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# textdomain:mobs
|
||||||
|
** Peaceful Mode Active - No Monsters Will Spawn=** Mod Aman Diaktifkan - Tiada Raksasa Akan Muncul
|
||||||
|
@1 (Tamed)=@1 (Jinak)
|
||||||
|
@1 at full health (@2)=Mata kesihatan @1 telah penuh (@2)
|
||||||
|
@1 has been tamed!=@1 telah dijinakkan!
|
||||||
|
@1 is owner!=Ini hak milik @1!
|
||||||
|
#Active Mob Limit Reached!=
|
||||||
|
Already protected!=Telah dilindungi!
|
||||||
|
#Change=
|
||||||
|
#Command:=
|
||||||
|
Enter name:=Masukkan nama:
|
||||||
|
#Enter texture:=
|
||||||
|
Lasso (right-click animal to put in inventory)=Tanjul (klik-kanan haiwan untuk masukkan ke inventori)
|
||||||
|
Leather=Kulit
|
||||||
|
Meat=Daging Bakar
|
||||||
|
Missed!=Terlepas!
|
||||||
|
Mob Fence=Pagar Mob
|
||||||
|
#Mob Fence Top=
|
||||||
|
Mob Protection Rune=Rune Perlindungan Mob
|
||||||
|
#Mob Reset Stick=
|
||||||
|
#Mob Spawner=
|
||||||
|
Mob Spawner settings failed!=Penetapan Pewujud Mob gagal!
|
||||||
|
Mob has been protected!=Mob telah pun dilindungi!
|
||||||
|
Name Tag=Tanda Nama
|
||||||
|
Net (right-click animal to put in inventory)=Jaring (klik-kanan haiwan untuk masukkan ke inventori)
|
||||||
|
Not tamed!=Belum dijinakkan!
|
||||||
|
Raw Meat=Daging Mentah
|
||||||
|
Rename=Namakan semula
|
||||||
|
Saddle=Pelana
|
||||||
|
Spawner Active (@1)=Pewujud Mob Aktif (@1)
|
||||||
|
Spawner Not Active (enter settings)=Pewujud Mob Tidak Aktif (masukkan tetapan)
|
||||||
|
Steel Shears (right-click to shear)=Ketam Keluli (klik-kanan untuk mengetam bulu biri-biri)
|
||||||
|
#Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] player_distance[1-20] y_offset[-10 to 10]”=
|
||||||
|
#lifetimer expired, removed @1=
|
34
locale/mobs.pt.tr
Normal file
34
locale/mobs.pt.tr
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# textdomain:mobs
|
||||||
|
#** Peaceful Mode Active - No Monsters Will Spawn=
|
||||||
|
#@1 (Tamed)=
|
||||||
|
@1 at full health (@2)=@1 em plena saude (@2)
|
||||||
|
@1 has been tamed!=@1 foi domesticado!
|
||||||
|
@1 is owner!=Dono @1!
|
||||||
|
#Active Mob Limit Reached!=
|
||||||
|
#Already protected!=
|
||||||
|
#Change=
|
||||||
|
#Command:=
|
||||||
|
Enter name:=Insira um nome:
|
||||||
|
#Enter texture:=
|
||||||
|
Lasso (right-click animal to put in inventory)=Laço (clique-direito no animal para por no inventario)
|
||||||
|
Leather=Couro
|
||||||
|
Meat=Carne
|
||||||
|
Missed!=Faltou!
|
||||||
|
#Mob Fence=
|
||||||
|
#Mob Fence Top=
|
||||||
|
#Mob Protection Rune=
|
||||||
|
#Mob Reset Stick=
|
||||||
|
#Mob Spawner=
|
||||||
|
Mob Spawner settings failed!=Configuraçao de Spawnador do Mob falhou!
|
||||||
|
#Mob has been protected!=
|
||||||
|
Name Tag=Etiqueta
|
||||||
|
Net (right-click animal to put in inventory)=Net (clique-direito no animal para por no inventario)
|
||||||
|
Not tamed!=Indomesticado!
|
||||||
|
Raw Meat=Carne crua
|
||||||
|
Rename=Renomear
|
||||||
|
#Saddle=
|
||||||
|
Spawner Active (@1)=Spawnador Ativo (@1)
|
||||||
|
Spawner Not Active (enter settings)=Spawnador Inativo (configurar)
|
||||||
|
Steel Shears (right-click to shear)=Tesoura de Aço (clique-direito para tosquiar)
|
||||||
|
#Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] player_distance[1-20] y_offset[-10 to 10]”=
|
||||||
|
#lifetimer expired, removed @1=
|
34
locale/mobs.ru.tr
Normal file
34
locale/mobs.ru.tr
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# textdomain:mobs
|
||||||
|
** Peaceful Mode Active - No Monsters Will Spawn=** Мирный модус активирован - монстры не спаунятся
|
||||||
|
@1 (Tamed)=@1 (Прирученный)
|
||||||
|
@1 at full health (@2)=@1 при полном здоровье (@2)
|
||||||
|
@1 has been tamed!=@1 приручен
|
||||||
|
@1 is owner!=@1 владелец
|
||||||
|
#Active Mob Limit Reached!=
|
||||||
|
Already protected!=Уже защищен!
|
||||||
|
#Change=
|
||||||
|
#Command:=
|
||||||
|
Enter name:=Введите имя:
|
||||||
|
#Enter texture:=
|
||||||
|
Lasso (right-click animal to put in inventory)=Лассо (Правый клик - положить животное в инвентарь)
|
||||||
|
Leather=Кожа
|
||||||
|
Meat=Мясо
|
||||||
|
Missed!=Промазал!
|
||||||
|
Mob Fence=Забор от мобов
|
||||||
|
#Mob Fence Top=
|
||||||
|
Mob Protection Rune=Защитная руна мобов
|
||||||
|
#Mob Reset Stick=
|
||||||
|
#Mob Spawner=
|
||||||
|
Mob Spawner settings failed!=Настройки спаунера моба провалились
|
||||||
|
Mob has been protected!=Моб защищен!
|
||||||
|
Name Tag=Новый тэг
|
||||||
|
Net (right-click animal to put in inventory)=Сеть (Правый клик - положить животное в инвентарь)
|
||||||
|
Not tamed!=Не прирученный
|
||||||
|
Raw Meat=Сырое мясо
|
||||||
|
Rename=Переименовать
|
||||||
|
Saddle=Седло
|
||||||
|
Spawner Active (@1)=Активные спаунер (@1)
|
||||||
|
Spawner Not Active (enter settings)=Спаунер не активен (введите настройки)
|
||||||
|
Steel Shears (right-click to shear)=Ножницы (Правый клик - подстричь)
|
||||||
|
#Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] player_distance[1-20] y_offset[-10 to 10]”=
|
||||||
|
#lifetimer expired, removed @1=
|
34
locale/mobs.tr.tr
Normal file
34
locale/mobs.tr.tr
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# textdomain:mobs
|
||||||
|
#** Peaceful Mode Active - No Monsters Will Spawn=
|
||||||
|
#@1 (Tamed)=
|
||||||
|
@1 at full health (@2)=@1 tam canında (@2)
|
||||||
|
@1 has been tamed!=@1 tamamen evcilleştirilmiştir!
|
||||||
|
@1 is owner!=Sahibi @1!
|
||||||
|
#Active Mob Limit Reached!=
|
||||||
|
#Already protected!=
|
||||||
|
#Change=
|
||||||
|
#Command:=
|
||||||
|
Enter name:=İsim gir:
|
||||||
|
#Enter texture:=
|
||||||
|
Lasso (right-click animal to put in inventory)=Kement (hayvana sağ tıklayarak envantere koy)
|
||||||
|
Leather=Deri
|
||||||
|
Meat=Et
|
||||||
|
Missed!=Kaçırdın!
|
||||||
|
Mob Fence=Canavar Yaratıcı
|
||||||
|
#Mob Fence Top=
|
||||||
|
#Mob Protection Rune=
|
||||||
|
#Mob Reset Stick=
|
||||||
|
#Mob Spawner=
|
||||||
|
Mob Spawner settings failed!=Yaratıcı ayarları uygulanamadı.
|
||||||
|
#Mob has been protected!=
|
||||||
|
Name Tag=İsim etiketi
|
||||||
|
Net (right-click animal to put in inventory)=Ağ (hayvana sağ tıklayarak envantere koy)
|
||||||
|
Not tamed!=Evcil değil!
|
||||||
|
Raw Meat=Çiğ et
|
||||||
|
Rename=Yeniden adlandır
|
||||||
|
#Saddle=
|
||||||
|
Spawner Active (@1)=Yaratıcı aktif (@1)
|
||||||
|
Spawner Not Active (enter settings)=Yaratıcı aktif değil (ayarlara gir)
|
||||||
|
Steel Shears (right-click to shear)=Çelik makas (sağ tıklayarak kes)
|
||||||
|
#Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] player_distance[1-20] y_offset[-10 to 10]”=
|
||||||
|
#lifetimer expired, removed @1=
|
34
locale/mobs.zh_CN.tr
Normal file
34
locale/mobs.zh_CN.tr
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# textdomain:mobs
|
||||||
|
** Peaceful Mode Active - No Monsters Will Spawn=** 和平模式已激活——没有怪物会产生
|
||||||
|
@1 (Tamed)=@1(已驯服)
|
||||||
|
@1 at full health (@2)=@1已经满血(@2)
|
||||||
|
@1 has been tamed!=@1已经被驯服!
|
||||||
|
@1 is owner!=@1 是主人
|
||||||
|
#Active Mob Limit Reached!=
|
||||||
|
Already protected!=已经被保护!
|
||||||
|
#Change=
|
||||||
|
#Command:=
|
||||||
|
Enter name:=输入名称:
|
||||||
|
#Enter texture:=
|
||||||
|
Lasso (right-click animal to put in inventory)=套索(右键单击动物以放入物品栏)
|
||||||
|
Leather=皮革
|
||||||
|
Meat=肉
|
||||||
|
Missed!=没抓住!
|
||||||
|
Mob Fence=Mob 栅栏
|
||||||
|
#Mob Fence Top=
|
||||||
|
Mob Protection Rune=Mob 保护符文
|
||||||
|
#Mob Reset Stick=
|
||||||
|
#Mob Spawner=
|
||||||
|
Mob Spawner settings failed!=Mob 孵化器设置失败!
|
||||||
|
Mob has been protected!=Mob 已经被保护了!
|
||||||
|
Name Tag=名称标签
|
||||||
|
Net (right-click animal to put in inventory)=网(右键单击动物以放入物品栏)
|
||||||
|
Not tamed!=没有驯服!
|
||||||
|
Raw Meat=生肉
|
||||||
|
Rename=重新命名
|
||||||
|
Saddle=鞍
|
||||||
|
Spawner Active (@1)=孵化器正在运转(@1)
|
||||||
|
Spawner Not Active (enter settings)=孵化器未使用(输入设置)
|
||||||
|
Steel Shears (right-click to shear)=钢剪(右键单击以剪切)
|
||||||
|
#Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] player_distance[1-20] y_offset[-10 to 10]”=
|
||||||
|
#lifetimer expired, removed @1=
|
34
locale/mobs.zh_TW.tr
Normal file
34
locale/mobs.zh_TW.tr
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# textdomain:mobs
|
||||||
|
** Peaceful Mode Active - No Monsters Will Spawn=** 和平模式已激活——沒有怪物會產生
|
||||||
|
@1 (Tamed)=@1(已馴服)
|
||||||
|
@1 at full health (@2)=@1已經滿血(@2)
|
||||||
|
@1 has been tamed!=@1已經被馴服!
|
||||||
|
@1 is owner!=@1 是主人
|
||||||
|
#Active Mob Limit Reached!=
|
||||||
|
Already protected!=已經被保護!
|
||||||
|
#Change=
|
||||||
|
#Command:=
|
||||||
|
Enter name:=輸入名稱:
|
||||||
|
#Enter texture:=
|
||||||
|
Lasso (right-click animal to put in inventory)=套索(右鍵單擊動物以放入物品欄)
|
||||||
|
Leather=皮革
|
||||||
|
Meat=肉
|
||||||
|
Missed!=沒抓住!
|
||||||
|
Mob Fence=Mob 柵欄
|
||||||
|
#Mob Fence Top=
|
||||||
|
Mob Protection Rune=Mob 保護符文
|
||||||
|
#Mob Reset Stick=
|
||||||
|
#Mob Spawner=
|
||||||
|
Mob Spawner settings failed!=Mob 孵化器設置失敗!
|
||||||
|
Mob has been protected!=Mob 已經被保護了!
|
||||||
|
Name Tag=名稱標籤
|
||||||
|
Net (right-click animal to put in inventory)=網(右鍵單擊動物以放入物品欄)
|
||||||
|
Not tamed!=沒有馴服!
|
||||||
|
Raw Meat=生肉
|
||||||
|
Rename=重新命名
|
||||||
|
Saddle=鞍
|
||||||
|
Spawner Active (@1)=孵化器正在運轉(@1)
|
||||||
|
Spawner Not Active (enter settings)=孵化器未使用(輸入設置)
|
||||||
|
Steel Shears (right-click to shear)=鋼剪(右鍵單擊以剪切)
|
||||||
|
#Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] player_distance[1-20] y_offset[-10 to 10]”=
|
||||||
|
#lifetimer expired, removed @1=
|
@ -101,6 +101,10 @@ msgstr ""
|
|||||||
msgid "Mob Fence"
|
msgid "Mob Fence"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: crafts.lua
|
||||||
|
msgid "Mob Fence Top"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: spawner.lua
|
#: spawner.lua
|
||||||
msgid "Mob Spawner"
|
msgid "Mob Spawner"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -23,7 +23,8 @@ Lucky Blocks: 9
|
|||||||
|
|
||||||
|
|
||||||
Changelog:
|
Changelog:
|
||||||
- 1.52 - Added 'mob_active_limit' in settings to set number of mobs in game
|
- 1.53 - Added 'on_map_load' settings to mobs:spawn so that mobs will only spawn when new areas of map are loaded.
|
||||||
|
- 1.52 - Added 'mob_active_limit' in settings to set number of mobs in game,
|
||||||
(default is 0 for unlimited), removed {immortal} from mob armor, fluid viscocity slows mobs
|
(default is 0 for unlimited), removed {immortal} from mob armor, fluid viscocity slows mobs
|
||||||
- 1.51 - Added some node checks for dangerous nodes, jumping and falling tweaks, spawn area check (thx for idea wuzzy), re-enabled mob suffocation, add 'mob_nospawn_range' setting
|
- 1.51 - Added some node checks for dangerous nodes, jumping and falling tweaks, spawn area check (thx for idea wuzzy), re-enabled mob suffocation, add 'mob_nospawn_range' setting
|
||||||
- 1.50 - Added new line_of_sight function that uses raycasting if mt5.0 is found, (thanks Astrobe), dont spawn mobs if world anchor nearby (technic or simple_anchor mods), chinese local added
|
- 1.50 - Added new line_of_sight function that uses raycasting if mt5.0 is found, (thanks Astrobe), dont spawn mobs if world anchor nearby (technic or simple_anchor mods), chinese local added
|
||||||
|
BIN
textures/mobs_meat_bottom.png
Normal file
BIN
textures/mobs_meat_bottom.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 253 B |
BIN
textures/mobs_meat_side.png
Normal file
BIN
textures/mobs_meat_side.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 271 B |
BIN
textures/mobs_meat_top.png
Normal file
BIN
textures/mobs_meat_top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 287 B |
Reference in New Issue
Block a user