Outback game refactored
|
@ -1,6 +1,6 @@
|
|||
# Outback
|
||||
|
||||
A game for Minetest 0.4.16. The game is under heavy development and is still missing many features.
|
||||
A game for Minetest 0.5-dev. The game is under heavy development and is still missing many features.
|
||||
|
||||
![Screenshot](https://raw.githubusercontent.com/vlapsley/outback/master/screenshot.png)
|
||||
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
## Mapgen
|
||||
|
||||
### Advanced
|
||||
|
||||
# Noise parameters for biome API temperature, humidity and biome blend.
|
||||
# type: noise_params
|
||||
mg_biome_np_heat = 50, 50, (1024, 1024, 1024), 5349, 3, 0.5, 2.0
|
||||
|
||||
# type: noise_params
|
||||
mg_biome_np_heat_blend = 0, 1.5, (8, 8, 8), 13, 2, 1.0, 2.0
|
||||
|
||||
# type: noise_params
|
||||
mg_biome_np_humidity = 50, 50, (1024, 1024, 1024), 842, 3, 0.5, 2.0
|
||||
|
||||
# type: noise_params
|
||||
mg_biome_np_humidity_blend = 0, 1.5, (8, 8, 8), 90003, 2, 1.0, 2.0
|
||||
|
|
@ -1,579 +0,0 @@
|
|||
This document describes the Plantlife mod API.
|
||||
|
||||
Last revision: 2015-02-16
|
||||
|
||||
|
||||
=========
|
||||
Functions
|
||||
=========
|
||||
|
||||
There are three main functions defined by the main "biome_lib" mod:
|
||||
|
||||
spawn_on_surfaces()
|
||||
register_generate_plant()
|
||||
grow_plants()
|
||||
|
||||
There are also several internal, helper functions that can be called if so
|
||||
desired, but they are not really intended for use by other mods and may change
|
||||
at any time. They are briefly described below these main functions, but see
|
||||
init.lua for details.
|
||||
|
||||
Most functions in plants lib are declared locally to avoid namespace
|
||||
collisions with other mods. They are accessible via the "biome_lib" method,
|
||||
e.g. biome_lib:spawn_on_surfaces() and so forth.
|
||||
|
||||
=====
|
||||
spawn_on_surfaces(biome)
|
||||
spawn_on_surfaces(sdelay, splant, sradius, schance, ssurface, savoid)
|
||||
|
||||
This first function is an ABM-based spawner function originally created as
|
||||
part of Ironzorg's flowers mod. It has since been largely extended and
|
||||
expanded. There are two ways to call this function: You can either pass it
|
||||
several individual string and number parameters to use the legacy interface,
|
||||
or you can pass a single biome definition as a table, with all of your options
|
||||
spelled out nicely. This is the preferred method.
|
||||
|
||||
When used with the legacy interface, you must specify the parameters exactly
|
||||
in order, with the first five being mandatory (even if some are set to nil),
|
||||
and the last one being optional:
|
||||
|
||||
sdelay: The value passed to the ABM's interval parameter, in seconds.
|
||||
splant: The node name of the item to spawn (e.g.
|
||||
"flowers:flower_rose"). A plant will of course only be
|
||||
spawned if the node about to be replaced is air.
|
||||
sradius: Don't spawn within this many nodes of the avoid items
|
||||
mentioned below. If set to nil, this check is skipped.
|
||||
schance: The value passed to the ABM's chance parameter, normally in
|
||||
the 10-100 range (1-in-X chance of operating on a given node)
|
||||
ssurface: String with the name of the node on which to spawn the plant
|
||||
in question, such as "default:sand" or
|
||||
"default:dirt_with_grass". It is not recommended to put air,
|
||||
stone, or plain dirt here if you can use some other node, as
|
||||
doing so will cause the engine to process potentially large
|
||||
numbers of such nodes when deciding when to execute the ABM
|
||||
and where it should operate.
|
||||
savoid: Table with a list of groups and/or node names to avoid when
|
||||
spawning the plant, such as {"group:flowers", "default:tree"}.
|
||||
|
||||
When passed a table as the argument, and thus using the modern calling method,
|
||||
you must pass a number of arguments in the form of an ordinary keyed-value
|
||||
table. Below is a list of everything supported by this function:
|
||||
|
||||
biome = {
|
||||
spawn_plants = something, -- [*] String or table; see below.
|
||||
spawn_delay = number, -- same as sdelay, above.
|
||||
spawn_chance = number, -- same as schance, above.
|
||||
spawn_surfaces = {table}, -- List of node names on which the plants
|
||||
-- should be spawned. As with the single-node "ssurface"
|
||||
-- option in the legacy API, you should not put stone, air,
|
||||
-- etc. here.
|
||||
|
||||
---- From here down are a number of optional parameters. You will
|
||||
---- most likely want to use at least some of these to limit how and
|
||||
---- where your objects are spawned.
|
||||
|
||||
avoid_nodes = {table}, -- same meaning as savoid, above
|
||||
avoid_radius = num, -- same as sradius
|
||||
seed_diff = num, -- The Perlin seed difference value passed to the
|
||||
-- minetest.get_perlin() function. Used along with
|
||||
-- the global Perlin controls below to create the
|
||||
-- "biome" in which the plants will spawn. Defaults
|
||||
-- to 0 if not provided.
|
||||
light_min = num, -- Minimum amount of light necessary to make a plant
|
||||
-- spawn. Defaults to 0.
|
||||
light_max = num, -- Maximum amount of light needed to spawn. Defaults
|
||||
-- to the engine's MAX_LIGHT value of 14.
|
||||
neighbors = {table}, -- List of neighboring nodes that need to be
|
||||
-- immediately next to the node the plant is about to
|
||||
-- spawn on. Can also be a string with a single node
|
||||
-- name. It is both passed to the ABM as the
|
||||
-- "neighbors" parameter, and is used to manually
|
||||
-- check the adjacent nodes. It only takes one of
|
||||
-- these for the spawn routine to mark the target as
|
||||
-- spawnable. Defaults to nil (ignored).
|
||||
ncount = num, -- There must be at least this many of the above
|
||||
-- neighbors in the eight spaces immediately
|
||||
-- surrounding the node the plant is about to spawn on
|
||||
-- for it to happen. If not provided, this check is
|
||||
-- disabled.
|
||||
facedir = num, -- The value passed to the param2 variable when adding
|
||||
-- the node to the map. Defaults to 0. Be sure that
|
||||
-- the value you use here (and the range thereof) is
|
||||
-- appropriate for the type of node you're spawning.
|
||||
random_facedir = {table}, -- If set, the table should contain two values.
|
||||
-- If they're both provided, the spawned plant will be
|
||||
-- given a random facedir value in the range specified
|
||||
-- by these two numbers. Overrides the facedir
|
||||
-- parameter above, if it exists. Use {0,3} if you
|
||||
-- want the full range for wallmounted nodes, or {2,5}
|
||||
-- for most everything else, or any other pair of
|
||||
-- numbers appropriate for the node you want to spawn.
|
||||
depth_max = num, -- If the object spawns on top of a water source, the
|
||||
-- water must be at most this deep. Defaults to 1.
|
||||
min_elevation = num, -- Surface must be at this altitude or higher to
|
||||
-- spawn at all. Defaults to -31000...
|
||||
max_elevation = num, -- ...but must be no higher than this altitude.
|
||||
-- Defaults to +31000.
|
||||
near_nodes = {table}, -- List of nodes that must be somewhere in the
|
||||
-- vicinity in order for the plant to spawn. Can also
|
||||
-- be a string with a single node name. If not
|
||||
-- provided, this check is disabled.
|
||||
near_nodes_size = num, -- How large of an area to check for the above
|
||||
-- node. Specifically, this checks a flat, horizontal
|
||||
-- area centered on the node to be spawned on.
|
||||
-- Defaults to 0, but is ignored if the above
|
||||
-- near_nodes value is not set.
|
||||
near_nodes_vertical = num, -- Used with the size value above, this extends
|
||||
-- the vertical range of the near nodes search.
|
||||
-- Basically, this turns the flat region described
|
||||
-- above into a cuboid region. The area to be checked
|
||||
-- will extend this high and this low above/below the
|
||||
-- target node, centered thereon. Defaults to 1 (only
|
||||
-- check the layer above, the layer at, and the layer
|
||||
-- below the target node), but is ignored if
|
||||
-- near_nodes is not set.
|
||||
near_nodes_count = num, -- How many of the above nodes must be within that
|
||||
-- radius. Defaults to 1 but is ignored if near_nodes
|
||||
-- isn't set. Bear in mind that the total area to be
|
||||
-- checked is equal to:
|
||||
-- (near_nodes_size^2)*near_nodes_vertical*2
|
||||
-- For example, if size is 10 and vertical is 4, then
|
||||
-- the area is (10^2)*8 = 800 nodes in size, so you'll
|
||||
-- want to make sure you specify a value appropriate
|
||||
-- for the size of the area being tested.
|
||||
air_size = num, -- How large of an area to check for air above and
|
||||
-- around the target. If omitted, only the space
|
||||
-- above the target is checked. This does not check
|
||||
-- for air at the sides or below the target.
|
||||
air_count = num, -- How many of the surrounding nodes need to be air
|
||||
-- for the above check to return true. If omitted,
|
||||
-- only the space above the target is checked.
|
||||
plantlife_limit = num, -- The value compared against the generic "plants
|
||||
-- can grow here" Perlin noise layer. Smaller numbers
|
||||
-- result in more abundant plants. Range of -1 to +1,
|
||||
-- with values in the range of about 0 to 0.5 being
|
||||
-- most useful. Defaults to 0.1.
|
||||
temp_min = num, -- Minimum temperature needed for the desired object
|
||||
-- to spawn. This is a 2d Perlin value, which has an
|
||||
-- inverted range of +1 to -1. Larger values
|
||||
-- represent *colder* temperatures, so this value is
|
||||
-- actually the upper end of the desired Perlin range.
|
||||
-- See the temperature map section at the bottom of
|
||||
-- this document for details on how these values work.
|
||||
-- Defaults to +1 (unlimited coldness).
|
||||
temp_max = num, -- Maximum temperature/lower end of the Perlin range.
|
||||
-- Defaults to -1 (unlimited heat).
|
||||
humidity_min = num, -- Minimum humidity for the plant to spawn in. Like
|
||||
-- the temperature map, this is a Perlin value where
|
||||
-- lower numbers mean more humidity in the area.
|
||||
-- Defaults to +1 (0% humidity).
|
||||
humidity_max = num, -- Maximum humidity for the plant to spawn at.
|
||||
-- Defaults to -1 (100% humidity).
|
||||
verticals_list = {table}, -- List of nodes that should be considered to be
|
||||
-- natural walls.
|
||||
alt_wallnode = "string", -- If specified, this node will be substituted in
|
||||
-- place of the plant(s) defined by spawn_plants
|
||||
-- above, if the spawn target has one or more adjacent
|
||||
-- walls. In such a case, the two above facedir
|
||||
-- parameters will be ignored.
|
||||
spawn_on_side = bool, -- Set this to true to immediately spawn the node on
|
||||
-- one side of the target node rather than the top.
|
||||
-- The code will search for an airspace to the side of
|
||||
-- the target, then spawn the plant at the first one
|
||||
-- found. The above facedir and random_facedir
|
||||
-- parameters are ignored in this case. If the above
|
||||
-- parameters for selecting generic wall nodes are
|
||||
-- provided, this option is ignored. Important note:
|
||||
-- the facedir values assigned by this option only
|
||||
-- make sense with wallmounted nodes (nodes which
|
||||
-- don't use facedir won't be affected).
|
||||
choose_random_wall = bool, -- if set to true, and searching for walls is
|
||||
-- being done, just pick any random wall if there is
|
||||
-- one, rather than returning the first one.
|
||||
spawn_on_bottom = bool, -- If set to true, spawn the object below the
|
||||
-- target node instead of above it. The above
|
||||
-- spawn_on_side variable takes precedence over this
|
||||
-- one if both happen to be true. When using this
|
||||
-- option with the random facedir function above, the
|
||||
-- values given to the facedir parameter are for
|
||||
-- regular nodes, not wallmounted.
|
||||
spawn_replace_node = bool, -- If set to true, the target node itself is
|
||||
-- replaced by the spawned object. Overrides the
|
||||
-- spawn_on_bottom and spawn_on_side settings.
|
||||
}
|
||||
|
||||
[*] spawn_plants must be either a table or a string. If it's a table, the
|
||||
values therein are treated as a list of nodenames to pick from randomly on
|
||||
each application of the ABM code. The more nodes you can pack into this
|
||||
parameter to avoid making too many calls to this function, the lower the CPU
|
||||
load will likely be.
|
||||
|
||||
You can also specify a string containing the name of a function to execute.
|
||||
In this case, the function will be passed a single position parameter
|
||||
indicating where the function should place the desired object, and the checks
|
||||
for spawning on top vs. sides vs. bottom vs. replacing the target node will be
|
||||
skipped.
|
||||
|
||||
By default, if a biome node, size, and count are not defined, the biome
|
||||
checking is disabled. Same holds true for the nneighbors bit above that.
|
||||
|
||||
|
||||
=====
|
||||
biome_lib:register_generate_plant(biome, nodes_or_function_or_treedef)
|
||||
|
||||
To register an object to be spawned at mapgen time rather than via an ABM,
|
||||
call this function with two parameters: a table with your object's biome
|
||||
information, and a string, function, or table describing what to do if the
|
||||
engine finds a suitable surface node (see below).
|
||||
|
||||
The biome table contains quite a number of options, though there are fewer
|
||||
here than are available in the ABM-based spawner, as some stuff doesn't make
|
||||
sense at map-generation time.
|
||||
|
||||
biome = {
|
||||
surface = something, -- What node(s). May be a string such as
|
||||
-- "default:dirt_with_grass" or a table with
|
||||
-- multiple such entries.
|
||||
|
||||
---- Everything else is optional, but you'll definitely want to use
|
||||
---- some of these other fields to limit where and under what
|
||||
---- conditions the objects are spawned.
|
||||
|
||||
below_nodes = {table}, -- List of nodes that must be below the target
|
||||
-- node. Useful in snow biomes to keep objects from
|
||||
-- spawning in snow that's on the wrong surface for
|
||||
-- that object.
|
||||
avoid_nodes = {table}, -- List of nodes to avoid when spawning. Groups are
|
||||
-- not supported here.
|
||||
avoid_radius = num, -- How much distance to leave between the object to be
|
||||
-- added and the objects to be avoided. If this or
|
||||
-- the avoid_nodes value is nil/omitted, this check is
|
||||
-- skipped. Avoid using excessively large radii.
|
||||
rarity = num, -- How rare should this object be in its biome? Larger
|
||||
-- values make objects more rare, via:
|
||||
-- math.random(1,100) > this
|
||||
max_count = num, -- The absolute maximum number of your object that
|
||||
-- should be allowed to spawn in a 5x5x5 mapblock area
|
||||
-- (80x80x80 nodes). Defaults to 5, but be sure you
|
||||
-- set this to some reasonable value depending on your
|
||||
-- object and its size if 5 is insufficient.
|
||||
seed_diff = num, -- Perlin seed-diff value. Defaults to 0, which
|
||||
-- causes the function to inherit the global value of
|
||||
-- 329.
|
||||
neighbors = {table}, -- What ground nodes must be right next to and at the
|
||||
-- same elevation as the node to be spawned on.
|
||||
ncount = num, -- At least this many of the above nodes must be next
|
||||
-- to the node to spawn on. Any value greater than 8
|
||||
-- will probably cause the code to never spawn
|
||||
-- anything. Defaults to 0.
|
||||
depth = num, -- How deep/thick of a layer the spawned-on node must
|
||||
-- be. Typically used for water.
|
||||
min_elevation = num, -- Minimum elevation in meters/nodes. Defaults to
|
||||
-- -31000 (unlimited).
|
||||
max_elevation = num, -- Max elevation. Defaults to +31000 (unlimited).
|
||||
near_nodes = {table}, -- what nodes must be in the general vicinity of the
|
||||
-- object being spawned.
|
||||
near_nodes_size = num, -- how wide of a search area to look for the nodes
|
||||
-- in that list.
|
||||
near_nodes_vertical = num, -- How high/low of an area to search from the
|
||||
-- target node.
|
||||
near_nodes_count = num, -- at least this many of those nodes must be in
|
||||
-- the area.
|
||||
plantlife_limit = num, -- The value compared against the generic "plants
|
||||
-- can grow here" Perlin noise layer. Smaller numbers
|
||||
-- result in more abundant plants. Range of -1 to +1,
|
||||
-- with values in the range of about 0 to 0.5 being
|
||||
-- most useful. Defaults to 0.1.
|
||||
temp_min = num, -- Coldest allowable temperature for a plant to spawn
|
||||
-- (that is, the largest Perlin value).
|
||||
temp_max = num, -- warmest allowable temperature to spawn a plant
|
||||
-- (lowest Perlin value).
|
||||
verticals_list = {table}, -- Same as with the spawn_on_surfaces function.
|
||||
check_air = bool, -- Flag to tell the mapgen code to check for air above
|
||||
-- the spawn target. Defaults to true if not
|
||||
-- explicitly set to false. Set this to false VERY
|
||||
-- SPARINGLY, as it will slow the map generator down.
|
||||
delete_above = bool, -- Flag to tell the mapgen code to delete the two
|
||||
-- nodes directly above the spawn target just before
|
||||
-- adding the plant or tree. Useful when generating
|
||||
-- in snow biomes. Defaults to false.
|
||||
delete_above_surround = bool, -- Flag to tell the mapgen code to also
|
||||
-- delete the five nodes surrounding the above space,
|
||||
-- and the five nodes above those, resulting in a two-
|
||||
-- node-deep cross-shaped empty region above/around
|
||||
-- the spawn target. Useful when adding trees to snow
|
||||
-- biomes. Defaults to false.
|
||||
spawn_replace_node = bool, -- same as with the ABM spawner.
|
||||
random_facedir = {table}, -- same as with the ABM spawner.
|
||||
}
|
||||
|
||||
Regarding nodes_or_function_or_treedef, this must either be a string naming
|
||||
a node to spawn, a table with a list of nodes to choose from, a table with an
|
||||
L-Systems tree definition, or a function.
|
||||
|
||||
If you specified a string, the code will attempt to determine whether that
|
||||
string specifies a valid node name. If it does, that node will be placed on
|
||||
top of the target position directly (unless one of the other mapgen options
|
||||
directs the code to do otherwise).
|
||||
|
||||
If you specified a table and there is no "axiom" field, the code assumes that
|
||||
it is a list of nodes. Simply name one node per entry in the list, e.g.
|
||||
{"default:junglegrass", "default:dry_shrub"} and so on, for as many nodes as
|
||||
you want to list. A random node from the list will be chosen each time the
|
||||
code goes to place a node.
|
||||
|
||||
If you specified a table, and there *is* an "axiom" field, the code assumes
|
||||
that this table contains an L-Systems tree definition, which will be passed
|
||||
directly to the engine's spawn_tree() function along with the position on
|
||||
which to spawn the tree.
|
||||
|
||||
You can also supply a function to be directly executed, which is given the
|
||||
current node position (the usual "pos" table format) as its sole argument. It
|
||||
will be called in the form:
|
||||
|
||||
somefunction(pos)
|
||||
|
||||
|
||||
=====
|
||||
biome_lib:grow_plants(options)
|
||||
|
||||
The third function, grow_plants() is used to turn the spawned nodes above
|
||||
into something else over time. This function has no return value, and accepts
|
||||
a biome definition table as the only parameter. These are defined like so:
|
||||
|
||||
options = {
|
||||
grow_plant = "string", -- Name of the node to be grown into something
|
||||
-- else. This value is passed to the ABM as the
|
||||
-- "nodenames" parameter, so it is the plants
|
||||
-- themselves that are the ABM trigger, rather than
|
||||
-- the ground they spawned on. A plant will only grow
|
||||
-- if the node above it is air. Can also be a table,
|
||||
-- but note that all nodes referenced therein will be
|
||||
-- grown into the same object.
|
||||
grow_delay = num, -- Passed as the ABM "interval" parameter, as with
|
||||
-- spawning.
|
||||
grow_chance = num, -- Passed as the ABM "chance" parameter.
|
||||
grow_result = "string", -- Name of the node into which the grow_plant
|
||||
-- node(s) should transform when the ABM executes.
|
||||
|
||||
---- Everything from here down is optional.
|
||||
|
||||
dry_early_node = "string", -- This value is ignored except for jungle
|
||||
-- grass (a corner case needed by that mod), where it
|
||||
-- indicates which node the grass must be on in order
|
||||
-- for it to turn from the short size to
|
||||
-- "default:dry_shrub" instead of the medium size.
|
||||
grow_nodes = {table}, -- One of these nodes must be under the plant in
|
||||
-- order for it to grow at all. Normally this should
|
||||
-- be the same as the list of surfaces passed to the
|
||||
-- spawning ABM as the "nodenames" parameter. This is
|
||||
-- so that the plant can be manually placed on
|
||||
-- something like a flower pot or something without it
|
||||
-- necessarily growing and perhaps dieing. Defaults
|
||||
-- to "default:dirt_with_grass".
|
||||
facedir = num, -- Same as with spawning a plant.
|
||||
need_wall = bool, -- Set this to true if you the plant needs to grow
|
||||
-- against a wall. Defaults to false.
|
||||
verticals_list = {table}, -- same as with spawning a plant.
|
||||
choose_random_wall = bool, -- same as with spawning a plant.
|
||||
grow_vertically = bool, -- Set this to true if the plant needs to grow
|
||||
-- vertically, as in climbing poison ivy. Defaults to
|
||||
-- false.
|
||||
height_limit = num, -- Set this to limit how tall the desired node can
|
||||
-- grow. The mod will search straight down from the
|
||||
-- position being spawned at to find a ground node,
|
||||
-- set via the field below. Defaults to 5 nodes.
|
||||
ground_nodes = {table}, -- What nodes should be treated as "the ground"
|
||||
-- below a vertically-growing plant. Usually this
|
||||
-- should be the same as the grow_nodes table, but
|
||||
-- might also include, for example, water or some
|
||||
-- other surrounding material. Defaults to
|
||||
-- "default:dirt_with_grass".
|
||||
grow_function = something, -- [*] see below.
|
||||
seed_diff = num, -- [*] see below.
|
||||
}
|
||||
|
||||
[*] grow_function can take one of three possible settings: it can be nil (or
|
||||
not provided), a string, or a table.
|
||||
|
||||
If it is not provided or it's set to nil, all of the regular growing code is
|
||||
executed normally, the value of seed_diff, if any, is ignored, and the node to
|
||||
be placed is assumed to be specified in the grow_result variable.
|
||||
|
||||
If this value is set to a simple string, this is treated as the name of the
|
||||
function to use to grow the plant. In this case, all of the usual growing
|
||||
code is executeed, but then instead of a plant being simply added to the
|
||||
world, grow_result is ignored and the named function is executed and passed a
|
||||
few parmeters in the following general form:
|
||||
|
||||
somefunction(pos, perlin1, perlin2)
|
||||
|
||||
These values represent the current position (the usual table), the Perlin
|
||||
noise value for that spot in the generic "plants can grow here" map for the
|
||||
seed_diff value above, the Perlin value for that same spot from the
|
||||
temperature map, and the detected neighboring wall face, if there was one (or
|
||||
nil if not). If seed_diff is not provided, it defaults to 0.
|
||||
|
||||
If this variable is instead set to a table, it is treated an an L-Systems tree
|
||||
definition. All of the growing code is executed in the usual manner, then the
|
||||
tree described by that definition is spawned at the current position instead,
|
||||
and grow_result is ignored.
|
||||
|
||||
|
||||
=====
|
||||
find_adjacent_wall(pos, verticals, randomflag)
|
||||
|
||||
Of the few helper functions, this one expects a position parameter and a table
|
||||
with the list of nodes that should be considered as walls. The code will
|
||||
search around the given position for a neighboring wall, returning the first
|
||||
one it finds as a facedir value, or nil if there are no adjacent walls.
|
||||
|
||||
If randomflag is set to true, the function will just return the facedir of any
|
||||
random wall it finds adjacent to the target position. Defaults to false if
|
||||
not specified.
|
||||
|
||||
=====
|
||||
is_node_loaded(pos)
|
||||
|
||||
This acts as a wrapper for the minetest.get_node_or_nil(node_pos)
|
||||
function and accepts a single position parameter. Returns true if the node in
|
||||
question is already loaded, or false if not.
|
||||
|
||||
|
||||
=====
|
||||
dbg(string)
|
||||
|
||||
This is a simple debug output function which takes one string parameter. It
|
||||
just checks if DEBUG is true and outputs the phrase "[Plantlife] " followed by
|
||||
the supplied string, via the print() function, if so.
|
||||
|
||||
=====
|
||||
biome_lib:generate_tree(pos, treemodel)
|
||||
biome_lib:grow_tree(pos, treemodel)
|
||||
|
||||
In the case of the growing code and the mapgen-based tree generator code,
|
||||
generating a tree is done via the above two calls, which in turn immediately
|
||||
call the usual spawn_tree() functions. This rerouting exists as a way for
|
||||
other mods to hook into biome_lib's tree-growing functions in general,
|
||||
perhaps to execute something extra whenever a tree is spawned.
|
||||
|
||||
biome_lib:generate_tree(pos, treemodel) is called any time a tree is spawned
|
||||
at map generation time. 'pos' is the position of the block on which the tree
|
||||
is to be placed. 'treemodel' is the standard L-Systems tree definition table
|
||||
expected by the spawn_tree() function. Refer to the 'trunk' field in that
|
||||
table to derive the name of the tree being spawned.
|
||||
|
||||
biome_lib:grow_tree(pos, treemodel) does the same sort of thing whenever a
|
||||
tree is spawned within the abm-based growing code, for example when growing a
|
||||
sapling into a tree.
|
||||
|
||||
|
||||
=====
|
||||
There are other, internal helper functions that are not meant for use by other
|
||||
mods. Don't rely on them, as they are subject to change without notice.
|
||||
|
||||
|
||||
===============
|
||||
Global Settings
|
||||
===============
|
||||
|
||||
Set this to true if you want the mod to spam your console with debug info :-)
|
||||
|
||||
plantlife_debug = false
|
||||
|
||||
|
||||
======================
|
||||
Fertile Ground Mapping
|
||||
======================
|
||||
|
||||
The mod uses Perlin noise to create "biomes" of the various plants, via the
|
||||
minetest.get_perlin() function. At present, there are three layers of
|
||||
Perlin noise used.
|
||||
|
||||
The first one is for a "fertile ground" layer, which I tend to refer to as the
|
||||
generic "stuff can potentially grow here" layer. Its values are hard-coded:
|
||||
|
||||
biome_lib.plantlife_seed_diff = 329
|
||||
perlin_octaves = 3
|
||||
perlin_persistence = 0.6
|
||||
perlin_scale = 100
|
||||
|
||||
For more information on how Perlin noise is generated, you will need to search
|
||||
the web, as these default values were from that which is used by minetest_game
|
||||
to spawn jungle grass at mapgen time, and I'm still learning how Perlin noise
|
||||
works. ;-)
|
||||
|
||||
|
||||
===================
|
||||
Temperature Mapping
|
||||
===================
|
||||
|
||||
The second Perlin layer is a temperature map, with values taken from
|
||||
SPlizard's Snow Biomes mod so that the two will be compatible, since that mod
|
||||
appears to be the standard now. Those values are:
|
||||
|
||||
temperature_seeddiff = 112
|
||||
temperature_octaves = 3
|
||||
temperature_persistence = 0.5
|
||||
temperature_scale = 150
|
||||
|
||||
The way Perlin values are used by this mod, in keeping with the snow mod's
|
||||
apparent methods, larger values returned by the Perlin function represent
|
||||
*colder* temperatures. In this mod, the following table gives a rough
|
||||
approximation of how temperature maps to these values, normalized to
|
||||
0.53 = 0 °C and +1.0 = -25 °C.
|
||||
|
||||
Perlin Approx. Temperature
|
||||
-1.0 81 °C ( 178 °F)
|
||||
-0.75 68 °C ( 155 °F)
|
||||
-0.56 58 °C ( 136 °F)
|
||||
-0.5 55 °C ( 131 °F)
|
||||
-0.25 41 °C ( 107 °F)
|
||||
-0.18 38 °C ( 100 °F)
|
||||
0 28 °C ( 83 °F)
|
||||
0.13 21 °C ( 70 °F)
|
||||
0.25 15 °C ( 59 °F)
|
||||
0.5 2 °C ( 35 °F)
|
||||
0.53 0 °C ( 32 °F)
|
||||
0.75 -12 °C ( 11 °F)
|
||||
0.86 -18 °C ( 0 °F)
|
||||
1.0 -25 °C (- 13 °F)
|
||||
|
||||
Included in this table are even 0.25 steps in Perlin values along with some
|
||||
common temperatures on both the Centigrade and Fahrenheit scales. Note that
|
||||
unless you're trying to model the Moon or perhaps Mercury in your mods/maps,
|
||||
you probably won't need to bother with Perlin values of less than -0.56 or so.
|
||||
|
||||
|
||||
================
|
||||
Humidity Mapping
|
||||
================
|
||||
|
||||
Last but not least is a moisture/humidity map. Like the temperature map
|
||||
above, Perlin values can be tested to determine the approximate humidity of
|
||||
the *air* in the area. This humidity map is basically the perlin layer used
|
||||
for deserts.
|
||||
|
||||
A value of +1.0 is very moist (basically a thick fog, if it could be seen), a
|
||||
value of roughly +0.25 represents the edge of a desert as usually seen in the
|
||||
game, and a value of -1.0 is as dry as a bone.
|
||||
|
||||
This does not check for nearby water, just general air humidity, and that
|
||||
being the case, nearby ground does not affect the reported humidity of a
|
||||
region (because this isn't yet possible to calculate yet). Use the near_nodes
|
||||
and avoid_nodes parameters and their related options to check for water and
|
||||
such.
|
||||
|
||||
The Perlin values use for this layer are:
|
||||
|
||||
humidity_seeddiff = 9130
|
||||
humidity_octaves = 3
|
||||
humidity_persistence = 0.5
|
||||
humidity_scale = 250
|
||||
|
||||
And this particular one is mapped slightly differently from the others:
|
||||
|
||||
noise3 = perlin3:get2d({x=p_top.x+150, y=p_top.z+50})
|
||||
|
||||
(Note the +150 and +50 offsets)
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
default
|
||||
intllib?
|
|
@ -1,741 +0,0 @@
|
|||
-- Plantlife library mod by Vanessa Ezekowitz
|
||||
--
|
||||
-- License: WTFPL
|
||||
--
|
||||
-- I got the temperature map idea from "hmmmm", values used for it came from
|
||||
-- Splizard's snow mod.
|
||||
--
|
||||
|
||||
-- Various settings - most of these probably won't need to be changed
|
||||
|
||||
biome_lib = {}
|
||||
|
||||
plantslib = setmetatable({}, { __index=function(t,k) print("Use of deprecated function:", k) return biome_lib[k] end })
|
||||
|
||||
biome_lib.blocklist_aircheck = {}
|
||||
biome_lib.blocklist_no_aircheck = {}
|
||||
|
||||
biome_lib.surface_nodes_aircheck = {}
|
||||
biome_lib.surface_nodes_no_aircheck = {}
|
||||
|
||||
biome_lib.surfaceslist_aircheck = {}
|
||||
biome_lib.surfaceslist_no_aircheck = {}
|
||||
|
||||
biome_lib.actioncount_aircheck = {}
|
||||
biome_lib.actioncount_no_aircheck = {}
|
||||
|
||||
biome_lib.actionslist_aircheck = {}
|
||||
biome_lib.actionslist_no_aircheck = {}
|
||||
|
||||
biome_lib.modpath = minetest.get_modpath("biome_lib")
|
||||
|
||||
biome_lib.total_no_aircheck_calls = 0
|
||||
|
||||
-- Boilerplate to support localized strings if intllib mod is installed.
|
||||
local S
|
||||
if minetest.get_modpath("intllib") then
|
||||
S = intllib.Getter()
|
||||
else
|
||||
S = function(s) return s end
|
||||
end
|
||||
biome_lib.intllib = S
|
||||
|
||||
local DEBUG = false --... except if you want to spam the console with debugging info :-)
|
||||
|
||||
function biome_lib:dbg(msg)
|
||||
if DEBUG then
|
||||
print("[Plantlife] "..msg)
|
||||
minetest.log("verbose", "[Plantlife] "..msg)
|
||||
end
|
||||
end
|
||||
|
||||
biome_lib.plantlife_seed_diff = 329 -- needs to be global so other mods can see it
|
||||
|
||||
local perlin_octaves = 3
|
||||
local perlin_persistence = 0.6
|
||||
local perlin_scale = 100
|
||||
|
||||
local temperature_seeddiff = 112
|
||||
local temperature_octaves = 3
|
||||
local temperature_persistence = 0.5
|
||||
local temperature_scale = 150
|
||||
|
||||
local humidity_seeddiff = 9130
|
||||
local humidity_octaves = 3
|
||||
local humidity_persistence = 0.5
|
||||
local humidity_scale = 250
|
||||
|
||||
local time_scale = 1
|
||||
local time_speed = tonumber(minetest.settings:get("time_speed"))
|
||||
|
||||
if time_speed and time_speed > 0 then
|
||||
time_scale = 72 / time_speed
|
||||
end
|
||||
|
||||
--PerlinNoise(seed, octaves, persistence, scale)
|
||||
|
||||
biome_lib.perlin_temperature = PerlinNoise(temperature_seeddiff, temperature_octaves, temperature_persistence, temperature_scale)
|
||||
biome_lib.perlin_humidity = PerlinNoise(humidity_seeddiff, humidity_octaves, humidity_persistence, humidity_scale)
|
||||
|
||||
-- Local functions
|
||||
|
||||
function biome_lib:is_node_loaded(node_pos)
|
||||
local n = minetest.get_node_or_nil(node_pos)
|
||||
if (not n) or (n.name == "ignore") then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function biome_lib:set_defaults(biome)
|
||||
biome.seed_diff = biome.seed_diff or 0
|
||||
biome.min_elevation = biome.min_elevation or -31000
|
||||
biome.max_elevation = biome.max_elevation or 31000
|
||||
biome.temp_min = biome.temp_min or 1
|
||||
biome.temp_max = biome.temp_max or -1
|
||||
biome.humidity_min = biome.humidity_min or 1
|
||||
biome.humidity_max = biome.humidity_max or -1
|
||||
biome.plantlife_limit = biome.plantlife_limit or 0.1
|
||||
biome.near_nodes_vertical = biome.near_nodes_vertical or 1
|
||||
|
||||
-- specific to on-generate
|
||||
|
||||
biome.neighbors = biome.neighbors or biome.surface
|
||||
biome.near_nodes_size = biome.near_nodes_size or 0
|
||||
biome.near_nodes_count = biome.near_nodes_count or 1
|
||||
biome.rarity = biome.rarity or 50
|
||||
biome.max_count = biome.max_count or 5
|
||||
if biome.check_air ~= false then biome.check_air = true end
|
||||
|
||||
-- specific to abm spawner
|
||||
biome.seed_diff = biome.seed_diff or 0
|
||||
biome.light_min = biome.light_min or 0
|
||||
biome.light_max = biome.light_max or 15
|
||||
biome.depth_max = biome.depth_max or 1
|
||||
biome.facedir = biome.facedir or 0
|
||||
end
|
||||
|
||||
local function search_table(t, s)
|
||||
for i = 1, #t do
|
||||
if t[i] == s then return true end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
-- register the list of surfaces to spawn stuff on, filtering out all duplicates.
|
||||
-- separate the items by air-checking or non-air-checking map eval methods
|
||||
|
||||
function biome_lib:register_generate_plant(biomedef, nodes_or_function_or_model)
|
||||
|
||||
-- if calling code passes an undefined node for a surface or
|
||||
-- as a node to be spawned, don't register an action for it.
|
||||
|
||||
if type(nodes_or_function_or_model) == "string"
|
||||
and string.find(nodes_or_function_or_model, ":")
|
||||
and not minetest.registered_nodes[nodes_or_function_or_model] then
|
||||
biome_lib:dbg("Warning: Ignored registration for undefined spawn node: "..dump(nodes_or_function_or_model))
|
||||
return
|
||||
end
|
||||
|
||||
if type(nodes_or_function_or_model) == "string"
|
||||
and not string.find(nodes_or_function_or_model, ":") then
|
||||
biome_lib:dbg("Warning: Registered function call using deprecated string method: "..dump(nodes_or_function_or_model))
|
||||
end
|
||||
|
||||
if biomedef.check_air == false then
|
||||
biome_lib:dbg("Register no-air-check mapgen hook: "..dump(nodes_or_function_or_model))
|
||||
biome_lib.actionslist_no_aircheck[#biome_lib.actionslist_no_aircheck + 1] = { biomedef, nodes_or_function_or_model }
|
||||
local s = biomedef.surface
|
||||
if type(s) == "string" then
|
||||
if s and (string.find(s, "^group:") or minetest.registered_nodes[s]) then
|
||||
if not search_table(biome_lib.surfaceslist_no_aircheck, s) then
|
||||
biome_lib.surfaceslist_no_aircheck[#biome_lib.surfaceslist_no_aircheck + 1] = s
|
||||
end
|
||||
else
|
||||
biome_lib:dbg("Warning: Ignored no-air-check registration for undefined surface node: "..dump(s))
|
||||
end
|
||||
else
|
||||
for i = 1, #biomedef.surface do
|
||||
local s = biomedef.surface[i]
|
||||
if s and (string.find(s, "^group:") or minetest.registered_nodes[s]) then
|
||||
if not search_table(biome_lib.surfaceslist_no_aircheck, s) then
|
||||
biome_lib.surfaceslist_no_aircheck[#biome_lib.surfaceslist_no_aircheck + 1] = s
|
||||
end
|
||||
else
|
||||
biome_lib:dbg("Warning: Ignored no-air-check registration for undefined surface node: "..dump(s))
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
biome_lib:dbg("Register with-air-checking mapgen hook: "..dump(nodes_or_function_or_model))
|
||||
biome_lib.actionslist_aircheck[#biome_lib.actionslist_aircheck + 1] = { biomedef, nodes_or_function_or_model }
|
||||
local s = biomedef.surface
|
||||
if type(s) == "string" then
|
||||
if s and (string.find(s, "^group:") or minetest.registered_nodes[s]) then
|
||||
if not search_table(biome_lib.surfaceslist_aircheck, s) then
|
||||
biome_lib.surfaceslist_aircheck[#biome_lib.surfaceslist_aircheck + 1] = s
|
||||
end
|
||||
else
|
||||
biome_lib:dbg("Warning: Ignored with-air-checking registration for undefined surface node: "..dump(s))
|
||||
end
|
||||
else
|
||||
for i = 1, #biomedef.surface do
|
||||
local s = biomedef.surface[i]
|
||||
if s and (string.find(s, "^group:") or minetest.registered_nodes[s]) then
|
||||
if not search_table(biome_lib.surfaceslist_aircheck, s) then
|
||||
biome_lib.surfaceslist_aircheck[#biome_lib.surfaceslist_aircheck + 1] = s
|
||||
end
|
||||
else
|
||||
biome_lib:dbg("Warning: Ignored with-air-checking registration for undefined surface node: "..dump(s))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function biome_lib:populate_surfaces(biome, nodes_or_function_or_model, snodes, checkair)
|
||||
|
||||
biome_lib:set_defaults(biome)
|
||||
|
||||
-- filter stage 1 - find nodes from the supplied surfaces that are within the current biome.
|
||||
|
||||
local in_biome_nodes = {}
|
||||
local perlin_fertile_area = minetest.get_perlin(biome.seed_diff, perlin_octaves, perlin_persistence, perlin_scale)
|
||||
|
||||
for i = 1, #snodes do
|
||||
local pos = snodes[i]
|
||||
local p_top = { x = pos.x, y = pos.y + 1, z = pos.z }
|
||||
local noise1 = perlin_fertile_area:get2d({x=pos.x, y=pos.z})
|
||||
local noise2 = biome_lib.perlin_temperature:get2d({x=pos.x, y=pos.z})
|
||||
local noise3 = biome_lib.perlin_humidity:get2d({x=pos.x+150, y=pos.z+50})
|
||||
local biome_surfaces_string = dump(biome.surface)
|
||||
local surface_ok = false
|
||||
|
||||
if not biome.depth then
|
||||
local dest_node = minetest.get_node(pos)
|
||||
if string.find(biome_surfaces_string, dest_node.name) then
|
||||
surface_ok = true
|
||||
else
|
||||
if string.find(biome_surfaces_string, "group:") then
|
||||
for j = 1, #biome.surface do
|
||||
if string.find(biome.surface[j], "^group:")
|
||||
and minetest.get_item_group(dest_node.name, biome.surface[j]) then
|
||||
surface_ok = true
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif not string.find(biome_surfaces_string, minetest.get_node({ x = pos.x, y = pos.y-biome.depth-1, z = pos.z }).name) then
|
||||
surface_ok = true
|
||||
end
|
||||
|
||||
if surface_ok
|
||||
and (not checkair or minetest.get_node(p_top).name == "air")
|
||||
and pos.y >= biome.min_elevation
|
||||
and pos.y <= biome.max_elevation
|
||||
and noise1 > biome.plantlife_limit
|
||||
and noise2 <= biome.temp_min
|
||||
and noise2 >= biome.temp_max
|
||||
and noise3 <= biome.humidity_min
|
||||
and noise3 >= biome.humidity_max
|
||||
and (not biome.ncount or #(minetest.find_nodes_in_area({x=pos.x-1, y=pos.y, z=pos.z-1}, {x=pos.x+1, y=pos.y, z=pos.z+1}, biome.neighbors)) > biome.ncount)
|
||||
and (not biome.near_nodes or #(minetest.find_nodes_in_area({x=pos.x-biome.near_nodes_size, y=pos.y-biome.near_nodes_vertical, z=pos.z-biome.near_nodes_size}, {x=pos.x+biome.near_nodes_size, y=pos.y+biome.near_nodes_vertical, z=pos.z+biome.near_nodes_size}, biome.near_nodes)) >= biome.near_nodes_count)
|
||||
and math.random(1,100) > biome.rarity
|
||||
and (not biome.below_nodes or string.find(dump(biome.below_nodes), minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name) )
|
||||
then
|
||||
in_biome_nodes[#in_biome_nodes + 1] = pos
|
||||
end
|
||||
end
|
||||
|
||||
-- filter stage 2 - find places within that biome area to place the plants.
|
||||
|
||||
local num_in_biome_nodes = #in_biome_nodes
|
||||
|
||||
if num_in_biome_nodes > 0 then
|
||||
for i = 1, math.min(biome.max_count, num_in_biome_nodes) do
|
||||
local tries = 0
|
||||
local spawned = false
|
||||
while tries < 2 and not spawned do
|
||||
local pos = in_biome_nodes[math.random(1, num_in_biome_nodes)]
|
||||
if biome.spawn_replace_node then
|
||||
pos.y = pos.y-1
|
||||
end
|
||||
local p_top = { x = pos.x, y = pos.y + 1, z = pos.z }
|
||||
|
||||
if not (biome.avoid_nodes and biome.avoid_radius and minetest.find_node_near(p_top, biome.avoid_radius + math.random(-1.5,2), biome.avoid_nodes)) then
|
||||
if biome.delete_above then
|
||||
minetest.remove_node(p_top)
|
||||
minetest.remove_node({x=p_top.x, y=p_top.y+1, z=p_top.z})
|
||||
end
|
||||
|
||||
if biome.delete_above_surround then
|
||||
minetest.remove_node({x=p_top.x-1, y=p_top.y, z=p_top.z})
|
||||
minetest.remove_node({x=p_top.x+1, y=p_top.y, z=p_top.z})
|
||||
minetest.remove_node({x=p_top.x, y=p_top.y, z=p_top.z-1})
|
||||
minetest.remove_node({x=p_top.x, y=p_top.y, z=p_top.z+1})
|
||||
|
||||
minetest.remove_node({x=p_top.x-1, y=p_top.y+1, z=p_top.z})
|
||||
minetest.remove_node({x=p_top.x+1, y=p_top.y+1, z=p_top.z})
|
||||
minetest.remove_node({x=p_top.x, y=p_top.y+1, z=p_top.z-1})
|
||||
minetest.remove_node({x=p_top.x, y=p_top.y+1, z=p_top.z+1})
|
||||
end
|
||||
|
||||
if biome.spawn_replace_node then
|
||||
minetest.remove_node(pos)
|
||||
end
|
||||
|
||||
local objtype = type(nodes_or_function_or_model)
|
||||
|
||||
if objtype == "table" then
|
||||
if nodes_or_function_or_model.axiom then
|
||||
biome_lib:generate_tree(p_top, nodes_or_function_or_model)
|
||||
spawned = true
|
||||
else
|
||||
local fdir = nil
|
||||
if biome.random_facedir then
|
||||
fdir = math.random(biome.random_facedir[1], biome.random_facedir[2])
|
||||
end
|
||||
minetest.set_node(p_top, { name = nodes_or_function_or_model[math.random(#nodes_or_function_or_model)], param2 = fdir })
|
||||
spawned = true
|
||||
end
|
||||
elseif objtype == "string" and
|
||||
minetest.registered_nodes[nodes_or_function_or_model] then
|
||||
local fdir = nil
|
||||
if biome.random_facedir then
|
||||
fdir = math.random(biome.random_facedir[1], biome.random_facedir[2])
|
||||
end
|
||||
minetest.set_node(p_top, { name = nodes_or_function_or_model, param2 = fdir })
|
||||
spawned = true
|
||||
elseif objtype == "function" then
|
||||
nodes_or_function_or_model(pos)
|
||||
spawned = true
|
||||
elseif objtype == "string" and pcall(loadstring(("return %s(...)"):
|
||||
format(nodes_or_function_or_model)),pos) then
|
||||
spawned = true
|
||||
else
|
||||
biome_lib:dbg("Warning: Ignored invalid definition for object "..dump(nodes_or_function_or_model).." that was pointed at {"..dump(pos).."}")
|
||||
end
|
||||
else
|
||||
tries = tries + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Primary mapgen spawner, for mods that can work with air checking enabled on
|
||||
-- a surface during the initial map read stage.
|
||||
|
||||
function biome_lib:generate_block_with_air_checking()
|
||||
if #biome_lib.blocklist_aircheck > 0 then
|
||||
|
||||
local minp = biome_lib.blocklist_aircheck[1][1]
|
||||
local maxp = biome_lib.blocklist_aircheck[1][2]
|
||||
|
||||
-- use the block hash as a unique key into the surface nodes
|
||||
-- tables, so that we can write the tables thread-safely.
|
||||
|
||||
local blockhash = minetest.hash_node_position(minp)
|
||||
|
||||
if not biome_lib.surface_nodes_aircheck.blockhash then
|
||||
|
||||
if type(minetest.find_nodes_in_area_under_air) == "function" then -- use newer API call
|
||||
biome_lib.surface_nodes_aircheck.blockhash =
|
||||
minetest.find_nodes_in_area_under_air(minp, maxp, biome_lib.surfaceslist_aircheck)
|
||||
else
|
||||
local search_area = minetest.find_nodes_in_area(minp, maxp, biome_lib.surfaceslist_aircheck)
|
||||
|
||||
-- search the generated block for air-bounded surfaces the slow way.
|
||||
|
||||
biome_lib.surface_nodes_aircheck.blockhash = {}
|
||||
|
||||
for i = 1, #search_area do
|
||||
local pos = search_area[i]
|
||||
local p_top = { x=pos.x, y=pos.y+1, z=pos.z }
|
||||
if minetest.get_node(p_top).name == "air" then
|
||||
biome_lib.surface_nodes_aircheck.blockhash[#biome_lib.surface_nodes_aircheck.blockhash + 1] = pos
|
||||
end
|
||||
end
|
||||
end
|
||||
biome_lib.actioncount_aircheck.blockhash = 1
|
||||
|
||||
else
|
||||
if biome_lib.actioncount_aircheck.blockhash <= #biome_lib.actionslist_aircheck then
|
||||
-- [1] is biome, [2] is node/function/model
|
||||
biome_lib:populate_surfaces(
|
||||
biome_lib.actionslist_aircheck[biome_lib.actioncount_aircheck.blockhash][1],
|
||||
biome_lib.actionslist_aircheck[biome_lib.actioncount_aircheck.blockhash][2],
|
||||
biome_lib.surface_nodes_aircheck.blockhash, true)
|
||||
biome_lib.actioncount_aircheck.blockhash = biome_lib.actioncount_aircheck.blockhash + 1
|
||||
else
|
||||
if biome_lib.surface_nodes_aircheck.blockhash then
|
||||
table.remove(biome_lib.blocklist_aircheck, 1)
|
||||
biome_lib.surface_nodes_aircheck.blockhash = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Secondary mapgen spawner, for mods that require disabling of
|
||||
-- checking for air during the initial map read stage.
|
||||
|
||||
function biome_lib:generate_block_no_aircheck()
|
||||
if #biome_lib.blocklist_no_aircheck > 0 then
|
||||
|
||||
local minp = biome_lib.blocklist_no_aircheck[1][1]
|
||||
local maxp = biome_lib.blocklist_no_aircheck[1][2]
|
||||
|
||||
local blockhash = minetest.hash_node_position(minp)
|
||||
|
||||
if not biome_lib.surface_nodes_no_aircheck.blockhash then
|
||||
|
||||
-- directly read the block to be searched into the chunk cache
|
||||
|
||||
biome_lib.surface_nodes_no_aircheck.blockhash =
|
||||
minetest.find_nodes_in_area(minp, maxp, biome_lib.surfaceslist_no_aircheck)
|
||||
biome_lib.actioncount_no_aircheck.blockhash = 1
|
||||
|
||||
else
|
||||
if biome_lib.actioncount_no_aircheck.blockhash <= #biome_lib.actionslist_no_aircheck then
|
||||
biome_lib:populate_surfaces(
|
||||
biome_lib.actionslist_no_aircheck[biome_lib.actioncount_no_aircheck.blockhash][1],
|
||||
biome_lib.actionslist_no_aircheck[biome_lib.actioncount_no_aircheck.blockhash][2],
|
||||
biome_lib.surface_nodes_no_aircheck.blockhash, false)
|
||||
biome_lib.actioncount_no_aircheck.blockhash = biome_lib.actioncount_no_aircheck.blockhash + 1
|
||||
else
|
||||
if biome_lib.surface_nodes_no_aircheck.blockhash then
|
||||
table.remove(biome_lib.blocklist_no_aircheck, 1)
|
||||
biome_lib.surface_nodes_no_aircheck.blockhash = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- "Record" the chunks being generated by the core mapgen
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||
biome_lib.blocklist_aircheck[#biome_lib.blocklist_aircheck + 1] = { minp, maxp }
|
||||
end)
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||
biome_lib.blocklist_no_aircheck[#biome_lib.blocklist_no_aircheck + 1] = { minp, maxp }
|
||||
end)
|
||||
|
||||
-- "Play" them back, populating them with new stuff in the process
|
||||
|
||||
minetest.register_globalstep(function(dtime)
|
||||
if dtime < 0.2 and -- don't attempt to populate if lag is already too high
|
||||
(#biome_lib.blocklist_aircheck > 0 or #biome_lib.blocklist_no_aircheck > 0) then
|
||||
biome_lib.globalstep_start_time = minetest.get_us_time()
|
||||
biome_lib.globalstep_runtime = 0
|
||||
while (#biome_lib.blocklist_aircheck > 0 or #biome_lib.blocklist_no_aircheck > 0)
|
||||
and biome_lib.globalstep_runtime < 200000 do -- 0.2 seconds, in uS.
|
||||
if #biome_lib.blocklist_aircheck > 0 then
|
||||
biome_lib:generate_block_with_air_checking()
|
||||
end
|
||||
if #biome_lib.blocklist_no_aircheck > 0 then
|
||||
biome_lib:generate_block_no_aircheck()
|
||||
end
|
||||
biome_lib.globalstep_runtime = minetest.get_us_time() - biome_lib.globalstep_start_time
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
-- Play out the entire log all at once on shutdown
|
||||
-- to prevent unpopulated map areas
|
||||
|
||||
minetest.register_on_shutdown(function()
|
||||
if #biome_lib.blocklist_aircheck > 0 then
|
||||
print("[biome_lib] Stand by, playing out the rest of the aircheck mapblock log")
|
||||
print("(there are "..#biome_lib.blocklist_aircheck.." entries)...")
|
||||
while true do
|
||||
biome_lib:generate_block_with_air_checking(0.1)
|
||||
if #biome_lib.blocklist_aircheck == 0 then return end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_on_shutdown(function()
|
||||
if #biome_lib.blocklist_no_aircheck > 0 then
|
||||
print("[biome_lib] Stand by, playing out the rest of the no-aircheck mapblock log")
|
||||
print("(there are "..#biome_lib.blocklist_no_aircheck.." entries)...")
|
||||
while true do
|
||||
biome_lib:generate_block_no_aircheck(0.1)
|
||||
if #biome_lib.blocklist_no_aircheck == 0 then return end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
-- The spawning ABM
|
||||
|
||||
function biome_lib:spawn_on_surfaces(sd,sp,sr,sc,ss,sa)
|
||||
|
||||
local biome = {}
|
||||
|
||||
if type(sd) ~= "table" then
|
||||
biome.spawn_delay = sd -- old api expects ABM interval param here.
|
||||
biome.spawn_plants = {sp}
|
||||
biome.avoid_radius = sr
|
||||
biome.spawn_chance = sc
|
||||
biome.spawn_surfaces = {ss}
|
||||
biome.avoid_nodes = sa
|
||||
else
|
||||
biome = sd
|
||||
end
|
||||
|
||||
if biome.spawn_delay*time_scale >= 1 then
|
||||
biome.interval = biome.spawn_delay*time_scale
|
||||
else
|
||||
biome.interval = 1
|
||||
end
|
||||
|
||||
biome_lib:set_defaults(biome)
|
||||
biome.spawn_plants_count = #(biome.spawn_plants)
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = biome.spawn_surfaces,
|
||||
interval = biome.interval,
|
||||
chance = biome.spawn_chance,
|
||||
neighbors = biome.neighbors,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local p_top = { x = pos.x, y = pos.y + 1, z = pos.z }
|
||||
local n_top = minetest.get_node(p_top)
|
||||
local perlin_fertile_area = minetest.get_perlin(biome.seed_diff, perlin_octaves, perlin_persistence, perlin_scale)
|
||||
local noise1 = perlin_fertile_area:get2d({x=p_top.x, y=p_top.z})
|
||||
local noise2 = biome_lib.perlin_temperature:get2d({x=p_top.x, y=p_top.z})
|
||||
local noise3 = biome_lib.perlin_humidity:get2d({x=p_top.x+150, y=p_top.z+50})
|
||||
if noise1 > biome.plantlife_limit
|
||||
and noise2 <= biome.temp_min
|
||||
and noise2 >= biome.temp_max
|
||||
and noise3 <= biome.humidity_min
|
||||
and noise3 >= biome.humidity_max
|
||||
and biome_lib:is_node_loaded(p_top) then
|
||||
local n_light = minetest.get_node_light(p_top, nil)
|
||||
if not (biome.avoid_nodes and biome.avoid_radius and minetest.find_node_near(p_top, biome.avoid_radius + math.random(-1.5,2), biome.avoid_nodes))
|
||||
and n_light >= biome.light_min
|
||||
and n_light <= biome.light_max
|
||||
and (not(biome.neighbors and biome.ncount) or #(minetest.find_nodes_in_area({x=pos.x-1, y=pos.y, z=pos.z-1}, {x=pos.x+1, y=pos.y, z=pos.z+1}, biome.neighbors)) > biome.ncount )
|
||||
and (not(biome.near_nodes and biome.near_nodes_count and biome.near_nodes_size) or #(minetest.find_nodes_in_area({x=pos.x-biome.near_nodes_size, y=pos.y-biome.near_nodes_vertical, z=pos.z-biome.near_nodes_size}, {x=pos.x+biome.near_nodes_size, y=pos.y+biome.near_nodes_vertical, z=pos.z+biome.near_nodes_size}, biome.near_nodes)) >= biome.near_nodes_count)
|
||||
and (not(biome.air_count and biome.air_size) or #(minetest.find_nodes_in_area({x=p_top.x-biome.air_size, y=p_top.y, z=p_top.z-biome.air_size}, {x=p_top.x+biome.air_size, y=p_top.y, z=p_top.z+biome.air_size}, "air")) >= biome.air_count)
|
||||
and pos.y >= biome.min_elevation
|
||||
and pos.y <= biome.max_elevation
|
||||
then
|
||||
local walldir = biome_lib:find_adjacent_wall(p_top, biome.verticals_list, biome.choose_random_wall)
|
||||
if biome.alt_wallnode and walldir then
|
||||
if n_top.name == "air" then
|
||||
minetest.set_node(p_top, { name = biome.alt_wallnode, param2 = walldir })
|
||||
end
|
||||
else
|
||||
local currentsurface = minetest.get_node(pos).name
|
||||
if currentsurface ~= "default:water_source"
|
||||
or (currentsurface == "default:water_source" and #(minetest.find_nodes_in_area({x=pos.x, y=pos.y-biome.depth_max-1, z=pos.z}, {x=pos.x, y=pos.y, z=pos.z}, {"default:dirt", "default:dirt_with_grass", "default:sand"})) > 0 )
|
||||
then
|
||||
local rnd = math.random(1, biome.spawn_plants_count)
|
||||
local plant_to_spawn = biome.spawn_plants[rnd]
|
||||
local fdir = biome.facedir
|
||||
if biome.random_facedir then
|
||||
fdir = math.random(biome.random_facedir[1],biome.random_facedir[2])
|
||||
end
|
||||
if type(biome.spawn_plants) == "string" then
|
||||
assert(loadstring(biome.spawn_plants.."(...)"))(pos)
|
||||
elseif not biome.spawn_on_side and not biome.spawn_on_bottom and not biome.spawn_replace_node then
|
||||
if n_top.name == "air" then
|
||||
minetest.set_node(p_top, { name = plant_to_spawn, param2 = fdir })
|
||||
end
|
||||
elseif biome.spawn_replace_node then
|
||||
minetest.set_node(pos, { name = plant_to_spawn, param2 = fdir })
|
||||
|
||||
elseif biome.spawn_on_side then
|
||||
local onside = biome_lib:find_open_side(pos)
|
||||
if onside then
|
||||
minetest.set_node(onside.newpos, { name = plant_to_spawn, param2 = onside.facedir })
|
||||
end
|
||||
elseif biome.spawn_on_bottom then
|
||||
if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "air" then
|
||||
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z}, { name = plant_to_spawn, param2 = fdir} )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
-- The growing ABM
|
||||
|
||||
function biome_lib:grow_plants(opts)
|
||||
|
||||
local options = opts
|
||||
|
||||
options.height_limit = options.height_limit or 5
|
||||
options.ground_nodes = options.ground_nodes or { "default:dirt_with_grass" }
|
||||
options.grow_nodes = options.grow_nodes or { "default:dirt_with_grass" }
|
||||
options.seed_diff = options.seed_diff or 0
|
||||
|
||||
if options.grow_delay*time_scale >= 1 then
|
||||
options.interval = options.grow_delay*time_scale
|
||||
else
|
||||
options.interval = 1
|
||||
end
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = { options.grow_plant },
|
||||
interval = options.interval,
|
||||
chance = options.grow_chance,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local p_top = {x=pos.x, y=pos.y+1, z=pos.z}
|
||||
local p_bot = {x=pos.x, y=pos.y-1, z=pos.z}
|
||||
local n_top = minetest.get_node(p_top)
|
||||
local n_bot = minetest.get_node(p_bot)
|
||||
local root_node = minetest.get_node({x=pos.x, y=pos.y-options.height_limit, z=pos.z})
|
||||
local walldir = nil
|
||||
if options.need_wall and options.verticals_list then
|
||||
walldir = biome_lib:find_adjacent_wall(p_top, options.verticals_list, options.choose_random_wall)
|
||||
end
|
||||
if (n_top.name == "air" or n_top.name == "default:snow")
|
||||
and (not options.need_wall or (options.need_wall and walldir)) then
|
||||
-- corner case for changing short junglegrass
|
||||
-- to dry shrub in desert
|
||||
if n_bot.name == options.dry_early_node and options.grow_plant == "junglegrass:short" then
|
||||
minetest.set_node(pos, { name = "default:dry_shrub" })
|
||||
|
||||
elseif options.grow_vertically and walldir then
|
||||
if biome_lib:search_downward(pos, options.height_limit, options.ground_nodes) then
|
||||
minetest.set_node(p_top, { name = options.grow_plant, param2 = walldir})
|
||||
end
|
||||
|
||||
elseif not options.grow_result and not options.grow_function then
|
||||
minetest.remove_node(pos)
|
||||
|
||||
else
|
||||
biome_lib:replace_object(pos, options.grow_result, options.grow_function, options.facedir, options.seed_diff)
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
-- Function to decide how to replace a plant - either grow it, replace it with
|
||||
-- a tree, run a function, or die with an error.
|
||||
|
||||
function biome_lib:replace_object(pos, replacement, grow_function, walldir, seeddiff)
|
||||
local growtype = type(grow_function)
|
||||
if growtype == "table" then
|
||||
minetest.remove_node(pos)
|
||||
biome_lib:grow_tree(pos, grow_function)
|
||||
return
|
||||
elseif growtype == "function" then
|
||||
local perlin_fertile_area = minetest.get_perlin(seeddiff, perlin_octaves, perlin_persistence, perlin_scale)
|
||||
local noise1 = perlin_fertile_area:get2d({x=pos.x, y=pos.z})
|
||||
local noise2 = biome_lib.perlin_temperature:get2d({x=pos.x, y=pos.z})
|
||||
grow_function(pos,noise1,noise2,walldir)
|
||||
return
|
||||
elseif growtype == "string" then
|
||||
local perlin_fertile_area = minetest.get_perlin(seeddiff, perlin_octaves, perlin_persistence, perlin_scale)
|
||||
local noise1 = perlin_fertile_area:get2d({x=pos.x, y=pos.z})
|
||||
local noise2 = biome_lib.perlin_temperature:get2d({x=pos.x, y=pos.z})
|
||||
assert(loadstring(grow_function.."(...)"))(pos,noise1,noise2,walldir)
|
||||
return
|
||||
elseif growtype == "nil" then
|
||||
minetest.set_node(pos, { name = replacement, param2 = walldir})
|
||||
return
|
||||
elseif growtype ~= "nil" and growtype ~= "string" and growtype ~= "table" then
|
||||
error("Invalid grow function "..dump(grow_function).." used on object at ("..dump(pos)..")")
|
||||
end
|
||||
end
|
||||
|
||||
-- function to decide if a node has a wall that's in verticals_list{}
|
||||
-- returns wall direction of valid node, or nil if invalid.
|
||||
|
||||
function biome_lib:find_adjacent_wall(pos, verticals, randomflag)
|
||||
local verts = dump(verticals)
|
||||
if randomflag then
|
||||
local walltab = {}
|
||||
|
||||
if string.find(verts, minetest.get_node({ x=pos.x-1, y=pos.y, z=pos.z }).name) then walltab[#walltab + 1] = 3 end
|
||||
if string.find(verts, minetest.get_node({ x=pos.x+1, y=pos.y, z=pos.z }).name) then walltab[#walltab + 1] = 2 end
|
||||
if string.find(verts, minetest.get_node({ x=pos.x , y=pos.y, z=pos.z-1 }).name) then walltab[#walltab + 1] = 5 end
|
||||
if string.find(verts, minetest.get_node({ x=pos.x , y=pos.y, z=pos.z+1 }).name) then walltab[#walltab + 1] = 4 end
|
||||
|
||||
if #walltab > 0 then return walltab[math.random(1, #walltab)] end
|
||||
|
||||
else
|
||||
if string.find(verts, minetest.get_node({ x=pos.x-1, y=pos.y, z=pos.z }).name) then return 3 end
|
||||
if string.find(verts, minetest.get_node({ x=pos.x+1, y=pos.y, z=pos.z }).name) then return 2 end
|
||||
if string.find(verts, minetest.get_node({ x=pos.x , y=pos.y, z=pos.z-1 }).name) then return 5 end
|
||||
if string.find(verts, minetest.get_node({ x=pos.x , y=pos.y, z=pos.z+1 }).name) then return 4 end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
-- Function to search downward from the given position, looking for the first
|
||||
-- node that matches the ground table. Returns the new position, or nil if
|
||||
-- height limit is exceeded before finding it.
|
||||
|
||||
function biome_lib:search_downward(pos, heightlimit, ground)
|
||||
for i = 0, heightlimit do
|
||||
if string.find(dump(ground), minetest.get_node({x=pos.x, y=pos.y-i, z = pos.z}).name) then
|
||||
return {x=pos.x, y=pos.y-i, z = pos.z}
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function biome_lib:find_open_side(pos)
|
||||
if minetest.get_node({ x=pos.x-1, y=pos.y, z=pos.z }).name == "air" then
|
||||
return {newpos = { x=pos.x-1, y=pos.y, z=pos.z }, facedir = 2}
|
||||
end
|
||||
if minetest.get_node({ x=pos.x+1, y=pos.y, z=pos.z }).name == "air" then
|
||||
return {newpos = { x=pos.x+1, y=pos.y, z=pos.z }, facedir = 3}
|
||||
end
|
||||
if minetest.get_node({ x=pos.x, y=pos.y, z=pos.z-1 }).name == "air" then
|
||||
return {newpos = { x=pos.x, y=pos.y, z=pos.z-1 }, facedir = 4}
|
||||
end
|
||||
if minetest.get_node({ x=pos.x, y=pos.y, z=pos.z+1 }).name == "air" then
|
||||
return {newpos = { x=pos.x, y=pos.y, z=pos.z+1 }, facedir = 5}
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
-- spawn_tree() on generate is routed through here so that other mods can hook
|
||||
-- into it.
|
||||
|
||||
function biome_lib:generate_tree(pos, nodes_or_function_or_model)
|
||||
minetest.spawn_tree(pos, nodes_or_function_or_model)
|
||||
end
|
||||
|
||||
-- and this one's for the call used in the growing code
|
||||
|
||||
function biome_lib:grow_tree(pos, nodes_or_function_or_model)
|
||||
minetest.spawn_tree(pos, nodes_or_function_or_model)
|
||||
end
|
||||
|
||||
-- Check for infinite stacks
|
||||
|
||||
if minetest.get_modpath("unified_inventory") or not minetest.settings:get_bool("creative_mode") then
|
||||
biome_lib.expect_infinite_stacks = false
|
||||
else
|
||||
biome_lib.expect_infinite_stacks = true
|
||||
end
|
||||
|
||||
-- read a field from a node's definition
|
||||
|
||||
function biome_lib:get_nodedef_field(nodename, fieldname)
|
||||
if not minetest.registered_nodes[nodename] then
|
||||
return nil
|
||||
end
|
||||
return minetest.registered_nodes[nodename][fieldname]
|
||||
end
|
||||
|
||||
print("[Biome Lib] Loaded")
|
||||
|
||||
minetest.after(0, function()
|
||||
print("[Biome Lib] Registered a total of "..(#biome_lib.surfaceslist_aircheck)+(#biome_lib.surfaceslist_no_aircheck).." surface types to be evaluated, spread")
|
||||
print("[Biome Lib] across "..#biome_lib.actionslist_aircheck.." actions with air-checking and "..#biome_lib.actionslist_no_aircheck.." actions without.")
|
||||
end)
|
||||
|
|
@ -1 +0,0 @@
|
|||
inventory
|
|
@ -1,31 +0,0 @@
|
|||
--[[
|
||||
Init
|
||||
--]]
|
||||
|
||||
init = {}
|
||||
|
||||
-- GUI related stuff
|
||||
init.gui_bg = "bgcolor[#080808BB;true]"
|
||||
init.gui_bg_img = "background[5,5;1,1;gui_formbg.png;true]"
|
||||
init.gui_slots = "listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
|
||||
|
||||
function init.get_hotbar_bg(x,y)
|
||||
local out = ""
|
||||
for i=0,7,1 do
|
||||
out = out .."image["..x+i..","..y..";1,1;gui_hb_bg.png]"
|
||||
end
|
||||
return out
|
||||
end
|
||||
|
||||
init.gui_survival_form = "size[8,8.5]"..
|
||||
init.gui_bg..
|
||||
init.gui_bg_img..
|
||||
init.gui_slots..
|
||||
"list[current_player;main;0,4.25;8,1;]"..
|
||||
"list[current_player;main;0,5.5;8,3;8]"..
|
||||
"list[current_player;craft;1.75,0.5;3,3;]"..
|
||||
"list[current_player;craftpreview;5.75,1.5;1,1;]"..
|
||||
"image[4.75,1.5;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
|
||||
"listring[current_player;main]"..
|
||||
"listring[current_player;craft]"..
|
||||
init.get_hotbar_bg(0,4.25)
|
|
@ -1 +0,0 @@
|
|||
name = init
|
|
@ -1,488 +0,0 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-03 11:09+0200\n"
|
||||
"PO-Revision-Date: 2017-08-03 11:32+0200\n"
|
||||
"Last-Translator: Xanthin\n"
|
||||
"Language-Team: \n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.8.12\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: ../bushes/init.lua
|
||||
msgid "Young Tree 2 (bottom)"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes/init.lua
|
||||
msgid "Bush Branches @1"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes/init.lua
|
||||
msgid "Bush Leaves @1"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/cooking.lua
|
||||
msgid "Sugar"
|
||||
msgstr "Zucker"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Strawberry pies"
|
||||
msgstr "Korb mit Erdbeertorten"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Strawberry pie"
|
||||
msgstr "Erdbeertorte"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Strawberry pie"
|
||||
msgstr "Rohe Erdbeertorte"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Strawberry pie"
|
||||
msgstr "Erdbeertortenstueck"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Strawberry"
|
||||
msgstr "Erdbeere"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Strawberry Bush"
|
||||
msgstr "Erdbeerbusch"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Blackberry pies"
|
||||
msgstr "Korb mit Brombeertorten"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blackberry"
|
||||
msgstr "Brombeere"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blackberry Bush"
|
||||
msgstr "Brombeerbusch"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Blackberry pie"
|
||||
msgstr "Brombeertorte"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Blackberry pie"
|
||||
msgstr "Rohe Brombeertorte"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Blackberry pie"
|
||||
msgstr "Brombeertortenstueck"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Blueberry pies"
|
||||
msgstr "Korb mit Blaubeertorten"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blueberry"
|
||||
msgstr "Blaubeere"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blueberry Bush"
|
||||
msgstr "Blaubeerbusch"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Blueberry pie"
|
||||
msgstr "Blaubeertorte"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Blueberry pie"
|
||||
msgstr "Rohe Blaubeertorte"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Blueberry pie"
|
||||
msgstr "Blaubeertortenstueck"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Raspberry pies"
|
||||
msgstr "Korb mit Himbeertorten"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Raspberry pie"
|
||||
msgstr "Himbeertorte"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raspberry"
|
||||
msgstr "Himbeere"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raspberry Bush"
|
||||
msgstr "Himbeerbusch"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Raspberry pie"
|
||||
msgstr "Rohe Himbeertorte"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Raspberry pie"
|
||||
msgstr "Himbeertortenstueck"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Gooseberry pies"
|
||||
msgstr "Korb mit Stachelbeertorten"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Gooseberry pie"
|
||||
msgstr "Stachelbeertorte"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Gooseberry"
|
||||
msgstr "Stachelbeere"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Gooseberry Bush"
|
||||
msgstr "Stachelbeerbusch"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Gooseberry pie"
|
||||
msgstr "Rohe Stachelbeertorte"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Gooseberry pie"
|
||||
msgstr "Stachelbeertortenstueck"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Mixed Berry pies"
|
||||
msgstr "Korb mit Beerenmixtorten"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Mixed Berry pie"
|
||||
msgstr "Beerenmixtorte"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
#, fuzzy
|
||||
msgid "Currently fruitless Bush"
|
||||
msgstr "zur Zeit fruechteloser"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Mixed Berry"
|
||||
msgstr "Beerenmix"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Mixed Berry pie"
|
||||
msgstr "Rohe Beerenmixtorte"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Mixed Berry pie"
|
||||
msgstr "Beerenmixtortenstueck"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "[Bushes] Loaded."
|
||||
msgstr "[Bushes] Geladen."
|
||||
|
||||
#: ../bushes_classic/nodes.lua
|
||||
msgid "Basket"
|
||||
msgstr "Korb"
|
||||
|
||||
#: ../cavestuff/nodes.lua
|
||||
msgid "Pebble"
|
||||
msgstr ""
|
||||
|
||||
#: ../cavestuff/nodes.lua
|
||||
msgid "Desert Pebble"
|
||||
msgstr ""
|
||||
|
||||
#: ../cavestuff/nodes.lua
|
||||
msgid "Stalactite"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Sickle"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Cut Grass"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Hay"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Short Grass"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/juncus.lua
|
||||
msgid "Juncus"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Slab"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Roof"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Roof Corner"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Roof Corner 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Slab"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Roof"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Roof Corner"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Roof Corner 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 1"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 3"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 3 & Spikes"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Fiddlehead"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Roasted Fiddlehead"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Fern Tuber"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Roasted Fern Tuber"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/fern.lua
|
||||
msgid "Lady-fern (Athyrium)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua ../ferns/treefern.lua
|
||||
msgid "Tree Fern Crown (Dicksonia)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Tree Fern Leaves"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Tree Fern Leave End"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Fern Trunk"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Tree Fern Sapling"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/horsetail.lua
|
||||
msgid "Young Horsetail (Equisetum)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/horsetail.lua
|
||||
msgid "Horsetail (Equisetum)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/treefern.lua
|
||||
msgid "Fern Trunk (Dicksonia)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/treefern.lua
|
||||
msgid "Tree Fern Sapling (Dicksonia)"
|
||||
msgstr ""
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "Waterlily"
|
||||
msgstr "Seerose"
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "Seaweed"
|
||||
msgstr "Seetang"
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "Sunflower"
|
||||
msgstr "Sonnenblume"
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "[Flowers] Loaded."
|
||||
msgstr "[Flowers] Geladen."
|
||||
|
||||
#: ../molehills/init.lua
|
||||
msgid "Mole Hill"
|
||||
msgstr ""
|
||||
|
||||
#: ../molehills/init.lua
|
||||
msgid "Loaded..."
|
||||
msgstr ""
|
||||
|
||||
#: ../nature_classic/blossom.lua
|
||||
msgid "Apple blossoms"
|
||||
msgstr ""
|
||||
|
||||
#: ../nature_classic/init.lua
|
||||
msgid "[Nature Classic] loaded!"
|
||||
msgstr ""
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "Poison ivy (seedling)"
|
||||
msgstr "Giftefeu (Saemling)"
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "Poison ivy (sproutling)"
|
||||
msgstr "Giftefeu (Sproessling)"
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "Poison ivy (climbing plant)"
|
||||
msgstr "Giftefeu (Kletterpflanze)"
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "[Poison Ivy] Loaded."
|
||||
msgstr "[Poison Ivy] Geladen."
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twig"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Moss"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Moss with Fungus"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Block"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Slab"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Roof"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Roof Corner 1"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Roof Corner 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Root"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/crafts.lua ../vines/vines.lua
|
||||
msgid "Vines"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/functions.lua
|
||||
msgid "Matured"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/init.lua
|
||||
msgid "[Vines] Loaded!"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/nodes.lua
|
||||
msgid "Rope"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/shear.lua
|
||||
msgid "Shears"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/vines.lua
|
||||
msgid "Roots"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/vines.lua
|
||||
msgid "Jungle Vines"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/vines.lua
|
||||
msgid "Willow Vines"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 1"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 3"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 4"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Bamboo Tree"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree 2 (middle)"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree (top)"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree (middle)"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree (bottom)"
|
||||
msgstr ""
|
|
@ -1,488 +0,0 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-03 11:34+0200\n"
|
||||
"PO-Revision-Date: 2017-08-03 11:41+0200\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.8.12\n"
|
||||
"Last-Translator: Carlos Barraza <carlosbarrazaes@gmail.com>\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"Language: es\n"
|
||||
|
||||
#: ../bushes/init.lua
|
||||
msgid "Young Tree 2 (bottom)"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes/init.lua
|
||||
msgid "Bush Branches @1"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes/init.lua
|
||||
msgid "Bush Leaves @1"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/cooking.lua
|
||||
msgid "Sugar"
|
||||
msgstr "Azúcar"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Strawberry pies"
|
||||
msgstr "Cesta con Pasteles de Frutilla"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Strawberry pie"
|
||||
msgstr "Pastel de Frutilla Cocido"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Strawberry pie"
|
||||
msgstr "Pastel de Frutilla Crudo"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Strawberry pie"
|
||||
msgstr "Rebanada de Pastel de Frutilla"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Strawberry"
|
||||
msgstr "Frutilla"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Strawberry Bush"
|
||||
msgstr "Arbusto de Frutilla"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Blackberry pies"
|
||||
msgstr "Cesta con Pasteles de Mora"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blackberry"
|
||||
msgstr "Mora"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blackberry Bush"
|
||||
msgstr "Arbusto de Mora"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Blackberry pie"
|
||||
msgstr "Pastel de Mora Cocido"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Blackberry pie"
|
||||
msgstr "Pastel de Mora Crudo"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Blackberry pie"
|
||||
msgstr "Rebanada de Pastel de Mora"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Blueberry pies"
|
||||
msgstr "Cesta con Pasteles de Arándano"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blueberry"
|
||||
msgstr "Arándano"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blueberry Bush"
|
||||
msgstr "Arbusto de Arándano"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Blueberry pie"
|
||||
msgstr "Pastel de Arándano Cocido"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Blueberry pie"
|
||||
msgstr "Pastel de Arándano Crudo"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Blueberry pie"
|
||||
msgstr "Rebanada de Pastel de Arándano"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Raspberry pies"
|
||||
msgstr "Cesta con Pasteles de Frambuesa"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Raspberry pie"
|
||||
msgstr "Pastel de Frambuesa Cocido"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raspberry"
|
||||
msgstr "Frambuesa"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raspberry Bush"
|
||||
msgstr "Arbusto de Frambuesa"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Raspberry pie"
|
||||
msgstr "Pastel de Frambuesa Crudo"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Raspberry pie"
|
||||
msgstr "Rebanada de Pastel de Frambuesa"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Gooseberry pies"
|
||||
msgstr "Cesta con Pasteles de Grosella"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Gooseberry pie"
|
||||
msgstr "Pastel de Grosella Cocido"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Gooseberry"
|
||||
msgstr "Grosella"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Gooseberry Bush"
|
||||
msgstr "Arbusto de Grosella"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Gooseberry pie"
|
||||
msgstr "Pastel de Grosella Crudo"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Gooseberry pie"
|
||||
msgstr "Rebanada de Pastel de Grosella"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Mixed Berry pies"
|
||||
msgstr "Cesta con Pasteles de Mezcla de Baya"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Mixed Berry pie"
|
||||
msgstr "Pastel de Mezcla de Bayas Cocido"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
#, fuzzy
|
||||
msgid "Currently fruitless Bush"
|
||||
msgstr "Arbusto actualmente infructuoso"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Mixed Berry"
|
||||
msgstr "Mezcla de Baya"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Mixed Berry pie"
|
||||
msgstr "Pastel de Mezcla de Bayas Cruda"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Mixed Berry pie"
|
||||
msgstr "Rebanada de Pastel de Mezcla de Bayas"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "[Bushes] Loaded."
|
||||
msgstr "[Bushes] Cargado."
|
||||
|
||||
#: ../bushes_classic/nodes.lua
|
||||
msgid "Basket"
|
||||
msgstr "Cesta"
|
||||
|
||||
#: ../cavestuff/nodes.lua
|
||||
msgid "Pebble"
|
||||
msgstr ""
|
||||
|
||||
#: ../cavestuff/nodes.lua
|
||||
msgid "Desert Pebble"
|
||||
msgstr ""
|
||||
|
||||
#: ../cavestuff/nodes.lua
|
||||
msgid "Stalactite"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Sickle"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Cut Grass"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Hay"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Short Grass"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/juncus.lua
|
||||
msgid "Juncus"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Slab"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Roof"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Roof Corner"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Roof Corner 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Slab"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Roof"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Roof Corner"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Roof Corner 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 1"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 3"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 3 & Spikes"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Fiddlehead"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Roasted Fiddlehead"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Fern Tuber"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Roasted Fern Tuber"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/fern.lua
|
||||
msgid "Lady-fern (Athyrium)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua ../ferns/treefern.lua
|
||||
msgid "Tree Fern Crown (Dicksonia)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Tree Fern Leaves"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Tree Fern Leave End"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Fern Trunk"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Tree Fern Sapling"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/horsetail.lua
|
||||
msgid "Young Horsetail (Equisetum)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/horsetail.lua
|
||||
msgid "Horsetail (Equisetum)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/treefern.lua
|
||||
msgid "Fern Trunk (Dicksonia)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/treefern.lua
|
||||
msgid "Tree Fern Sapling (Dicksonia)"
|
||||
msgstr ""
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "Waterlily"
|
||||
msgstr "Lirio de agua"
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "Seaweed"
|
||||
msgstr "Algas marinas"
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "Sunflower"
|
||||
msgstr "Girasol"
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "[Flowers] Loaded."
|
||||
msgstr "[Flowers] Cargado."
|
||||
|
||||
#: ../molehills/init.lua
|
||||
msgid "Mole Hill"
|
||||
msgstr ""
|
||||
|
||||
#: ../molehills/init.lua
|
||||
msgid "Loaded..."
|
||||
msgstr ""
|
||||
|
||||
#: ../nature_classic/blossom.lua
|
||||
msgid "Apple blossoms"
|
||||
msgstr ""
|
||||
|
||||
#: ../nature_classic/init.lua
|
||||
msgid "[Nature Classic] loaded!"
|
||||
msgstr ""
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "Poison ivy (seedling)"
|
||||
msgstr "Hiedra venenosa (retoño)"
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "Poison ivy (sproutling)"
|
||||
msgstr "Hiedra venenosa (brotes)"
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "Poison ivy (climbing plant)"
|
||||
msgstr "Hiedra venenosa (planta trepadora)"
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "[Poison Ivy] Loaded."
|
||||
msgstr "[Poison Ivy] Cargado."
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twig"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Moss"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Moss with Fungus"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Block"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Slab"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Roof"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Roof Corner 1"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Roof Corner 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Root"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/crafts.lua ../vines/vines.lua
|
||||
msgid "Vines"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/functions.lua
|
||||
msgid "Matured"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/init.lua
|
||||
msgid "[Vines] Loaded!"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/nodes.lua
|
||||
msgid "Rope"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/shear.lua
|
||||
msgid "Shears"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/vines.lua
|
||||
msgid "Roots"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/vines.lua
|
||||
msgid "Jungle Vines"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/vines.lua
|
||||
msgid "Willow Vines"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 1"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 3"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 4"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Bamboo Tree"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree 2 (middle)"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree (top)"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree (middle)"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree (bottom)"
|
||||
msgstr ""
|
|
@ -1,487 +0,0 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-03 11:09+0200\n"
|
||||
"PO-Revision-Date: 2017-08-03 11:18+0200\n"
|
||||
"Last-Translator: fat115 <fat115@framasoft.org>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.8.12\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
#: ../bushes/init.lua
|
||||
msgid "Young Tree 2 (bottom)"
|
||||
msgstr "Arbuste 2 (bas)"
|
||||
|
||||
#: ../bushes/init.lua
|
||||
msgid "Bush Branches @1"
|
||||
msgstr "Branches de buisson @1"
|
||||
|
||||
#: ../bushes/init.lua
|
||||
msgid "Bush Leaves @1"
|
||||
msgstr "Feuilles de buisson @1"
|
||||
|
||||
#: ../bushes_classic/cooking.lua
|
||||
msgid "Sugar"
|
||||
msgstr "Sucre"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Strawberry pies"
|
||||
msgstr "Panier de tartes aux fraises"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Strawberry pie"
|
||||
msgstr "Tarte aux fraises (cuite)"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Strawberry pie"
|
||||
msgstr "Tarte aux fraises (crue)"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Strawberry pie"
|
||||
msgstr "Part de tarte aux fraises"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Strawberry"
|
||||
msgstr "Fraises"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Strawberry Bush"
|
||||
msgstr "Buisson de fraises"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Blackberry pies"
|
||||
msgstr "Panier de tartes aux fraises"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blackberry"
|
||||
msgstr "Mûres"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blackberry Bush"
|
||||
msgstr "Buisson de mûres"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Blackberry pie"
|
||||
msgstr "Tarte aux mûres (cuite)"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Blackberry pie"
|
||||
msgstr "Tarte aux mûres (crue)"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Blackberry pie"
|
||||
msgstr "Part de tarte aux mûres"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Blueberry pies"
|
||||
msgstr "Panier de tartes aux mûres"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blueberry"
|
||||
msgstr "Myrtilles"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blueberry Bush"
|
||||
msgstr "Buisson de myrtilles"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Blueberry pie"
|
||||
msgstr "Tarte aux myrtilles (cuite)"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Blueberry pie"
|
||||
msgstr "Tarte aux myrtilles (crue)"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Blueberry pie"
|
||||
msgstr "Part de tarte aux myrtilles"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Raspberry pies"
|
||||
msgstr "Panier de tartes aux framboises"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Raspberry pie"
|
||||
msgstr "Tarte aux framboises (cuite)"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raspberry"
|
||||
msgstr "Framboises"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raspberry Bush"
|
||||
msgstr "Buisson de framboises"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Raspberry pie"
|
||||
msgstr "Tarte aux framboises (crue)"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Raspberry pie"
|
||||
msgstr "Part de tarts aux framboises"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Gooseberry pies"
|
||||
msgstr "Panier de tartes aux groseilles"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Gooseberry pie"
|
||||
msgstr "Tarte aux groseilles (cuite)"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Gooseberry"
|
||||
msgstr "Groseilles"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Gooseberry Bush"
|
||||
msgstr "Buisson de groseilles"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Gooseberry pie"
|
||||
msgstr "Tarte aux groseilles (crue)"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Gooseberry pie"
|
||||
msgstr "Part de tarte aux groseilles"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Mixed Berry pies"
|
||||
msgstr "Panier de tartes aux fruits rouges"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Mixed Berry pie"
|
||||
msgstr "Tarte aux fruits rouges (cuite)"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Currently fruitless Bush"
|
||||
msgstr "Buisson sans fruits pour l'instant"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Mixed Berry"
|
||||
msgstr "Fruits rouges"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Mixed Berry pie"
|
||||
msgstr "Tarte aux fruits rouges (crue)"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Mixed Berry pie"
|
||||
msgstr "Part de tarte aux fruits rouges"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "[Bushes] Loaded."
|
||||
msgstr "[Bushes] chargé."
|
||||
|
||||
#: ../bushes_classic/nodes.lua
|
||||
msgid "Basket"
|
||||
msgstr "Panier"
|
||||
|
||||
#: ../cavestuff/nodes.lua
|
||||
msgid "Pebble"
|
||||
msgstr "Caillou"
|
||||
|
||||
#: ../cavestuff/nodes.lua
|
||||
msgid "Desert Pebble"
|
||||
msgstr "Caillou du désert"
|
||||
|
||||
#: ../cavestuff/nodes.lua
|
||||
msgid "Stalactite"
|
||||
msgstr "Stalactite"
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Sickle"
|
||||
msgstr "Faucille"
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Cut Grass"
|
||||
msgstr "Herbe coupée"
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Hay"
|
||||
msgstr "Foin"
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Short Grass"
|
||||
msgstr "Herbes courtes"
|
||||
|
||||
#: ../dryplants/juncus.lua
|
||||
msgid "Juncus"
|
||||
msgstr "Joncs"
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed"
|
||||
msgstr "Bloc de roseau humide"
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Slab"
|
||||
msgstr "Dalle en roseau humide"
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Roof"
|
||||
msgstr "Toit en roseau humide"
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Roof Corner"
|
||||
msgstr "Angle de toit en roseau humide"
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Roof Corner 2"
|
||||
msgstr "Angle de toit en roseau humide 2"
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed"
|
||||
msgstr "Roseau"
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Slab"
|
||||
msgstr "Dalle en roseau"
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Roof"
|
||||
msgstr "Toit en roseau"
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Roof Corner"
|
||||
msgstr "Angle de toit en roseau"
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Roof Corner 2"
|
||||
msgstr "Angle de toit en roseau 2"
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace"
|
||||
msgstr "Roseau"
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 1"
|
||||
msgstr "Roseau, 1 de hauteur"
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 2"
|
||||
msgstr "Roseau, 2 de hauteur"
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 3"
|
||||
msgstr "Roseau, 3 de hauteur"
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 3 & Spikes"
|
||||
msgstr "Roseau, 3 de hauteur avec panicules"
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Fiddlehead"
|
||||
msgstr "Crosse de fougère"
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Roasted Fiddlehead"
|
||||
msgstr "Crosse de fougère rôtie"
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Fern Tuber"
|
||||
msgstr "Tubercule de fougère"
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Roasted Fern Tuber"
|
||||
msgstr "Tubercule de fougère rôti"
|
||||
|
||||
#: ../ferns/fern.lua
|
||||
msgid "Lady-fern (Athyrium)"
|
||||
msgstr "Fougère (Athyrium)"
|
||||
|
||||
#: ../ferns/gianttreefern.lua ../ferns/treefern.lua
|
||||
msgid "Tree Fern Crown (Dicksonia)"
|
||||
msgstr "Fougère en couronne (Dicksonia)"
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Tree Fern Leaves"
|
||||
msgstr "Feuilles de fougère géante"
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Tree Fern Leave End"
|
||||
msgstr "Feuilles de fougère géante (extrémité)"
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Fern Trunk"
|
||||
msgstr "Tronc de fougère géante"
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Tree Fern Sapling"
|
||||
msgstr "Pousse de fougère géante"
|
||||
|
||||
#: ../ferns/horsetail.lua
|
||||
msgid "Young Horsetail (Equisetum)"
|
||||
msgstr "Pousse de prêle (Equisetum)"
|
||||
|
||||
#: ../ferns/horsetail.lua
|
||||
msgid "Horsetail (Equisetum)"
|
||||
msgstr "Prêle (Equisetum)"
|
||||
|
||||
#: ../ferns/treefern.lua
|
||||
msgid "Fern Trunk (Dicksonia)"
|
||||
msgstr "Tronc de fougère en couronne (Dicksonia)"
|
||||
|
||||
#: ../ferns/treefern.lua
|
||||
msgid "Tree Fern Sapling (Dicksonia)"
|
||||
msgstr "Pousse de fougère en couronne (Dicksonia)"
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "Waterlily"
|
||||
msgstr "Nénuphar"
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "Seaweed"
|
||||
msgstr "Algues"
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "Sunflower"
|
||||
msgstr "Tournesol"
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "[Flowers] Loaded."
|
||||
msgstr "[Flowers] chargé."
|
||||
|
||||
#: ../molehills/init.lua
|
||||
msgid "Mole Hill"
|
||||
msgstr "Taupinière"
|
||||
|
||||
#: ../molehills/init.lua
|
||||
msgid "Loaded..."
|
||||
msgstr "chargé."
|
||||
|
||||
#: ../nature_classic/blossom.lua
|
||||
msgid "Apple blossoms"
|
||||
msgstr "Fleurs de pommier"
|
||||
|
||||
#: ../nature_classic/init.lua
|
||||
msgid "[Nature Classic] loaded!"
|
||||
msgstr "[Nature Classic] chargé.!"
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "Poison ivy (seedling)"
|
||||
msgstr "Sumac vénéneux (semis)"
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "Poison ivy (sproutling)"
|
||||
msgstr "Sumac vénéneux (pousse)"
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "Poison ivy (climbing plant)"
|
||||
msgstr "Sumac vénéneux (grimpant)"
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "[Poison Ivy] Loaded."
|
||||
msgstr "[Poison Ivy] chargé."
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twig"
|
||||
msgstr "Brindille"
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Moss"
|
||||
msgstr "Mousse"
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Moss with Fungus"
|
||||
msgstr "Mousse et champignons"
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Block"
|
||||
msgstr "Bloc de brindilles"
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Slab"
|
||||
msgstr "Dalle en brindilles"
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Roof"
|
||||
msgstr "Toit de brindilles"
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Roof Corner 1"
|
||||
msgstr "Angle de toit de brindilles 1"
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Roof Corner 2"
|
||||
msgstr "Angle de toit de brindilles 2"
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Root"
|
||||
msgstr "(racine)"
|
||||
|
||||
#: ../vines/crafts.lua ../vines/vines.lua
|
||||
msgid "Vines"
|
||||
msgstr "Plantes grimpantes"
|
||||
|
||||
#: ../vines/functions.lua
|
||||
msgid "Matured"
|
||||
msgstr "Extrémité de"
|
||||
|
||||
#: ../vines/init.lua
|
||||
msgid "[Vines] Loaded!"
|
||||
msgstr "[Vines] chargé."
|
||||
|
||||
#: ../vines/nodes.lua
|
||||
msgid "Rope"
|
||||
msgstr "Corde"
|
||||
|
||||
#: ../vines/shear.lua
|
||||
msgid "Shears"
|
||||
msgstr "Cisailles"
|
||||
|
||||
#: ../vines/vines.lua
|
||||
msgid "Roots"
|
||||
msgstr "Racines"
|
||||
|
||||
#: ../vines/vines.lua
|
||||
msgid "Jungle Vines"
|
||||
msgstr "Lianes"
|
||||
|
||||
#: ../vines/vines.lua
|
||||
msgid "Willow Vines"
|
||||
msgstr "Lianes de saule"
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 1"
|
||||
msgstr "Humus forestier 1"
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 2"
|
||||
msgstr "Humus forestier 2"
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 3"
|
||||
msgstr "Humus forestier 3"
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 4"
|
||||
msgstr "Humus forestier 4"
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Bamboo Tree"
|
||||
msgstr "Bambou jeune"
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree 2 (middle)"
|
||||
msgstr "Arbuste 2 (milieu)"
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree (top)"
|
||||
msgstr "Arbuste (haut)"
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree (middle)"
|
||||
msgstr "Arbuste (milieu)"
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree (bottom)"
|
||||
msgstr "Arbuste (bas)"
|
|
@ -1,487 +0,0 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-03 14:07+0200\n"
|
||||
"PO-Revision-Date: 2017-08-03 14:08+0200\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\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: pt\n"
|
||||
|
||||
#: ../bushes/init.lua
|
||||
msgid "Young Tree 2 (bottom)"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes/init.lua
|
||||
msgid "Bush Branches @1"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes/init.lua
|
||||
msgid "Bush Leaves @1"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/cooking.lua
|
||||
msgid "Sugar"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Strawberry pies"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Strawberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Strawberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Strawberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Strawberry"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Strawberry Bush"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Blackberry pies"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blackberry"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blackberry Bush"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Blackberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Blackberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Blackberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Blueberry pies"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blueberry"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blueberry Bush"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Blueberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Blueberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Blueberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Raspberry pies"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Raspberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raspberry"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raspberry Bush"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Raspberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Raspberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Gooseberry pies"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Gooseberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Gooseberry"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Gooseberry Bush"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Gooseberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Gooseberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Mixed Berry pies"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Mixed Berry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Currently fruitless Bush"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Mixed Berry"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Mixed Berry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Mixed Berry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "[Bushes] Loaded."
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/nodes.lua
|
||||
msgid "Basket"
|
||||
msgstr ""
|
||||
|
||||
#: ../cavestuff/nodes.lua
|
||||
msgid "Pebble"
|
||||
msgstr ""
|
||||
|
||||
#: ../cavestuff/nodes.lua
|
||||
msgid "Desert Pebble"
|
||||
msgstr ""
|
||||
|
||||
#: ../cavestuff/nodes.lua
|
||||
msgid "Stalactite"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Sickle"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Cut Grass"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Hay"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Short Grass"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/juncus.lua
|
||||
msgid "Juncus"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Slab"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Roof"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Roof Corner"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Roof Corner 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Slab"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Roof"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Roof Corner"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Roof Corner 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 1"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 3"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 3 & Spikes"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Fiddlehead"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Roasted Fiddlehead"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Fern Tuber"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Roasted Fern Tuber"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/fern.lua
|
||||
msgid "Lady-fern (Athyrium)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua ../ferns/treefern.lua
|
||||
msgid "Tree Fern Crown (Dicksonia)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Tree Fern Leaves"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Tree Fern Leave End"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Fern Trunk"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Tree Fern Sapling"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/horsetail.lua
|
||||
msgid "Young Horsetail (Equisetum)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/horsetail.lua
|
||||
msgid "Horsetail (Equisetum)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/treefern.lua
|
||||
msgid "Fern Trunk (Dicksonia)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/treefern.lua
|
||||
msgid "Tree Fern Sapling (Dicksonia)"
|
||||
msgstr ""
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "Waterlily"
|
||||
msgstr ""
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "Seaweed"
|
||||
msgstr ""
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "Sunflower"
|
||||
msgstr ""
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "[Flowers] Loaded."
|
||||
msgstr ""
|
||||
|
||||
#: ../molehills/init.lua
|
||||
msgid "Mole Hill"
|
||||
msgstr ""
|
||||
|
||||
#: ../molehills/init.lua
|
||||
msgid "Loaded..."
|
||||
msgstr ""
|
||||
|
||||
#: ../nature_classic/blossom.lua
|
||||
msgid "Apple blossoms"
|
||||
msgstr ""
|
||||
|
||||
#: ../nature_classic/init.lua
|
||||
msgid "[Nature Classic] loaded!"
|
||||
msgstr ""
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "Poison ivy (seedling)"
|
||||
msgstr "Hera venenosa (plantilha)"
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "Poison ivy (sproutling)"
|
||||
msgstr "Hera venenosa (brotando)"
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "Poison ivy (climbing plant)"
|
||||
msgstr "Hera venenosa (planta trepadeira)"
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "[Poison Ivy] Loaded."
|
||||
msgstr "[Poison Ivy] Carregado"
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twig"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Moss"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Moss with Fungus"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Block"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Slab"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Roof"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Roof Corner 1"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Roof Corner 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Root"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/crafts.lua ../vines/vines.lua
|
||||
msgid "Vines"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/functions.lua
|
||||
msgid "Matured"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/init.lua
|
||||
msgid "[Vines] Loaded!"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/nodes.lua
|
||||
msgid "Rope"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/shear.lua
|
||||
msgid "Shears"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/vines.lua
|
||||
msgid "Roots"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/vines.lua
|
||||
msgid "Jungle Vines"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/vines.lua
|
||||
msgid "Willow Vines"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 1"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 3"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 4"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Bamboo Tree"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree 2 (middle)"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree (top)"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree (middle)"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree (bottom)"
|
||||
msgstr ""
|
|
@ -1,486 +0,0 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-03 11:09+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../bushes/init.lua
|
||||
msgid "Young Tree 2 (bottom)"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes/init.lua
|
||||
msgid "Bush Branches @1"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes/init.lua
|
||||
msgid "Bush Leaves @1"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/cooking.lua
|
||||
msgid "Sugar"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Strawberry pies"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Strawberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Strawberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Strawberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Strawberry"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Strawberry Bush"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Blackberry pies"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blackberry"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blackberry Bush"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Blackberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Blackberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Blackberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Blueberry pies"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blueberry"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blueberry Bush"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Blueberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Blueberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Blueberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Raspberry pies"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Raspberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raspberry"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raspberry Bush"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Raspberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Raspberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Gooseberry pies"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Gooseberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Gooseberry"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Gooseberry Bush"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Gooseberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Gooseberry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Mixed Berry pies"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Mixed Berry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Currently fruitless Bush"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Mixed Berry"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Mixed Berry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Mixed Berry pie"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "[Bushes] Loaded."
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/nodes.lua
|
||||
msgid "Basket"
|
||||
msgstr ""
|
||||
|
||||
#: ../cavestuff/nodes.lua
|
||||
msgid "Pebble"
|
||||
msgstr ""
|
||||
|
||||
#: ../cavestuff/nodes.lua
|
||||
msgid "Desert Pebble"
|
||||
msgstr ""
|
||||
|
||||
#: ../cavestuff/nodes.lua
|
||||
msgid "Stalactite"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Sickle"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Cut Grass"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Hay"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Short Grass"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/juncus.lua
|
||||
msgid "Juncus"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Slab"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Roof"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Roof Corner"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Roof Corner 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Slab"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Roof"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Roof Corner"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Roof Corner 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 1"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 3"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 3 & Spikes"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Fiddlehead"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Roasted Fiddlehead"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Fern Tuber"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Roasted Fern Tuber"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/fern.lua
|
||||
msgid "Lady-fern (Athyrium)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua ../ferns/treefern.lua
|
||||
msgid "Tree Fern Crown (Dicksonia)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Tree Fern Leaves"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Tree Fern Leave End"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Fern Trunk"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Tree Fern Sapling"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/horsetail.lua
|
||||
msgid "Young Horsetail (Equisetum)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/horsetail.lua
|
||||
msgid "Horsetail (Equisetum)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/treefern.lua
|
||||
msgid "Fern Trunk (Dicksonia)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/treefern.lua
|
||||
msgid "Tree Fern Sapling (Dicksonia)"
|
||||
msgstr ""
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "Waterlily"
|
||||
msgstr ""
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "Seaweed"
|
||||
msgstr ""
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "Sunflower"
|
||||
msgstr ""
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "[Flowers] Loaded."
|
||||
msgstr ""
|
||||
|
||||
#: ../molehills/init.lua
|
||||
msgid "Mole Hill"
|
||||
msgstr ""
|
||||
|
||||
#: ../molehills/init.lua
|
||||
msgid "Loaded..."
|
||||
msgstr ""
|
||||
|
||||
#: ../nature_classic/blossom.lua
|
||||
msgid "Apple blossoms"
|
||||
msgstr ""
|
||||
|
||||
#: ../nature_classic/init.lua
|
||||
msgid "[Nature Classic] loaded!"
|
||||
msgstr ""
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "Poison ivy (seedling)"
|
||||
msgstr ""
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "Poison ivy (sproutling)"
|
||||
msgstr ""
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "Poison ivy (climbing plant)"
|
||||
msgstr ""
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "[Poison Ivy] Loaded."
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twig"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Moss"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Moss with Fungus"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Block"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Slab"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Roof"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Roof Corner 1"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Roof Corner 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Root"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/crafts.lua ../vines/vines.lua
|
||||
msgid "Vines"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/functions.lua
|
||||
msgid "Matured"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/init.lua
|
||||
msgid "[Vines] Loaded!"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/nodes.lua
|
||||
msgid "Rope"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/shear.lua
|
||||
msgid "Shears"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/vines.lua
|
||||
msgid "Roots"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/vines.lua
|
||||
msgid "Jungle Vines"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/vines.lua
|
||||
msgid "Willow Vines"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 1"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 3"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 4"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Bamboo Tree"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree 2 (middle)"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree (top)"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree (middle)"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree (bottom)"
|
||||
msgstr ""
|
|
@ -1,489 +0,0 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-03 11:43+0200\n"
|
||||
"PO-Revision-Date: 2017-08-03 11:51+0200\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.8.12\n"
|
||||
"Last-Translator: mahmutelmas06@hotmail.com\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"Language: tr\n"
|
||||
|
||||
#: ../bushes/init.lua
|
||||
msgid "Young Tree 2 (bottom)"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes/init.lua
|
||||
msgid "Bush Branches @1"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes/init.lua
|
||||
msgid "Bush Leaves @1"
|
||||
msgstr ""
|
||||
|
||||
#: ../bushes_classic/cooking.lua
|
||||
msgid "Sugar"
|
||||
msgstr "Şeker"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Strawberry pies"
|
||||
msgstr "Çilekli pasta sepeti"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Strawberry pie"
|
||||
msgstr "Pişmiş çilekli pasta "
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Strawberry pie"
|
||||
msgstr "Çilekli çiğ pasta"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Strawberry pie"
|
||||
msgstr "Çilekli pasta dilimi"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Strawberry"
|
||||
msgstr "Çilek"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Strawberry Bush"
|
||||
msgstr "Çilek fidanı"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Blackberry pies"
|
||||
msgstr "Böğürtlenli pasta sepeti"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blackberry"
|
||||
msgstr "Böğürtlen"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blackberry Bush"
|
||||
msgstr "Böğürtlen fidanı"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Blackberry pie"
|
||||
msgstr "Pişmiş böğürtlenli pasta"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Blackberry pie"
|
||||
msgstr "Böğürtlenli çiğ pasta"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Blackberry pie"
|
||||
msgstr "Böğürtlenli pasta dilimi"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Blueberry pies"
|
||||
msgstr "Yaban mersini pastalı sepet"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blueberry"
|
||||
msgstr "Yaban mersini"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Blueberry Bush"
|
||||
msgstr "Yaban mersini fidanı"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Blueberry pie"
|
||||
msgstr "Pişmiş yaban mersinli pasta"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Blueberry pie"
|
||||
msgstr "Yaban mersinli çiğ pasta"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Blueberry pie"
|
||||
msgstr "Yaban mersinli pasta dilimi"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Raspberry pies"
|
||||
msgstr "Ahududulu pasta sepeti"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Raspberry pie"
|
||||
msgstr "Pişmiş ahududulu pasta"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raspberry"
|
||||
msgstr "Ahududu"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raspberry Bush"
|
||||
msgstr "Ahududu fidanı"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Raspberry pie"
|
||||
msgstr "Ahududulu çiğ pasta"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Raspberry pie"
|
||||
msgstr "Ahududulu pasta dilimi"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Gooseberry pies"
|
||||
msgstr "Bektaşi üzümlü pasta sepeti"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Gooseberry pie"
|
||||
msgstr "Pişmiş bektaşi üzümlü pasta"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Gooseberry"
|
||||
msgstr "Bektaşi üzümü"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Gooseberry Bush"
|
||||
msgstr "Bektaşi üzümü fidanı"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Gooseberry pie"
|
||||
msgstr "Bektaşi üzümlü çiğ pasta"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Gooseberry pie"
|
||||
msgstr "Bektaşi üzümlü pasta dilimi"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Basket with Mixed Berry pies"
|
||||
msgstr "Dutlu pasta sepeti"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Cooked Mixed Berry pie"
|
||||
msgstr "Pişmiş dutlu pasta"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
#, fuzzy
|
||||
msgid "Currently fruitless Bush"
|
||||
msgstr "Fidanı şu anda meyvesiz"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Mixed Berry"
|
||||
msgstr "Dut"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Raw Mixed Berry pie"
|
||||
msgstr "Dutlu çiğ pasta"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "Slice of Mixed Berry pie"
|
||||
msgstr "Dutlu pasta dilimi"
|
||||
|
||||
#: ../bushes_classic/init.lua
|
||||
msgid "[Bushes] Loaded."
|
||||
msgstr "[Bushes] yüklendi."
|
||||
|
||||
#: ../bushes_classic/nodes.lua
|
||||
msgid "Basket"
|
||||
msgstr "Sepet"
|
||||
|
||||
#: ../cavestuff/nodes.lua
|
||||
msgid "Pebble"
|
||||
msgstr ""
|
||||
|
||||
#: ../cavestuff/nodes.lua
|
||||
msgid "Desert Pebble"
|
||||
msgstr ""
|
||||
|
||||
#: ../cavestuff/nodes.lua
|
||||
msgid "Stalactite"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Sickle"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Cut Grass"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Hay"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/init.lua
|
||||
msgid "Short Grass"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/juncus.lua
|
||||
msgid "Juncus"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Slab"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Roof"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Roof Corner"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Wet Reed Roof Corner 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Slab"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Roof"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Roof Corner"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reed.lua
|
||||
msgid "Reed Roof Corner 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 1"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 3"
|
||||
msgstr ""
|
||||
|
||||
#: ../dryplants/reedmace.lua
|
||||
msgid "Reedmace, height: 3 & Spikes"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Fiddlehead"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Roasted Fiddlehead"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Fern Tuber"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/crafting.lua
|
||||
msgid "Roasted Fern Tuber"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/fern.lua
|
||||
msgid "Lady-fern (Athyrium)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua ../ferns/treefern.lua
|
||||
msgid "Tree Fern Crown (Dicksonia)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Tree Fern Leaves"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Tree Fern Leave End"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Fern Trunk"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/gianttreefern.lua
|
||||
msgid "Giant Tree Fern Sapling"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/horsetail.lua
|
||||
msgid "Young Horsetail (Equisetum)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/horsetail.lua
|
||||
msgid "Horsetail (Equisetum)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/treefern.lua
|
||||
msgid "Fern Trunk (Dicksonia)"
|
||||
msgstr ""
|
||||
|
||||
#: ../ferns/treefern.lua
|
||||
msgid "Tree Fern Sapling (Dicksonia)"
|
||||
msgstr ""
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "Waterlily"
|
||||
msgstr "Nilüfer"
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "Seaweed"
|
||||
msgstr "Deniz yosunu"
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
#, fuzzy
|
||||
msgid "Sunflower"
|
||||
msgstr "Ayçiçeği"
|
||||
|
||||
#: ../flowers_plus/init.lua
|
||||
msgid "[Flowers] Loaded."
|
||||
msgstr "[Flowers] yüklendi."
|
||||
|
||||
#: ../molehills/init.lua
|
||||
msgid "Mole Hill"
|
||||
msgstr ""
|
||||
|
||||
#: ../molehills/init.lua
|
||||
msgid "Loaded..."
|
||||
msgstr ""
|
||||
|
||||
#: ../nature_classic/blossom.lua
|
||||
msgid "Apple blossoms"
|
||||
msgstr ""
|
||||
|
||||
#: ../nature_classic/init.lua
|
||||
msgid "[Nature Classic] loaded!"
|
||||
msgstr ""
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "Poison ivy (seedling)"
|
||||
msgstr "Sarmaşık (Fidan)"
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "Poison ivy (sproutling)"
|
||||
msgstr "Sarmaşık (Filiz)"
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "Poison ivy (climbing plant)"
|
||||
msgstr "Sarmaşık (Dolanan)"
|
||||
|
||||
#: ../poisonivy/init.lua
|
||||
msgid "[Poison Ivy] Loaded."
|
||||
msgstr "[Poison Ivy] yüklendi."
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twig"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Moss"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Moss with Fungus"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Block"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Slab"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Roof"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Roof Corner 1"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Twigs Roof Corner 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../trunks/nodes.lua
|
||||
msgid "Root"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/crafts.lua ../vines/vines.lua
|
||||
msgid "Vines"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/functions.lua
|
||||
msgid "Matured"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/init.lua
|
||||
msgid "[Vines] Loaded!"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/nodes.lua
|
||||
msgid "Rope"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/shear.lua
|
||||
msgid "Shears"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/vines.lua
|
||||
msgid "Roots"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/vines.lua
|
||||
msgid "Jungle Vines"
|
||||
msgstr ""
|
||||
|
||||
#: ../vines/vines.lua
|
||||
msgid "Willow Vines"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 1"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 3"
|
||||
msgstr ""
|
||||
|
||||
#: ../woodsoils/nodes.lua
|
||||
msgid "Forest Soil 4"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Bamboo Tree"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree 2 (middle)"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree (top)"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree (middle)"
|
||||
msgstr ""
|
||||
|
||||
#: ../youngtrees/init.lua
|
||||
msgid "Young Tree (bottom)"
|
||||
msgstr ""
|
|
@ -1,56 +0,0 @@
|
|||
--[[
|
||||
Plants API
|
||||
--]]
|
||||
|
||||
|
||||
plants_api = {}
|
||||
|
||||
plants_api.registered_plants = {}
|
||||
|
||||
-- Localize math routines for performance
|
||||
local math_floor = math.floor
|
||||
local math_random = math.random
|
||||
|
||||
function plants_api.register_plant(params)
|
||||
local n = #plants_api.registered_plants + 1
|
||||
params.priority = math_floor(params.priority) + 1 / n
|
||||
plants_api.registered_plants[n] = params
|
||||
end
|
||||
|
||||
function plants_api.choose_generate_plant(conditions, pos, data, area, ivm)
|
||||
local rand = math_random() -- Random number to choose the plant
|
||||
|
||||
for _, plant in ipairs(plants_api.registered_plants) do -- for each registered plant
|
||||
local cover = plant.cover
|
||||
if plant.check(conditions, pos) then -- Place this plant, or do not place anything (see Cover parameter)
|
||||
if rand < cover then
|
||||
if rand < plant.density then
|
||||
local grow = plant.grow
|
||||
local nodes = plant.nodes
|
||||
|
||||
if grow then -- if a grow function is defined, then run it
|
||||
grow(nodes, pos, data, area, ivm, conditions)
|
||||
else
|
||||
if type(nodes) == "number" then -- 'nodes' is just a number
|
||||
data[ivm] = nodes
|
||||
else -- 'nodes' is an array
|
||||
local node = nodes[math_random(#nodes)]
|
||||
local n = nodes.n or 1
|
||||
local ystride = area.ystride
|
||||
|
||||
for h = 1, n do
|
||||
data[ivm] = node
|
||||
ivm = ivm + ystride
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
break
|
||||
else
|
||||
rand = (rand - cover) / (1 - cover)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -1 +0,0 @@
|
|||
name = plants_api
|
|
@ -1,15 +0,0 @@
|
|||
Minetest Game mod: boats
|
||||
========================
|
||||
See license.txt for license information.
|
||||
|
||||
Authors of source code
|
||||
----------------------
|
||||
Originally by PilzAdam (MIT)
|
||||
Various Minetest developers and contributors (MIT)
|
||||
|
||||
Authors of media (textures and model)
|
||||
-------------------------------------
|
||||
Textures: Zeg9 (CC BY-SA 3.0)
|
||||
Model: thetoon and Zeg9 (CC BY-SA 3.0),
|
||||
modified by PavelS(SokolovPavel) (CC BY-SA 3.0),
|
||||
modified by sofar (CC BY-SA 3.0)
|
|
@ -1,271 +0,0 @@
|
|||
--
|
||||
-- Helper functions
|
||||
--
|
||||
|
||||
local function is_water(pos)
|
||||
local nn = minetest.get_node(pos).name
|
||||
return minetest.get_item_group(nn, "water") ~= 0
|
||||
end
|
||||
|
||||
|
||||
local function get_sign(i)
|
||||
if i == 0 then
|
||||
return 0
|
||||
else
|
||||
return i / math.abs(i)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local function get_velocity(v, yaw, y)
|
||||
local x = -math.sin(yaw) * v
|
||||
local z = math.cos(yaw) * v
|
||||
return {x = x, y = y, z = z}
|
||||
end
|
||||
|
||||
|
||||
local function get_v(v)
|
||||
return math.sqrt(v.x ^ 2 + v.z ^ 2)
|
||||
end
|
||||
|
||||
--
|
||||
-- Boat entity
|
||||
--
|
||||
|
||||
local boat = {
|
||||
physical = true,
|
||||
-- Warning: Do not change the position of the collisionbox top surface,
|
||||
-- lowering it causes the boat to fall through the world if underwater
|
||||
collisionbox = {-0.5, -0.35, -0.5, 0.5, 0.3, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "boats_boat.obj",
|
||||
textures = {"default_wood.png"},
|
||||
|
||||
driver = nil,
|
||||
v = 0,
|
||||
last_v = 0,
|
||||
removed = false
|
||||
}
|
||||
|
||||
|
||||
function boat.on_rightclick(self, clicker)
|
||||
if not clicker or not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
local name = clicker:get_player_name()
|
||||
if self.driver and clicker == self.driver then
|
||||
self.driver = nil
|
||||
clicker:set_detach()
|
||||
player_api.player_attached[name] = false
|
||||
player_api.set_animation(clicker, "stand" , 30)
|
||||
local pos = clicker:getpos()
|
||||
pos = {x = pos.x, y = pos.y + 0.2, z = pos.z}
|
||||
minetest.after(0.1, function()
|
||||
clicker:setpos(pos)
|
||||
end)
|
||||
elseif not self.driver then
|
||||
local attach = clicker:get_attach()
|
||||
if attach and attach:get_luaentity() then
|
||||
local luaentity = attach:get_luaentity()
|
||||
if luaentity.driver then
|
||||
luaentity.driver = nil
|
||||
end
|
||||
clicker:set_detach()
|
||||
end
|
||||
self.driver = clicker
|
||||
clicker:set_attach(self.object, "",
|
||||
{x = 0.5, y = 1, z = -3}, {x = 0, y = 0, z = 0})
|
||||
player_api.player_attached[name] = true
|
||||
minetest.after(0.2, function()
|
||||
player_api.set_animation(clicker, "sit" , 30)
|
||||
end)
|
||||
clicker:set_look_horizontal(self.object:getyaw())
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function boat.on_activate(self, staticdata, dtime_s)
|
||||
self.object:set_armor_groups({immortal = 1})
|
||||
if staticdata then
|
||||
self.v = tonumber(staticdata)
|
||||
end
|
||||
self.last_v = self.v
|
||||
end
|
||||
|
||||
|
||||
function boat.get_staticdata(self)
|
||||
return tostring(self.v)
|
||||
end
|
||||
|
||||
|
||||
function boat.on_punch(self, puncher)
|
||||
if not puncher or not puncher:is_player() or self.removed then
|
||||
return
|
||||
end
|
||||
if self.driver and puncher == self.driver then
|
||||
self.driver = nil
|
||||
puncher:set_detach()
|
||||
player_api.player_attached[puncher:get_player_name()] = false
|
||||
end
|
||||
if not self.driver then
|
||||
self.removed = true
|
||||
local inv = puncher:get_inventory()
|
||||
if not (creative and creative.is_enabled_for
|
||||
and creative.is_enabled_for(puncher:get_player_name()))
|
||||
or not inv:contains_item("main", "boats:boat") then
|
||||
local leftover = inv:add_item("main", "boats:boat")
|
||||
-- if no room in inventory add a replacement boat to the world
|
||||
if not leftover:is_empty() then
|
||||
minetest.add_item(self.object:getpos(), leftover)
|
||||
end
|
||||
end
|
||||
-- delay remove to ensure player is detached
|
||||
minetest.after(0.1, function()
|
||||
self.object:remove()
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function boat.on_step(self, dtime)
|
||||
self.v = get_v(self.object:getvelocity()) * get_sign(self.v)
|
||||
if self.driver then
|
||||
local ctrl = self.driver:get_player_control()
|
||||
local yaw = self.object:getyaw()
|
||||
if ctrl.up then
|
||||
self.v = self.v + 0.1
|
||||
elseif ctrl.down then
|
||||
self.v = self.v - 0.1
|
||||
end
|
||||
if ctrl.left then
|
||||
if self.v < 0 then
|
||||
self.object:setyaw(yaw - (1 + dtime) * 0.03)
|
||||
else
|
||||
self.object:setyaw(yaw + (1 + dtime) * 0.03)
|
||||
end
|
||||
elseif ctrl.right then
|
||||
if self.v < 0 then
|
||||
self.object:setyaw(yaw + (1 + dtime) * 0.03)
|
||||
else
|
||||
self.object:setyaw(yaw - (1 + dtime) * 0.03)
|
||||
end
|
||||
end
|
||||
end
|
||||
local velo = self.object:getvelocity()
|
||||
if self.v == 0 and velo.x == 0 and velo.y == 0 and velo.z == 0 then
|
||||
self.object:setpos(self.object:getpos())
|
||||
return
|
||||
end
|
||||
local s = get_sign(self.v)
|
||||
self.v = self.v - 0.02 * s
|
||||
if s ~= get_sign(self.v) then
|
||||
self.object:setvelocity({x = 0, y = 0, z = 0})
|
||||
self.v = 0
|
||||
return
|
||||
end
|
||||
if math.abs(self.v) > 5 then
|
||||
self.v = 5 * get_sign(self.v)
|
||||
end
|
||||
|
||||
local p = self.object:getpos()
|
||||
p.y = p.y - 0.5
|
||||
local new_velo
|
||||
local new_acce = {x = 0, y = 0, z = 0}
|
||||
if not is_water(p) then
|
||||
local nodedef = minetest.registered_nodes[minetest.get_node(p).name]
|
||||
if (not nodedef) or nodedef.walkable then
|
||||
self.v = 0
|
||||
new_acce = {x = 0, y = 1, z = 0}
|
||||
else
|
||||
new_acce = {x = 0, y = -9.8, z = 0}
|
||||
end
|
||||
new_velo = get_velocity(self.v, self.object:getyaw(),
|
||||
self.object:getvelocity().y)
|
||||
self.object:setpos(self.object:getpos())
|
||||
else
|
||||
p.y = p.y + 1
|
||||
if is_water(p) then
|
||||
local y = self.object:getvelocity().y
|
||||
if y >= 5 then
|
||||
y = 5
|
||||
elseif y < 0 then
|
||||
new_acce = {x = 0, y = 20, z = 0}
|
||||
else
|
||||
new_acce = {x = 0, y = 5, z = 0}
|
||||
end
|
||||
new_velo = get_velocity(self.v, self.object:getyaw(), y)
|
||||
self.object:setpos(self.object:getpos())
|
||||
else
|
||||
new_acce = {x = 0, y = 0, z = 0}
|
||||
if math.abs(self.object:getvelocity().y) < 1 then
|
||||
local pos = self.object:getpos()
|
||||
pos.y = math.floor(pos.y) + 0.5
|
||||
self.object:setpos(pos)
|
||||
new_velo = get_velocity(self.v, self.object:getyaw(), 0)
|
||||
else
|
||||
new_velo = get_velocity(self.v, self.object:getyaw(),
|
||||
self.object:getvelocity().y)
|
||||
self.object:setpos(self.object:getpos())
|
||||
end
|
||||
end
|
||||
end
|
||||
self.object:setvelocity(new_velo)
|
||||
self.object:setacceleration(new_acce)
|
||||
end
|
||||
|
||||
|
||||
minetest.register_entity("boats:boat", boat)
|
||||
|
||||
|
||||
minetest.register_craftitem("boats:boat", {
|
||||
description = "Boat",
|
||||
inventory_image = "boats_inventory.png",
|
||||
wield_image = "boats_wield.png",
|
||||
wield_scale = {x = 2, y = 2, z = 1},
|
||||
liquids_pointable = true,
|
||||
groups = {flammable = 2},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local under = pointed_thing.under
|
||||
local node = minetest.get_node(under)
|
||||
local udef = minetest.registered_nodes[node.name]
|
||||
if udef and udef.on_rightclick and
|
||||
not (placer and placer:get_player_control().sneak) then
|
||||
return udef.on_rightclick(under, node, placer, itemstack,
|
||||
pointed_thing) or itemstack
|
||||
end
|
||||
|
||||
if pointed_thing.type ~= "node" then
|
||||
return itemstack
|
||||
end
|
||||
if not is_water(pointed_thing.under) then
|
||||
return itemstack
|
||||
end
|
||||
pointed_thing.under.y = pointed_thing.under.y + 0.5
|
||||
boat = minetest.add_entity(pointed_thing.under, "boats:boat")
|
||||
if boat then
|
||||
boat:setyaw(placer:get_look_horizontal())
|
||||
if not (creative and creative.is_enabled_for
|
||||
and creative.is_enabled_for(placer:get_player_name())) then
|
||||
itemstack:take_item()
|
||||
end
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "boats:boat",
|
||||
recipe = {
|
||||
{"", "", "" },
|
||||
{"group:wood", "", "group:wood"},
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "boats:boat",
|
||||
burntime = 20,
|
||||
})
|
|
@ -1,403 +0,0 @@
|
|||
local cart_entity = {
|
||||
physical = false, -- otherwise going uphill breaks
|
||||
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "carts_cart.b3d",
|
||||
visual_size = {x=1, y=1},
|
||||
textures = {"carts_cart.png"},
|
||||
|
||||
driver = nil,
|
||||
punched = false, -- used to re-send velocity and position
|
||||
velocity = {x=0, y=0, z=0}, -- only used on punch
|
||||
old_dir = {x=1, y=0, z=0}, -- random value to start the cart on punch
|
||||
old_pos = nil,
|
||||
old_switch = 0,
|
||||
railtype = nil,
|
||||
attached_items = {}
|
||||
}
|
||||
|
||||
function cart_entity:on_rightclick(clicker)
|
||||
if not clicker or not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
local player_name = clicker:get_player_name()
|
||||
if self.driver and player_name == self.driver then
|
||||
self.driver = nil
|
||||
carts:manage_attachment(clicker, nil)
|
||||
elseif not self.driver then
|
||||
self.driver = player_name
|
||||
carts:manage_attachment(clicker, self.object)
|
||||
end
|
||||
end
|
||||
|
||||
function cart_entity:on_activate(staticdata, dtime_s)
|
||||
self.object:set_armor_groups({immortal=1})
|
||||
if string.sub(staticdata, 1, string.len("return")) ~= "return" then
|
||||
return
|
||||
end
|
||||
local data = minetest.deserialize(staticdata)
|
||||
if not data or type(data) ~= "table" then
|
||||
return
|
||||
end
|
||||
self.railtype = data.railtype
|
||||
if data.old_dir then
|
||||
self.old_dir = data.old_dir
|
||||
end
|
||||
if data.old_vel then
|
||||
self.old_vel = data.old_vel
|
||||
end
|
||||
end
|
||||
|
||||
function cart_entity:get_staticdata()
|
||||
return minetest.serialize({
|
||||
railtype = self.railtype,
|
||||
old_dir = self.old_dir,
|
||||
old_vel = self.old_vel
|
||||
})
|
||||
end
|
||||
|
||||
function cart_entity:on_punch(puncher, time_from_last_punch, tool_capabilities, direction)
|
||||
local pos = self.object:getpos()
|
||||
if not self.railtype then
|
||||
local node = minetest.get_node(pos).name
|
||||
self.railtype = minetest.get_item_group(node, "connect_to_raillike")
|
||||
end
|
||||
-- Punched by non-player
|
||||
if not puncher or not puncher:is_player() then
|
||||
local cart_dir = carts:get_rail_direction(pos, self.old_dir, nil, nil, self.railtype)
|
||||
if vector.equals(cart_dir, {x=0, y=0, z=0}) then
|
||||
return
|
||||
end
|
||||
self.velocity = vector.multiply(cart_dir, 2)
|
||||
self.punched = true
|
||||
return
|
||||
end
|
||||
-- Player digs cart by sneak-punch
|
||||
if puncher:get_player_control().sneak then
|
||||
if self.sound_handle then
|
||||
minetest.sound_stop(self.sound_handle)
|
||||
end
|
||||
-- Detach driver and items
|
||||
if self.driver then
|
||||
if self.old_pos then
|
||||
self.object:setpos(self.old_pos)
|
||||
end
|
||||
local player = minetest.get_player_by_name(self.driver)
|
||||
carts:manage_attachment(player, nil)
|
||||
end
|
||||
for _,obj_ in ipairs(self.attached_items) do
|
||||
if obj_ then
|
||||
obj_:set_detach()
|
||||
end
|
||||
end
|
||||
-- Pick up cart
|
||||
local inv = puncher:get_inventory()
|
||||
if not (creative and creative.is_enabled_for
|
||||
and creative.is_enabled_for(puncher:get_player_name()))
|
||||
or not inv:contains_item("main", "carts:cart") then
|
||||
local leftover = inv:add_item("main", "carts:cart")
|
||||
-- If no room in inventory add a replacement cart to the world
|
||||
if not leftover:is_empty() then
|
||||
minetest.add_item(self.object:getpos(), leftover)
|
||||
end
|
||||
end
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
-- Player punches cart to alter velocity
|
||||
local vel = self.object:getvelocity()
|
||||
if puncher:get_player_name() == self.driver then
|
||||
if math.abs(vel.x + vel.z) > carts.punch_speed_max then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
local punch_dir = carts:velocity_to_dir(puncher:get_look_dir())
|
||||
punch_dir.y = 0
|
||||
local cart_dir = carts:get_rail_direction(pos, punch_dir, nil, nil, self.railtype)
|
||||
if vector.equals(cart_dir, {x=0, y=0, z=0}) then
|
||||
return
|
||||
end
|
||||
|
||||
local punch_interval = 1
|
||||
if tool_capabilities and tool_capabilities.full_punch_interval then
|
||||
punch_interval = tool_capabilities.full_punch_interval
|
||||
end
|
||||
time_from_last_punch = math.min(time_from_last_punch or punch_interval, punch_interval)
|
||||
local f = 2 * (time_from_last_punch / punch_interval)
|
||||
|
||||
self.velocity = vector.multiply(cart_dir, f)
|
||||
self.old_dir = cart_dir
|
||||
self.punched = true
|
||||
end
|
||||
|
||||
local function rail_on_step_event(handler, obj, dtime)
|
||||
if handler then
|
||||
handler(obj, dtime)
|
||||
end
|
||||
end
|
||||
|
||||
-- sound refresh interval = 1.0sec
|
||||
local function rail_sound(self, dtime)
|
||||
if not self.sound_ttl then
|
||||
self.sound_ttl = 1.0
|
||||
return
|
||||
elseif self.sound_ttl > 0 then
|
||||
self.sound_ttl = self.sound_ttl - dtime
|
||||
return
|
||||
end
|
||||
self.sound_ttl = 1.0
|
||||
if self.sound_handle then
|
||||
local handle = self.sound_handle
|
||||
self.sound_handle = nil
|
||||
minetest.after(0.2, minetest.sound_stop, handle)
|
||||
end
|
||||
local vel = self.object:getvelocity()
|
||||
local speed = vector.length(vel)
|
||||
if speed > 0 then
|
||||
self.sound_handle = minetest.sound_play(
|
||||
"carts_cart_moving", {
|
||||
object = self.object,
|
||||
gain = (speed / carts.speed_max) / 2,
|
||||
loop = true,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
local function get_railparams(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
return carts.railparams[node.name] or {}
|
||||
end
|
||||
|
||||
local function rail_on_step(self, dtime)
|
||||
local vel = self.object:getvelocity()
|
||||
if self.punched then
|
||||
vel = vector.add(vel, self.velocity)
|
||||
self.object:setvelocity(vel)
|
||||
self.old_dir.y = 0
|
||||
elseif vector.equals(vel, {x=0, y=0, z=0}) then
|
||||
return
|
||||
end
|
||||
|
||||
local pos = self.object:getpos()
|
||||
local update = {}
|
||||
|
||||
-- stop cart if velocity vector flips
|
||||
if self.old_vel and self.old_vel.y == 0 and
|
||||
(self.old_vel.x * vel.x < 0 or self.old_vel.z * vel.z < 0) then
|
||||
self.old_vel = {x = 0, y = 0, z = 0}
|
||||
self.old_pos = pos
|
||||
self.object:setvelocity(vector.new())
|
||||
self.object:setacceleration(vector.new())
|
||||
rail_on_step_event(get_railparams(pos).on_step, self, dtime)
|
||||
return
|
||||
end
|
||||
self.old_vel = vector.new(vel)
|
||||
|
||||
if self.old_pos and not self.punched then
|
||||
local flo_pos = vector.round(pos)
|
||||
local flo_old = vector.round(self.old_pos)
|
||||
if vector.equals(flo_pos, flo_old) then
|
||||
-- Do not check one node multiple times
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
local ctrl, player
|
||||
|
||||
-- Get player controls
|
||||
if self.driver then
|
||||
player = minetest.get_player_by_name(self.driver)
|
||||
if player then
|
||||
ctrl = player:get_player_control()
|
||||
end
|
||||
end
|
||||
|
||||
if self.old_pos then
|
||||
-- Detection for "skipping" nodes
|
||||
local found_path = carts:pathfinder(
|
||||
pos, self.old_pos, self.old_dir, ctrl, self.old_switch, self.railtype
|
||||
)
|
||||
|
||||
if not found_path then
|
||||
-- No rail found: reset back to the expected position
|
||||
pos = vector.new(self.old_pos)
|
||||
update.pos = true
|
||||
end
|
||||
end
|
||||
|
||||
local cart_dir = carts:velocity_to_dir(vel)
|
||||
local railparams
|
||||
|
||||
-- dir: New moving direction of the cart
|
||||
-- switch_keys: Currently pressed L/R key, used to ignore the key on the next rail node
|
||||
local dir, switch_keys = carts:get_rail_direction(
|
||||
pos, cart_dir, ctrl, self.old_switch, self.railtype
|
||||
)
|
||||
|
||||
local new_acc = {x=0, y=0, z=0}
|
||||
if vector.equals(dir, {x=0, y=0, z=0}) then
|
||||
vel = {x = 0, y = 0, z = 0}
|
||||
pos = vector.round(pos)
|
||||
update.pos = true
|
||||
update.vel = true
|
||||
else
|
||||
-- Direction change detected
|
||||
if not vector.equals(dir, self.old_dir) then
|
||||
vel = vector.multiply(dir, math.abs(vel.x + vel.z))
|
||||
update.vel = true
|
||||
if dir.y ~= self.old_dir.y then
|
||||
pos = vector.round(pos)
|
||||
update.pos = true
|
||||
end
|
||||
end
|
||||
-- Center on the rail
|
||||
if dir.z ~= 0 and math.floor(pos.x + 0.5) ~= pos.x then
|
||||
pos.x = math.floor(pos.x + 0.5)
|
||||
update.pos = true
|
||||
end
|
||||
if dir.x ~= 0 and math.floor(pos.z + 0.5) ~= pos.z then
|
||||
pos.z = math.floor(pos.z + 0.5)
|
||||
update.pos = true
|
||||
end
|
||||
|
||||
-- Slow down or speed up..
|
||||
local acc = dir.y * -4.0
|
||||
|
||||
-- Get rail for corrected position
|
||||
railparams = get_railparams(pos)
|
||||
|
||||
-- no need to check for railparams == nil since we always make it exist.
|
||||
local speed_mod = railparams.acceleration
|
||||
if speed_mod and speed_mod ~= 0 then
|
||||
-- Try to make it similar to the original carts mod
|
||||
acc = acc + speed_mod
|
||||
else
|
||||
-- Handbrake or coast
|
||||
if ctrl and ctrl.down then
|
||||
acc = acc - 3
|
||||
else
|
||||
acc = acc - 0.4
|
||||
end
|
||||
end
|
||||
|
||||
new_acc = vector.multiply(dir, acc)
|
||||
end
|
||||
|
||||
-- Limits
|
||||
local max_vel = carts.speed_max
|
||||
for _, v in pairs({"x","y","z"}) do
|
||||
if math.abs(vel[v]) > max_vel then
|
||||
vel[v] = carts:get_sign(vel[v]) * max_vel
|
||||
new_acc[v] = 0
|
||||
update.vel = true
|
||||
end
|
||||
end
|
||||
|
||||
self.object:setacceleration(new_acc)
|
||||
self.old_pos = vector.new(pos)
|
||||
if not vector.equals(dir, {x=0, y=0, z=0}) then
|
||||
self.old_dir = vector.new(dir)
|
||||
end
|
||||
self.old_switch = switch_keys
|
||||
|
||||
if self.punched then
|
||||
-- Collect dropped items
|
||||
for _, obj_ in pairs(minetest.get_objects_inside_radius(pos, 1)) do
|
||||
if not obj_:is_player() and
|
||||
obj_:get_luaentity() and
|
||||
not obj_:get_luaentity().physical_state and
|
||||
obj_:get_luaentity().name == "__builtin:item" then
|
||||
|
||||
obj_:set_attach(self.object, "", {x=0, y=0, z=0}, {x=0, y=0, z=0})
|
||||
self.attached_items[#self.attached_items + 1] = obj_
|
||||
end
|
||||
end
|
||||
self.punched = false
|
||||
update.vel = true
|
||||
end
|
||||
|
||||
railparams = railparams or get_railparams(pos)
|
||||
|
||||
if not (update.vel or update.pos) then
|
||||
rail_on_step_event(railparams.on_step, self, dtime)
|
||||
return
|
||||
end
|
||||
|
||||
local yaw = 0
|
||||
if self.old_dir.x < 0 then
|
||||
yaw = 0.5
|
||||
elseif self.old_dir.x > 0 then
|
||||
yaw = 1.5
|
||||
elseif self.old_dir.z < 0 then
|
||||
yaw = 1
|
||||
end
|
||||
self.object:setyaw(yaw * math.pi)
|
||||
|
||||
local anim = {x=0, y=0}
|
||||
if dir.y == -1 then
|
||||
anim = {x=1, y=1}
|
||||
elseif dir.y == 1 then
|
||||
anim = {x=2, y=2}
|
||||
end
|
||||
self.object:set_animation(anim, 1, 0)
|
||||
|
||||
self.object:setvelocity(vel)
|
||||
if update.pos then
|
||||
self.object:setpos(pos)
|
||||
end
|
||||
|
||||
-- call event handler
|
||||
rail_on_step_event(railparams.on_step, self, dtime)
|
||||
end
|
||||
|
||||
function cart_entity:on_step(dtime)
|
||||
rail_on_step(self, dtime)
|
||||
rail_sound(self, dtime)
|
||||
end
|
||||
|
||||
minetest.register_entity("carts:cart", cart_entity)
|
||||
|
||||
minetest.register_craftitem("carts:cart", {
|
||||
description = "Cart (Sneak+Click to pick up)",
|
||||
inventory_image = minetest.inventorycube("carts_cart_top.png", "carts_cart_side.png", "carts_cart_side.png"),
|
||||
wield_image = "carts_cart_side.png",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local under = pointed_thing.under
|
||||
local node = minetest.get_node(under)
|
||||
local udef = minetest.registered_nodes[node.name]
|
||||
if udef and udef.on_rightclick and
|
||||
not (placer and placer:get_player_control().sneak) then
|
||||
return udef.on_rightclick(under, node, placer, itemstack,
|
||||
pointed_thing) or itemstack
|
||||
end
|
||||
|
||||
if not pointed_thing.type == "node" then
|
||||
return
|
||||
end
|
||||
if carts:is_rail(pointed_thing.under) then
|
||||
minetest.add_entity(pointed_thing.under, "carts:cart")
|
||||
elseif carts:is_rail(pointed_thing.above) then
|
||||
minetest.add_entity(pointed_thing.above, "carts:cart")
|
||||
else
|
||||
return
|
||||
end
|
||||
|
||||
minetest.sound_play({name = "default_place_node_metal", gain = 0.5},
|
||||
{pos = pointed_thing.above})
|
||||
|
||||
if not (creative and creative.is_enabled_for
|
||||
and creative.is_enabled_for(placer:get_player_name())) then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "carts:cart",
|
||||
recipe = {
|
||||
{"default:steel_ingot", "", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
|
||||
},
|
||||
})
|
|
@ -1,221 +0,0 @@
|
|||
function carts:get_sign(z)
|
||||
if z == 0 then
|
||||
return 0
|
||||
else
|
||||
return z / math.abs(z)
|
||||
end
|
||||
end
|
||||
|
||||
function carts:manage_attachment(player, obj)
|
||||
if not player then
|
||||
return
|
||||
end
|
||||
local status = obj ~= nil
|
||||
local player_name = player:get_player_name()
|
||||
if player_api.player_attached[player_name] == status then
|
||||
return
|
||||
end
|
||||
player_api.player_attached[player_name] = status
|
||||
|
||||
if status then
|
||||
player:set_attach(obj, "", {x=0, y=-4.5, z=0}, {x=0, y=0, z=0})
|
||||
player:set_eye_offset({x=0, y=-4, z=0},{x=0, y=-4, z=0})
|
||||
else
|
||||
player:set_detach()
|
||||
player:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0})
|
||||
end
|
||||
end
|
||||
|
||||
function carts:velocity_to_dir(v)
|
||||
if math.abs(v.x) > math.abs(v.z) then
|
||||
return {x=carts:get_sign(v.x), y=carts:get_sign(v.y), z=0}
|
||||
else
|
||||
return {x=0, y=carts:get_sign(v.y), z=carts:get_sign(v.z)}
|
||||
end
|
||||
end
|
||||
|
||||
function carts:is_rail(pos, railtype)
|
||||
local node = minetest.get_node(pos).name
|
||||
if node == "ignore" then
|
||||
local vm = minetest.get_voxel_manip()
|
||||
local emin, emax = vm:read_from_map(pos, pos)
|
||||
local area = VoxelArea:new{
|
||||
MinEdge = emin,
|
||||
MaxEdge = emax,
|
||||
}
|
||||
local data = vm:get_data()
|
||||
local vi = area:indexp(pos)
|
||||
node = minetest.get_name_from_content_id(data[vi])
|
||||
end
|
||||
if minetest.get_item_group(node, "rail") == 0 then
|
||||
return false
|
||||
end
|
||||
if not railtype then
|
||||
return true
|
||||
end
|
||||
return minetest.get_item_group(node, "connect_to_raillike") == railtype
|
||||
end
|
||||
|
||||
function carts:check_front_up_down(pos, dir_, check_up, railtype)
|
||||
local dir = vector.new(dir_)
|
||||
local cur
|
||||
|
||||
-- Front
|
||||
dir.y = 0
|
||||
cur = vector.add(pos, dir)
|
||||
if carts:is_rail(cur, railtype) then
|
||||
return dir
|
||||
end
|
||||
-- Up
|
||||
if check_up then
|
||||
dir.y = 1
|
||||
cur = vector.add(pos, dir)
|
||||
if carts:is_rail(cur, railtype) then
|
||||
return dir
|
||||
end
|
||||
end
|
||||
-- Down
|
||||
dir.y = -1
|
||||
cur = vector.add(pos, dir)
|
||||
if carts:is_rail(cur, railtype) then
|
||||
return dir
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
function carts:get_rail_direction(pos_, dir, ctrl, old_switch, railtype)
|
||||
local pos = vector.round(pos_)
|
||||
local cur
|
||||
local left_check, right_check = true, true
|
||||
|
||||
-- Check left and right
|
||||
local left = {x=0, y=0, z=0}
|
||||
local right = {x=0, y=0, z=0}
|
||||
if dir.z ~= 0 and dir.x == 0 then
|
||||
left.x = -dir.z
|
||||
right.x = dir.z
|
||||
elseif dir.x ~= 0 and dir.z == 0 then
|
||||
left.z = dir.x
|
||||
right.z = -dir.x
|
||||
end
|
||||
|
||||
if ctrl then
|
||||
if old_switch == 1 then
|
||||
left_check = false
|
||||
elseif old_switch == 2 then
|
||||
right_check = false
|
||||
end
|
||||
if ctrl.left and left_check then
|
||||
cur = carts:check_front_up_down(pos, left, false, railtype)
|
||||
if cur then
|
||||
return cur, 1
|
||||
end
|
||||
left_check = false
|
||||
end
|
||||
if ctrl.right and right_check then
|
||||
cur = carts:check_front_up_down(pos, right, false, railtype)
|
||||
if cur then
|
||||
return cur, 2
|
||||
end
|
||||
right_check = true
|
||||
end
|
||||
end
|
||||
|
||||
-- Normal
|
||||
cur = carts:check_front_up_down(pos, dir, true, railtype)
|
||||
if cur then
|
||||
return cur
|
||||
end
|
||||
|
||||
-- Left, if not already checked
|
||||
if left_check then
|
||||
cur = carts:check_front_up_down(pos, left, false, railtype)
|
||||
if cur then
|
||||
return cur
|
||||
end
|
||||
end
|
||||
|
||||
-- Right, if not already checked
|
||||
if right_check then
|
||||
cur = carts:check_front_up_down(pos, right, false, railtype)
|
||||
if cur then
|
||||
return cur
|
||||
end
|
||||
end
|
||||
|
||||
-- Backwards
|
||||
if not old_switch then
|
||||
cur = carts:check_front_up_down(pos, {
|
||||
x = -dir.x,
|
||||
y = dir.y,
|
||||
z = -dir.z
|
||||
}, true, railtype)
|
||||
if cur then
|
||||
return cur
|
||||
end
|
||||
end
|
||||
|
||||
return {x=0, y=0, z=0}
|
||||
end
|
||||
|
||||
function carts:pathfinder(pos_, old_pos, old_dir, ctrl, pf_switch, railtype)
|
||||
local pos = vector.round(pos_)
|
||||
local pf_pos = vector.round(old_pos)
|
||||
local pf_dir = vector.new(old_dir)
|
||||
|
||||
for i = 1, 3 do
|
||||
if vector.equals(pf_pos, pos) then
|
||||
-- Success! Cart moved on correctly
|
||||
return true
|
||||
end
|
||||
|
||||
pf_dir, pf_switch = carts:get_rail_direction(pf_pos, pf_dir, ctrl, pf_switch, railtype)
|
||||
if vector.equals(pf_dir, {x=0, y=0, z=0}) then
|
||||
-- No way forwards
|
||||
return false
|
||||
end
|
||||
|
||||
pf_pos = vector.add(pf_pos, pf_dir)
|
||||
end
|
||||
-- Cart not found
|
||||
return false
|
||||
end
|
||||
|
||||
function carts:register_rail(name, def_overwrite, railparams)
|
||||
local def = {
|
||||
drawtype = "raillike",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sounds = default.node_sound_metal_defaults()
|
||||
}
|
||||
for k, v in pairs(def_overwrite) do
|
||||
def[k] = v
|
||||
end
|
||||
if not def.inventory_image then
|
||||
def.wield_image = def.tiles[1]
|
||||
def.inventory_image = def.tiles[1]
|
||||
end
|
||||
|
||||
if railparams then
|
||||
carts.railparams[name] = table.copy(railparams)
|
||||
end
|
||||
|
||||
minetest.register_node(name, def)
|
||||
end
|
||||
|
||||
function carts:get_rail_groups(additional_groups)
|
||||
-- Get the default rail groups and add more when a table is given
|
||||
local groups = {dig_immediate = 2, attached_node = 1, rail = 1, connect_to_raillike = 1}
|
||||
if type(additional_groups) == "table" then
|
||||
for k, v in pairs(additional_groups) do
|
||||
groups[k] = v
|
||||
end
|
||||
end
|
||||
return groups
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
|
||||
carts = {}
|
||||
carts.modpath = minetest.get_modpath("carts")
|
||||
carts.railparams = {}
|
||||
|
||||
-- Maximal speed of the cart in m/s (min = -1)
|
||||
carts.speed_max = 7
|
||||
-- Set to -1 to disable punching the cart from inside (min = -1)
|
||||
carts.punch_speed_max = 5
|
||||
|
||||
|
||||
dofile(carts.modpath.."/functions.lua")
|
||||
dofile(carts.modpath.."/rails.lua")
|
||||
dofile(carts.modpath.."/cart_entity.lua")
|
|
@ -1,57 +0,0 @@
|
|||
carts:register_rail("carts:rail", {
|
||||
description = "Rail",
|
||||
tiles = {
|
||||
"carts_rail_straight.png", "carts_rail_curved.png",
|
||||
"carts_rail_t_junction.png", "carts_rail_crossing.png"
|
||||
},
|
||||
inventory_image = "carts_rail_straight.png",
|
||||
wield_image = "carts_rail_straight.png",
|
||||
groups = carts:get_rail_groups(),
|
||||
}, {})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "carts:rail 18",
|
||||
recipe = {
|
||||
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
carts:register_rail("carts:powerrail", {
|
||||
description = "Powered rail",
|
||||
tiles = {
|
||||
"carts_rail_straight_pwr.png", "carts_rail_curved_pwr.png",
|
||||
"carts_rail_t_junction_pwr.png", "carts_rail_crossing_pwr.png"
|
||||
},
|
||||
groups = carts:get_rail_groups(),
|
||||
}, {acceleration = 5})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "carts:powerrail 18",
|
||||
recipe = {
|
||||
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "default:mese_crystal", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
carts:register_rail("carts:brakerail", {
|
||||
description = "Brake rail",
|
||||
tiles = {
|
||||
"carts_rail_straight_brk.png", "carts_rail_curved_brk.png",
|
||||
"carts_rail_t_junction_brk.png", "carts_rail_crossing_brk.png"
|
||||
},
|
||||
groups = carts:get_rail_groups(),
|
||||
}, {acceleration = -3})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "carts:brakerail 18",
|
||||
recipe = {
|
||||
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "default:coal_lump", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
||||
}
|
||||
})
|
|
@ -1,76 +0,0 @@
|
|||
--[[
|
||||
Item Entity
|
||||
--]]
|
||||
|
||||
local builtin_item = minetest.registered_entities["__builtin:item"]
|
||||
|
||||
local item = {
|
||||
set_item = function(self, itemstring)
|
||||
builtin_item.set_item(self, itemstring)
|
||||
|
||||
local stack = ItemStack(itemstring)
|
||||
local itemdef = minetest.registered_items[stack:get_name()]
|
||||
if itemdef and itemdef.groups.flammable ~= 0 then
|
||||
self.flammable = itemdef.groups.flammable
|
||||
end
|
||||
end,
|
||||
|
||||
burn_up = function(self)
|
||||
-- disappear in a smoke puff
|
||||
self.object:remove()
|
||||
local p = self.object:getpos()
|
||||
minetest.sound_play("item_entity_item_smoke", {
|
||||
pos = p,
|
||||
max_hear_distance = 8,
|
||||
})
|
||||
minetest.add_particlespawner({
|
||||
amount = 3,
|
||||
time = 0.1,
|
||||
minpos = {x = p.x - 0.1, y = p.y + 0.1, z = p.z - 0.1 },
|
||||
maxpos = {x = p.x + 0.1, y = p.y + 0.2, z = p.z + 0.1 },
|
||||
minvel = {x = 0, y = 2.5, z = 0},
|
||||
maxvel = {x = 0, y = 2.5, z = 0},
|
||||
minacc = {x = -0.15, y = -0.02, z = -0.15},
|
||||
maxacc = {x = 0.15, y = -0.01, z = 0.15},
|
||||
minexptime = 4,
|
||||
maxexptime = 6,
|
||||
minsize = 5,
|
||||
maxsize = 5,
|
||||
collisiondetection = true,
|
||||
texture = "item_entity_item_smoke.png"
|
||||
})
|
||||
end,
|
||||
|
||||
on_step = function(self, dtime)
|
||||
builtin_item.on_step(self, dtime)
|
||||
|
||||
if self.flammable then
|
||||
-- flammable, check for igniters
|
||||
self.ignite_timer = (self.ignite_timer or 0) + dtime
|
||||
if self.ignite_timer > 10 then
|
||||
self.ignite_timer = 0
|
||||
|
||||
local node = minetest.get_node_or_nil(self.object:getpos())
|
||||
if not node then
|
||||
return
|
||||
end
|
||||
|
||||
-- Immediately burn up flammable items in lava
|
||||
if minetest.get_item_group(node.name, "lava") > 0 then
|
||||
self:burn_up()
|
||||
else
|
||||
-- otherwise there'll be a chance based on its igniter value
|
||||
local burn_chance = self.flammable
|
||||
* minetest.get_item_group(node.name, "igniter")
|
||||
if burn_chance > 0 and math.random(0, burn_chance) ~= 0 then
|
||||
self:burn_up()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
-- set defined item as new __builtin:item, with the old one as fallback table
|
||||
setmetatable(item, builtin_item)
|
||||
minetest.register_entity(":__builtin:item", item)
|
|
@ -1 +0,0 @@
|
|||
name = item_entity
|
|
@ -1,462 +0,0 @@
|
|||
|
||||
MOB API (13th July 2017)
|
||||
|
||||
The mob api is a function that can be called on by other mods to add new animals or monsters into minetest.
|
||||
|
||||
minetest.conf settings*
|
||||
|
||||
'enable_damage' if true monsters will attack players (default is true)
|
||||
'only_peaceful_mobs' if true only animals will spawn in game (default is false)
|
||||
'mobs_disable_blood' if false blood effects appear when mob is hit (default is false)
|
||||
'mobs_spawn_protected' if set to false then mobs will not spawn in protected areas (default is true)
|
||||
'remove_far_mobs' if true then mobs that are outside players visual range will be removed (default is false)
|
||||
'mobname' can change specific mob chance rate (0 to disable) and spawn number e.g. mobs_animal:cow = 1000,5
|
||||
'mob_difficulty' sets difficulty level (health and hit damage multiplied by this number), defaults to 1.0.
|
||||
'mob_show_health' if false then punching mob will not show health status (true by default)
|
||||
|
||||
mobs:register_mob(name, definition)
|
||||
|
||||
This functions registers a new mob as a Minetest entity.
|
||||
|
||||
'name' is the name of the mob (e.g. "mobs:dirt_monster")
|
||||
definition is a table with the following fields
|
||||
'type' the type of the mob ("monster", "animal" or "npc") where monsters attack players and npc's, animals and npc's tend to wander around and can attack when hit 1st.
|
||||
'passive' will mob defend itself, set to false to attack
|
||||
'docile_by_day' when true, mob will not attack during daylight hours unless provoked
|
||||
'attacks_monsters' usually for npc's to attack monsters in area
|
||||
'group_attack' true to defend same kind of mobs from attack in area
|
||||
'owner_loyal' when true owned mobs will attack any monsters you punch
|
||||
'attack_animals' true for monster to attack animals as well as player and npc's
|
||||
'specific_attack' has a table of entity names that monsters can attack {"player", "mobs_animal:chicken"}
|
||||
'hp_min' minimum health
|
||||
'hp_max' maximum health (mob health is randomly selected between both)
|
||||
'physical' same is in minetest.register_entity()
|
||||
'collisionbox' same is in minetest.register_entity()
|
||||
'visual' same is in minetest.register_entity()
|
||||
'visual_size' same is in minetest.register_entity()
|
||||
'textures' same is in minetest.register_entity()
|
||||
although you can add multiple lines for random textures {{"texture1.png"},{"texture2.png"}},
|
||||
'gotten_texture' alt. texture for when self.gotten value is set to true (used for shearing sheep)
|
||||
'child_texture' texture of mod for when self.child is set to true
|
||||
'mesh' same is in minetest.register_entity()
|
||||
'gotten_mesh' alternative mesh for when self.gotten is true (used for sheep)
|
||||
'makes_footstep_sound' same is in minetest.register_entity()
|
||||
'follow' item when held will cause mob to follow player, can be single string "default:apple" or table {"default:apple", "default:diamond"}. These are also items that are used to feed and tame mob.
|
||||
'view_range' the range in which the mob will follow or attack player
|
||||
'walk_chance' chance of mob walking around (0 to 100), set to 0 for jumping mob only
|
||||
'walk_velocity' the velocity when the monster is walking around
|
||||
'run_velocity' the velocity when the monster is attacking a player
|
||||
'runaway' when true mob will turn and run away when punched
|
||||
'stepheight' minimum node height mob can walk onto without jumping (default: 0.6)
|
||||
'jump' can mob jump, true or false
|
||||
'jump_height' height mob can jump, default is 6 (0 to disable jump)
|
||||
'fly' can mob fly, true or false (used for swimming mobs also)
|
||||
'fly_in' node name that mob flys inside, e.g "air", "default:water_source" for fish
|
||||
'damage' the damage mobs inflict per melee attack.
|
||||
'recovery_time' how much time from when mob is hit to recovery (default: 0.5 seconds)
|
||||
'knock_back' strength of knock-back when mob hit (default: 3)
|
||||
'immune_to' table holding special tool/item names and damage the incur e.g.
|
||||
{"default:sword_wood", 0}, {"default:gold_lump", -10} immune to sword, gold lump heals
|
||||
'blood_amount' number of droplets that appear when hit
|
||||
'blood_texture' texture of blood droplets (default: "mobs_blood.png")
|
||||
'drops' is list of tables with the following fields:
|
||||
'name' itemname e.g. default:stone
|
||||
'chance' the inverted chance (same as in abm) to get the item
|
||||
'min' the minimum number of items
|
||||
'max' the maximum number of items
|
||||
'armor' this integer holds armor strength with 100 being normal, with lower numbers hardening the armor and higher numbers making it weaker (weird I know but compatible with simple mobs)
|
||||
'drawtype' "front" or "side" (DEPRECATED, replaced with below)
|
||||
'rotate' set mob rotation, 0=front, 90=side, 180=back, 270=other side
|
||||
'water_damage' the damage per second if the mob is in water
|
||||
'lava_damage' the damage per second if the mob is in lava
|
||||
'light_damage' the damage per second if the mob is in light
|
||||
'suffocation' health value mob loses when inside a solid node
|
||||
'fall_damage' will mob be hurt when falling from height
|
||||
'fall_speed' maximum falling velocity of mob (default is -10 and must be below -2)
|
||||
'fear_height' when mob walks near a drop then anything over this value makes it stop and turn back (default is 0 to disable)
|
||||
'on_die' a function that is called when the mob is killed the parameters are (self, pos)
|
||||
'floats' 1 to float in water, 0 to sink
|
||||
'on_rightclick' its same as in minetest.register_entity()
|
||||
'pathfinding' set to 1 for mobs to use pathfinder feature to locate player, set to 2 so they can build/break also (only works with dogfight attack)
|
||||
'attack_type' the attack type of a monster
|
||||
'dogfight' follows player in range and attacks when in reach
|
||||
'shoot' shoots defined arrows when player is within range
|
||||
'explode' follows player in range and will flash and explode when in reach
|
||||
'dogshoot' shoots arrows when in range and one on one attack when in reach
|
||||
'dogshoot_switch' allows switching between shoot and dogfight modes inside dogshoot using timer (1 = shoot, 2 = dogfight)
|
||||
'dogshoot_count_max' number of seconds before switching to dogfight mode.
|
||||
'dogshoot_count2_max' number of seconds before switching back to shoot mode.
|
||||
'custom_attack' when set this function is called instead of the normal mob melee attack, parameters are (self, to_attack)
|
||||
'double_melee_attack' if false then api will choose randomly between 'punch' and 'punch2' attack animations
|
||||
'on_blast' is called when an explosion happens near mob when using TNT functions, parameters are (object, damage) and returns (do_damage, do_knockback, drops)
|
||||
'explosion_radius' radius of explosion attack (defaults to 1)
|
||||
'arrow' if the attack_type is "shoot" or "dogshoot" then the entity name of a pre-defined arrow is required, see below for arrow definition.
|
||||
'shoot_interval' the minimum shoot interval
|
||||
'shoot_offset' +/- value to position arrow/fireball when fired
|
||||
'reach' how far a reach this mob has, default is 3
|
||||
'sounds' this is a table with sounds of the mob
|
||||
'random' random sounds during gameplay
|
||||
'war_cry' sound when starting to attack player
|
||||
'attack' sound when attacking player
|
||||
'shoot_attack' sound when attacking player by shooting arrow/entity
|
||||
'damage' sound when being hit
|
||||
'death' sound when killed
|
||||
'jump' sound when jumping
|
||||
'explode' sound when exploding
|
||||
'distance' maximum distance sounds are heard from (default is 10)
|
||||
|
||||
Mobs can look for specific nodes as they walk and replace them to mimic eating.
|
||||
|
||||
'replace_what' group if items to replace e.g. {"farming:wheat_8", "farming:carrot_8"}
|
||||
'replace_with' replace with what e.g. "air" or in chickens case "mobs:egg"
|
||||
'replace_rate' how random should the replace rate be (typically 10)
|
||||
'replace_offset' +/- value to check specific node to replace
|
||||
'on_replace(self, pos, oldnode, newnode)' gets called when mob is about to replace a node
|
||||
self: ObjectRef of mob
|
||||
pos: Position of node to replace
|
||||
oldnode: Current node
|
||||
newnode: What the node will become after replacing
|
||||
|
||||
If false is returned, the mob will not replace the node.
|
||||
|
||||
By default, replacing sets self.gotten to true and resets the object properties.
|
||||
|
||||
The 'replace_what' has been updated to use tables for what, with and y_offset e.g.
|
||||
|
||||
replace_what = { {"group:grass", "air", 0}, {"default:dirt_with_grass", "default:dirt", -1} }
|
||||
|
||||
Mob animation comes in three parts, start_frame, end_frame and frame_speed which
|
||||
can be added to the mob definition under pre-defined mob animation names like:
|
||||
|
||||
'animation' a table with the animation ranges and speed of the model
|
||||
'stand_start', 'stand_end', 'stand_speed' when mob stands still
|
||||
'walk_start', 'walk_end', 'walk_speed' when mob walks
|
||||
'run_start', 'run_end', 'run_speed' when mob runs
|
||||
'fly_start', 'fly_end', 'fly_speed' when mob flies
|
||||
'punch_start', 'punch_end', 'punch_speed' when mob attacks
|
||||
'punch2_start', 'punch2_end', 'punch2_speed' when mob attacks (alternative)
|
||||
'die_start', 'die_end', 'die_speed' when mob dies
|
||||
'*_loop' bool value to determine if any set animation loops e.g (die_loop = false)
|
||||
defaults to true if not set
|
||||
also 'speed_normal' for compatibility with older mobs for animation speed (deprecated)
|
||||
|
||||
|
||||
The mob api also has some preset variables and functions that it will remember for each mob
|
||||
|
||||
'self.health' contains current health of mob (cannot exceed self.hp_max)
|
||||
'self.texture_list' contains list of all mob textures
|
||||
'self.child_texture' contains mob child texture when growing up
|
||||
'self.base_texture' contains current skin texture which was randomly selected from textures list
|
||||
'self.gotten' this is used for obtaining milk from cow and wool from sheep
|
||||
'self.horny' when animal fed enough it is set to true and animal can breed with same animal
|
||||
'self.hornytimer' background timer that controls breeding functions and mob childhood timings
|
||||
'self.child' used for when breeding animals have child, will use child_texture and be half size
|
||||
'self.owner' string used to set owner of npc mobs, typically used for dogs
|
||||
'self.order' set to "follow" or "stand" so that npc will follow owner or stand it's ground
|
||||
'self.nametag' contains the name of the mob which it can show above
|
||||
'on_die' a function that is called when mob is killed
|
||||
'do_custom' a custom function that is called every tick while mob is active and which has access to all of the self.* variables e.g. (self.health for health or self.standing_in for node status), return with 'false' to skip remainder of mob API.
|
||||
|
||||
|
||||
mobs:register_spawn(name, nodes, max_light, min_light, chance, active_object_count, max_height, day_toggle)
|
||||
|
||||
mobs:spawn_specfic(name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height, day_toggle, on_spawn)
|
||||
|
||||
These functions register a spawn algorithm for the mob. Without this function the call the mobs won't spawn.
|
||||
|
||||
'name' is the name of the animal/monster
|
||||
'nodes' is a list of nodenames on that the animal/monster can spawn on top of
|
||||
'neighbors' is a list of nodenames on that the animal/monster will spawn beside (default is {"air"} for mobs:register_spawn)
|
||||
'max_light' is the maximum of light
|
||||
'min_light' is the minimum of light
|
||||
'interval' is same as in register_abm() (default is 30 for mobs:register_spawn)
|
||||
'chance' is same as in register_abm()
|
||||
'active_object_count' mob is only spawned if active_object_count_wider of ABM is <= this
|
||||
'min_height' is the minimum height the mob can spawn
|
||||
'max_height' is the maximum height the mob can spawn
|
||||
'day_toggle' true for day spawning, false for night or nil for anytime
|
||||
'on_spawn' is a custom function which runs after mob has spawned and gives self and pos values.
|
||||
|
||||
... also a simpler way to handle mob spawns has been added with the mobs:spawn(def) command which uses above names to make settings clearer:
|
||||
|
||||
mobs:spawn({name = "mobs_monster:tree_monster",
|
||||
nodes = {"group:leaves"},
|
||||
max_light = 7,
|
||||
})
|
||||
|
||||
|
||||
Players can override the spawn chance for each mob registered by adding a line to their minetest.conf file with a new value, the lower the value the more each mob will spawn e.g.
|
||||
|
||||
mobs_animal:sheep_chance 11000 or mobs_monster:sand_monster_chance 100
|
||||
|
||||
For each mob that spawns with this function is a field in mobs.spawning_mobs. It tells if the mob should spawn or not. Default is true. So other mods can only use the API of this mod by disabling the spawning of the default mobs in this mod.
|
||||
|
||||
|
||||
mobs:register_arrow(name, definition)
|
||||
|
||||
This function registers a arrow for mobs with the attack type shoot.
|
||||
|
||||
'name' is the name of the arrow
|
||||
-definition' is a table with the following values:
|
||||
'visual' same is in minetest.register_entity()
|
||||
'visual_size' same is in minetest.register_entity()
|
||||
'textures' same is in minetest.register_entity()
|
||||
'velocity' the velocity of the arrow
|
||||
'drop' if set to true any arrows hitting a node will drop as item
|
||||
'hit_player' a function that is called when the arrow hits a player; this function should hurt the player
|
||||
the parameters are (self, player)
|
||||
'hit_mob' a function that is called when the arrow hits a mob; this function should hurt the mob
|
||||
the parameters are (self, player)
|
||||
'hit_node' a function that is called when the arrow hits a node
|
||||
the parameters are (self, pos, node)
|
||||
'tail' when set to 1 adds a trail or tail to mob arrows
|
||||
'tail_texture' texture string used for above effect
|
||||
'tail_size' has size for above texture (defaults to between 5 and 10)
|
||||
'expire' contains float value for how long tail appears for (defaults to 0.25)
|
||||
'glow' has value for how brightly tail glows 1 to 10 (default is 0, no glow)
|
||||
'rotate' integer value in degrees to rotate arrow
|
||||
'on_step' is a custom function when arrow is active, nil for default.
|
||||
|
||||
|
||||
mobs:register_egg(name, description, background, addegg, no_creative)
|
||||
|
||||
This function registers a spawn egg which can be used by admin to properly spawn in a mob.
|
||||
|
||||
'name' this is the name of your new mob to spawn e.g. "mob:sheep"
|
||||
'description' the name of the new egg you are creating e.g. "Spawn Sheep"
|
||||
'background' the texture displayed for the egg in inventory
|
||||
'addegg' would you like an egg image in front of your texture (1=yes, 0=no)
|
||||
'no_creative' when set to true this stops spawn egg appearing in creative mode for destructive mobs like Dungeon Masters
|
||||
|
||||
|
||||
mobs:explosion(pos, radius) -- DEPRECATED!!! use mobs:boom() instead
|
||||
|
||||
mobs:boom(self, pos, radius)
|
||||
This function generates an explosion which removes nodes in a specific radius and damages any entity caught inside the blast radius. Protection will limit node destruction but not entity damage.
|
||||
|
||||
'self' mob entity
|
||||
'pos' centre position of explosion
|
||||
'radius' radius of explosion (typically set to 3)
|
||||
|
||||
|
||||
mobs:capture_mob(self, clicker, chance_hand, chance_net, chance_lasso, force_take, replacewith)
|
||||
|
||||
This function is generally called inside the on_rightclick section of the mob api code, it provides a chance of capturing the mob by hand, using the net or magic lasso items, and can also have the player take the mob by force if tamed and replace with another item entirely.
|
||||
|
||||
'self' mob information
|
||||
'clicker' player information
|
||||
'chance_hand' chance of capturing mob by hand (1 to 100) 0 to disable
|
||||
'chance_net' chance of capturing mob using net (1 to 100) 0 to disable
|
||||
'chance_lasso' chance of capturing mob using magic lasso (1 to 100) 0 to disable
|
||||
'force_take' take mob by force, even if tamed (true or false)
|
||||
'replacewith' once captured replace mob with this item instead (overrides new mob eggs with saved information)
|
||||
|
||||
|
||||
mobs:feed_tame(self, clicker, feed_count, breed, tame)
|
||||
|
||||
This function allows the mob to be fed the item inside self.follow be it apple, wheat or whatever a set number of times and be tamed or bred as a result. Will return true when mob is fed with item it likes.
|
||||
|
||||
'self' mob information
|
||||
'clicker' player information
|
||||
'feed_count' number of times mob must be fed to tame or breed
|
||||
'breed' true or false stating if mob can be bred and a child created afterwards
|
||||
'tame' true or false stating if mob can be tamed so player can pick them up
|
||||
|
||||
|
||||
mobs:protect(self, clicker)
|
||||
|
||||
This function can be used to right-click any tamed mob with mobs:protector item, this will protect the mob from harm inside of a protected area from other players. Will return true when mob right-clicked with mobs:protector item.
|
||||
|
||||
'self' mob information
|
||||
'clicker' player information
|
||||
|
||||
|
||||
Mobs can now be ridden by players and the following shows the functions and usage:
|
||||
|
||||
|
||||
mobs:attach(self, player)
|
||||
|
||||
This function attaches a player to the mob so it can be ridden.
|
||||
|
||||
'self' mob information
|
||||
'player' player information
|
||||
|
||||
|
||||
mobs:detach(player, offset)
|
||||
|
||||
This function will detach the player currently riding a mob to an offset position.
|
||||
|
||||
'player' player information
|
||||
'offset' position table containing offset values
|
||||
|
||||
|
||||
mobs:drive(self, move_animation, stand_animation, can_fly, dtime)
|
||||
|
||||
This function allows an attached player to move the mob around and animate it at same time.
|
||||
|
||||
'self' mob information
|
||||
'move_animation' string containing movement animation e.g. "walk"
|
||||
'stand_animation' string containing standing animation e.g. "stand"
|
||||
'can_fly' if true then jump and sneak controls will allow mob to fly up and down
|
||||
'dtime' tick time used inside drive function
|
||||
|
||||
|
||||
mobs:fly(self, dtime, speed, can_shoot, arrow_entity, move_animation, stand_animation)
|
||||
|
||||
This function allows an attached player to fly the mob around using directional controls.
|
||||
|
||||
'self' mob information
|
||||
'dtime' tick time used inside fly function
|
||||
'speed' speed of flight
|
||||
'can_shoot' true if mob can fire arrow (sneak and left mouse button fires)
|
||||
'arrow_entity' name of arrow entity used for firing
|
||||
'move_animation' string containing name of pre-defined animation e.g. "walk" or "fly" etc.
|
||||
'stand_animation' string containing name of pre-defined animation e.g. "stand" or "blink" etc.
|
||||
|
||||
Note: animation names above are from the pre-defined animation lists inside mob registry without extensions.
|
||||
|
||||
|
||||
mobs:set_animation(self, name)
|
||||
|
||||
This function sets the current animation for mob, defaulting to "stand" if not found.
|
||||
|
||||
'self' mob information
|
||||
'name' name of animation
|
||||
|
||||
|
||||
Certain variables need to be set before using the above functions:
|
||||
|
||||
'self.v2' toggle switch used to define below values for the first time
|
||||
'self.max_speed_forward' max speed mob can move forward
|
||||
'self.max_speed_reverse' max speed mob can move backwards
|
||||
'self.accel' acceleration speed
|
||||
'self.terrain_type' integer containing terrain mob can walk on (1 = water, 2 or 3 = land)
|
||||
'self.driver_attach_at' position offset for attaching player to mob
|
||||
'self.driver_eye_offset' position offset for attached player view
|
||||
'self.driver_scale' sets driver scale for mobs larger than {x=1, y=1}
|
||||
|
||||
|
||||
Here is an example mob to show how the above functions work:
|
||||
|
||||
|
||||
-- rideable horse
|
||||
mobs:register_mob("mob_horse:horse", {
|
||||
type = "animal",
|
||||
visual = "mesh",
|
||||
visual_size = {x = 1.20, y = 1.20},
|
||||
mesh = "mobs_horse.x",
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.25, 0.4},
|
||||
animation = {
|
||||
speed_normal = 15,
|
||||
speed_run = 30,
|
||||
stand_start = 25,
|
||||
stand_end = 75,
|
||||
walk_start = 75,
|
||||
walk_end = 100,
|
||||
run_start = 75,
|
||||
run_end = 100,
|
||||
},
|
||||
textures = {
|
||||
{"mobs_horse.png"},
|
||||
{"mobs_horsepeg.png"},
|
||||
{"mobs_horseara.png"}
|
||||
},
|
||||
fear_height = 3,
|
||||
runaway = true,
|
||||
fly = false,
|
||||
walk_chance = 60,
|
||||
view_range = 5,
|
||||
follow = {"farming:wheat"},
|
||||
passive = true,
|
||||
hp_min = 12,
|
||||
hp_max = 16,
|
||||
armor = 200,
|
||||
lava_damage = 5,
|
||||
fall_damage = 5,
|
||||
water_damage = 1,
|
||||
makes_footstep_sound = true,
|
||||
drops = {
|
||||
{name = "mobs:meat_raw", chance = 1, min = 2, max = 3}
|
||||
},
|
||||
|
||||
do_custom = function(self, dtime)
|
||||
|
||||
-- set needed values if not already present
|
||||
if not self.v2 then
|
||||
self.v2 = 0
|
||||
self.max_speed_forward = 6
|
||||
self.max_speed_reverse = 2
|
||||
self.accel = 6
|
||||
self.terrain_type = 3
|
||||
self.driver_attach_at = {x = 0, y = 20, z = -2}
|
||||
self.driver_eye_offset = {x = 0, y = 3, z = 0}
|
||||
self.driver_scale = {x = 1, y = 1}
|
||||
end
|
||||
|
||||
-- if driver present allow control of horse
|
||||
if self.driver then
|
||||
|
||||
mobs.drive(self, "walk", "stand", false, dtime)
|
||||
|
||||
return false -- skip rest of mob functions
|
||||
end
|
||||
|
||||
return true
|
||||
end,
|
||||
|
||||
on_die = function(self, pos)
|
||||
|
||||
-- drop saddle when horse is killed while riding
|
||||
-- also detach from horse properly
|
||||
if self.driver then
|
||||
minetest.add_item(pos, "mobs:saddle")
|
||||
mobs.detach(self.driver, {x = 1, y = 0, z = 1})
|
||||
end
|
||||
|
||||
end,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
|
||||
-- make sure player is clicking
|
||||
if not clicker or not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
|
||||
-- feed, tame or heal horse
|
||||
if mobs:feed_tame(self, clicker, 10, true, true) then
|
||||
return
|
||||
end
|
||||
|
||||
-- make sure tamed horse is being clicked by owner only
|
||||
if self.tamed and self.owner == clicker:get_player_name() then
|
||||
|
||||
local inv = clicker:get_inventory()
|
||||
|
||||
-- detatch player already riding horse
|
||||
if self.driver and clicker == self.driver then
|
||||
|
||||
mobs.detach(clicker, {x = 1, y = 0, z = 1})
|
||||
|
||||
-- add saddle back to inventory
|
||||
if inv:room_for_item("main", "mobs:saddle") then
|
||||
inv:add_item("main", "mobs:saddle")
|
||||
else
|
||||
minetest.add_item(clicker.getpos(), "mobs:saddle")
|
||||
end
|
||||
|
||||
-- attach player to horse
|
||||
elseif not self.driver
|
||||
and clicker:get_wielded_item():get_name() == "mobs:saddle" then
|
||||
|
||||
self.object:set_properties({stepheight = 1.1})
|
||||
mobs.attach(self, clicker)
|
||||
|
||||
-- take saddle from inventory
|
||||
inv:remove_item("main", "mobs:saddle")
|
||||
end
|
||||
end
|
||||
|
||||
-- used to capture horse with magic lasso
|
||||
mobs:capture_mob(self, clicker, 0, 0, 80, false, nil)
|
||||
end
|
||||
})
|
|
@ -1,123 +0,0 @@
|
|||
|
||||
local S = mobs.intllib
|
||||
|
||||
-- name tag
|
||||
minetest.register_craftitem("mobs:nametag", {
|
||||
description = S("Name Tag"),
|
||||
inventory_image = "mobs_nametag.png",
|
||||
})
|
||||
|
||||
if minetest.get_modpath("dye") and minetest.get_modpath("farming") then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "mobs:nametag",
|
||||
recipe = {"default:paper", "dye:black", "farming:string"},
|
||||
})
|
||||
end
|
||||
|
||||
-- leather
|
||||
minetest.register_craftitem("mobs:leather", {
|
||||
description = S("Leather"),
|
||||
inventory_image = "mobs_leather.png",
|
||||
})
|
||||
|
||||
-- raw meat
|
||||
minetest.register_craftitem("mobs:meat_raw", {
|
||||
description = S("Raw Meat"),
|
||||
inventory_image = "mobs_meat_raw.png",
|
||||
on_use = minetest.item_eat(3),
|
||||
})
|
||||
|
||||
-- cooked meat
|
||||
minetest.register_craftitem("mobs:meat", {
|
||||
description = S("Meat"),
|
||||
inventory_image = "mobs_meat.png",
|
||||
on_use = minetest.item_eat(8),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "mobs:meat",
|
||||
recipe = "mobs:meat_raw",
|
||||
cooktime = 5,
|
||||
})
|
||||
|
||||
-- lasso
|
||||
minetest.register_tool("mobs:lasso", {
|
||||
description = S("Lasso (right-click animal to put in inventory)"),
|
||||
inventory_image = "mobs_magic_lasso.png",
|
||||
})
|
||||
|
||||
if minetest.get_modpath("farming") then
|
||||
minetest.register_craft({
|
||||
output = "mobs:lasso",
|
||||
recipe = {
|
||||
{"farming:string", "", "farming:string"},
|
||||
{"", "default:diamond", ""},
|
||||
{"farming:string", "", "farming:string"},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_alias("mobs:magic_lasso", "mobs:lasso")
|
||||
|
||||
-- net
|
||||
minetest.register_tool("mobs:net", {
|
||||
description = S("Net (right-click animal to put in inventory)"),
|
||||
inventory_image = "mobs_net.png",
|
||||
})
|
||||
|
||||
if minetest.get_modpath("farming") then
|
||||
minetest.register_craft({
|
||||
output = "mobs:net",
|
||||
recipe = {
|
||||
{"group:stick", "", "group:stick"},
|
||||
{"group:stick", "", "group:stick"},
|
||||
{"farming:string", "group:stick", "farming:string"},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-- shears (right click to shear animal)
|
||||
minetest.register_tool("mobs:shears", {
|
||||
description = S("Steel Shears (right-click to shear)"),
|
||||
inventory_image = "mobs_shears.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'mobs:shears',
|
||||
recipe = {
|
||||
{'', 'default:steel_ingot', ''},
|
||||
{'', 'group:stick', 'default:steel_ingot'},
|
||||
}
|
||||
})
|
||||
|
||||
-- protection rune
|
||||
minetest.register_craftitem("mobs:protector", {
|
||||
description = S("Mob Protection Rune"),
|
||||
inventory_image = "mobs_protector.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mobs:protector",
|
||||
recipe = {
|
||||
{"default:stone", "default:stone", "default:stone"},
|
||||
{"default:stone", "default:goldblock", "default:stone"},
|
||||
{"default:stone", "default:stone", "default:stone"},
|
||||
}
|
||||
})
|
||||
|
||||
-- saddle
|
||||
minetest.register_craftitem("mobs:saddle", {
|
||||
description = S("Saddle"),
|
||||
inventory_image = "mobs_saddle.png"
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mobs:saddle",
|
||||
recipe = {
|
||||
{"mobs:leather", "mobs:leather", "mobs:leather"},
|
||||
{"mobs:leather", "default:steel_ingot", "mobs:leather"},
|
||||
{"mobs:leather", "default:steel_ingot", "mobs:leather"},
|
||||
}
|
||||
})
|
|
@ -1,9 +0,0 @@
|
|||
init
|
||||
default
|
||||
tnt?
|
||||
dye?
|
||||
farming?
|
||||
invisibility?
|
||||
intllib?
|
||||
lucky_block?
|
||||
cmi?
|
|
@ -1 +0,0 @@
|
|||
Adds a mob api for mods to add animals or monsters etc.
|
|
@ -1,19 +0,0 @@
|
|||
|
||||
local path = minetest.get_modpath("mobs")
|
||||
|
||||
-- Mob API
|
||||
dofile(path .. "/api.lua")
|
||||
|
||||
-- Rideable Mobs
|
||||
dofile(path .. "/mount.lua")
|
||||
|
||||
-- Mob Items
|
||||
dofile(path .. "/crafts.lua")
|
||||
|
||||
-- Mob Spawner
|
||||
dofile(path .. "/spawner.lua")
|
||||
|
||||
-- Lucky Blocks
|
||||
dofile(path .. "/lucky_block.lua")
|
||||
|
||||
minetest.log("action", "[MOD] Mobs Redo loaded")
|
|
@ -1,45 +0,0 @@
|
|||
|
||||
-- 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
|
|
@ -1,21 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 TenPlus1
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -1,127 +0,0 @@
|
|||
# Mobs Redo translation.
|
||||
# Copyright (C) 2017 TenPlus1
|
||||
# This file is distributed under the same license as the mobs package.
|
||||
# Wuzzy <Wuzzy@mail.ru>, 2017
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mobs\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-07-02 16:48+0200\n"
|
||||
"PO-Revision-Date: 2017-07-02 14:27+0200\n"
|
||||
"Last-Translator: Wuzzy <almikes@aol.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: de_DE\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.0.2\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: api.lua
|
||||
msgid "Mob has been protected!"
|
||||
msgstr "Kreatur wurde geschützt!"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 (Tamed)"
|
||||
msgstr "@1 (Gezähmt)"
|
||||
|
||||
#: api.lua
|
||||
msgid "Not tamed!"
|
||||
msgstr "Nicht gezähmt!"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 is owner!"
|
||||
msgstr "@1 ist der Besitzer!"
|
||||
|
||||
#: api.lua
|
||||
msgid "Missed!"
|
||||
msgstr "Daneben!"
|
||||
|
||||
#: api.lua
|
||||
msgid "Already protected!"
|
||||
msgstr "Bereits geschützt!"
|
||||
|
||||
#: api.lua
|
||||
msgid "Protected!"
|
||||
msgstr "Geschützt!"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 at full health (@2)"
|
||||
msgstr "@1 bei voller Gesundheit (@2)"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 has been tamed!"
|
||||
msgstr "@1 wurde gezähmt!"
|
||||
|
||||
#: api.lua
|
||||
msgid "Enter name:"
|
||||
msgstr "Namen eingeben:"
|
||||
|
||||
#: api.lua
|
||||
msgid "Rename"
|
||||
msgstr "Umbenennen"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Name Tag"
|
||||
msgstr "Namensschild"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Leather"
|
||||
msgstr "Leder"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Raw Meat"
|
||||
msgstr "Rohes Fleisch"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Meat"
|
||||
msgstr "Fleisch"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Lasso (right-click animal to put in inventory)"
|
||||
msgstr "Lasso (Rechtsklick auf Tier, um es zu nehmen)"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Net (right-click animal to put in inventory)"
|
||||
msgstr "Netz (Rechtsklick auf Tier, um es zu nehmen)"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Steel Shears (right-click to shear)"
|
||||
msgstr "Stahlschere (Rechtsklick zum Scheren)"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Mob Protection Rune"
|
||||
msgstr "Kreaturschutzrune"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Saddle"
|
||||
msgstr "Sattel"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob Spawner"
|
||||
msgstr "Kreaturenspawner"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob MinLight MaxLight Amount PlayerDist"
|
||||
msgstr "Kreatur MinLicht MaxLicht Menge SpielerEntfng"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Spawner Not Active (enter settings)"
|
||||
msgstr "Nicht aktiv (Einstellungen eingeben)"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Spawner Active (@1)"
|
||||
msgstr "Spawner aktiv (@1)"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob Spawner settings failed!"
|
||||
msgstr "Kreaturenspawner-Einstellungen gescheitert!"
|
||||
|
||||
#: spawner.lua
|
||||
msgid ""
|
||||
"Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] "
|
||||
"distance[1-20] y_offset[-10 to 10]”"
|
||||
msgstr ""
|
||||
"Syntax: „name min_licht[0-14] max_licht[0-14] max_mobs_im_gebiet[0 zum "
|
||||
"Deaktivieren] distanz[1-20] y_versatz[-10 bis 10]“"
|
|
@ -1,124 +0,0 @@
|
|||
# Mobs Redo translation.
|
||||
# Copyright (C) 2017 TenPlus1
|
||||
# This file is distributed under the same license as the mobs package.
|
||||
# Wuzzy <Wuzzy@mail.ru>, 2017
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-07-16 16:48+0200\n"
|
||||
"PO-Revision-Date: 2017-07-16 16:48+0200\n"
|
||||
"Last-Translator: Aleks <alexsinteck@icqmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: api.lua
|
||||
msgid "Mob has been protected!"
|
||||
msgstr "El mob ha sido protegido!"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 (Tamed)"
|
||||
msgstr "@1 (Domesticado)"
|
||||
|
||||
#: api.lua
|
||||
msgid "Not tamed!"
|
||||
msgstr "No domesticado!"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 is owner!"
|
||||
msgstr "@1 es el dueño!"
|
||||
|
||||
#: api.lua
|
||||
msgid "Missed!"
|
||||
msgstr "Perdido!"
|
||||
|
||||
#: api.lua
|
||||
msgid "Already protected!"
|
||||
msgstr "Ya está protegido!"
|
||||
|
||||
#: api.lua
|
||||
msgid "Protected!"
|
||||
msgstr "Protegido!"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 at full health (@2)"
|
||||
msgstr "@1 con salud llena (@2)"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 has been tamed!"
|
||||
msgstr "@1 ha sido domesticado!"
|
||||
|
||||
#: api.lua
|
||||
msgid "Enter name:"
|
||||
msgstr "Ingrese nombre:"
|
||||
|
||||
#: api.lua
|
||||
msgid "Rename"
|
||||
msgstr "Renombrar"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Name Tag"
|
||||
msgstr "Nombrar etiqueta"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Leather"
|
||||
msgstr "Cuero"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Raw Meat"
|
||||
msgstr "Carne cruda"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Meat"
|
||||
msgstr "Carne"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Lasso (right-click animal to put in inventory)"
|
||||
msgstr "Lazo (click derecho en animal para colocar en inventario)"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Net (right-click animal to put in inventory)"
|
||||
msgstr "Red (click derecho en animal para colocar en inventario)"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Steel Shears (right-click to shear)"
|
||||
msgstr "Tijera de acero (click derecho para esquilar)"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Mob Protection Rune"
|
||||
msgstr "Runa de protección de Mob"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Saddle"
|
||||
msgstr "Montura"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob Spawner"
|
||||
msgstr "Generador de Mob"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob MinLight MaxLight Amount PlayerDist"
|
||||
msgstr "Mob LuzMin LuzMax Cantidad DistJugador"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Spawner Not Active (enter settings)"
|
||||
msgstr "Generador no activo (ingrese config)"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Spawner Active (@1)"
|
||||
msgstr "Generador activo (@1)"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob Spawner settings failed!"
|
||||
msgstr "Configuracion de generador de Mob falló!"
|
||||
|
||||
#: spawner.lua
|
||||
msgid ""
|
||||
"Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] "
|
||||
"distance[1-20] y_offset[-10 to 10]”"
|
||||
msgstr "Sintaxis: “nombre luz_min[0-14] luz_max[0-14] max_mobs_en_area[0 para deshabilitar] "
|
||||
"distancia[1-20] compensacion[-10 a 10]”"
|
|
@ -1,125 +0,0 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-07-29 09:13+0200\n"
|
||||
"PO-Revision-Date: 2017-07-29 09:20+0200\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\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
|
||||
msgid "Mob has been protected!"
|
||||
msgstr "L'animal a été protégé !"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 (Tamed)"
|
||||
msgstr "@1 (apprivoisé)"
|
||||
|
||||
#: api.lua
|
||||
msgid "Not tamed!"
|
||||
msgstr "Non-apprivoisé !"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 is owner!"
|
||||
msgstr "Appartient à @1 !"
|
||||
|
||||
#: api.lua
|
||||
msgid "Missed!"
|
||||
msgstr "Raté !"
|
||||
|
||||
#: api.lua
|
||||
msgid "Already protected!"
|
||||
msgstr "Déjà protégé !"
|
||||
|
||||
#: api.lua
|
||||
msgid "Protected!"
|
||||
msgstr "Protégé !"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 at full health (@2)"
|
||||
msgstr "@1 est en pleine forme (@2) "
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 has been tamed!"
|
||||
msgstr "@1 a été apprivoisé ! "
|
||||
|
||||
#: api.lua
|
||||
msgid "Enter name:"
|
||||
msgstr "Saisissez un nom :"
|
||||
|
||||
#: api.lua
|
||||
msgid "Rename"
|
||||
msgstr "Renommer"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Name Tag"
|
||||
msgstr "Étiquette pour collier"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Leather"
|
||||
msgstr "Cuir"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Raw Meat"
|
||||
msgstr "Viande crue"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Meat"
|
||||
msgstr "Viande"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Lasso (right-click animal to put in inventory)"
|
||||
msgstr "Lasso (clic droit sur l'animal pour le mettre dans l'inventaire)"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Net (right-click animal to put in inventory)"
|
||||
msgstr "Filet (clic droit sur l'animal pour le mettre dans l'inventaire)"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Steel Shears (right-click to shear)"
|
||||
msgstr "Ciseaux à laine (clic droit pour tondre)"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Mob Protection Rune"
|
||||
msgstr "Rune de protection des animaux"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Saddle"
|
||||
msgstr "Selle"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob Spawner"
|
||||
msgstr ""
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob MinLight MaxLight Amount PlayerDist"
|
||||
msgstr ""
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Spawner Not Active (enter settings)"
|
||||
msgstr ""
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Spawner Active (@1)"
|
||||
msgstr ""
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob Spawner settings failed!"
|
||||
msgstr ""
|
||||
|
||||
#: spawner.lua
|
||||
msgid ""
|
||||
"Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] "
|
||||
"distance[1-20] y_offset[-10 to 10]”"
|
||||
msgstr ""
|
|
@ -1,129 +0,0 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mobs\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-07-02 16:48+0200\n"
|
||||
"PO-Revision-Date: 2017-07-02 14:55+0200\n"
|
||||
"Last-Translator: Wuzzy <almikes@aol.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: pt\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.0.2\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: api.lua
|
||||
msgid "Mob has been protected!"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 (Tamed)"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "Not tamed!"
|
||||
msgstr "Indomesticado!"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 is owner!"
|
||||
msgstr "Dono @1!"
|
||||
|
||||
#: api.lua
|
||||
msgid "Missed!"
|
||||
msgstr "Faltou!"
|
||||
|
||||
#: api.lua
|
||||
msgid "Already protected!"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "Protected!"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 at full health (@2)"
|
||||
msgstr "@1 em plena saude (@2)"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 has been tamed!"
|
||||
msgstr "@1 foi domesticado!"
|
||||
|
||||
#: api.lua
|
||||
msgid "Enter name:"
|
||||
msgstr "Insira um nome:"
|
||||
|
||||
#: api.lua
|
||||
msgid "Rename"
|
||||
msgstr "Renomear"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Name Tag"
|
||||
msgstr "Etiqueta"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Leather"
|
||||
msgstr "Couro"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Raw Meat"
|
||||
msgstr "Carne crua"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Meat"
|
||||
msgstr "Carne"
|
||||
|
||||
#: crafts.lua
|
||||
#, fuzzy
|
||||
msgid "Lasso (right-click animal to put in inventory)"
|
||||
msgstr "Laço (clique-direito no animal para por no inventario)"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Net (right-click animal to put in inventory)"
|
||||
msgstr "Net (clique-direito no animal para por no inventario)"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Steel Shears (right-click to shear)"
|
||||
msgstr "Tesoura de Aço (clique-direito para tosquiar)"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Mob Protection Rune"
|
||||
msgstr ""
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Saddle"
|
||||
msgstr ""
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob Spawner"
|
||||
msgstr "Spawnador de Mob"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob MinLight MaxLight Amount PlayerDist"
|
||||
msgstr "Mob LuzMinima LuzMaxima Valor DistJogador"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Spawner Not Active (enter settings)"
|
||||
msgstr "Spawnador Inativo (configurar)"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Spawner Active (@1)"
|
||||
msgstr "Spawnador Ativo (@1)"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob Spawner settings failed!"
|
||||
msgstr "Configuraçao de Spawnador do Mob falhou!"
|
||||
|
||||
#: spawner.lua
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] "
|
||||
"distance[1-20] y_offset[-10 to 10]”"
|
||||
msgstr ""
|
||||
"> nome luz_min[0-14] luz_max[0-14] max_mobs_na_area[0 para desabilitar] "
|
||||
"distancia[1-20] y_offset[-10 a 10]"
|
|
@ -1,124 +0,0 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-13 15:47+0200\n"
|
||||
"PO-Revision-Date: 2017-08-13 15:47+ZONE\n"
|
||||
"Last-Translator: Oleg720 <olegsiriak@yandex.ru>\n"
|
||||
"Language-Team: 720 Locales <>\n"
|
||||
"Language: ru\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: api.lua
|
||||
msgid "Mob has been protected!"
|
||||
msgstr "Моб защищен!"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 (Tamed)"
|
||||
msgstr "@1 (Прирученный)"
|
||||
|
||||
#: api.lua
|
||||
msgid "Not tamed!"
|
||||
msgstr "Не прирученный"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 is owner!"
|
||||
msgstr "@1 владелец"
|
||||
|
||||
#: api.lua
|
||||
msgid "Missed!"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "Already protected!"
|
||||
msgstr "Уже защищен!"
|
||||
|
||||
#: api.lua
|
||||
msgid "Protected!"
|
||||
msgstr "Защищен!"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 at full health (@2)"
|
||||
msgstr "@1 при полном здоровье (@2)"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 has been tamed!"
|
||||
msgstr "@1 приручен"
|
||||
|
||||
#: api.lua
|
||||
msgid "Enter name:"
|
||||
msgstr "Введите имя:"
|
||||
|
||||
#: api.lua
|
||||
msgid "Rename"
|
||||
msgstr "Переименовать"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Name Tag"
|
||||
msgstr "Новый тег
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Leather"
|
||||
msgstr "Кожа"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Raw Meat"
|
||||
msgstr "Сырое мясо"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Meat"
|
||||
msgstr "Мясо"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Lasso (right-click animal to put in inventory)"
|
||||
msgstr "Лассо (Правый клик - положить животное в инвентарь)"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Net (right-click animal to put in inventory)"
|
||||
msgstr "Сеть (Правый клик - положить животное в инвентарь)"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Steel Shears (right-click to shear)"
|
||||
msgstr "Ножницы (Правый клик - подстричь)"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Mob Protection Rune"
|
||||
msgstr ""
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Saddle"
|
||||
msgstr "Седло"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob Spawner"
|
||||
msgstr "Спавнер моба"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob MinLight MaxLight Amount PlayerDist"
|
||||
msgstr ""
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Spawner Not Active (enter settings)"
|
||||
msgstr "Спавнер не активен (введите настройки)"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Spawner Active (@1)"
|
||||
msgstr "Активные спавнер (@1)"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob Spawner settings failed!"
|
||||
msgstr "Настройки спавнера моба провалились"
|
||||
|
||||
#: spawner.lua
|
||||
msgid ""
|
||||
"Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] "
|
||||
"distance[1-20] y_offset[-10 to 10]”"
|
||||
msgstr ""
|
|
@ -1,124 +0,0 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-07-02 16:48+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: api.lua
|
||||
msgid "Mob has been protected!"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 (Tamed)"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "Not tamed!"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 is owner!"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "Missed!"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "Already protected!"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "Protected!"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 at full health (@2)"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 has been tamed!"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "Enter name:"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "Rename"
|
||||
msgstr ""
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Name Tag"
|
||||
msgstr ""
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Leather"
|
||||
msgstr ""
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Raw Meat"
|
||||
msgstr ""
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Meat"
|
||||
msgstr ""
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Lasso (right-click animal to put in inventory)"
|
||||
msgstr ""
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Net (right-click animal to put in inventory)"
|
||||
msgstr ""
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Steel Shears (right-click to shear)"
|
||||
msgstr ""
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Mob Protection Rune"
|
||||
msgstr ""
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Saddle"
|
||||
msgstr ""
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob Spawner"
|
||||
msgstr ""
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob MinLight MaxLight Amount PlayerDist"
|
||||
msgstr ""
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Spawner Not Active (enter settings)"
|
||||
msgstr ""
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Spawner Active (@1)"
|
||||
msgstr ""
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob Spawner settings failed!"
|
||||
msgstr ""
|
||||
|
||||
#: spawner.lua
|
||||
msgid ""
|
||||
"Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] "
|
||||
"distance[1-20] y_offset[-10 to 10]”"
|
||||
msgstr ""
|
|
@ -1,129 +0,0 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mobs\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-07-02 16:48+0200\n"
|
||||
"PO-Revision-Date: 2017-07-02 14:56+0200\n"
|
||||
"Last-Translator: Wuzzy <almikes@aol.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: tr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.0.2\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: api.lua
|
||||
msgid "Mob has been protected!"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 (Tamed)"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "Not tamed!"
|
||||
msgstr "Evcil değil!"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 is owner!"
|
||||
msgstr "Sahibi @1!"
|
||||
|
||||
#: api.lua
|
||||
msgid "Missed!"
|
||||
msgstr "Kaçırdın!"
|
||||
|
||||
#: api.lua
|
||||
msgid "Already protected!"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "Protected!"
|
||||
msgstr ""
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 at full health (@2)"
|
||||
msgstr "@1 tam canında (@2)"
|
||||
|
||||
#: api.lua
|
||||
msgid "@1 has been tamed!"
|
||||
msgstr "@1 tamamen evcilleştirilmiştir!"
|
||||
|
||||
#: api.lua
|
||||
msgid "Enter name:"
|
||||
msgstr "İsim gir:"
|
||||
|
||||
#: api.lua
|
||||
msgid "Rename"
|
||||
msgstr "Yeniden adlandır"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Name Tag"
|
||||
msgstr "İsim etiketi"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Leather"
|
||||
msgstr "Deri"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Raw Meat"
|
||||
msgstr "Çiğ et"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Meat"
|
||||
msgstr "Et"
|
||||
|
||||
#: crafts.lua
|
||||
#, fuzzy
|
||||
msgid "Lasso (right-click animal to put in inventory)"
|
||||
msgstr "Kement (hayvana sağ tıklayarak envantere koy)"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Net (right-click animal to put in inventory)"
|
||||
msgstr "Ağ (hayvana sağ tıklayarak envantere koy)"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Steel Shears (right-click to shear)"
|
||||
msgstr "Çelik makas (sağ tıklayarak kes)"
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Mob Protection Rune"
|
||||
msgstr ""
|
||||
|
||||
#: crafts.lua
|
||||
msgid "Saddle"
|
||||
msgstr ""
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob Spawner"
|
||||
msgstr "Canavar Yaratıcı"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob MinLight MaxLight Amount PlayerDist"
|
||||
msgstr "Mob MinIşık MaxIşık Miktar OyuncuMesafesi"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Spawner Not Active (enter settings)"
|
||||
msgstr "Yaratıcı aktif değil (ayarlara gir)"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Spawner Active (@1)"
|
||||
msgstr "Yaratıcı aktif (@1)"
|
||||
|
||||
#: spawner.lua
|
||||
msgid "Mob Spawner settings failed!"
|
||||
msgstr "Yaratıcı ayarları uygulanamadı."
|
||||
|
||||
#: spawner.lua
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
"Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] "
|
||||
"distance[1-20] y_offset[-10 to 10]”"
|
||||
msgstr ""
|
||||
"> isim min_isik[0-14] max_isik[0-14] alandaki_max_canavar_sayisi[kapatmak "
|
||||
"icin 0] mesafe[1-20] y_cikinti[-10 ve 10 arası]"
|
|
@ -1,15 +0,0 @@
|
|||
|
||||
if minetest.get_modpath("lucky_block") then
|
||||
|
||||
lucky_block:add_blocks({
|
||||
{"dro", {"mobs:meat_raw"}, 5},
|
||||
{"dro", {"mobs:meat"}, 5},
|
||||
{"dro", {"mobs:nametag"}, 1},
|
||||
{"dro", {"mobs:leather"}, 5},
|
||||
{"dro", {"mobs:net"}, 1},
|
||||
{"dro", {"mobs:magic_lasso"}, 1},
|
||||
{"dro", {"mobs:shears"}, 1},
|
||||
{"dro", {"mobs:protector"}, 1},
|
||||
{"lig"},
|
||||
})
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
name = mobs
|
|
@ -1,451 +0,0 @@
|
|||
|
||||
-- lib_mount by Blert2112 (edited by TenPlus1)
|
||||
|
||||
local enable_crash = false
|
||||
local crash_threshold = 6.5 -- ignored if enable_crash=false
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Helper functions
|
||||
--
|
||||
|
||||
local node_ok = function(pos, fallback)
|
||||
|
||||
fallback = fallback or mobs.fallback_node
|
||||
|
||||
local node = minetest.get_node_or_nil(pos)
|
||||
|
||||
if node and minetest.registered_nodes[node.name] then
|
||||
return node
|
||||
end
|
||||
|
||||
return {name = fallback}
|
||||
end
|
||||
|
||||
|
||||
local function node_is(pos)
|
||||
|
||||
local node = node_ok(pos)
|
||||
|
||||
if node.name == "air" then
|
||||
return "air"
|
||||
end
|
||||
|
||||
if minetest.get_item_group(node.name, "lava") ~= 0 then
|
||||
return "lava"
|
||||
end
|
||||
|
||||
if minetest.get_item_group(node.name, "liquid") ~= 0 then
|
||||
return "liquid"
|
||||
end
|
||||
|
||||
if minetest.registered_nodes[node.name].walkable == true then
|
||||
return "walkable"
|
||||
end
|
||||
|
||||
return "other"
|
||||
end
|
||||
|
||||
|
||||
local function get_sign(i)
|
||||
|
||||
i = i or 0
|
||||
|
||||
if i == 0 then
|
||||
return 0
|
||||
else
|
||||
return i / math.abs(i)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local function get_velocity(v, yaw, y)
|
||||
|
||||
local x = -math.sin(yaw) * v
|
||||
local z = math.cos(yaw) * v
|
||||
|
||||
return {x = x, y = y, z = z}
|
||||
end
|
||||
|
||||
|
||||
local function get_v(v)
|
||||
return math.sqrt(v.x * v.x + v.z * v.z)
|
||||
end
|
||||
|
||||
|
||||
local function force_detach(player)
|
||||
|
||||
local attached_to = player:get_attach()
|
||||
|
||||
if not attached_to then
|
||||
return
|
||||
end
|
||||
|
||||
local entity = attached_to:get_luaentity()
|
||||
|
||||
if entity.driver
|
||||
and entity.driver == player then
|
||||
|
||||
entity.driver = nil
|
||||
end
|
||||
|
||||
player:set_detach()
|
||||
player_api.player_attached[player:get_player_name()] = false
|
||||
player:set_eye_offset({x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0})
|
||||
player_api.player_set_animation(player, "stand" , 30)
|
||||
player:set_properties({visual_size = {x = 1, y = 1} })
|
||||
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
force_detach(player)
|
||||
end)
|
||||
|
||||
minetest.register_on_shutdown(function()
|
||||
local players = minetest.get_connected_players()
|
||||
for i = 1, #players do
|
||||
force_detach(players[i])
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_on_dieplayer(function(player)
|
||||
force_detach(player)
|
||||
return true
|
||||
end)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
function mobs.attach(entity, player)
|
||||
|
||||
local attach_at, eye_offset = {}, {}
|
||||
|
||||
entity.player_rotation = entity.player_rotation or {x = 0, y = 0, z = 0}
|
||||
entity.driver_attach_at = entity.driver_attach_at or {x = 0, y = 0, z = 0}
|
||||
entity.driver_eye_offset = entity.driver_eye_offset or {x = 0, y = 0, z = 0}
|
||||
entity.driver_scale = entity.driver_scale or {x = 1, y = 1}
|
||||
|
||||
local rot_view = 0
|
||||
|
||||
if entity.player_rotation.y == 90 then
|
||||
rot_view = math.pi/2
|
||||
end
|
||||
|
||||
attach_at = entity.driver_attach_at
|
||||
eye_offset = entity.driver_eye_offset
|
||||
entity.driver = player
|
||||
|
||||
force_detach(player)
|
||||
|
||||
player:set_attach(entity.object, "", attach_at, entity.player_rotation)
|
||||
player_api.player_attached[player:get_player_name()] = true
|
||||
player:set_eye_offset(eye_offset, {x = 0, y = 0, z = 0})
|
||||
|
||||
player:set_properties({
|
||||
visual_size = {
|
||||
x = entity.driver_scale.x,
|
||||
y = entity.driver_scale.y
|
||||
}
|
||||
})
|
||||
|
||||
minetest.after(0.2, function()
|
||||
player_api.player_set_animation(player, "sit" , 30)
|
||||
end)
|
||||
|
||||
--player:set_look_yaw(entity.object:getyaw() - rot_view)
|
||||
player:set_look_horizontal(entity.object:getyaw() - rot_view)
|
||||
end
|
||||
|
||||
|
||||
function mobs.detach(player, offset)
|
||||
|
||||
force_detach(player)
|
||||
|
||||
player_api.player_set_animation(player, "stand" , 30)
|
||||
|
||||
local pos = player:getpos()
|
||||
|
||||
pos = {x = pos.x + offset.x, y = pos.y + 0.2 + offset.y, z = pos.z + offset.z}
|
||||
|
||||
minetest.after(0.1, function()
|
||||
player:setpos(pos)
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
function mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime)
|
||||
|
||||
local rot_steer, rot_view = math.pi/2, 0
|
||||
|
||||
if entity.player_rotation.y == 90 then
|
||||
rot_steer, rot_view = 0, math.pi/2
|
||||
end
|
||||
|
||||
local acce_y = 0
|
||||
local velo = entity.object:getvelocity()
|
||||
|
||||
entity.v = get_v(velo) * get_sign(entity.v)
|
||||
|
||||
-- process controls
|
||||
if entity.driver then
|
||||
|
||||
--print ("---velo", get_v(velo))
|
||||
|
||||
local ctrl = entity.driver:get_player_control()
|
||||
|
||||
-- move forwards
|
||||
if ctrl.up then
|
||||
|
||||
entity.v = entity.v + entity.accel / 10
|
||||
|
||||
-- move backwards
|
||||
elseif ctrl.down then
|
||||
|
||||
if entity.max_speed_reverse == 0 and entity.v == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
entity.v = entity.v - entity.accel / 10
|
||||
end
|
||||
|
||||
-- fix mob rotation
|
||||
-- entity.object:setyaw(entity.driver:get_look_yaw() - entity.rotate)
|
||||
entity.object:setyaw(entity.driver:get_look_horizontal() - entity.rotate)
|
||||
|
||||
if can_fly then
|
||||
|
||||
-- fly up
|
||||
if ctrl.jump then
|
||||
velo.y = velo.y + 1
|
||||
if velo.y > entity.accel then velo.y = entity.accel end
|
||||
|
||||
elseif velo.y > 0 then
|
||||
velo.y = velo.y - 0.1
|
||||
if velo.y < 0 then velo.y = 0 end
|
||||
end
|
||||
|
||||
-- fly down
|
||||
if ctrl.sneak then
|
||||
velo.y = velo.y - 1
|
||||
if velo.y < -entity.accel then velo.y = -entity.accel end
|
||||
|
||||
elseif velo.y < 0 then
|
||||
velo.y = velo.y + 0.1
|
||||
if velo.y > 0 then velo.y = 0 end
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
-- jump
|
||||
if ctrl.jump then
|
||||
|
||||
if velo.y == 0 then
|
||||
velo.y = velo.y + entity.jump_height
|
||||
acce_y = acce_y + (acce_y * 3) + 1
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
-- if not moving then set animation and return
|
||||
if entity.v == 0 and velo.x == 0 and velo.y == 0 and velo.z == 0 then
|
||||
|
||||
if stand_anim then
|
||||
mobs:set_animation(entity, stand_anim)
|
||||
end
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
-- set moving animation
|
||||
if moving_anim then
|
||||
mobs:set_animation(entity, moving_anim)
|
||||
end
|
||||
|
||||
-- Stop!
|
||||
local s = get_sign(entity.v)
|
||||
|
||||
entity.v = entity.v - 0.02 * s
|
||||
|
||||
if s ~= get_sign(entity.v) then
|
||||
|
||||
entity.object:setvelocity({x = 0, y = 0, z = 0})
|
||||
entity.v = 0
|
||||
return
|
||||
end
|
||||
|
||||
-- enforce speed limit forward and reverse
|
||||
local max_spd = entity.max_speed_reverse
|
||||
|
||||
if get_sign(entity.v) >= 0 then
|
||||
max_spd = entity.max_speed_forward
|
||||
end
|
||||
|
||||
if math.abs(entity.v) > max_spd then
|
||||
entity.v = entity.v - get_sign(entity.v)
|
||||
end
|
||||
|
||||
-- Set position, velocity and acceleration
|
||||
local p = entity.object:getpos()
|
||||
local new_velo = {x = 0, y = 0, z = 0}
|
||||
local new_acce = {x = 0, y = -9.8, z = 0}
|
||||
|
||||
p.y = p.y - 0.5
|
||||
|
||||
local ni = node_is(p)
|
||||
local v = entity.v
|
||||
|
||||
if ni == "air" then
|
||||
|
||||
if can_fly == true then
|
||||
new_acce.y = 0
|
||||
end
|
||||
|
||||
elseif ni == "liquid" or ni == "lava" then
|
||||
|
||||
if ni == "lava" and entity.lava_damage ~= 0 then
|
||||
|
||||
entity.lava_counter = (entity.lava_counter or 0) + dtime
|
||||
|
||||
if entity.lava_counter > 1 then
|
||||
|
||||
minetest.sound_play("default_punch", {
|
||||
object = entity.object,
|
||||
max_hear_distance = 5
|
||||
})
|
||||
|
||||
entity.object:punch(entity.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
damage_groups = {fleshy = entity.lava_damage}
|
||||
}, nil)
|
||||
|
||||
entity.lava_counter = 0
|
||||
end
|
||||
end
|
||||
|
||||
if entity.terrain_type == 2
|
||||
or entity.terrain_type == 3 then
|
||||
|
||||
new_acce.y = 0
|
||||
p.y = p.y + 1
|
||||
|
||||
if node_is(p) == "liquid" then
|
||||
|
||||
if velo.y >= 5 then
|
||||
velo.y = 5
|
||||
elseif velo.y < 0 then
|
||||
new_acce.y = 20
|
||||
else
|
||||
new_acce.y = 5
|
||||
end
|
||||
else
|
||||
if math.abs(velo.y) < 1 then
|
||||
local pos = entity.object:getpos()
|
||||
pos.y = math.floor(pos.y) + 0.5
|
||||
entity.object:setpos(pos)
|
||||
velo.y = 0
|
||||
end
|
||||
end
|
||||
else
|
||||
v = v * 0.25
|
||||
end
|
||||
end
|
||||
|
||||
new_velo = get_velocity(v, entity.object:getyaw() - rot_view, velo.y)
|
||||
new_acce.y = new_acce.y + acce_y
|
||||
|
||||
entity.object:setvelocity(new_velo)
|
||||
entity.object:setacceleration(new_acce)
|
||||
|
||||
-- CRASH!
|
||||
if enable_crash then
|
||||
|
||||
local intensity = entity.v2 - v
|
||||
|
||||
if intensity >= crash_threshold then
|
||||
|
||||
--print("----------- crash", intensity)
|
||||
|
||||
entity.object:punch(entity.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
damage_groups = {fleshy = intensity}
|
||||
}, nil)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
entity.v2 = v
|
||||
end
|
||||
|
||||
|
||||
-- directional flying routine by D00Med (edited by TenPlus1)
|
||||
|
||||
function mobs.fly(entity, dtime, speed, shoots, arrow, moving_anim, stand_anim)
|
||||
|
||||
local ctrl = entity.driver:get_player_control()
|
||||
local velo = entity.object:getvelocity()
|
||||
local dir = entity.driver:get_look_dir()
|
||||
-- local yaw = entity.driver:get_look_yaw()
|
||||
local yaw = entity.driver:get_look_horizontal() + 1.57 -- offset fix between old and new commands
|
||||
local rot_steer, rot_view = math.pi / 2, 0
|
||||
|
||||
if entity.player_rotation.y == 90 then
|
||||
rot_steer, rot_view = 0, math.pi / 2
|
||||
end
|
||||
|
||||
if ctrl.up then
|
||||
entity.object:setvelocity({
|
||||
x = dir.x * speed,
|
||||
y = dir.y * speed + 2,
|
||||
z = dir.z * speed
|
||||
})
|
||||
|
||||
elseif ctrl.down then
|
||||
entity.object:setvelocity({
|
||||
x = -dir.x * speed,
|
||||
y = dir.y * speed + 2,
|
||||
z = -dir.z * speed
|
||||
})
|
||||
|
||||
elseif not ctrl.down or ctrl.up or ctrl.jump then
|
||||
entity.object:setvelocity({x = 0, y = -2, z = 0})
|
||||
end
|
||||
|
||||
entity.object:setyaw(yaw + math.pi + math.pi / 2 - entity.rotate)
|
||||
|
||||
-- firing arrows
|
||||
if ctrl.LMB and ctrl.sneak and shoots then
|
||||
|
||||
local pos = entity.object:getpos()
|
||||
local obj = minetest.add_entity({
|
||||
x = pos.x + 0 + dir.x * 2.5,
|
||||
y = pos.y + 1.5 + dir.y,
|
||||
z = pos.z + 0 + dir.z * 2.5}, arrow)
|
||||
|
||||
local ent = obj:get_luaentity()
|
||||
if ent then
|
||||
ent.switch = 1 -- for mob specific arrows
|
||||
ent.owner_id = tostring(entity.object) -- so arrows dont hurt entity you are riding
|
||||
local vec = {x = dir.x * 6, y = dir.y * 6, z = dir.z * 6}
|
||||
-- local yaw = entity.driver:get_look_yaw()
|
||||
local yaw = entity.driver:get_look_horizontal()
|
||||
obj:setyaw(yaw + math.pi / 2)
|
||||
obj:setvelocity(vec)
|
||||
else
|
||||
obj:remove()
|
||||
end
|
||||
end
|
||||
|
||||
-- change animation if stopped
|
||||
if velo.x == 0 and velo.y == 0 and velo.z == 0 then
|
||||
|
||||
mobs:set_animation(entity, stand_anim)
|
||||
else
|
||||
-- moving animation
|
||||
mobs:set_animation(entity, moving_anim)
|
||||
end
|
||||
end
|
|
@ -1,72 +0,0 @@
|
|||
|
||||
MOBS REDO for MINETEST
|
||||
|
||||
Built from PilzAdam's original Simple Mobs with additional mobs by KrupnoPavel, Zeg9, ExeterDad and AspireMint.
|
||||
|
||||
|
||||
This mod contains the API only for adding your own mobs into the world, so please use the additional modpacks to add animals, monsters etc.
|
||||
|
||||
|
||||
https://forum.minetest.net/viewtopic.php?f=11&t=9917
|
||||
|
||||
|
||||
Crafts:
|
||||
|
||||
- Nametag (paper, black dye, string) can be used right-click on a tamed mob to give them a name.
|
||||
- Nets can be used to right-click tamed mobs to pick them up and place inside inventory as a spawn egg.
|
||||
- Magic Lasso is similar to nets but with a better chance of picking up larger mobs.
|
||||
- Shears are used to right-click sheep and return 1-3 wool.
|
||||
- Protection Rune lets you protect tamed mobs from harm by other players
|
||||
|
||||
Lucky Blocks: 9
|
||||
|
||||
|
||||
Changelog:
|
||||
- 1.37- Added support for Raymoo's CMI (common mob interface) mod: https://forum.minetest.net/viewtopic.php?f=9&t=15448
|
||||
- 1.36- Death check added, if mob dies in fire/lava/with lava pick then drops are cooked
|
||||
- 1.35- Added owner_loyal flag for owned mobs to attack player enemies, also fixed group_attack
|
||||
- 1.34- Added function to fly mob using directional movement (thanks D00Med for flying code)
|
||||
- 1.33- Added functions to mount ride mobs (mobs.attach, mobs.detach, mobs.drive) many thanks to Blert2112
|
||||
- 1.32- Added new spawn check to count specific mobs AND new minetest.conf setting to chance spawn chance and numbers, added ability to protect tamed mobs
|
||||
- 1.31- Added 'attack_animals' and 'specific_attack' flags for custom monster attacks, also 'mob_difficulty' .conf setting to make mobs harder.
|
||||
- 1.30- Added support for invisibility mod (mobs cant attack what they cant see), tweaked and tidied code
|
||||
- 1.29- Split original Mobs Redo into a modpack to make it easier to disable mob sets (animal, monster, npc) or simply use the Api itself for your own mod
|
||||
- 1.28- New damage system added with ability for mob to be immune to weapons or healed by them :)
|
||||
- 1.27- Added new sheep, lava flan and spawn egg textures. New Lava Pick tool smelts what you dig. New atan checking function.
|
||||
- 1.26- Pathfinding feature added thanks to rnd, when monsters attack they become scary smart in finding you :) also, beehive produces honey now :)
|
||||
- 1.25- Mobs no longer spawn within 12 blocks of player or despawn within same range, spawners now have player detection, Code tidy and tweak.
|
||||
- 1.24- Added feature where certain animals run away when punched (runaway = true in mob definition)
|
||||
- 1.23- Added mob spawner block for admin to setup spawners in-game (place and right click to enter settings)
|
||||
- 1.22- Added ability to name tamed animals and npc using nametags, also npc will attack anyone who punches them apart from owner
|
||||
- 1.21- Added some more error checking to reduce serialize.h error and added height checks for falling off cliffs (thanks cmdskp)
|
||||
- 1.20- Error checking added to remove bad mobs, out of map limit mobs and stop serialize.h error
|
||||
- 1.19- Chickens now drop egg items instead of placing the egg, also throwing eggs result in 1/8 chance of spawning chick
|
||||
- 1.18- Added docile_by_day flag so that monsters will not attack automatically during daylight hours unless hit first
|
||||
- 1.17- Added 'dogshoot' attack type, shoots when out of reach, melee attack when in reach, also api tweaks and self.reach added
|
||||
- 1.16- Mobs follow multiple items now, Npc's can breed
|
||||
- 1.15- Added Feeding/Taming/Breeding function, right-click to pick up any sheep with X mark on them and replace with new one to fix compatibility.
|
||||
- 1.14- All .self variables saved in staticdata, Fixed self.health bug
|
||||
- 1.13- Added capture function (thanks blert2112) chance of picking up mob with hand; net; magic lasso, replaced some .x models with newer .b3d one's
|
||||
- 1.12- Added animal ownership so that players cannot steal your tamed animals
|
||||
- 1.11- Added flying mobs (and swimming), fly=true and fly_in="air" or "deafult:water_source" for fishy
|
||||
- 1,10- Footstep removed (use replace), explosion routine added for exploding mobs.
|
||||
- 1.09- reworked breeding routine, added mob rotation value, added footstep feature, added jumping mobs with sounds feature, added magic lasso for picking up animals
|
||||
- 1.08- Mob throwing attack has been rehauled so that they can damage one another, also drops and on_die function added
|
||||
- 1.07- Npc's can now be set to follow player or stand by using self.order and self.owner variables
|
||||
- beta- Npc mob added, kills monsters, attacks player when punched, right click with food to heal or gold lump for drop
|
||||
- 1.06- Changed recovery times after breeding, and time taken to grow up (can be sped up by feeding baby animal)
|
||||
- 1.05- Added ExeterDad's bunny's which can be picked up and tamed with 4 carrots from farming redo or farming_plus, also shears added to get wool from sheep and lastly Jordach/BSD's kitten
|
||||
- 1.04- Added mating for sheep, cows and hogs... feed animals to make horny and hope for a baby which is half size, will grow up quick though :)
|
||||
- 1.03- Added mob drop/replace feature so that chickens can drop eggs, cow/sheep can eat grass/wheat etc.
|
||||
- 1.02- Sheared sheep are remembered and spawn shaven, Warthogs will attack when threatened, Api additions
|
||||
- 1.01- Mobs that suffer fall damage or die in water/lava/sunlight will now drop items
|
||||
- 1.0 - more work on Api so that certain mobs can float in water while some sink like a brick :)
|
||||
- 0.9 - Spawn eggs added for all mobs (admin only, cannot be placed in protected areas)... Api tweaked
|
||||
- 0.8 - Added sounds to monster mobs (thanks Cyberpangolin for the sfx) and also chicken sound
|
||||
- 0.7 - mobs.protected switch added to api.lua, when set to 1 mobs no longer spawn in protected areas, also bug fixes
|
||||
- 0.6 - Api now supports multi-textured mobs, e.g oerkki, dungeon master, rats and chickens have random skins when spawning (sheep fix TODO), also new Honey block
|
||||
- 0.5 - Mobs now float in water, die from falling, and some code improvements
|
||||
- 0.4 - Dungeon Masters and Mese Monsters have much better aim due to shoot_offset, also they can both shoot through nodes that aren't walkable (flowers, grass etc) plus new sheep sound :)
|
||||
- 0.3 - Added LOTT's Spider mob, made Cobwebs, added KPavel's Bee with Honey and Beehives (made texture), Warthogs now have sound and can be tamed, taming of shaved sheep or milked cow with 8 wheat so it will not despawn, many bug fixes :)
|
||||
- 0.2 - Cooking bucket of milk into cheese now returns empty bucket
|
||||
- 0.1 - Initial Release
|
|
@ -1,7 +0,0 @@
|
|||
Creative Commons sounds from Freesound.org
|
||||
|
||||
mobs_swing.ogg by qubodup
|
||||
- http://freesound.org/people/qubodup/sounds/60012/
|
||||
|
||||
mobs_spell.ogg by littlerobotsoundfactory
|
||||
- http://freesound.org/people/LittleRobotSoundFactory/sounds/270396/
|
|
@ -1,180 +0,0 @@
|
|||
|
||||
-- intllib
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP .. "/intllib.lua")
|
||||
|
||||
-- mob spawner
|
||||
|
||||
local spawner_default = "mobs_animal:pumba 10 15 0 0"
|
||||
|
||||
minetest.register_node("mobs:spawner", {
|
||||
tiles = {"mob_spawner.png"},
|
||||
drawtype = "glasslike",
|
||||
paramtype = "light",
|
||||
walkable = true,
|
||||
description = S("Mob Spawner"),
|
||||
groups = {cracky = 1},
|
||||
|
||||
on_construct = function(pos)
|
||||
|
||||
local meta = minetest.get_meta(pos)
|
||||
|
||||
-- text entry formspec
|
||||
meta:set_string("formspec",
|
||||
"field[text;" .. S("Mob MinLight MaxLight Amount PlayerDist") .. ";${command}]")
|
||||
meta:set_string("infotext", S("Spawner Not Active (enter settings)"))
|
||||
meta:set_string("command", spawner_default)
|
||||
end,
|
||||
|
||||
on_right_click = function(pos, placer)
|
||||
|
||||
if minetest.is_protected(pos, placer:get_player_name()) then
|
||||
return
|
||||
end
|
||||
end,
|
||||
|
||||
on_receive_fields = function(pos, formname, fields, sender)
|
||||
|
||||
if not fields.text or fields.text == "" then
|
||||
return
|
||||
end
|
||||
|
||||
local meta = minetest.get_meta(pos)
|
||||
local comm = fields.text:split(" ")
|
||||
local name = sender:get_player_name()
|
||||
|
||||
if minetest.is_protected(pos, name) then
|
||||
minetest.record_protection_violation(pos, name)
|
||||
return
|
||||
end
|
||||
|
||||
local mob = comm[1] -- mob to spawn
|
||||
local mlig = tonumber(comm[2]) -- min light
|
||||
local xlig = tonumber(comm[3]) -- max light
|
||||
local num = tonumber(comm[4]) -- total mobs in area
|
||||
local pla = tonumber(comm[5]) -- player distance (0 to disable)
|
||||
local yof = tonumber(comm[6]) or 0 -- Y offset to spawn mob
|
||||
|
||||
if mob and mob ~= "" and mobs.spawning_mobs[mob] == true
|
||||
and num and num >= 0 and num <= 10
|
||||
and mlig and mlig >= 0 and mlig <= 15
|
||||
and xlig and xlig >= 0 and xlig <= 15
|
||||
and pla and pla >=0 and pla <= 20
|
||||
and yof and yof > -10 and yof < 10 then
|
||||
|
||||
meta:set_string("command", fields.text)
|
||||
meta:set_string("infotext", S("Spawner Active (@1)", mob))
|
||||
|
||||
else
|
||||
minetest.chat_send_player(name, S("Mob Spawner settings failed!"))
|
||||
minetest.chat_send_player(name,
|
||||
S("Syntax: “name min_light[0-14] max_light[0-14] max_mobs_in_area[0 to disable] distance[1-20] y_offset[-10 to 10]”"))
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
local max_per_block = tonumber(minetest.setting_get("max_objects_per_block") or 99)
|
||||
|
||||
-- spawner abm
|
||||
minetest.register_abm({
|
||||
label = "Mob spawner node",
|
||||
nodenames = {"mobs:spawner"},
|
||||
interval = 10,
|
||||
chance = 4,
|
||||
catch_up = false,
|
||||
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
|
||||
-- return if too many entities already
|
||||
if active_object_count_wider >= max_per_block then
|
||||
return
|
||||
end
|
||||
|
||||
-- get meta and command
|
||||
local meta = minetest.get_meta(pos)
|
||||
local comm = meta:get_string("command"):split(" ")
|
||||
|
||||
-- get settings from command
|
||||
local mob = comm[1]
|
||||
local mlig = tonumber(comm[2])
|
||||
local xlig = tonumber(comm[3])
|
||||
local num = tonumber(comm[4])
|
||||
local pla = tonumber(comm[5]) or 0
|
||||
local yof = tonumber(comm[6]) or 0
|
||||
|
||||
-- if amount is 0 then do nothing
|
||||
if num == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
-- are we spawning a registered mob?
|
||||
if not mobs.spawning_mobs[mob] then
|
||||
--print ("--- mob doesn't exist", mob)
|
||||
return
|
||||
end
|
||||
|
||||
-- check objects inside 9x9 area around spawner
|
||||
local objs = minetest.get_objects_inside_radius(pos, 9)
|
||||
local count = 0
|
||||
local ent = nil
|
||||
|
||||
-- count mob objects of same type in area
|
||||
for k, obj in ipairs(objs) do
|
||||
|
||||
ent = obj:get_luaentity()
|
||||
|
||||
if ent and ent.name and ent.name == mob then
|
||||
count = count + 1
|
||||
end
|
||||
end
|
||||
|
||||
-- is there too many of same type?
|
||||
if count >= num then
|
||||
return
|
||||
end
|
||||
|
||||
-- spawn mob if player detected and in range
|
||||
if pla > 0 then
|
||||
|
||||
local in_range = 0
|
||||
local objs = minetest.get_objects_inside_radius(pos, pla)
|
||||
|
||||
for _,oir in pairs(objs) do
|
||||
|
||||
if oir:is_player() then
|
||||
|
||||
in_range = 1
|
||||
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
-- player not found
|
||||
if in_range == 0 then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
-- find air blocks within 5 nodes of spawner
|
||||
local air = minetest.find_nodes_in_area(
|
||||
{x = pos.x - 5, y = pos.y + yof, z = pos.z - 5},
|
||||
{x = pos.x + 5, y = pos.y + yof, z = pos.z + 5},
|
||||
{"air"})
|
||||
|
||||
-- spawn in random air block
|
||||
if air and #air > 0 then
|
||||
|
||||
local pos2 = air[math.random(#air)]
|
||||
local lig = minetest.get_node_light(pos2) or 0
|
||||
|
||||
pos2.y = pos2.y + 0.5
|
||||
|
||||
-- only if light levels are within range
|
||||
if lig >= mlig and lig <= xlig then
|
||||
minetest.add_entity(pos2, mob)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
})
|
Before Width: | Height: | Size: 108 B |
Before Width: | Height: | Size: 267 B |
Before Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 191 B |
Before Width: | Height: | Size: 196 B |
Before Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 411 B |
Before Width: | Height: | Size: 426 B |
Before Width: | Height: | Size: 247 B |
Before Width: | Height: | Size: 195 B |
Before Width: | Height: | Size: 165 B |
Before Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 164 B |
Before Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 224 B |
|
@ -1 +0,0 @@
|
|||
-- This mod has no code and is only a collection of textures.
|
|
@ -1 +0,0 @@
|
|||
name = base_textures
|
|
@ -1,12 +0,0 @@
|
|||
Minetest Game mod: creative
|
||||
===========================
|
||||
See license.txt for license information.
|
||||
|
||||
Authors of source code
|
||||
----------------------
|
||||
Originally by Perttu Ahola (celeron55) <celeron55@gmail.com> (MIT)
|
||||
Jean-Patrick G. (kilbith) <jeanpatrick.guerrero@gmail.com> (MIT)
|
||||
|
||||
Author of media (textures)
|
||||
--------------------------
|
||||
Jean-Patrick G. (kilbith) <jeanpatrick.guerrero@gmail.com> (CC BY-SA 3.0)
|
|
@ -1,2 +0,0 @@
|
|||
init
|
||||
sfinv
|
|
@ -1,63 +0,0 @@
|
|||
creative = {}
|
||||
|
||||
local creative_mode_cache = minetest.settings:get_bool("creative_mode")
|
||||
|
||||
function creative.is_enabled_for(name)
|
||||
return creative_mode_cache
|
||||
end
|
||||
|
||||
dofile(minetest.get_modpath("creative") .. "/inventory.lua")
|
||||
|
||||
if creative_mode_cache then
|
||||
-- Dig time is modified according to difference (leveldiff) between tool
|
||||
-- 'maxlevel' and node 'level'. Digtime is divided by the larger of
|
||||
-- leveldiff and 1.
|
||||
-- To speed up digging in creative, hand 'maxlevel' and 'digtime' have been
|
||||
-- increased such that nodes of differing levels have an insignificant
|
||||
-- effect on digtime.
|
||||
local digtime = 42
|
||||
local caps = {times = {digtime, digtime, digtime}, uses = 0, maxlevel = 256}
|
||||
|
||||
minetest.register_item(":", {
|
||||
type = "none",
|
||||
wield_image = "wieldhand.png",
|
||||
wield_scale = {x = 1, y = 1, z = 2.5},
|
||||
range = 10,
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.5,
|
||||
max_drop_level = 3,
|
||||
groupcaps = {
|
||||
crumbly = caps,
|
||||
cracky = caps,
|
||||
snappy = caps,
|
||||
choppy = caps,
|
||||
oddly_breakable_by_hand = caps,
|
||||
},
|
||||
damage_groups = {fleshy = 10},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-- Unlimited node placement
|
||||
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack)
|
||||
return creative.is_enabled_for(placer:get_player_name())
|
||||
end)
|
||||
|
||||
-- Don't pick up if the item is already in the inventory
|
||||
local old_handle_node_drops = minetest.handle_node_drops
|
||||
function minetest.handle_node_drops(pos, drops, digger)
|
||||
if not digger or not digger:is_player() then
|
||||
return
|
||||
end
|
||||
if not creative.is_enabled_for(digger:get_player_name()) then
|
||||
return old_handle_node_drops(pos, drops, digger)
|
||||
end
|
||||
local inv = digger:get_inventory()
|
||||
if inv then
|
||||
for _, item in ipairs(drops) do
|
||||
if not inv:contains_item("main", item, true) then
|
||||
inv:add_item("main", item)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,177 +0,0 @@
|
|||
local player_inventory = {}
|
||||
|
||||
function creative.init_creative_inventory(player)
|
||||
local player_name = player:get_player_name()
|
||||
player_inventory[player_name] = {
|
||||
size = 0,
|
||||
filter = "",
|
||||
start_i = 0
|
||||
}
|
||||
|
||||
minetest.create_detached_inventory("creative_" .. player_name, {
|
||||
allow_move = function(inv, from_list, from_index, to_list, to_index, count, player2)
|
||||
if not to_list == "main" then
|
||||
return count
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end,
|
||||
allow_put = function(inv, listname, index, stack, player2)
|
||||
return 0
|
||||
end,
|
||||
allow_take = function(inv, listname, index, stack, player2)
|
||||
return -1
|
||||
end,
|
||||
on_move = function(inv, from_list, from_index, to_list, to_index, count, player2)
|
||||
end,
|
||||
on_put = function(inv, listname, index, stack, player2)
|
||||
end,
|
||||
on_take = function(inv, listname, index, stack, player2)
|
||||
if stack and stack:get_count() > 0 then
|
||||
minetest.log("action", player_name .. " takes " .. stack:get_name().. " from creative inventory")
|
||||
end
|
||||
end,
|
||||
}, player_name)
|
||||
|
||||
return player_inventory[player_name]
|
||||
end
|
||||
|
||||
function creative.update_creative_inventory(player_name, tab_content)
|
||||
local creative_list = {}
|
||||
local inv = player_inventory[player_name] or
|
||||
creative.init_creative_inventory(minetest.get_player_by_name(player_name))
|
||||
local player_inv = minetest.get_inventory({type = "detached", name = "creative_" .. player_name})
|
||||
|
||||
for name, def in pairs(tab_content) do
|
||||
if not (def.groups.not_in_creative_inventory == 1) and
|
||||
def.description and def.description ~= "" and
|
||||
(def.name:find(inv.filter, 1, true) or
|
||||
def.description:lower():find(inv.filter, 1, true)) then
|
||||
creative_list[#creative_list+1] = name
|
||||
end
|
||||
end
|
||||
|
||||
table.sort(creative_list)
|
||||
player_inv:set_size("main", #creative_list)
|
||||
player_inv:set_list("main", creative_list)
|
||||
inv.size = #creative_list
|
||||
end
|
||||
|
||||
-- Create the trash field
|
||||
local trash = minetest.create_detached_inventory("creative_trash", {
|
||||
-- Allow the stack to be placed and remove it in on_put()
|
||||
-- This allows the creative inventory to restore the stack
|
||||
allow_put = function(inv, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end,
|
||||
on_put = function(inv, listname)
|
||||
inv:set_list(listname, {})
|
||||
end,
|
||||
})
|
||||
trash:set_size("main", 1)
|
||||
|
||||
creative.formspec_add = ""
|
||||
|
||||
function creative.register_tab(name, title, items)
|
||||
sfinv.register_page("creative:" .. name, {
|
||||
title = title,
|
||||
is_in_nav = function(self, player, context)
|
||||
return creative.is_enabled_for(player:get_player_name())
|
||||
end,
|
||||
get = function(self, player, context)
|
||||
local player_name = player:get_player_name()
|
||||
creative.update_creative_inventory(player_name, items)
|
||||
local inv = player_inventory[player_name]
|
||||
local start_i = inv.start_i or 0
|
||||
local pagenum = math.floor(start_i / (3*8) + 1)
|
||||
local pagemax = math.ceil(inv.size / (3*8))
|
||||
return sfinv.make_formspec(player, context,
|
||||
"label[6.2,3.35;" .. minetest.colorize("#FFFF00", tostring(pagenum)) .. " / " .. tostring(pagemax) .. "]" ..
|
||||
[[
|
||||
image[4.06,3.4;0.8,0.8;creative_trash_icon.png]
|
||||
listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]
|
||||
list[current_player;main;0,4.7;8,1;]
|
||||
list[current_player;main;0,5.85;8,3;8]
|
||||
list[detached:creative_trash;main;4,3.3;1,1;]
|
||||
listring[]
|
||||
button[5.4,3.2;0.8,0.9;creative_prev;<]
|
||||
button[7.25,3.2;0.8,0.9;creative_next;>]
|
||||
button[2.1,3.4;0.8,0.5;creative_search;?]
|
||||
button[2.75,3.4;0.8,0.5;creative_clear;X]
|
||||
tooltip[creative_search;Search]
|
||||
tooltip[creative_clear;Reset]
|
||||
listring[current_player;main]
|
||||
field_close_on_enter[creative_filter;false]
|
||||
]] ..
|
||||
"field[0.3,3.5;2.2,1;creative_filter;;" .. minetest.formspec_escape(inv.filter) .. "]" ..
|
||||
"listring[detached:creative_" .. player_name .. ";main]" ..
|
||||
"list[detached:creative_" .. player_name .. ";main;0,0;8,3;" .. tostring(start_i) .. "]" ..
|
||||
init.get_hotbar_bg(0,4.7) ..
|
||||
init.gui_bg .. init.gui_bg_img .. init.gui_slots
|
||||
.. creative.formspec_add, false)
|
||||
end,
|
||||
on_enter = function(self, player, context)
|
||||
local player_name = player:get_player_name()
|
||||
local inv = player_inventory[player_name]
|
||||
if inv then
|
||||
inv.start_i = 0
|
||||
end
|
||||
end,
|
||||
on_player_receive_fields = function(self, player, context, fields)
|
||||
local player_name = player:get_player_name()
|
||||
local inv = player_inventory[player_name]
|
||||
assert(inv)
|
||||
|
||||
if fields.creative_clear then
|
||||
inv.start_i = 0
|
||||
inv.filter = ""
|
||||
creative.update_creative_inventory(player_name, items)
|
||||
sfinv.set_player_inventory_formspec(player, context)
|
||||
elseif fields.creative_search or
|
||||
fields.key_enter_field == "creative_filter" then
|
||||
inv.start_i = 0
|
||||
inv.filter = fields.creative_filter:lower()
|
||||
creative.update_creative_inventory(player_name, items)
|
||||
sfinv.set_player_inventory_formspec(player, context)
|
||||
elseif not fields.quit then
|
||||
local start_i = inv.start_i or 0
|
||||
|
||||
if fields.creative_prev then
|
||||
start_i = start_i - 3*8
|
||||
if start_i < 0 then
|
||||
start_i = inv.size - (inv.size % (3*8))
|
||||
if inv.size == start_i then
|
||||
start_i = math.max(0, inv.size - (3*8))
|
||||
end
|
||||
end
|
||||
elseif fields.creative_next then
|
||||
start_i = start_i + 3*8
|
||||
if start_i >= inv.size then
|
||||
start_i = 0
|
||||
end
|
||||
end
|
||||
|
||||
inv.start_i = start_i
|
||||
sfinv.set_player_inventory_formspec(player, context)
|
||||
end
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
creative.update_creative_inventory(player:get_player_name(), minetest.registered_items)
|
||||
end)
|
||||
|
||||
creative.register_tab("all", "All", minetest.registered_items)
|
||||
creative.register_tab("nodes", "Nodes", minetest.registered_nodes)
|
||||
creative.register_tab("tools", "Tools", minetest.registered_tools)
|
||||
creative.register_tab("craftitems", "Items", minetest.registered_craftitems)
|
||||
|
||||
local old_homepage_name = sfinv.get_homepage_name
|
||||
function sfinv.get_homepage_name(player)
|
||||
if creative.is_enabled_for(player:get_player_name()) then
|
||||
return "creative:all"
|
||||
else
|
||||
return old_homepage_name(player)
|
||||
end
|
||||
end
|
|
@ -1,60 +0,0 @@
|
|||
License of source code
|
||||
----------------------
|
||||
|
||||
The MIT License (MIT)
|
||||
Copyright (C) 2012-2016 Perttu Ahola (celeron55) <celeron55@gmail.com>
|
||||
Copyright (C) 2015-2016 Jean-Patrick G. (kilbith) <jeanpatrick.guerrero@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
software and associated documentation files (the "Software"), to deal in the Software
|
||||
without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more details:
|
||||
https://opensource.org/licenses/MIT
|
||||
|
||||
|
||||
Licenses of media (textures)
|
||||
----------------------------
|
||||
|
||||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||
Copyright (C) 2016 Jean-Patrick G. (kilbith) <jeanpatrick.guerrero@gmail.com>
|
||||
|
||||
You are free to:
|
||||
Share — copy and redistribute the material in any medium or format.
|
||||
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
|
||||
The licensor cannot revoke these freedoms as long as you follow the license terms.
|
||||
|
||||
Under the following terms:
|
||||
|
||||
Attribution — You must give appropriate credit, provide a link to the license, and
|
||||
indicate if changes were made. You may do so in any reasonable manner, but not in any way
|
||||
that suggests the licensor endorses you or your use.
|
||||
|
||||
ShareAlike — If you remix, transform, or build upon the material, you must distribute
|
||||
your contributions under the same license as the original.
|
||||
|
||||
No additional restrictions — You may not apply legal terms or technological measures that
|
||||
legally restrict others from doing anything the license permits.
|
||||
|
||||
Notices:
|
||||
|
||||
You do not have to comply with the license for elements of the material in the public
|
||||
domain or where your use is permitted by an applicable exception or limitation.
|
||||
No warranties are given. The license may not give you all of the permissions necessary
|
||||
for your intended use. For example, other rights such as publicity, privacy, or moral
|
||||
rights may limit how you use the material.
|
||||
|
||||
For more details:
|
||||
http://creativecommons.org/licenses/by-sa/3.0/
|
Before Width: | Height: | Size: 179 B |
|
@ -1,196 +0,0 @@
|
|||
API documentation for the HUD bars mod
|
||||
======================================
|
||||
|
||||
## Introduction
|
||||
This API allows you to add, change, hide and unhide custom HUD bars for this mod.
|
||||
|
||||
## Overview
|
||||
To give you a *very* brief overview over this API, here is the basic workflow on how to add your own custom HUD bar:
|
||||
|
||||
* Create images for your HUD bar
|
||||
* Call `hb.register_hudbar` to make the definition of the HUD bar known to this mod
|
||||
* Call `hb.init_hudbar` for each player for which you want to use previously defined HUD bar
|
||||
* Use `hb.change_hudbar` whenever you need to change the values of a HUD bar of a certain player
|
||||
* If you need it: Use `hb.hide_hudbar` and `hb.unhide_hudbar` to hide or unhide HUD bars of a certain player
|
||||
|
||||
## The basic rules
|
||||
In order to use this API, you should be aware of a few basic rules in order to understand it:
|
||||
|
||||
* A HUD bar is an approximate graphical representation of the ratio of a current value and a maximum value, i.e. current health of 15 and maximum health of 20. A full HUD bar represents 100%, an empty HUD bar represents 0%.
|
||||
* The current value must always be equal to or smaller then the maximum
|
||||
* Both current value and maximum must not be smaller than 0
|
||||
* Both current value and maximum must be real numbers. So no NaN, infinity, etc.
|
||||
* The HUD bar will be hidden if the maximum equals 0. This is intentional.
|
||||
* The health and breath HUD bars are hardcoded.
|
||||
|
||||
These are soft rules, the HUD bars mod will not enforce all of these.
|
||||
But this mod has been programmed under the assumption that these rules are followed, for integrity.
|
||||
|
||||
## Adding a HUD bar
|
||||
To make a new HUD bar known to this mod, you need …
|
||||
|
||||
* … an image of size 2×16 for the bar
|
||||
* … an icon of size 16×16 (optional)
|
||||
* … to register it with `hb.register_hudbar`
|
||||
|
||||
### Bar image
|
||||
The image for the bar will be repeated horizontally to denote the “value” of the HUD bar.
|
||||
It **must** be of size 2×16.
|
||||
If neccessary, the image will be split vertically in half, and only the left half of the image
|
||||
is displayed. So the final HUD bar will always be displayed on a per-pixel basis.
|
||||
|
||||
The default bar images are single-colored, but you can use other styles as well, for instance,
|
||||
a vertical gradient.
|
||||
|
||||
### Icon
|
||||
A 16×16 image shown left of the HUD bar. This is optional.
|
||||
|
||||
### `hb.register_hudbar(identifier, text_color, label, textures, default_start_value, default_start_max, default_start_hidden, format_string)`
|
||||
This function registers a new custom HUD bar definition to the HUD bars mod, so it can be later used to be displayed, changed, hidden
|
||||
and unhidden on a per-player basis.
|
||||
Note this does not yet display the HUD bar.
|
||||
|
||||
The HUD bars will be displayed in a “first come, first serve” order. This API does not allow fow a custom order or a way to set it
|
||||
manually in a reliable way. However, you can use the setting `hudbars_sorting` for this. See the advanced setting menu in Minetest
|
||||
for more information.
|
||||
|
||||
|
||||
#### Parameters
|
||||
* `identifier`: A globally unique internal name for the HUD bar, will be used later to refer to it. Please only rely on alphanumeric characters for now. The identifiers “`health`” and “`breath`” are used internally for the built-in health and breath bar, respectively. Please do not use these names.
|
||||
* `text_color`: A 3-octet number defining the color of the text. The octets denote, in this order red, green and blue and range from `0x00` (complete lack of this component) to `0xFF` (full intensity of this component). Example: `0xFFFFFF` for white.
|
||||
* `label`: A string which is displayed on the HUD bar itself to describe the HUD bar. Try to keep this string short.
|
||||
* `textures`: A table with the following fields:
|
||||
* `bar`: The file name of the bar image (as string). This is only used for the `progress_bar` bar type (see `README.txt`, settings section).
|
||||
* `icon`: The file name of the icon, as string. For the `progress_bar` type, it is shown as single image left of the bar, for the two statbar bar types, it is used as the statbar icon and will be repeated. This field can be `nil`, in which case no icon will be used, but this is not recommended, because the HUD bar will be invisible if the one of the statbar bar types is used.
|
||||
* `bgicon`: The file name of the background icon, it is used as the background for the modern statbar mode only. This field can be `nil`, in which case no background icon will be displayed in this mode.
|
||||
* `default_start_value`: If this HUD bar is added to a player, and no initial value is specified, this value will be used as initial current value
|
||||
* `default_max_value`: If this HUD bar is added to a player, and no initial maximum value is specified, this value will be used as initial maximum value
|
||||
* `default_start_hidden`: The HUD bar will be initially start hidden by default when added to a player. Use `hb.unhide_hudbar` to unhide it.
|
||||
* `format_string`: This is optional; You can specify an alternative format string display the final text on the HUD bar. The default format string is “`%s: %d/%d`” (in this order: Label, current value, maximum value). See also the Lua documentation of `string.format`.
|
||||
|
||||
#### Return value
|
||||
Always `nil`.
|
||||
|
||||
|
||||
## Displaying a HUD bar
|
||||
After a HUD bar has been registered, they are not yet displayed yet for any player. HUD bars must be
|
||||
explicitly initialized on a per-player basis.
|
||||
|
||||
You probably want to do this in the `minetest.register_on_joinplayer`.
|
||||
|
||||
### `hb.init_hudbar(player, identifier, start_value, start_max, start_hidden)`
|
||||
This function initialzes and activates a previously registered HUD bar and assigns it to a
|
||||
certain client/player. This has only to be done once per player and after that, you can change
|
||||
the values using `hb.change_hudbar`.
|
||||
|
||||
However, if `start_hidden` was set to `true` for the HUD bar (in `hb.register_hudbar`), the HUD bar
|
||||
will initially be hidden, but the HUD elements are still sent to the client. Otherwise,
|
||||
the HUD bar will be initially be shown to the player.
|
||||
|
||||
#### Parameters
|
||||
* `player`: `ObjectRef` of the player to which the new HUD bar should be displayed to.
|
||||
* `identifier`: The identifier of the HUD bar type, as specified in `hb.register_hudbar`.
|
||||
* `start_value`: The initial current value of the HUD bar. This is optional, `default_start_value` of the registration function will be used, if this is `nil`.
|
||||
* `start_max`: The initial maximum value of the HUD bar. This is optional, `default_start_max` of the registration function will be used, if this is `nil`
|
||||
* `start_hidden`: Whether the HUD bar is initially hidden. This is optional, `default_start_hidden` of the registration function will be used as default
|
||||
|
||||
#### Return value
|
||||
`true` on success, `false` otherwise.
|
||||
|
||||
|
||||
## Modifying a HUD bar
|
||||
After a HUD bar has been added, you can change the current and maximum value and other attributes on a per-player basis.
|
||||
You use the function `hb.change_hudbar` for this.
|
||||
|
||||
### `hb.change_hudbar(player, identifier, new_value, new_max_value, new_icon, new_bgicon, new_bar, new_label, new_text_color)`
|
||||
Changes the values and the appearance of an initialized HUD bar for a certain player. `new_value`
|
||||
and `new_max_value` are the most important parameters as they specify the new current and maximum new values, you do not need
|
||||
to worry too much about the other parameters.
|
||||
|
||||
The following parameters are less important and provided for styling the HUD bar after registration (if
|
||||
this is desired). The “styling” parameters parallel the parameters of `hb.register_hudbar`. It is
|
||||
recommended to not change the style of a HUD bar too often as this can be distracting or confusing
|
||||
for players.
|
||||
|
||||
`new_value`, `new_max_value` `new_icon`, `new_bgicon`, `new_bar`, `new_label` and `new_text_color` can be
|
||||
`nil`; if one of them is `nil`, that means the value is unchanged. If all those values are `nil`, this
|
||||
function is a no-op.
|
||||
|
||||
This function tries to minimize the amount of calls to `hud_change` of the Minetest Lua API
|
||||
(and thus, network traffic), when you only change the value and/or maximum value. In this case,
|
||||
`hud_change` is only called if it is actually needed, e.g. when the actual length of the bar
|
||||
or the displayed string changed, so you do not have to worry about it. There is, however, no
|
||||
such network optimization for the “styling” parameters, so keep this in mind.
|
||||
|
||||
#### Parameters
|
||||
* `player`: `ObjectRef` of the player to which the HUD bar belongs to
|
||||
* `identifier`: The identifier of the HUD bar type to change, as specified in `hb.register_hudbar`.
|
||||
* `new_value`: The new current value of the HUD bar
|
||||
* `new_max_value`: The new maximum value of the HUD bar
|
||||
* `new_icon`: File name of the new icon
|
||||
* `new_bgicon`: File name of the new background icon for the modern-style statbar
|
||||
* `new_bar`: File name of the new bar segment image
|
||||
* `new_label`: A new text label of the HUD bar. Note the format string still applies
|
||||
* `new_text_color`: A 3-octet number defining the new color of the text.
|
||||
|
||||
#### Return value
|
||||
`true` on success, `false` otherwise.
|
||||
|
||||
|
||||
## Hiding and unhiding a HUD bar
|
||||
You can also hide custom HUD bars, meaning they will not be displayed for a certain player. You can still
|
||||
use `hb.change_hudbar` on a hidden HUD bar, the new values will be correctly displayed after the HUD bar
|
||||
has been unhidden. Both functions will only call `hud_change` if there has been an actual change to avoid
|
||||
unneccessary traffic.
|
||||
|
||||
Note that the hidden state of a HUD bar will *not* be saved by this mod on server shutdown, so you may need
|
||||
to write your own routines for this or by setting the correct value for `start_hidden` when calling
|
||||
`hb.init_hudbar`.
|
||||
|
||||
### `hb.hide_hudbar(player, identifier)`
|
||||
Hides the specified HUD bar from the screen of the specified player.
|
||||
|
||||
#### Parameters
|
||||
* `player`: `ObjectRef` of the player to which the HUD bar belongs to
|
||||
* `identifier`: The identifier of the HUD bar type to hide, as specified in `hb.register_hudbar`.
|
||||
|
||||
#### Return value
|
||||
`true` on success, `false` otherwise.
|
||||
|
||||
|
||||
### `hb.unhide_hudbar(player, identifier)`
|
||||
Makes a previously hidden HUD bar visible again to a player.
|
||||
|
||||
#### Parameters
|
||||
* `player`: `ObjectRef` of the player to which the HUD bar belongs to
|
||||
* `identifier`: The identifier of the HUD bar type to unhide, as specified in `hb.register_hudbar`.
|
||||
|
||||
#### Return value
|
||||
`true` on success, `false` otherwise.
|
||||
|
||||
|
||||
## Reading HUD bar information
|
||||
It is also possible to read information about existing HUD bars.
|
||||
|
||||
### `hb.get_hudbar_state(player, identifier)`
|
||||
Returns the current state of the active player's HUD bar.
|
||||
|
||||
#### Parameters
|
||||
* `player`: `ObjectRef` of the player to which the HUD bar belongs to
|
||||
* `identifier`: The identifier of the HUD bar type to hide, as specified in `hb.register_hudbar`.
|
||||
|
||||
#### Return value
|
||||
On success, returns a table which holds information on the current state of the HUD bar. Note
|
||||
the table is a deep copy of the internal HUD bar state, it is *not* a reference; the information
|
||||
hold by the table is only true for the moment you called this function. The fields of this table are:
|
||||
|
||||
* `value`: Current value of HUD bar.
|
||||
* `max`: Current maximum value of HUD bar.
|
||||
* `hidden`: Boolean denoting whether the HUD bar is hidden.
|
||||
* `barlength`: The length of the HUD bar in pixels. This field is meaningless if the HUD bar is currently hidden.
|
||||
* `text`: The text shown on the HUD bar. This fiels is meaningless if the HUD bar is currently hidden.
|
||||
|
||||
If the player does not exist, returns `nil` instead.
|
||||
|
||||
### `hb.get_hudbar_identifiers()`
|
||||
Returns a table of all currently registered HUD bar identifiers.
|
|
@ -1,57 +0,0 @@
|
|||
# HUD bars
|
||||
|
||||
## Description
|
||||
This mod changes the HUD of Minetest. It replaces the default health and breath
|
||||
symbols by horizontal colored bars with text showing the number.
|
||||
|
||||
Furthermore, it enables other mods to add their own custom bars to the HUD,
|
||||
this mod will place them accordingly.
|
||||
|
||||
**Important**: Keep in mind if running a server with this mod, that the custom
|
||||
position should be displayed correctly on every screen size.
|
||||
|
||||
## Current version
|
||||
The current version is 1.9.0.
|
||||
|
||||
This software uses [semantic versioning](http://semver.org), as defined by version 2.0.0 of the SemVer
|
||||
standard.
|
||||
|
||||
## Settings
|
||||
This mod can be configured quite a bit. You can change HUD bar appearance, offsets, ordering, and more.
|
||||
Use the advanced settings menu in Minetest for detailed configuration.
|
||||
|
||||
## API
|
||||
The API is used to add your own custom HUD bars.
|
||||
Documentation for the API of this mod can be found in `API.md`.
|
||||
|
||||
## Legal
|
||||
### License of source code
|
||||
Author: Wuzzy (2015)
|
||||
|
||||
Also: This mod was forked from the “Better HUD” [hud] mod by BlockMen.
|
||||
|
||||
Translations:
|
||||
|
||||
* German: Wuzzy
|
||||
* Portuguese: BrunoMine
|
||||
* Turkish: admicos
|
||||
|
||||
This program is free software. It comes without any warranty, to
|
||||
the extent permitted by applicable law. You can redistribute it
|
||||
and/or modify it under the terms of the Do What The Fuck You Want
|
||||
To Public License (WTFPL), version 2, as published by Sam Hocevar.
|
||||
|
||||
### Licenses of textures
|
||||
|
||||
* `hudbars_icon_health.png`—celeron55 (CC BY-SA 3.0), modified by BlockMen
|
||||
* `hudbars_bgicon_health.png`—celeron55 (CC BY-SA 3.0), modified by BlockMen
|
||||
* `hudbars_icon_breath.png`—kaeza (WTFPL), modified by BlockMen, modified again by Wuzzy
|
||||
* `hudbars_bgicon_breath.png`—based on previous image, edited by Wuzzy (WTFPL)
|
||||
* `hudbars_bar_health.png`—Wuzzy (WTFPL)
|
||||
* `hudbars_bar_breath.png`—Wuzzy (WTFPL)
|
||||
* `hudbars_bar_background.png`—Wuzzy (WTFPL)
|
||||
|
||||
### License references
|
||||
|
||||
* [CC-BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/)
|
||||
* [WTFPL](http://sam.zoy.org/wtfpl/COPYING)
|
|
@ -1,92 +0,0 @@
|
|||
Note: This software uses semantic versioning,
|
||||
as of version 2.0.0 of the standard <http://semver.org/>.
|
||||
|
||||
0.1.0
|
||||
-----
|
||||
- Initial release, forked from mod “Better HUD” [hud].
|
||||
|
||||
0.2.0
|
||||
-----
|
||||
- Add API documentation
|
||||
|
||||
0.3.0
|
||||
-----
|
||||
- Rename main table from “hud” to “hb” (affects function names!)
|
||||
- Arguments 3-4 of hb.change_hudbar can be nil for values which should not change
|
||||
- Add proper function hb.init_hudbar, replaces odd call to hud.hudtables[identifier].add_all
|
||||
- Update API documentation and fix mistakes
|
||||
- Use “hudbars.conf” instead of “hud.conf”
|
||||
|
||||
0.4.0
|
||||
-----
|
||||
- New function: hb.get_hudbar_state to get information about the state of an active HUD bar, such as values, whether it is hidden, etc.
|
||||
- hb.change_hudbar has been optimized to call hud_change fewer times, which is hopefully good for networking
|
||||
- Rename hb.register_hudbar parameter “start_hide” to “start_hidden”
|
||||
- start_hidden parameter now finally works
|
||||
- Do not affect other HUD flags (crosshair, wielditem, etc.) when starting mod
|
||||
- Show error message when trying to call hb.init_hudbar or hb.change_hudbar with bad values
|
||||
- Update documentation
|
||||
- Lots of refactoring
|
||||
- Health and breath bar now use API
|
||||
|
||||
1.0.0
|
||||
-----
|
||||
- Add new parameter start_hidden to hb.init_hudbar, specified whether HUD bar is hidden on start
|
||||
- Copy-editing of API.md and README.txt
|
||||
- Internal: Fix add_all weirdness
|
||||
|
||||
1.0.1
|
||||
-----
|
||||
- Fix race condition causing crash at start of server
|
||||
|
||||
1.0.2
|
||||
-----
|
||||
- Fix other HUD elements disappearing for rejoining players
|
||||
- Remove pointless delays for initializing the HUD for new or rejoining players
|
||||
|
||||
1.0.3
|
||||
-----
|
||||
- Adjust default HUD bars position for Minetest 0.4.12
|
||||
|
||||
1.1.0
|
||||
-----
|
||||
- Add boolean minetest.conf setting support (hudbars_autohide_breathbar) to control whether the breath bar is automatically hidden when full (default: yes)
|
||||
|
||||
1.2.0
|
||||
-----
|
||||
- New setting: hudbars_sorting. You can now manually sort all the HUD bars. Useful if you don't like automatic order
|
||||
- New setting: hudbars_bar_type. You now can change the appearance of the HUD bars.
|
||||
- New HUD bar types, slightly experimental: Classic statbars and modern [hud]-style statbars
|
||||
- New experimental/unfinished setting: hudbars_alignment_pattern: You can now make the HUD bars stack vertically instead of the current zig-zag pattern. Note you probably need to change source code to productively use this feature
|
||||
- Various position-related HUD bar settings (see README.txt)
|
||||
- Remove hudbars.conf support and hudbars.conf.example (was never officially supported anyways)
|
||||
|
||||
1.2.1
|
||||
-----
|
||||
- Fix crash when enable_damage is changed in mid-game
|
||||
|
||||
1.3.0
|
||||
-----
|
||||
- Make all settings avaialbe in Minetest's advanced settings menu
|
||||
- Fix HUD bars overlap when both hudbars_tick and hudbars_vmargin were set
|
||||
- Use Markdown syntax in readme file
|
||||
- Fix some factual mistakes in readme file
|
||||
- Add metadata: mod.conf, description.txt, screenshot.png
|
||||
|
||||
1.4.0
|
||||
-----
|
||||
- Allow to change HUD bar images and label after it has been registered
|
||||
- Minor API.md correction
|
||||
|
||||
1.4.1
|
||||
-----
|
||||
- Fix bug in hb.change_hudbar being a no-op if new_value and new_max value are nil
|
||||
|
||||
1.5.0
|
||||
-----
|
||||
- Portuguese translation by BrunoMine
|
||||
|
||||
1.5.1
|
||||
-----
|
||||
- Fix critical bug: Mod does not work with both intllib and mod security enabled
|
||||
- Update screenshot to use new 3:2 aspect ratio
|
|
@ -1,48 +0,0 @@
|
|||
-- (Hardcoded) default settings
|
||||
|
||||
hb.settings.max_bar_length = 160
|
||||
hb.settings.statbar_length = 20
|
||||
|
||||
-- Statbar positions
|
||||
hb.settings.pos_left = {}
|
||||
hb.settings.pos_right = {}
|
||||
hb.settings.start_offset_left = {}
|
||||
hb.settings.start_offset_right= {}
|
||||
hb.settings.pos_left.x = hb.load_setting("hudbars_pos_left_x", "number", 0.5)
|
||||
hb.settings.pos_left.y = hb.load_setting("hudbars_pos_left_y", "number", 1)
|
||||
hb.settings.pos_right.x = hb.load_setting("hudbars_pos_right_x", "number", 0.5)
|
||||
hb.settings.pos_right.y = hb.load_setting("hudbars_pos_right_y", "number", 1)
|
||||
hb.settings.bar_type = hb.load_setting("hudbars_bar_type", "string", "progress_bar", {"progress_bar", "statbar_classic", "statbar_modern"})
|
||||
if hb.settings.bar_type == "progress_bar" then
|
||||
hb.settings.start_offset_left.x = hb.load_setting("hudbars_start_offset_left_x", "number", -175)
|
||||
hb.settings.start_offset_left.y = hb.load_setting("hudbars_start_offset_left_y", "number", -86)
|
||||
hb.settings.start_offset_right.x = hb.load_setting("hudbars_start_offset_right_x", "number", 15)
|
||||
hb.settings.start_offset_right.y = hb.load_setting("hudbars_start_offset_right_y", "number", -86)
|
||||
else
|
||||
hb.settings.start_offset_left.x = hb.load_setting("hudbars_start_statbar_offset_left_x", "number", -265)
|
||||
hb.settings.start_offset_left.y = hb.load_setting("hudbars_start_statbar_offset_left_y", "number", -90)
|
||||
hb.settings.start_offset_right.x = hb.load_setting("hudbars_start_statbar_offset_right_x", "number", 25)
|
||||
hb.settings.start_offset_right.y = hb.load_setting("hudbars_start_statbar_offset_right_y", "number", -90)
|
||||
end
|
||||
hb.settings.vmargin = hb.load_setting("hudbars_vmargin", "number", 24)
|
||||
hb.settings.tick = hb.load_setting("hudbars_tick", "number", 0.1)
|
||||
|
||||
-- Experimental setting: Changing this setting is not officially supported, do NOT rely on it!
|
||||
hb.settings.forceload_default_hudbars = hb.load_setting("hudbars_forceload_default_hudbars", "bool", true)
|
||||
|
||||
-- Misc. settings
|
||||
hb.settings.alignment_pattern = hb.load_setting("hudbars_alignment_pattern", "string", "zigzag", {"zigzag", "stack_up", "stack_down"})
|
||||
hb.settings.autohide_breath = hb.load_setting("hudbars_autohide_breath", "bool", true)
|
||||
|
||||
local sorting = minetest.settings:get("hudbars_sorting")
|
||||
if sorting ~= nil then
|
||||
hb.settings.sorting = {}
|
||||
hb.settings.sorting_reverse = {}
|
||||
for k,v in string.gmatch(sorting, "(%w+)=(%w+)") do
|
||||
hb.settings.sorting[k] = tonumber(v)
|
||||
hb.settings.sorting_reverse[tonumber(v)] = k
|
||||
end
|
||||
else
|
||||
hb.settings.sorting = { ["health"] = 0, ["breath"] = 1 }
|
||||
hb.settings.sorting_reverse = { [0] = "health", [1] = "breath" }
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
intllib?
|
|
@ -1 +0,0 @@
|
|||
Replaces the health and breath symbols in the HUD by “progress bars” and shows exact values. Other mods can add more progress bars for custom player stats.
|
|
@ -1,524 +0,0 @@
|
|||
local S
|
||||
if (minetest.get_modpath("intllib")) then
|
||||
S = intllib.Getter()
|
||||
else
|
||||
S = function ( s ) return s end
|
||||
end
|
||||
|
||||
hb = {}
|
||||
|
||||
hb.hudtables = {}
|
||||
|
||||
-- number of registered HUD bars
|
||||
hb.hudbars_count = 0
|
||||
|
||||
-- table which records which HUD bar slots have been “registered” so far; used for automatic positioning
|
||||
hb.registered_slots = {}
|
||||
|
||||
hb.settings = {}
|
||||
|
||||
function hb.load_setting(sname, stype, defaultval, valid_values)
|
||||
local sval
|
||||
if stype == "string" then
|
||||
sval = minetest.settings:get(sname)
|
||||
elseif stype == "bool" then
|
||||
sval = minetest.settings:get_bool(sname)
|
||||
elseif stype == "number" then
|
||||
sval = tonumber(minetest.settings:get(sname))
|
||||
end
|
||||
if sval ~= nil then
|
||||
if valid_values ~= nil then
|
||||
local valid = false
|
||||
for i=1,#valid_values do
|
||||
if sval == valid_values[i] then
|
||||
valid = true
|
||||
end
|
||||
end
|
||||
if not valid then
|
||||
minetest.log("error", "[hudbars] Invalid value for "..sname.."! Using default value ("..tostring(defaultval)..").")
|
||||
return defaultval
|
||||
else
|
||||
return sval
|
||||
end
|
||||
else
|
||||
return sval
|
||||
end
|
||||
else
|
||||
return defaultval
|
||||
end
|
||||
end
|
||||
|
||||
-- Load default settings
|
||||
dofile(minetest.get_modpath("hudbars").."/default_settings.lua")
|
||||
|
||||
local function player_exists(player)
|
||||
return player ~= nil and player:is_player()
|
||||
end
|
||||
|
||||
-- Table which contains all players with active default HUD bars (only for internal use)
|
||||
hb.players = {}
|
||||
|
||||
function hb.value_to_barlength(value, max)
|
||||
if max == 0 then
|
||||
return 0
|
||||
else
|
||||
if hb.settings.bar_type == "progress_bar" then
|
||||
local x
|
||||
if value < 0 then x=-0.5 else x = 0.5 end
|
||||
local ret = math.modf((value/max) * hb.settings.max_bar_length + x)
|
||||
return ret
|
||||
else
|
||||
local x
|
||||
if value < 0 then x=-0.5 else x = 0.5 end
|
||||
local ret = math.modf((value/max) * hb.settings.statbar_length + x)
|
||||
return ret
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function hb.get_hudtable(identifier)
|
||||
return hb.hudtables[identifier]
|
||||
end
|
||||
|
||||
function hb.get_hudbar_position_index(identifier)
|
||||
if hb.settings.sorting[identifier] ~= nil then
|
||||
return hb.settings.sorting[identifier]
|
||||
else
|
||||
local i = 0
|
||||
while true do
|
||||
if hb.registered_slots[i] ~= true and hb.settings.sorting_reverse[i] == nil then
|
||||
return i
|
||||
end
|
||||
i = i + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function hb.register_hudbar(identifier, text_color, label, textures, default_start_value, default_start_max, default_start_hidden, format_string)
|
||||
minetest.log("action", "hb.register_hudbar: "..tostring(identifier))
|
||||
local hudtable = {}
|
||||
local pos, offset
|
||||
local index = math.floor(hb.get_hudbar_position_index(identifier))
|
||||
hb.registered_slots[index] = true
|
||||
if hb.settings.alignment_pattern == "stack_up" then
|
||||
pos = hb.settings.pos_left
|
||||
offset = {
|
||||
x = hb.settings.start_offset_left.x,
|
||||
y = hb.settings.start_offset_left.y - hb.settings.vmargin * index
|
||||
}
|
||||
elseif hb.settings.alignment_pattern == "stack_down" then
|
||||
pos = hb.settings.pos_left
|
||||
offset = {
|
||||
x = hb.settings.start_offset_left.x,
|
||||
y = hb.settings.start_offset_left.y + hb.settings.vmargin * index
|
||||
}
|
||||
else
|
||||
if index % 2 == 0 then
|
||||
pos = hb.settings.pos_left
|
||||
offset = {
|
||||
x = hb.settings.start_offset_left.x,
|
||||
y = hb.settings.start_offset_left.y - hb.settings.vmargin * (index/2)
|
||||
}
|
||||
else
|
||||
pos = hb.settings.pos_right
|
||||
offset = {
|
||||
x = hb.settings.start_offset_right.x,
|
||||
y = hb.settings.start_offset_right.y - hb.settings.vmargin * ((index-1)/2)
|
||||
}
|
||||
end
|
||||
end
|
||||
if format_string == nil then
|
||||
format_string = S("%s: %d/%d")
|
||||
end
|
||||
|
||||
hudtable.add_all = function(player, hudtable, start_value, start_max, start_hidden)
|
||||
if start_value == nil then start_value = hudtable.default_start_value end
|
||||
if start_max == nil then start_max = hudtable.default_start_max end
|
||||
if start_hidden == nil then start_hidden = hudtable.default_start_hidden end
|
||||
local ids = {}
|
||||
local state = {}
|
||||
local name = player:get_player_name()
|
||||
local bgscale, iconscale, text, barnumber, bgiconnumber
|
||||
if start_max == 0 or start_hidden then
|
||||
bgscale = { x=0, y=0 }
|
||||
else
|
||||
bgscale = { x=1, y=1 }
|
||||
end
|
||||
if start_hidden then
|
||||
iconscale = { x=0, y=0 }
|
||||
barnumber = 0
|
||||
bgiconnumber = 0
|
||||
text = ""
|
||||
else
|
||||
iconscale = { x=1, y=1 }
|
||||
barnumber = hb.value_to_barlength(start_value, start_max)
|
||||
bgiconnumber = hb.settings.statbar_length
|
||||
text = string.format(format_string, label, start_value, start_max)
|
||||
end
|
||||
if hb.settings.bar_type == "progress_bar" then
|
||||
ids.bg = player:hud_add({
|
||||
hud_elem_type = "image",
|
||||
position = pos,
|
||||
scale = bgscale,
|
||||
text = "hudbars_bar_background.png",
|
||||
alignment = {x=1,y=1},
|
||||
offset = { x = offset.x - 1, y = offset.y - 1 },
|
||||
})
|
||||
if textures.icon ~= nil then
|
||||
ids.icon = player:hud_add({
|
||||
hud_elem_type = "image",
|
||||
position = pos,
|
||||
scale = iconscale,
|
||||
text = textures.icon,
|
||||
alignment = {x=-1,y=1},
|
||||
offset = { x = offset.x - 3, y = offset.y },
|
||||
})
|
||||
end
|
||||
elseif hb.settings.bar_type == "statbar_modern" then
|
||||
if textures.bgicon ~= nil then
|
||||
ids.bg = player:hud_add({
|
||||
hud_elem_type = "statbar",
|
||||
position = pos,
|
||||
text = textures.bgicon,
|
||||
number = bgiconnumber,
|
||||
alignment = {x=-1,y=-1},
|
||||
offset = { x = offset.x, y = offset.y },
|
||||
direction = 0,
|
||||
size = {x=24, y=24},
|
||||
})
|
||||
end
|
||||
end
|
||||
local bar_image, bar_size
|
||||
if hb.settings.bar_type == "progress_bar" then
|
||||
bar_image = textures.bar
|
||||
bar_size = {x=2, y=16}
|
||||
elseif hb.settings.bar_type == "statbar_classic" or hb.settings.bar_type == "statbar_modern" then
|
||||
bar_image = textures.icon
|
||||
bar_size = {x=24, y=24}
|
||||
end
|
||||
ids.bar = player:hud_add({
|
||||
hud_elem_type = "statbar",
|
||||
position = pos,
|
||||
text = bar_image,
|
||||
number = barnumber,
|
||||
alignment = {x=-1,y=-1},
|
||||
offset = offset,
|
||||
direction = 0,
|
||||
size = bar_size,
|
||||
})
|
||||
if hb.settings.bar_type == "progress_bar" then
|
||||
ids.text = player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
position = pos,
|
||||
text = text,
|
||||
alignment = {x=1,y=1},
|
||||
number = text_color,
|
||||
direction = 0,
|
||||
offset = { x = offset.x + 2, y = offset.y - 1},
|
||||
})
|
||||
end
|
||||
-- Do not forget to update hb.get_hudbar_state if you add new fields to the state table
|
||||
state.hidden = start_hidden
|
||||
state.value = start_value
|
||||
state.max = start_max
|
||||
state.text = text
|
||||
state.barlength = hb.value_to_barlength(start_value, start_max)
|
||||
|
||||
local main_error_text =
|
||||
"[hudbars] Bad initial values of HUD bar identifier “"..tostring(identifier).."” for player "..name..". "
|
||||
|
||||
if start_max < start_value then
|
||||
minetest.log("error", main_error_text.."start_max ("..start_max..") is smaller than start_value ("..start_value..")!")
|
||||
end
|
||||
if start_max < 0 then
|
||||
minetest.log("error", main_error_text.."start_max ("..start_max..") is smaller than 0!")
|
||||
end
|
||||
if start_value < 0 then
|
||||
minetest.log("error", main_error_text.."start_value ("..start_value..") is smaller than 0!")
|
||||
end
|
||||
|
||||
hb.hudtables[identifier].hudids[name] = ids
|
||||
hb.hudtables[identifier].hudstate[name] = state
|
||||
end
|
||||
|
||||
hudtable.identifier = identifier
|
||||
hudtable.format_string = format_string
|
||||
hudtable.label = label
|
||||
hudtable.hudids = {}
|
||||
hudtable.hudstate = {}
|
||||
hudtable.default_start_hidden = default_start_hidden
|
||||
hudtable.default_start_value = default_start_value
|
||||
hudtable.default_start_max = default_start_max
|
||||
|
||||
hb.hudbars_count= hb.hudbars_count + 1
|
||||
|
||||
hb.hudtables[identifier] = hudtable
|
||||
end
|
||||
|
||||
function hb.init_hudbar(player, identifier, start_value, start_max, start_hidden)
|
||||
if not player_exists(player) then return false end
|
||||
local hudtable = hb.get_hudtable(identifier)
|
||||
hb.hudtables[identifier].add_all(player, hudtable, start_value, start_max, start_hidden)
|
||||
return true
|
||||
end
|
||||
|
||||
function hb.change_hudbar(player, identifier, new_value, new_max_value, new_icon, new_bgicon, new_bar, new_label, new_text_color)
|
||||
if new_value == nil and new_max_value == nil and new_icon == nil and new_bgicon == nil and new_bar == nil and new_label == nil and new_text_color == nil then
|
||||
return true
|
||||
end
|
||||
if not player_exists(player) then
|
||||
return false
|
||||
end
|
||||
|
||||
local name = player:get_player_name()
|
||||
local hudtable = hb.get_hudtable(identifier)
|
||||
local value_changed, max_changed = false, false
|
||||
|
||||
if new_value ~= nil then
|
||||
if new_value ~= hudtable.hudstate[name].value then
|
||||
hudtable.hudstate[name].value = new_value
|
||||
value_changed = true
|
||||
end
|
||||
else
|
||||
new_value = hudtable.hudstate[name].value
|
||||
end
|
||||
if new_max_value ~= nil then
|
||||
if new_max_value ~= hudtable.hudstate[name].max then
|
||||
hudtable.hudstate[name].max = new_max_value
|
||||
max_changed = true
|
||||
end
|
||||
else
|
||||
new_max_value = hudtable.hudstate[name].max
|
||||
end
|
||||
|
||||
if hb.settings.bar_type == "progress_bar" then
|
||||
if new_icon ~= nil and hudtable.hudids[name].icon ~= nil then
|
||||
player:hud_change(hudtable.hudids[name].icon, "text", new_icon)
|
||||
end
|
||||
if new_bgicon ~= nil and hudtable.hudids[name].bgicon ~= nil then
|
||||
player:hud_change(hudtable.hudids[name].bgicon, "text", new_bgicon)
|
||||
end
|
||||
if new_bar ~= nil then
|
||||
player:hud_change(hudtable.hudids[name].bar , "text", new_bar)
|
||||
end
|
||||
if new_label ~= nil then
|
||||
hudtable.label = new_label
|
||||
local new_text = string.format(hudtable.format_string, new_label, hudtable.hudstate[name].value, hudtable.hudstate[name].max)
|
||||
player:hud_change(hudtable.hudids[name].text, "text", new_text)
|
||||
end
|
||||
if new_text_color ~= nil then
|
||||
player:hud_change(hudtable.hudids[name].text, "number", new_text_color)
|
||||
end
|
||||
else
|
||||
if new_icon ~= nil and hudtable.hudids[name].bar ~= nil then
|
||||
player:hud_change(hudtable.hudids[name].bar, "text", new_icon)
|
||||
end
|
||||
if new_bgicon ~= nil and hudtable.hudids[name].bg ~= nil then
|
||||
player:hud_change(hudtable.hudids[name].bg, "text", new_bgicon)
|
||||
end
|
||||
end
|
||||
|
||||
local main_error_text =
|
||||
"[hudbars] Bad call to hb.change_hudbar, identifier: “"..tostring(identifier).."”, player name: “"..name.."”. "
|
||||
if new_max_value < new_value then
|
||||
minetest.log("error", main_error_text.."new_max_value ("..new_max_value..") is smaller than new_value ("..new_value..")!")
|
||||
end
|
||||
if new_max_value < 0 then
|
||||
minetest.log("error", main_error_text.."new_max_value ("..new_max_value..") is smaller than 0!")
|
||||
end
|
||||
if new_value < 0 then
|
||||
minetest.log("error", main_error_text.."new_value ("..new_value..") is smaller than 0!")
|
||||
end
|
||||
|
||||
if hudtable.hudstate[name].hidden == false then
|
||||
if max_changed and hb.settings.bar_type == "progress_bar" then
|
||||
if hudtable.hudstate[name].max == 0 then
|
||||
player:hud_change(hudtable.hudids[name].bg, "scale", {x=0,y=0})
|
||||
else
|
||||
player:hud_change(hudtable.hudids[name].bg, "scale", {x=1,y=1})
|
||||
end
|
||||
end
|
||||
|
||||
if value_changed or max_changed then
|
||||
local new_barlength = hb.value_to_barlength(new_value, new_max_value)
|
||||
if new_barlength ~= hudtable.hudstate[name].barlength then
|
||||
player:hud_change(hudtable.hudids[name].bar, "number", hb.value_to_barlength(new_value, new_max_value))
|
||||
hudtable.hudstate[name].barlength = new_barlength
|
||||
end
|
||||
|
||||
if hb.settings.bar_type == "progress_bar" then
|
||||
local new_text = string.format(hudtable.format_string, hudtable.label, new_value, new_max_value)
|
||||
if new_text ~= hudtable.hudstate[name].text then
|
||||
player:hud_change(hudtable.hudids[name].text, "text", new_text)
|
||||
hudtable.hudstate[name].text = new_text
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function hb.hide_hudbar(player, identifier)
|
||||
if not player_exists(player) then return false end
|
||||
local name = player:get_player_name()
|
||||
local hudtable = hb.get_hudtable(identifier)
|
||||
if hudtable == nil then return false end
|
||||
if(hudtable.hudstate[name].hidden == false) then
|
||||
if hb.settings.bar_type == "progress_bar" then
|
||||
if hudtable.hudids[name].icon ~= nil then
|
||||
player:hud_change(hudtable.hudids[name].icon, "scale", {x=0,y=0})
|
||||
end
|
||||
player:hud_change(hudtable.hudids[name].bg, "scale", {x=0,y=0})
|
||||
player:hud_change(hudtable.hudids[name].text, "text", "")
|
||||
elseif hb.settings.bar_type == "statbar_modern" then
|
||||
player:hud_change(hudtable.hudids[name].bg, "number", 0)
|
||||
end
|
||||
player:hud_change(hudtable.hudids[name].bar, "number", 0)
|
||||
hudtable.hudstate[name].hidden = true
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function hb.unhide_hudbar(player, identifier)
|
||||
if not player_exists(player) then return false end
|
||||
local name = player:get_player_name()
|
||||
local hudtable = hb.get_hudtable(identifier)
|
||||
if hudtable == nil then return false end
|
||||
if(hudtable.hudstate[name].hidden) then
|
||||
local value = hudtable.hudstate[name].value
|
||||
local max = hudtable.hudstate[name].max
|
||||
if hb.settings.bar_type == "progress_bar" then
|
||||
if hudtable.hudids[name].icon ~= nil then
|
||||
player:hud_change(hudtable.hudids[name].icon, "scale", {x=1,y=1})
|
||||
end
|
||||
if hudtable.hudstate[name].max ~= 0 then
|
||||
player:hud_change(hudtable.hudids[name].bg, "scale", {x=1,y=1})
|
||||
end
|
||||
player:hud_change(hudtable.hudids[name].text, "text", tostring(string.format(hudtable.format_string, hudtable.label, value, max)))
|
||||
elseif hb.settings.bar_type == "statbar_modern" then
|
||||
player:hud_change(hudtable.hudids[name].bg, "number", hb.settings.statbar_length)
|
||||
end
|
||||
player:hud_change(hudtable.hudids[name].bar, "number", hb.value_to_barlength(value, max))
|
||||
hudtable.hudstate[name].hidden = false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function hb.get_hudbar_state(player, identifier)
|
||||
if not player_exists(player) then return nil end
|
||||
local ref = hb.get_hudtable(identifier).hudstate[player:get_player_name()]
|
||||
-- Do not forget to update this chunk of code in case the state changes
|
||||
local copy = {
|
||||
hidden = ref.hidden,
|
||||
value = ref.value,
|
||||
max = ref.max,
|
||||
text = ref.text,
|
||||
barlength = ref.barlength,
|
||||
}
|
||||
return copy
|
||||
end
|
||||
|
||||
function hb.get_hudbar_identifiers()
|
||||
local ids = {}
|
||||
for id, _ in pairs(hb.hudtables) do
|
||||
table.insert(ids, id)
|
||||
end
|
||||
return ids
|
||||
end
|
||||
|
||||
--register built-in HUD bars
|
||||
if minetest.settings:get_bool("enable_damage") or hb.settings.forceload_default_hudbars then
|
||||
hb.register_hudbar("health", 0xFFFFFF, S("Health"), { bar = "hudbars_bar_health.png", icon = "hudbars_icon_health.png", bgicon = "hudbars_bgicon_health.png" }, 20, 20, false)
|
||||
hb.register_hudbar("breath", 0xFFFFFF, S("Breath"), { bar = "hudbars_bar_breath.png", icon = "hudbars_icon_breath.png", bgicon = "hudbars_bgicon_breath.png" }, 10, 10, true)
|
||||
end
|
||||
|
||||
local function hide_builtin(player)
|
||||
local flags = player:hud_get_flags()
|
||||
flags.healthbar = false
|
||||
flags.breathbar = false
|
||||
player:hud_set_flags(flags)
|
||||
end
|
||||
|
||||
|
||||
local function custom_hud(player)
|
||||
if minetest.settings:get_bool("enable_damage") or hb.settings.forceload_default_hudbars then
|
||||
local hide
|
||||
if minetest.settings:get_bool("enable_damage") then
|
||||
hide = false
|
||||
else
|
||||
hide = true
|
||||
end
|
||||
hb.init_hudbar(player, "health", player:get_hp(), nil, hide)
|
||||
local breath = player:get_breath()
|
||||
local hide_breath
|
||||
if breath == 11 and hb.settings.autohide_breath == true then hide_breath = true else hide_breath = false end
|
||||
hb.init_hudbar(player, "breath", math.min(breath, 10), nil, hide_breath or hide)
|
||||
end
|
||||
end
|
||||
|
||||
local function update_health(player)
|
||||
hb.change_hudbar(player, "health", player:get_hp())
|
||||
end
|
||||
|
||||
-- update built-in HUD bars
|
||||
local function update_hud(player)
|
||||
if not player_exists(player) then return end
|
||||
if minetest.settings:get_bool("enable_damage") then
|
||||
if hb.settings.forceload_default_hudbars then
|
||||
hb.unhide_hudbar(player, "health")
|
||||
end
|
||||
--air
|
||||
local breath = player:get_breath()
|
||||
|
||||
if breath == 11 and hb.settings.autohide_breath == true then
|
||||
hb.hide_hudbar(player, "breath")
|
||||
else
|
||||
hb.unhide_hudbar(player, "breath")
|
||||
hb.change_hudbar(player, "breath", math.min(breath, 10))
|
||||
end
|
||||
--health
|
||||
update_health(player)
|
||||
elseif hb.settings.forceload_default_hudbars then
|
||||
hb.hide_hudbar(player, "health")
|
||||
hb.hide_hudbar(player, "breath")
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_on_player_hpchange(function(player)
|
||||
if hb.players[player:get_player_name()] ~= nil then
|
||||
update_health(player)
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_on_respawnplayer(function(player)
|
||||
update_health(player)
|
||||
hb.hide_hudbar(player, "breath")
|
||||
end)
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
hide_builtin(player)
|
||||
custom_hud(player)
|
||||
hb.players[player:get_player_name()] = player
|
||||
end)
|
||||
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
hb.players[player:get_player_name()] = nil
|
||||
end)
|
||||
|
||||
local main_timer = 0
|
||||
local timer = 0
|
||||
minetest.register_globalstep(function(dtime)
|
||||
main_timer = main_timer + dtime
|
||||
timer = timer + dtime
|
||||
if main_timer > hb.settings.tick or timer > 4 then
|
||||
if main_timer > hb.settings.tick then main_timer = 0 end
|
||||
-- only proceed if damage is enabled
|
||||
if minetest.settings:get_bool("enable_damage") or hb.settings.forceload_default_hudbars then
|
||||
for _, player in pairs(hb.players) do
|
||||
-- update all hud elements
|
||||
update_hud(player)
|
||||
end
|
||||
end
|
||||
end
|
||||
if timer > 4 then timer = 0 end
|
||||
end)
|
|
@ -1,3 +0,0 @@
|
|||
Health = Leben
|
||||
Breath = Atem
|
||||
%s: %d/%d = %s: %d/%d
|
|
@ -1,5 +0,0 @@
|
|||
Health = Saude
|
||||
Breath = Folego
|
||||
|
||||
# Formato de string padrão para progresso bar-style de barras do HUD, por exemplo “Saude 5/20”
|
||||
%s: %d/%d
|
|
@ -1,5 +0,0 @@
|
|||
Health
|
||||
Breath
|
||||
|
||||
# Default format string for progress bar-style HUD bars, e.g. “Health 5/20”
|
||||
%s: %d/%d
|
|
@ -1,3 +0,0 @@
|
|||
Health = Can
|
||||
Breath = Nefes
|
||||
%s: %d/%d = %s: %d/%d
|
|
@ -1 +0,0 @@
|
|||
name = hudbars
|
Before Width: | Height: | Size: 9.3 KiB |
|
@ -1,119 +0,0 @@
|
|||
[Appearance]
|
||||
# Specifies how the value indicators (i.e. health, breah, etc.) look. There are 3 styles
|
||||
# available. You can choose between the default progress-bar-like bars and the good
|
||||
# old statbars like you know from vanilla Minetest.
|
||||
# These values are possible:
|
||||
# - progress_bar: A horizontal progress-bar-like bar with a label, showing numerical value
|
||||
# (current, maximum), and an icon. These bars usually convey the most
|
||||
# information. This is the default and recommended value.
|
||||
# - statbar_classic: Classic statbar, like in vanilla Minetest. Made out of up to 20
|
||||
# half-symbols. Those bars represent the vague ratio between
|
||||
# the current value and the maximum value. 1 half-symbol stands for
|
||||
# approximately 5% of the maximum value.
|
||||
# - statbar_modern: Like the classic statbar, but also supports background images, this
|
||||
# kind of statbar may be considered to be more user-friendly than the
|
||||
# classic statbar. This bar type closely resembles the mod
|
||||
# “Better HUD” [hud] by BlockMen.
|
||||
hudbars_bar_type (HUD bars style) enum progress_bar progress_bar,statbar_classic,statbar_modern
|
||||
|
||||
|
||||
# If enabled (default), the breath indicators in the HUD will be automatically hidden shortly
|
||||
# after the breath has been filled up. Otherwise, the breath will always be displayed.
|
||||
hudbars_autohide_breath (Automatically hide breath indicators) bool true
|
||||
|
||||
# This setting changes the way the HUD bars are ordered on the display. You can choose
|
||||
# between a zig-zag pattern (default) or a vertically stacked pattern.
|
||||
# The following values are allowed:
|
||||
# - zigzag: Starting from the left bottom, the next is right from the first,
|
||||
# the next is above the first, the next is right of the third, etc.
|
||||
# - stack_up: The HUD bars are stacked vertically, going upwards.
|
||||
# - stack_down: The HUD bars are stacked vertically, going downwards.
|
||||
hudbars_alignment_pattern (HUD bars alignment pattern) enum zigzag zigzag,stack_up,stack_down
|
||||
|
||||
# This setting allows you to specify the order of the HUD bars explicitly. If left empty
|
||||
# (the default), the health and breath indicators come first, additional indicators
|
||||
# may appear in any order. This setting is quite technical and normal users probably do not
|
||||
# need to worry about it.
|
||||
#
|
||||
# Syntax:
|
||||
# The setting has to be specified as a comma-seperated list of key=value pairs, where a key
|
||||
# refers to the identifier of a HUD bar and the value refers to the slot number of where the
|
||||
# HUD bar should be placed. The slot number must be an integer greater of equal to 0. Where
|
||||
# the HUD bars will be displayed exactly depends on the alignment pattern being used.
|
||||
# All HUD bars to which no order value has been applied will fill in all slots which have
|
||||
# not been occupied by the HUD bars specified in this setting, the slots will be filled in
|
||||
# from the lowest slot number.
|
||||
# Note that the order of those remaining HUD bars is not fixed, it basically just boils
|
||||
# down on which mod “came” first. Don't worry, the mod will still work perfectly fine, this
|
||||
# setting is entirely optional.
|
||||
# The identifier for the health bar is “health” and the identifier for the breath bar is
|
||||
# “breath”. For other HUD bars, you have to learn it from the mod which is supplying them.
|
||||
#
|
||||
# Be careful not to use slot indices twice, or else different HUD bars will be drawn over
|
||||
# each other!
|
||||
#
|
||||
# Example: “breath=0, health=1”
|
||||
# This makes the breath bar first and the health bar second, which is the opposite order
|
||||
# of the default one.
|
||||
hudbars_sorting (HUD bars order) string
|
||||
|
||||
[Positions and offsets]
|
||||
# Horizontal (x) main position of the HUD bars over the entire screen.
|
||||
# 0.0 is left-most, 1.0 is right-most.
|
||||
# For the zig-zag alignment pattern, this is for the left HUD bars.
|
||||
hudbars_pos_left_x (Left HUD bar screen x position) float 0.5 0.0 1.0
|
||||
# Vertical (y) main position of the HUD bars over the entire screen.
|
||||
# 0.0 is top, 1.0 is bottom.
|
||||
# For the zig-zag alignment pattern, this is for the left HUD bars.
|
||||
hudbars_pos_left_y (Left HUD bar screen y position) float 1.0 0.0 1.0
|
||||
# Horizontal (x) main position of the right HUD bars over the entire screen.
|
||||
# 0.0 is left-most, 1.0 is right-most.
|
||||
# Only used for the zig-zag alignment pattern.
|
||||
hudbars_pos_right_x (Right HUD bar screen x position) float 0.5 0.0 1.0
|
||||
# Vertical main position (y) of the right HUD bars over the entire screen.
|
||||
# 0.0 is top, 1.0 is bottom.
|
||||
# Only used for the zig-zag alignment pattern.
|
||||
hudbars_pos_right_y (Right HUD bar screen y position) float 1.0 0.0 1.0
|
||||
|
||||
# Precise x offset in pixels from the basic screen x position of the HUD bars.
|
||||
# For the zig-zag alignment pattern, this is for the left HUD bars.
|
||||
# This setting is used for the progress bar HUD bar style.
|
||||
hudbars_start_offset_left_x (Left HUD bar x offset) int -175
|
||||
# Precise y offset in pixels from the basic screen y position of the HUD bars.
|
||||
# For the zig-zag alignment pattern, this is for the left HUD bars.
|
||||
# This setting is used for the progress bar HUD bar style.
|
||||
hudbars_start_offset_left_y (Left HUD bar y offset) int -86
|
||||
# Precise x offset in pixels from the basic screen x position of the right HUD bars.
|
||||
# Only used for the zig-zag alignment pattern.
|
||||
# This setting is used for the progress bar HUD bar style.
|
||||
hudbars_start_offset_right_x (Right HUD bar x offset) int 15
|
||||
# Precise y offset in pixels from the basic screen y position of the right HUD bars.
|
||||
# Only used for the zig-zag alignment pattern.
|
||||
# This setting is used for the progress bar HUD bar style.
|
||||
hudbars_start_offset_right_y (Right HUD bar y offset) int -86
|
||||
|
||||
# Precise x offset in pixels from the basic screen x position of the HUD statbars.
|
||||
# For the zig-zag alignment pattern, this is for the left HUD statbars.
|
||||
# This setting is used for the classic and modern statbar styles.
|
||||
hudbars_start_statbar_offset_left_x (Left HUD statbar x offset) int -265
|
||||
# Precise y offset in pixels from the basic screen y position of the HUD statbars.
|
||||
# For the zig-zag alignment pattern, this is for the left HUD statbars.
|
||||
# This setting is used for the classic and modern statbar styles.
|
||||
hudbars_start_statbar_offset_left_y (Left HUD statbar y offset) int -90
|
||||
# Precise x offset in pixels from the basic screen x position of the right HUD statbars.
|
||||
# Only used for the zig-zag alignment pattern.
|
||||
# This setting is used for the classic and modern statbar styles.
|
||||
hudbars_start_statbar_offset_right_x (Right HUD statbar x offset) int 25
|
||||
# Precise y offset in pixels from the basic screen y position of the right HUD statbars.
|
||||
# Only used for the zig-zag alignment pattern.
|
||||
# This setting is used for the classic and modern statbar styles.
|
||||
hudbars_start_statbar_offset_right_y (Right HUD statbar y offset) int -90
|
||||
|
||||
# The vertical distance between two HUD bars, in pixels.
|
||||
hudbars_vmargin (Vertical distance between HUD bars) int 24 0
|
||||
|
||||
[Performance]
|
||||
# The of seconds which need to pass before the server updates the default HUD bars
|
||||
# (health and breath). Increase this number if you have a slow server or a slow network
|
||||
# connection and experience performance problems.
|
||||
hudbars_tick (Default HUD bars update interval) float 0.1 0.0 4.0
|
Before Width: | Height: | Size: 140 B |
Before Width: | Height: | Size: 80 B |
Before Width: | Height: | Size: 80 B |
Before Width: | Height: | Size: 811 B |
Before Width: | Height: | Size: 302 B |
Before Width: | Height: | Size: 818 B |
Before Width: | Height: | Size: 321 B |
|
@ -1,23 +0,0 @@
|
|||
--[[
|
||||
Inventory
|
||||
]]
|
||||
|
||||
|
||||
inventory = {}
|
||||
|
||||
--
|
||||
-- optimized helper to put all items in an inventory into a drops list
|
||||
--
|
||||
|
||||
function inventory.get_inventory_drops(pos, inventory, drops)
|
||||
local inv = minetest.get_meta(pos):get_inventory()
|
||||
local n = #drops
|
||||
for i = 1, inv:get_size(inventory) do
|
||||
local stack = inv:get_stack(inventory, i)
|
||||
if stack:get_count() > 0 then
|
||||
drops[n+1] = stack:to_table()
|
||||
n = n + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -1 +0,0 @@
|
|||
name = inventory
|
|
@ -1,21 +0,0 @@
|
|||
Simple Fast Inventory
|
||||
====================
|
||||
|
||||
![SFINV Screeny](https://cdn.pbrd.co/images/1yQhd1TI.png)
|
||||
|
||||
A cleaner, simpler, solution to having an advanced inventory in Minetest.
|
||||
|
||||
Written by rubenwardy.
|
||||
License: MIT
|
||||
|
||||
See game_api.txt for this mod's API
|
||||
|
||||
License of source code and media files:
|
||||
---------------------------------------
|
||||
Copyright (C) 2016 rubenwardy <rubenwardy@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -1,170 +0,0 @@
|
|||
sfinv = {
|
||||
pages = {},
|
||||
pages_unordered = {},
|
||||
contexts = {},
|
||||
enabled = true
|
||||
}
|
||||
|
||||
function sfinv.register_page(name, def)
|
||||
assert(name, "Invalid sfinv page. Requires a name")
|
||||
assert(def, "Invalid sfinv page. Requires a def[inition] table")
|
||||
assert(def.get, "Invalid sfinv page. Def requires a get function.")
|
||||
assert(not sfinv.pages[name], "Attempt to register already registered sfinv page " .. dump(name))
|
||||
|
||||
sfinv.pages[name] = def
|
||||
def.name = name
|
||||
table.insert(sfinv.pages_unordered, def)
|
||||
end
|
||||
|
||||
function sfinv.override_page(name, def)
|
||||
assert(name, "Invalid sfinv page override. Requires a name")
|
||||
assert(def, "Invalid sfinv page override. Requires a def[inition] table")
|
||||
local page = sfinv.pages[name]
|
||||
assert(page, "Attempt to override sfinv page " .. dump(name) .. " which does not exist.")
|
||||
for key, value in pairs(def) do
|
||||
page[key] = value
|
||||
end
|
||||
end
|
||||
|
||||
function sfinv.get_nav_fs(player, context, nav, current_idx)
|
||||
-- Only show tabs if there is more than one page
|
||||
if #nav > 1 then
|
||||
return "tabheader[0,0;tabs;" .. table.concat(nav, ",") .. ";" .. current_idx .. ";true;false]"
|
||||
else
|
||||
return ""
|
||||
end
|
||||
end
|
||||
|
||||
local theme_main = "bgcolor[#080808BB;true]" .. init.gui_bg ..
|
||||
init.gui_bg_img
|
||||
|
||||
local theme_inv = init.gui_slots .. [[
|
||||
list[current_player;main;0,4.7;8,1;]
|
||||
list[current_player;main;0,5.85;8,3;8]
|
||||
]]
|
||||
|
||||
function sfinv.make_formspec(player, context, content, show_inv, size)
|
||||
local tmp = {
|
||||
size or "size[8,8.6]",
|
||||
theme_main,
|
||||
sfinv.get_nav_fs(player, context, context.nav_titles, context.nav_idx),
|
||||
content
|
||||
}
|
||||
if show_inv then
|
||||
tmp[#tmp + 1] = theme_inv
|
||||
end
|
||||
return table.concat(tmp, "")
|
||||
end
|
||||
|
||||
function sfinv.get_homepage_name(player)
|
||||
return "sfinv:crafting"
|
||||
end
|
||||
|
||||
function sfinv.get_formspec(player, context)
|
||||
-- Generate navigation tabs
|
||||
local nav = {}
|
||||
local nav_ids = {}
|
||||
local current_idx = 1
|
||||
for i, pdef in pairs(sfinv.pages_unordered) do
|
||||
if not pdef.is_in_nav or pdef:is_in_nav(player, context) then
|
||||
nav[#nav + 1] = pdef.title
|
||||
nav_ids[#nav_ids + 1] = pdef.name
|
||||
if pdef.name == context.page then
|
||||
current_idx = #nav_ids
|
||||
end
|
||||
end
|
||||
end
|
||||
context.nav = nav_ids
|
||||
context.nav_titles = nav
|
||||
context.nav_idx = current_idx
|
||||
|
||||
-- Generate formspec
|
||||
local page = sfinv.pages[context.page] or sfinv.pages["404"]
|
||||
if page then
|
||||
return page:get(player, context)
|
||||
else
|
||||
local old_page = context.page
|
||||
context.page = sfinv.get_homepage_name(player)
|
||||
assert(sfinv.pages[context.page], "[sfinv] Invalid homepage")
|
||||
minetest.log("warning", "[sfinv] Couldn't find " .. dump(old_page) .. " so using switching to homepage")
|
||||
return sfinv.get_formspec(player, context)
|
||||
end
|
||||
end
|
||||
|
||||
function sfinv.get_or_create_context(player)
|
||||
local name = player:get_player_name()
|
||||
local context = sfinv.contexts[name]
|
||||
if not context then
|
||||
context = {
|
||||
page = sfinv.get_homepage_name(player)
|
||||
}
|
||||
sfinv.contexts[name] = context
|
||||
end
|
||||
return context
|
||||
end
|
||||
|
||||
function sfinv.set_context(player, context)
|
||||
sfinv.contexts[player:get_player_name()] = context
|
||||
end
|
||||
|
||||
function sfinv.set_player_inventory_formspec(player, context)
|
||||
local fs = sfinv.get_formspec(player,
|
||||
context or sfinv.get_or_create_context(player))
|
||||
player:set_inventory_formspec(fs)
|
||||
end
|
||||
|
||||
function sfinv.set_page(player, pagename)
|
||||
local context = sfinv.get_or_create_context(player)
|
||||
local oldpage = sfinv.pages[context.page]
|
||||
if oldpage and oldpage.on_leave then
|
||||
oldpage:on_leave(player, context)
|
||||
end
|
||||
context.page = pagename
|
||||
local page = sfinv.pages[pagename]
|
||||
if page.on_enter then
|
||||
page:on_enter(player, context)
|
||||
end
|
||||
sfinv.set_player_inventory_formspec(player, context)
|
||||
end
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
if sfinv.enabled then
|
||||
sfinv.set_player_inventory_formspec(player)
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
sfinv.contexts[player:get_player_name()] = nil
|
||||
end)
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if formname ~= "" or not sfinv.enabled then
|
||||
return false
|
||||
end
|
||||
|
||||
-- Get Context
|
||||
local name = player:get_player_name()
|
||||
local context = sfinv.contexts[name]
|
||||
if not context then
|
||||
sfinv.set_player_inventory_formspec(player)
|
||||
return false
|
||||
end
|
||||
|
||||
-- Was a tab selected?
|
||||
if fields.tabs and context.nav then
|
||||
local tid = tonumber(fields.tabs)
|
||||
if tid and tid > 0 then
|
||||
local id = context.nav[tid]
|
||||
local page = sfinv.pages[id]
|
||||
if id and page then
|
||||
sfinv.set_page(player, id)
|
||||
end
|
||||
end
|
||||
else
|
||||
-- Pass event to page
|
||||
local page = sfinv.pages[context.page]
|
||||
if page and page.on_player_receive_fields then
|
||||
return page:on_player_receive_fields(player, context, fields)
|
||||
end
|
||||
end
|
||||
end)
|
|
@ -1,2 +0,0 @@
|
|||
init
|
||||
inventory
|