Commit Graph

855 Commits

Author SHA1 Message Date
rubenwardy
927adf9bdd Documentation: Create texture_packs.txt
Combine texture_overrides.txt and sections of lua_api.txt
2016-07-30 03:08:56 +01:00
mtango688
573b50ab2c lua_api.txt: Document how to properly clear node metadata 2016-07-30 03:08:21 +01:00
Wuzzy
2cb0f649f4 Main menu, lua_api.txt: Fix mod/texture pack screenshot size issues
Recommend mod screenshot size in lua_api.txt
Adjust displayed screenshot size of texture packs
Document texture pack files in lua_api.txt
2016-07-27 22:20:31 +01:00
James Stevenson
97c763158c lua_api.txt: Remove tooltip checkbox[] element 2016-07-21 05:00:40 +01:00
est31
6621daee50 HTTP lua API docs: correct some function references 2016-07-12 22:47:14 +02:00
Tim
d7060c212f Builtin/profiler: Replace game profiler (#4245)
Use the setting "profiler.load" to enable profiling.
Other settings can be found in settingtypes.txt.

* /profiler print [filter] - report statistics to in-game console
* /profiler dump [filter] - report statistics to STDOUT and debug.txt
* /profiler save [format [filter]] - saves statistics to a file in your worldpath
	* txt (default) - same treetable format as used by the dump and print commands
	* csv - ready for spreadsheet import
	* json - useful for adhoc D3 visualizations
	* json_pretty - line wrapped and intended json for humans
	* lua - serialized lua table of the profile-data, for adhoc scripts
* /profiler reset - reset all gathered profile data.
	This can be helpful to discard of any startup measurements that often spike during loading or to get more useful min-values.

[filter] allows limiting the output of the data via substring/pattern matching against the modname.

Note: Serialized data structures might be subject to change with changed or added measurements.
	csv might be the most stable, due to flat structure.

Changes to the previous version include:

* Updated and extended API monitoring
* Correct calculation of average (mean) values (undistorted by idleness)
* Reduce instrumentation overhead.
* Fix crashes related to missing parameters for the future and occasional DIV/0's.
* Prevent issues caused by timetravel (overflow, timejump, NTP corrections)
* Prevent modname clashes with internal names.
* Measure each instrumentation individually and label based on registration order.
* Labeling of ABM's and LBM's for easier classification.
  Giving several ABM's or LBM's the same label will treat them as one.
  Missing labels will be autogenerated based on name or registration order.
* Configurable instrumentation and reporting. Skip e.g. builtin if you don't need it.
* Profile the profiler to measure instrumentation overhead.
2016-07-12 21:51:10 +02:00
Duane
d6865c4d8d Lua_api.txt: Fix description of node drop behaviour 2016-07-12 20:23:46 +01:00
Foghrye4
281e9f39fd Adding minetest.clear_craft
Modifications by est31: grammar fixes in doc + error messages and
a little style fix, no functional change.
2016-07-05 21:40:13 +02:00
kwolekr
3c63c3044d Add MapSettingsManager and new mapgen setting script API functions
This commit refactors the majority of the Mapgen settings system.
- MapgenParams is now owned by MapSettingsManager, itself a part of ServerMap,
  instead of the EmergeManager.
- New Script API functions added:
    core.get_mapgen_setting
    core.get_mapgen_setting_noiseparams,
    core.set_mapgen_setting, and
    core.set_mapgen_setting_noiseparams.
- minetest.get/set_mapgen_params are deprecated by the above new functions.
- It is now possible to view and modify any arbitrary mapgen setting from a mod,
  rather than the base MapgenParams structure.
- MapgenSpecificParams has been removed.
2016-07-03 15:38:36 -04:00
raymoo
fa0bbbf96d Player: New get_look, set_look API
Deprecate get_look / set_look pitch / yaw
2016-06-24 02:13:09 +01:00
Auke Kok
39a9e9874e Builtin/game/item: Add place_param2 nodedef field
This allows a nodedef to specify a fixed value for param2 to be
used for all normal placements.

There are several uses for this:

- nodes that require param2 to be set to a non-zero value for
  internal mod use. E.g. leafdecay could use this to detect that
  leaves are played by players.
- force wallmounted or facedir value at placement at placement

This overrides any player look direction or other on-the-fly
param2 setting during placement.
2016-06-17 04:41:20 +01:00
Diego Martinez
dac40af6ee Server: Add reason for leave to on_leaveplayer callbacks 2016-06-11 04:17:04 +01:00
paramat
c7297e552b Lua_api.txt: Split long lines. Capitalise 'Biome API'. Minor edits 2016-06-07 04:45:41 +01:00
paramat
d24f384174 Biome API: Add per-biome riverbed material and depth
Mgvalleys: Remove riverbed sand placement from base terrain generation
Riverbed material placement moved to MapgenBasic::generateBiomes()
Document fields and add note that the biome API is still unstable
2016-06-05 16:37:02 +01:00
kwolekr
8ed467d438 PcgRandom: Fix/improve documentation 2016-06-04 02:16:06 -04:00
Ekdohibs
14ef2b445a Add colored text (not only colored chat).
Add documentation, move files to a proper place and avoid memory leaks.
Make it work with most kind of texts, and allow backgrounds too.
2016-05-31 17:34:29 +02:00
est31
27db929252 Add minetest.check_password_entry callback
Gives a convenient way to check a player's password.

This entirely bypasses the SRP protocol, so should be used
with great care.

This function is not intended to be used
in-game, but solely by external protocols, where no
authentication of the minetest engine is provided, and
also only for protocols, in which the user already gives the
server the plaintext password.

Examples for good use are the classical http form, or irc,
an example for a bad use is a password change dialog inside
formspec.

Users should be aware that they lose the advantages of the SRP
protocol if they enter their passwords for servers outside the
normal entry box, like in in-game formspec menus,
or through irc /msg s,

This patch also fixes an auth.h mistake which has mixed up the
order of params inside the decode_srp_verifier_and_salt function.

Zeno-: Added errorstream message for invalid format when I committed
2016-05-30 23:28:08 +10:00
Auke Kok
d499ec4838 Particles: Add option to remove particles on collision
Adds the particle option `collision_removal = bool`

Some particles are hard to use right now since they either go through
solid blocks (without collision detection), and with collision
detection enabled they (e.g. raindrops) would just stop dead on the
floor and sit there until they expire, or worse, scrape along a wall
or ceiling.

We can solve the problem by adding a boolean flag that tells the
particle to be removed if it ever collides with something. This will
make it easier to add rain that doesn't fall through your roof or stick
on the top of it. Or clouds and smoke that don't go through trees.

Particles that collide with this flag are marked expired
unconditionally, causing them to be treated like normal expired
particles and cleaned up normally.

Documentation is adjusted accordingly.

An added bonus of this patch is that particles can potentially collide
many times with nodes, and this reduces the amount of collisions to 1
(max), which may end up reducing particle load on the client.
2016-05-28 00:08:23 -04:00
red-001
62d15ac7c1 Add base64 encoding and decoding to the lua api. (#3919) 2016-05-27 23:37:28 -04:00
sfan5
854d9e3745 Bump version to 0.4.14 2016-05-15 14:49:15 +02:00
paramat
3f89bf4d7f Lua_api.txt: Fix documentation for facedir rotation 2016-05-10 02:21:53 +01:00
SmallJoker
53e9587861 Add [resize texture modifier Resizes the texture to the given dimensions. 2016-05-09 20:48:42 +02:00
paramat
a279426d12 Lua_api.txt: Add warnings of l-system lighting bug 2016-05-06 00:29:16 +01:00
rubenwardy
17bfe2fe5b Builtin: Add basic_privs setting 2016-04-28 07:19:07 +01:00
SmallJoker
31c1fca6fd tile.cpp: Automatically upscale lower resolution texture 2016-04-25 06:39:32 +01:00
rubenwardy
eae33951ad Hud: Fix offset being ignored by inventory bar 2016-04-10 23:54:23 -04:00
raymoo
c566a8f2de Document hpchange callback ordering thing (#3981)
Document hpchange callback ordering thing

Callbacks registered by register_on_player_hpchange are ordered so that non-modifiers are called after modifiers are called. Credit to @TeTpaAka who mentioned this previously-undocumented feature in #3799.

See also commit

aa13baa30a45b0f834c23bd5c0407895eb8ec0ee "Add minetest.register_on_player_hpchange"
2016-04-10 13:52:18 +02:00
Samuel Sieb
ecdd5921a1 Clearer explanation of [colorize with alpha 2016-04-07 03:55:17 -04:00
Samuel Sieb
01ae43c480 Add an option to colorize to respect the destination alpha
Also, rework the colorizing code to be more efficient.
2016-04-03 04:24:28 -04:00
est31
d915ca1124 lua_api.txt: improve vector documentation
Before it rendered very badly in HTML.
Also point out what vector.round does.
2016-03-19 15:34:51 +01:00
Auke Kok
37b4f0d34c Allow nodes to specify which sides to connect to.
NDT_CONNECTED attempts to connect to any side of nodes that it can
connect to, which is troublesome for FACEDIR type nodes that generally
may only have one usable face, and can be rotated.

We introduce a node parameter `connect_sides` that is valid for
any node type. If specified, it lists faces of the node (in "top",
"bottom", "front", "left", "back", "right", form, as array) that
connecting nodeboxes can connect to. "front" corresponds to the south
facing side of a node with facedir = 0.

If the node is rotatable using *simple* FACEDIR, then the attached
face is properly rotated before checking. This allows e.g. a chest
to be attached to only from the rear side.
2016-03-12 12:08:17 -05:00
Auke Kok
e737b1c271 Nodebox: Allow nodeboxes to "connect"
We introduce a new nodebox type "connected", and allow these nodes to
have optional nodeboxes that connect it to other connecting nodeboxes.

This is all done at scenedraw time in the client. The client will
inspect the surrounding nodes and if they are to be connected to,
it will draw the appropriate connecting nodeboxes to make those
connections.

In the node_box definition, we have to specify separate nodeboxes for
each valid connection. This allows us to make nodes that connect only
horizontally (the common case) by providing optional nodeboxes for +x,
-x, +z, -z directions. Or this allows us to make wires that can connect
up and down, by providing nodeboxes that connect it up and down (+y,
-y) as well.

The optional nodeboxes can be arrays. They are named "connect_top,
"connect_bottom", "connect_front", "connect_left", "connect_back" and
"connect_right". Here, "front" means the south facing side of the node
that has facedir = 0.

Additionally, a "fixed" nodebox list present will always be drawn,
so one can make a central post, for instance. This "fixed" nodebox
can be omitted, or it can be an array of nodeboxes.

Collision boxes are also updated in exactly the same fashion, which
allows you to walk over the upper extremities of the individual
node boxes, or stand really close to them. You can also walk up
node noxes that are small in height, all as expected, and unlike the
NDT_FENCELIKE nodes.

I've posted a screenshot demonstrating the flexibility at
    http://i.imgur.com/zaJq8jo.png
In the screenshot, all connecting nodes are of this new subtype.

Transparent textures render incorrectly, Which I don't think is
related to this text, as other nodeboxes also have issues with this.

A protocol bump is performed in order to be able to send older clients
a nodeblock that is usable for them. In order to avoid abuse of users
we send older clients a "full-size" node, so that it's impossible for
them to try and walk through a fence or wall that's created in this
fashion. This was tested with a pre-bump client connected against a
server running the new protocol.

These nodes connect to other nodes, and you can select which ones
those are by specifying node names (or group names) in the
connects_to string array:
      connects_to = { "group:fence", "default:wood" }
By default, nodes do not connect to anything, allowing you to create
nodes that always have to be paired in order to connect. lua_api.txt
is updated to reflect the extension to the node_box API.

Example lua code needed to generate these nodes can be found here:
    https://gist.github.com/sofar/b381c8c192c8e53e6062
2016-03-12 12:08:17 -05:00
Auke Kok
4e59fcf5c1 Add consistent monotonic day counter - get_day_count()
I've written several experimental bits of code that revolve around the
need for a consistent calendar, but implementing one is extremely hard
in mods due to time changes and mods overriding core.get_timeofday(),
which will conflict.

The second part of the problem is that doing this from a mod requires
constant maintenance of a settings file.

An implementation in core is trivial, however, and solves all of
these problems at virtually no cost: No extra branches in server
steps, and a single branch when minetest.set_time_of_day(), which is
entirely reasonable.

We store the day_count value in env_meta.txt.

The use case is obvious: This change allows mods to create an actual
virtual calendar, or properly account for seasonal changes, etc..

We add a "/days" chatcommand that displays the current day count. No
permissions are needed. It can only retrieve the day count, not
modify it.
2016-03-09 01:45:23 +01:00
ShadowNinja
3ce6642a26 Add AreaStore custom ID API 2016-03-07 16:33:20 -05:00
ShadowNinja
821551a266 Implement AreaStore serialization 2016-03-07 16:33:20 -05:00
ShadowNinja
095db16990 Simplify AreaStore ID management 2016-03-07 16:33:20 -05:00
est31
d494733839 Add minetest.register_lbm() to run code on block load only 2016-03-07 19:54:26 +01:00
paramat
48a718e715 Decoration API: Allow force_placement of simple decorations 2016-03-04 02:38:55 +00:00
Jeija
1100a5d614 Require minetest.request_http_api to be called from the mod's main scope
Fixes #3764
2016-03-03 22:42:00 +01:00
Jeija
31e0667a4a Add Lua interface to HTTPFetchRequest
This allows mods to perform both asynchronous and synchronous HTTP
requests. Mods are only granted access to HTTP APIs if either mod
security is disabled or if they are whitelisted in any of the
the secure.http_mods and secure.trusted_mods settings.

Adds httpfetch_caller_alloc_secure to generate random, non-predictable
caller IDs so that lua mods cannot spy on each others HTTP queries.
2016-02-22 15:39:41 +01:00
ShadowNinja
4827ee1258 Require request_insecure_environment to be called from the mod's main scope
Previously you could steal a secure environment from a trusted mod by wrapping
request_insecure_environment with some code like this:

local rie_cp = minetest.request_insecure_environment
local stolen_ie
function minetest.request_insecure_environment()
	local ie = rie_cp()
	stolen_ie = stolen_ie or ie
	return ie
end
2016-02-19 14:52:10 +00:00
Diego Martinez
13dd7959db Initialize facedir and wallmounted tables only once.
This makes the functions a bit faster since they don't
have to recreate the tables every invocation, and makes
the code more readable.

Also, document `wallmounted_to_dir`.

The function was implemented but not documented in `lua_api.txt`.
2016-02-11 04:23:17 +00:00
Kahrl
b1428ab4bb Add '/clearobjects quick' 2016-02-11 04:22:58 +00:00
Auke Kok
ad884f23d4 New timer design.
I could honestly not make much sense of the timer implementation
that was here. Instead I've implemented the type of timer algorithm
that I've used before, and tested it instead.

The concept is extremely simple: all timers are put in an ordered
list. We check every server tick if any of the timers have
elapsed, and execute the function associated with this timer.

We know that many timers by themselves cause new timers to be
added to this list, so we iterate *backwards* over the timer
list. This means that new timers being added while timers are
being executed, can never be executed in the same function pass,
as they are always appended to the table *after* the end of
the table, which we will never reach in the current pass over
all the table elements.

We switch time keeping to minetest.get_us_time(). dtime is
likely unreliable and we have our own high-res timer that we
can fix if it is indeed broken. This removes the need to do
any sort of time keeping.
2016-01-29 01:04:51 -05:00
Auke Kok
4ac1e9bccb Clocksource: use a better clock if available.
clock_gettime() is a far better clock than gettimeofday().

Even better than clock_gettime() is that you can select either
CLOCK_MONOTONIC, or even CLOCK_MONOTONIC_RAW. These clocks offer
high precision time. And the _RAW variant will never roll back
due to NTP drift or daylight savings, or otherwise.

I've adjusted this code to select the right clock method auto-
matically based on what's available in the OS. This means that
if you're running a very old linux version, MacOS or other,
you will automatically get the best clocksource available.

I've tested all Linux clocksources by selectively compiling and
running a 10k+ timer test suite. In all cases I confirmed that
the 3 POSIX Linux clocksources worked properly, and were
selected properly.

I've modified the OS X compile path to use the high-res clock
source for all time functions, but I can't confirm it works or
that it compiles.

As for WIN32, I confirmed that the used clocksource is indeed
a Monotonic clocksource, so good news: that code section appears
to be exactly what it should be.
2016-01-29 00:58:08 -05:00
Auke Kok
882a89d65a Allow per-tiles culling.
Backface culling is enabled by default for all tiles, as this
is how the lua parser initializes each tiledef. We revert to
always using the value from the tiledef since it is always
read and serialized.

Mods that wish to enable culling for e.g. mesh nodes, now can
specify the following to enable backface culling:

    tiles = {{ name = "tex.png", backface_culling = true }},

Note the double '{' and use of 'name' key here! In the same
fashion, backface_culling can be disabled for any node now.

I've tested this against the new door models and this properly
allows me to disable culling per node. I've also tested this
against my crops mod which uses mesh nodes where culling needs
to be disabled, and tested also with plantlike drawtype nodes
where we want this to continue to be disabled.

No default setting has changed. The defaults are just migrated
from nodedef.cpp to c_content.cpp.
2016-01-20 00:36:48 +00:00
RealBadAngel
87291ea44a Show infotext with description for item entities 2016-01-18 17:21:41 +00:00
Pinky Snow
22bc66d3a7 corrected minetest.pos_to_string()
corrected this bit reflect the function properly.
2016-01-16 13:06:41 +00:00
paramat
8fc8cb819b Mapgen: Various fixes and improvements
Lua_api.txt: Document 'minetest.registered_biomes'
Minimal: Remove 'mapgen_air' alias
Cavegen: Add fallback node for 'mapgen_ice'
Dungeongen: Add fallback node for 'mapgen_river_water_source'
Mgv5: Remove unnecessary '#include util/directiontables.h'
Add missing 'this->'s in makeChunk()
Mgv6: Edit empty line formatting
Remove leading spaces in makeChunk()
Add missing spaces after 'for' and 'if'
Mgv7: Edit empty line formatting
2016-01-11 01:32:20 +00:00
Pinky Snow
2800ff0660 fixed spelling
Fixed spelling mistake!
2016-01-09 02:29:07 +00:00
Robert Zenz
386d190e09 Clarified what get_node does. 2016-01-09 01:07:03 +00:00
slemonide
95c1b66722 Update lua_api.txt
set_sky does work with on_joinplayer
2016-01-09 01:06:45 +00:00
paramat
0bbbc6e13d Liquids: Flow into and destroy 'floodable' nodes
Add new node property 'floodable', default false
Define "air" as floodable = true in C++ and lua
2016-01-07 05:57:19 +00:00
Robert Zenz
a7c50a3080 Made it more clear that "[combine" does accept a list of files. 2016-01-03 01:05:04 +01:00
Sapier
cdbb9ef228 Add missing documentation of automatic_face_movement_max_rotation_per_sec entity parameter 2015-12-25 14:11:39 +01:00
BlockMen
9eee3c3f46 Add option to give every object a nametag
or change the nametag text of players
2015-12-15 23:32:19 +01:00
est31
9a5a538e8d lua_api.txt: add blank lines before * lists
If rendered as markdown, lists need a blank line before them
so that they are recognized as such.
2015-12-07 07:27:51 +01:00
paramat
49073ba2c3 Mapgen: Add propagate_shadow bool to calcLighting
To terminate unwanted shadows from floatlands or realms above
Also add to LuaVoxelManip calc_lighting for use in mapgen mods
Remove the 2 argument calcLighting, mapgens now use the 5
argument form to specify the volumes for propagateSunlight and
spreadLight
In mgsinglenode replace calcLighting with setLighting and
clean-up use of tabs and spaces
2015-12-07 03:18:24 +00:00
Jun Zhang
a78dd7f2b6 Fix spelling of noise_threshold 2015-12-06 11:38:03 +01:00
est31
89168a7ec8 Document limitations of minetest.get_password_hash 2015-12-02 18:32:14 +01:00
Alex Ford
97908cc656 Add on_secondary_use when right clicking an item in the air 2015-12-02 02:18:44 +00:00
paramat
5292ba7391 Lua_api.txt: Add documentation for biome definition 2015-11-29 21:55:58 +00:00
est31
ad5ac39d8d Add LuaSecureRandom 2015-11-08 15:57:15 -05:00
kwolekr
f9e394a466 Improve LuaVoxelManip documentation 2015-11-07 11:59:24 -05:00
BlockMen
2a12579fab Add support for audio feedback if placing node failed 2015-11-07 13:23:38 +01:00
kwolekr
1384108f8c Schematics: Add core.place_schematic_on_vmanip API
Fix memory leak in minetest.place_schematic
Slightly refactor Schematic code
2015-11-05 01:18:32 -05:00
kwolekr
c2b5da735e Add callback parameter for core.emerge_area() 2015-11-02 18:43:09 -05:00
BlockMen
50ba7e114d Add option to disable backface culling for models
- Disabled by default (except players)
- Fixes #2984
2015-10-25 12:06:08 +01:00
PilzAdam
6f2d9de769 Improve Lua settings menu
* Add key settings to setting table and ignore them later
  This way they are added to the auto-generated minetest.conf.example
* Add flags type
* Add input validation for int, float and flags
* Break in-game graphic settings into multiple sections
* Parse settingtpes.txt in mods and games
* Improve description for a lot of settings
* Fix typos and wording in settingtypes.txt
* Convert language setting to an enum
2015-10-24 19:39:15 +02:00
paramat
59fa117d13 Decoration API: Add flag for placement on liquid surface
Add findLiquidSurface() function to mapgen.cpp
Update lua_api.txt
2015-10-23 21:30:20 +01:00
Robert Zenz
c32847838d Add more ways to pass data to check_player_privs
The callback can now be invoked with either the player object or name as
the first parameter, and with either a table or a list of strings, like
this:

    minetest.check_player_privs(player_name, { shout = true, fly = true })
    minetest.check_player_privs(player_name, "shout", "fly")
    minetest.check_player_privs(player, { shout = true, fly = true })
    minetest.check_player_privs(player, "shout", "fly")
2015-10-22 19:55:48 +02:00
paramat
3b9f99e0d6 ABMs: Make catch-up behaviour optional
Default is true for backwards compatibility
Update lua_api.txt
2015-10-18 16:42:59 +01:00
ShadowNinja
2139d7d45f Refactor logging
- Add warning log level
- Change debug_log_level setting to enumeration string
- Map Irrlicht log events to MT log events
- Encapsulate log_* functions and global variables into a class, Logger
- Unify dstream with standard logging mechanism
- Unify core.debug() with standard core.log() script API
2015-10-14 01:03:54 -04:00
est31
b0523adc5f Add new ContentParamType2 "CPT2_DEGROTATE"
This might break some mods, but it is important for all uses of the param2 to
be documented.

This doesn't need a serialisation version or network protocol version change,
as old clients will still work on new servers, and it is bearable to have
new clients getting non rotated plants on old servers.
2015-10-04 23:59:41 +02:00
kwolekr
1f9c5a4a7b doc: Update node callback documentation 2015-10-04 15:34:56 -04:00
Duane Robertson
a5bdfb6b3c Add get_biome_id(biome_name) callback
It returns the index used in mg->biomemap for a given biome name.
The biomemap is useless without this unless you re-register all existing biomes,
which could cause problems for anyone else trying to use biomemap.
With this, you can quickly create a lookup table of ids and names.
2015-10-02 22:49:31 +02:00
Tim
776760aba7 Clarify radii and distance types in documentation
Because not all circles are round:
* circles using an euclidean metric are what we usually call "round"
* circles using a maximum metric look like euclidean rectangles with equal adjacent sides (squares)
* circles using a manhattan metric look like an euclidean right angled rhombus (squares, but 45° rotated to the former one)

[ci skip]
2015-09-26 21:28:50 +02:00
kwolekr
f062bbd7a1 Add /emergeblocks command and core.emerge_area() Lua API 2015-09-23 15:56:24 -04:00
est31
4f03f8d119 lua_api.txt: fix typo
Thanks to @kaadmy (NeD) for pointing this out.
2015-09-21 18:10:05 +02:00
kwolekr
dcbb95338a Ore: Add puff ore type 2015-09-17 03:04:50 -04:00
kwolekr
beba969413 Ore: Add ore sheet column height range selection
Modders are now able to select the range of ore column height,
and the midpoint at which they 'grow' starting from.
This commit adds three new parameters for the 'sheet' ore type:
column_height_min, column_height_max, and column_midpoint_factor.
clust_size is now deprecated for this ore type.
2015-09-13 00:11:50 -04:00
Robert Zenz
fe6575b8d3 Add more information about how get_node_light works. 2015-09-08 21:14:56 +02:00
est31
d44fceac7e Bump version to 0.4.13 2015-08-20 04:02:00 +02:00
kwolekr
be9024a397 minimap: Add ability to disable from server 2015-08-13 15:05:48 -04:00
rubenwardy
a953ff4dfc Fix segfaults caused by the Environment not being initialized yet 2015-08-09 23:36:55 +02:00
est31
a890c66bc0 Actually document what minetest.is_protected should do 2015-08-02 19:09:55 +02:00
est31
c30a2d6854 Add AreaStore data structure 2015-07-27 06:42:56 +02:00
est31
3b50b2766a Optional reconnect functionality
Enable the server to request the client to reconnect.

This can be done with the now extended minetest.request_shutdown([reason], [reconnect]) setting.
2015-07-23 07:38:13 +02:00
Robert Zenz
4eacce5e2f Add note that chat messages can be marked as handled. 2015-07-22 05:43:30 +02:00
est31
403e6e6c9c Document game main menu image system 2015-07-21 17:17:46 +02:00
Elia Argentieri
5ebb4237e2 Added get_player_velocity() method. Fixes #1176 2015-07-20 05:40:44 +02:00
RealBadAngel
655fc6010f Fix relief mapping issues 2015-07-16 15:36:48 +02:00
paramat
b51738177e Biome API decorations: 'spawnby' searches a 3D neighbourhood
The neighbours checked are the 8 nodes horizontally surrounding the decoration base
and the 8 nodes horizontally surrounding the ground node below the decoration
2015-07-08 22:44:10 +01:00
TeTpaAka
17ba584fe2 Fix bug when craft input isn't replaced 2015-06-22 19:30:35 +02:00
MirceaKitsune
660fa516bf Fix some issues with animations, and allow non-looped animations to be defined 2015-06-22 01:53:38 +02:00
est31
c977fbd928 Add list-rings
Adds list-rings, a method to implement item sending between inventories via shift-click.
Nice insider feature: a ring consisting of a single inventory list serves as nice clean-up method.
Also adds them to minimal game, and the standard inventory.
Craft output slots are not supported.
2015-06-16 14:51:26 +02:00
TeTpaAka
aa13baa30a Add minetest.register_on_player_hpchange 2015-06-13 19:40:31 +02:00
TeTpaAka
e50aa4ed06 Add return list of individual counts to find_node_in_area 2015-06-13 19:39:18 +02:00
TeTpaAka
c0335f7d13 Add some missing getter functions to the lua API
ObjectRef:
get_properties
get_armor_groups
get_animation
get_attach
get_bone_position

Players:
get_physics_override
hud_get_hotbar_itemcount
hud_get_hotbar_image
hud_get_hotbar_selected_image
get_sky
get_day_night_ratio
get_local_animation
get_eye_offset

Global:
minetest.get_gen_notify
minetest.get_noiseparams
2015-05-28 16:46:35 +02:00
kwolekr
4c9a8a91c4 SAPI/Noise: Add PerlinNoiseMap:getMapSlice() function
This adds the ability to grab 'slices' of noise calculated by PerlinNoiseMap.
Retrieving smaller slices of noise from the computation result as needed
optimizes memory usage while maintaining a reasonable amount of CPU overhead.
2015-05-17 04:04:17 -04:00
kwolekr
3ffb5f5761 Add optional buffer param for bulk data array writes in Lua 2015-05-17 00:07:45 -04:00
kwolekr
fb36c471d7 SAPI: Accept either ARGB8 table or ColorString to specify colors 2015-05-16 20:15:03 -04:00
ShadowNinja
8f9af57314 Add core.get_dir_list 2015-05-16 18:33:22 -04:00
ShadowNinja
6c06330daf Add core.request_insecure_environment() 2015-05-16 18:33:19 -04:00
ShadowNinja
05ab9973f9 Add core.mkdir 2015-05-16 18:32:37 -04:00
ShadowNinja
3a8c788880 Add mod security
Due to compatibility concerns, this is temporarily disabled.
2015-05-16 18:32:31 -04:00
TeTpaAka
18c2f16c13 Generalize core.get/set_nametag_color into core.get/set_nametag_attributes 2015-05-15 16:21:01 -04:00
Brandon
c5b4e54174 Add minetest.register_on_punchplayer 2015-05-15 11:09:55 +02:00
TeTpaAka
86a963caca Add get and set functions for the nametag color 2015-05-15 11:03:27 +02:00
Novatux
75622c30be Add code to support raillike group names 2015-05-12 20:48:55 +02:00
est31
b4c3ff6eab is_player() is no player-only function 2015-05-12 05:52:49 +02:00
kwolekr
2b99d904f6 Schematics: Add per-node force placement option 2015-05-09 18:44:00 -04:00
kwolekr
b246812455 Schematics: Add indent-with-space option for schematic Lua table serialization 2015-05-07 02:54:35 -04:00
kwolekr
656575b59d NodeResolver: Remove NodeResolveMethod
This simplifies NodeResolver logic and makes some interfaces cleaner.
2015-05-07 02:36:01 -04:00
kwolekr
b785577f03 Add core.find_nodes_with_meta() script API 2015-05-05 16:21:59 -04:00
ShadowNinja
436cb468e9 Add minetest.global_exists() 2015-04-21 22:58:37 +02:00
kwolekr
46a2c1f167 Ore: Add biomes parameter 2015-04-20 20:25:33 -04:00
kwolekr
479f38973e Schematics: Refactor NodeResolver and add NodeResolveMethod
NodeResolver name lists now belong to the NodeResolver object instead of
the associated NodeDefManager.  In addition to minimizing unnecessary
abstraction and overhead, this move permits NodeResolvers to look up nodes
that they had previously set pending for resolution.  So far, this
functionality has been used in the case of schematics for
serialization/deserialization.
2015-04-16 16:27:05 -04:00
kwolekr
b2a89c04b2 Schematics: Reorganize (de)serialization and add Lua serialization API 2015-04-13 03:10:52 -04:00
est31
0a413265cb Document for api functions that rely on current_modname, that it doesn't work when not loading mods 2015-04-08 23:05:26 +02:00
kwolekr
0df736173e Schematics: Prepend mod path to relative schematic filepaths 2015-04-08 00:28:56 -04:00
kwolekr
337e79c656 ObjDefManager, Mapgen SAPI: Huge refactoring
- General code cleanup
 - Unified object creation and loading
 - Specifying objects in APIs is now orthogonal (i.e. anything can take an ID,
   name string, or the raw table definition (and automatically registers if present
2015-03-31 23:27:58 -04:00
kwolekr
ed10005d38 GenElementManager: Pass opaque handles to Lua and rename to ObjDefManager
Add core.clear_registered_schematics() and refactor schematics somewhat
2015-03-31 01:11:51 -04:00
ShadowNinja
e680d49774 Document nil player as being allowed for can_dig 2015-03-27 15:11:28 -04:00
paramat
d1681872bf lua_api/l_mapgen: generate_ores/decorations: make p1, p2 optional 2015-03-24 18:07:29 +00:00
Loic Blot
008d7e0467 Revert "Add a Lua call to do damages / heals" ok @ShadowNinja
This reverts commit 467fc0ddc912ae38c3bf9fcb99e0b66d7478eec0.
2015-03-22 18:01:56 +01:00
kwolekr
3993093f51 Add support for the PCG32 PRNG algo (and associated script APIs) 2015-03-22 00:48:08 -04:00
Loic Blot
467fc0ddc9 Add a Lua call to do damages / heals 2015-03-18 14:52:35 +01:00
paramat
b2b6bbf3e8 lua_api/l_mapgen: Fix overlapping areas of minetest.generate_ores/decorations 2015-03-11 03:36:39 +00:00
paramat
c7454d4732 Biome API: Enable decorations placed on water
Add schematic decoration force placement flag
2015-03-06 03:32:15 +00:00
BlockMen
b65c7ab4a4 Improve group-based connection between raillike nodes 2015-03-05 23:24:32 +01:00
Craig Robbins
fdb9140825 Change find_surface_nodes_in_area to find_nodes_in_area_under_air 2015-02-27 21:42:00 +10:00
Loic Blot
0f556d0c7f Add find_surface_nodes_in_area LUA call which permit to only get the nodes which touch air. This permit to massively improve performance for mods like plantlife 2015-02-27 21:34:33 +10:00
rubenwardy
2b189d4507 Wrap lines longer than 80 characters in lua_api.txt ...and minor formating changes 2015-02-27 13:41:17 +10:00
Kahrl
38cf080a9c Disallow object:remove() if the object is a player
Rebased by Zeno- (conflict in lua_api.txt)
2015-02-23 16:49:48 +10:00
Perttu Ahola
e6ad2ace10 Bump version to 0.4.12 2015-02-18 23:50:01 +01:00
rubenwardy
efa977518a Fix minetest.item_eat's replace_with_item, fixes #2292 2015-02-16 10:24:19 +01:00
TriBlade9
db481e7232 Added ratio argument to colorize, removed the weird alpha-based ratio. 2015-01-20 22:56:20 +10:00
kwolekr
9736548720 Add ability to delete MapBlocks from map
Also add a Lua API and chatcommand for this
2015-01-15 16:48:56 -05:00
kwolekr
a4a6cc8eb1 builtin: Unify register wrapper functions and wrap clear_registered_* functions too 2015-01-13 12:36:05 -05:00
paramat
c28a90dafb Lua-api.txt: Document that paramtype='light' results in light propagation with attenuation and is essential for a light source to spread it's light 2015-01-11 22:30:28 -05:00
ShadowNinja
ef0a4e3614 Add registered_ores and registered_decorations 2015-01-05 18:24:15 -05:00
kwolekr
bdcf03ae36 Add minetest.generate_ores() and minetest.generate_decorations() 2015-01-04 22:38:48 -05:00
Craig Robbins
64cdbae6df Remove freezemelt documentation from lua_api.txt 2015-01-04 21:53:25 +10:00
kwolekr
8eb9cebdd0 Add warning about using deprecated fields in Mapgen API and update docs 2015-01-04 03:24:40 -05:00
Wuzzy
800d912b6f Rewrite lua_api.txt into Markdown format
Just Markdown, no variant of it. File name intentionally
not changed to “lua_api.md” because of fear to break references
to that file. The file can still be renamed later.
2015-01-03 00:48:38 -05:00
Diego Martínez
cfec470b51 Fix documentation for string functions 2014-12-30 00:42:50 -05:00
kwolekr
5e2753c712 Expose mapgen parameters on scripting init
Add minetest.get_mapgen_params()
Deprecate minetest.register_on_mapgen_init()
2014-12-29 12:59:59 -05:00
kwolekr
cc3ab5efa5 LuaVoxelManip: Remove blank allocator 2014-12-29 01:31:37 -05:00
kwolekr
3c637b4baf LuaItemStack: Fix and document behavior of set_name, set_count, set_wear, set_metadata 2014-12-28 23:59:24 -05:00
kwolekr
863379a4c6 Decoration: Add height_min and height_max parameters
Also set default height_min/height_max to -31000 and 31000,
respectively, for ore and biomes
2014-12-28 22:37:27 -05:00
kwolekr
61dfa912f5 Ore: Add Vein ore type 2014-12-28 21:17:12 -05:00
kwolekr
900fa26965 Ore: Add Blob ore type 2014-12-28 03:11:00 -05:00
kwolekr
8334100fe1 LuaVoxelManip: Add option to allocate blank data 2014-12-27 23:09:36 -05:00
kwolekr
3f83ca29d3 Bump version to 0.4.11 2014-12-24 22:28:06 -05:00
paramat
2b10520999 lua_api.txt: improve noise documentation. Remove previous eased 3D noise format example 2014-12-20 14:50:57 -05:00
Craig Robbins
06207ac550 Fix typo in lua_api.txt 2014-12-15 01:09:17 +10:00
kwolekr
2b8180a417 Add support for NoiseParams in minetest.get_perlin() and add docs on NoiseParams to lua_api.txt 2014-12-12 02:02:44 -05:00
kwolekr
d50878d608 Rename and repurpose minetest.set_noiseparam_defaults to set_noiseparams 2014-12-09 23:44:04 -05:00
kwolekr
5062b99cb0 Rewrite generate notification mechanism
Add support for notify-on-decoration
Clean up mapgen constructors
Clean up mapgen.cpp code style somewhat
Remove trailing whitespace from some files
2014-12-06 13:53:35 -05:00
SmallJoker
2fd14e1bd5 Add Lua helper functions vector.apply(v) math.sign(x, tolerance) 2014-12-06 10:07:25 +01:00
Ciaran Gultnieks
c30346ea30 Improve Lua API documentation
Changes:
  * Add extra documentation for remove_item.

    This isn't as silly as it sounds: iterate a list containing items with
    unique metadata each, and remove_item the first one you find, placing
    into a different - fine, except the remove will invariably remove the
    wrong one, leading to items being duplicated and others destroyed.

    Arguably it's a bug, and Inventory::removeItem should actually remove
    the item you tell it to. (i.e. if the passed ItemStack has metadata,
    match it). But it seems reasonable to just document the behaviour
    more clearly.

 * Improve string_to_pos documentation.
 * Clarify dig_node documentation (return value).
 * Better on_step documentation.
 * get_nodemeta -> get_meta.
 * Other minor fixes.
2014-11-28 18:35:45 -05:00
SmallJoker
6a43b3af09 Add minetest.copy_table(table) To get rid off the "table references"
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-27 18:19:01 +10:00
SmallJoker
874109c520 Add option 'eased' to NoiseParams
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-13 23:06:38 +10:00
Craig Robbins
813c088c1c Added names colours and refactored parseColorString() 2014-10-29 03:10:59 -04:00
RealBadAngel
e5652cb75c Custom collision boxes node property. 2014-10-19 20:48:21 +02:00
RealBadAngel
0066bd77d2 Add meshnode drawtype. 2014-10-18 16:42:23 +02:00
BlockMen
28438bba27 Add [colorize modifier 2014-10-05 16:49:52 +02:00
Diego Martínez
5baf379f40 Add better documentation for alternate drop definition to lua_api.txt. 2014-10-02 16:49:33 -04:00
BlockMen
f48f686930 Add optional framed glasslike drawtype 2014-10-02 11:35:15 +02:00
TriBlade9
9a685a4f2e Add firelike drawtype 2014-09-21 15:50:27 -04:00
ShadowNinja
406ed5efac Add compression API 2014-09-20 14:02:54 -04:00
ShadowNinja
2f170a63c6 Simplify and optimize schematic replacements 2014-09-11 22:25:06 -04:00
kwolekr
f3eefeb794 Add LuaVoxelManip methods: get_node_at() and set_node_at() 2014-09-01 17:33:21 -04:00
kwolekr
9e4e7072da Update Mapgen VoxelManipulator on buffer invalidation 2014-09-01 15:12:22 -04:00
sapier
8ab2971e0b Remove invalid doc about minetest.get_time_us() 2014-08-25 21:52:52 +02:00
sapier
d7364d65ac Add missing doc for minetest.get_us_time() 2014-08-25 21:16:32 +02:00
Craig Robbins
f33d31693e Fix seg fault if popping from empty stack (L-system trees)
See: https://github.com/minetest/minetest/issues/1525

Background
Wuzzy2: If you attempt to spawn a L-system tree with minetest.spawn_tree, you can make Minetest crash if it is attempted to pop an empty stack.

ShadowNinja: This shouldn't cause a segmentation fault, but it should throw a Lua error

Commit Description
This commit throws a Lua error instead of causing a segmentation fault. The server will still "crash" but will include a Lua backtrace.

L-Systems fix randomness
Unless a random seed is provided (via Lua treedef) seed the PRNG with a different seed for each tree
Resolves: https://github.com/minetest/minetest/issues/1469

Fix l-system crash when treedef random_level not set by Lua
2014-08-23 06:40:27 +02:00
sfan5
b19dd922ec Add ^[mask texture modifier 2014-08-22 22:42:04 +02:00
rubenwardy
944ffe9e53 Correct spelling mistakes in documentation 2014-08-22 20:55:01 +02:00
sapier
c24e0753fc Mod profiling support
Config settings:
profiling = true/false (gather statistics)
detailed_profiling = true/false (break mod times to callbacks)

Chat commands:
save_mod_profile saves current statistics in debug.txt and shows on console (on default loglevel)
2014-08-19 22:22:57 +02:00
sfan5
5884236046 Rework texture generating code, add texture grouping via ( ... ) 2014-07-29 20:02:56 +02:00
sapier
65b8b524c0 Add srollbar formspec element 2014-07-16 15:02:56 +02:00
sapier
96f285f71e Update version numbers for 0.4.10 2014-07-06 22:39:47 +02:00
sfan5
5f9962e1cc Fix typos in doc/lua-api.txt 2014-07-05 12:19:55 +02:00
Kahrl
95be18a3c1 Fix typo in doc/lua_api.txt 2014-07-05 01:09:53 +02:00
RealBadAngel
27538ecef5 Tooltips rework.
Separate element for tooltips. Delayed showing,
use global color or given ones.
2014-06-24 22:11:47 +02:00
RealBadAngel
04fbf47744 Add tooltips for button, imagebutton and checkbox. 2014-06-19 00:22:03 +02:00
ShadowNinja
e7706593c6 Add success and output return values to chat commands 2014-05-28 18:36:46 -04:00
rubenwardy
832d7973c8 Add item eat callback 2014-05-26 18:41:58 -04:00
sapier
d3ee617f37 Fix heart + bubble bar size on different texture packs
Add DPI support for statbar
Move heart+bubble bar to Lua HUD
Add statbar size (based upon an idea by blue42u)
Add support for customizing breath and statbar
2014-05-07 21:46:27 +02:00
ShadowNinja
f2a1900345 Update documentation on is_ground_content 2014-04-24 18:27:25 -04:00
proller
0279f32db7 Remove liquid_finite and weather 2014-04-18 21:56:48 +04:00
BlockMen
c0ab09af74 Add player:set_eye_offset() by @MirceaKitsune and clean up 2014-04-12 17:44:20 +02:00
BlockMen
a1db9242ec Add third person view 2014-04-12 17:44:15 +02:00
sapier
142e2d3b74 Cleanup client init states by bumping protocol version
Don't use TOSERVER_RECEIVED_MEDIA but TOSERVER_CLIENT_READY as indicatio for client ready
Handle clients with protocol version < 23 (almost) same way as before
Make client tell server about it's version
Add client state to not send bogus player position updates prior init complete
Add access to statistics information (peer connction time,rtt,version)
Fix clients standing stalled in world while preloading item visuals (new clients only)
Add get_player_information to read client specific information from lua
2014-04-08 21:12:20 +02:00
sapier
a4e2198e41 Replace pause and message menu by formspec ones 2014-03-05 18:44:14 +01:00
ShadowNinja
9a3b7715e2 Remove "Server -!- " prefix from player messages 2014-02-27 00:00:22 -05:00
kwolekr
c163859057 Schematic: Add force_placement parameter to minetest.place_structure API 2014-02-15 19:46:57 -05:00
kwolekr
3570f3e396 Add minetest.set_noiseparam_defaults() Lua API 2014-02-15 19:13:14 -05:00
kwolekr
2a01050a0c Add capability to read table flag fields from Lua API 2014-02-09 12:44:31 -05:00
kwolekr
83bafbe08b Make flag strings clear specified flag with 'no' prefix
Remove flagmask field from set_mapgen_params table
Add small bits of needed documentation
2014-02-08 17:50:59 -05:00
sapier
857a49e081 Add minetest.kick_player(name, reason) 2014-02-03 17:33:59 -05:00
Perttu Ahola
6a3fa9df12 Add player:override_day_night_ratio() for arbitrarily controlling sunlight brightness 2014-02-01 18:38:21 +01:00
Perttu Ahola
86a6cca3cf Add player:set_sky() with simple skybox support 2014-02-01 18:34:26 +01:00
RealBadAngel
21f1bec724 New HUD element - waypoint. 2014-01-26 21:31:59 +01:00
ShadowNinja
76d4396fa1 Pass pointed_thing to on_punch and minetest.register_on_punchnode callbacks 2014-01-23 19:21:56 -05:00
ShadowNinja
1b5b6fe692 Add pointed_thing to minetest.register_on_placenode
As suggested by qwrwed.
2014-01-21 22:06:40 -05:00
kwolekr
1146db9956 Update lua_api.txt documentation 2014-01-19 03:00:47 -05:00
ShadowNinja
574ed6a363 Add minetest.override_item 2014-01-13 21:41:00 -05:00
Kahrl
8966c16ad2 Add formspec table 2014-01-13 18:11:08 -05:00
khonkhortisan
2b1eff7725 Allow vertical axis particle rotation constraint
Use tables for adding particles, deprecate former way.

separate particles(pawner) definition, add default values, work with no
arguments
2014-01-13 17:34:56 -05:00
Novatux
676f34a02b Fix doc and forceloading crash. 2014-01-12 14:31:32 +01:00
ShadowNinja
bd8ddf1a52 Add InvRef::get/set_lists() 2014-01-11 13:52:26 -05:00
Novatux
84b94eb198 Add forceloading 2014-01-11 17:54:00 +01:00
Novatux
e21b29f422 Deepcopy pointed_thing for after_place_node, give it to on_rightclick too. 2014-01-11 17:23:28 +01:00
ShadowNinja
c3eb7fe316 Document "wielditem" visual 2014-01-08 17:10:57 -05:00
ShadowNinja
c46574f30f Pass pointed_thing to after_place_node 2014-01-06 21:25:10 -05:00
kwolekr
1ad81c1ce3 Bump version to 0.4.9 2014-01-01 16:54:28 -05:00
ShadowNinja
e1f9ba435f Don't throw a error when writing JSON fails 2013-12-18 18:18:43 -05:00
ShadowNinja
1ed90c90c3 Add 'minetest.write_json' 2013-12-18 16:46:53 -05:00
kwolekr
c3708b456e Add map feature generation notify Lua API 2013-12-14 01:52:24 -05:00
ShadowNinja
83853ccd41 Remove support for optdepends.txt 2013-12-13 13:10:24 -05:00
stujones11
d9ef072305 Make line_of_sight return blocking node position 2013-12-12 16:11:00 -05:00
kaeza
33de69a173 Add 'on_prejoinplayer' callback 2013-12-12 13:42:14 -05:00
sfan5
e15681080e Fix small mistake in Lua API docs 2013-12-06 18:37:32 +01:00
PilzAdam
e51ad5337f Use a table in set_physics_override() 2013-12-03 23:20:00 +01:00
PilzAdam
15be2659ea Add sneak and sneak_glitch to set_physics_override() 2013-12-03 23:20:00 +01:00
kwolekr
20e3d550fa Decoration: Add schematic Y-slice probability support 2013-12-01 01:24:59 -05:00
Novatux
06baf05c64 Add documentation for minetest.swap_node 2013-11-30 18:57:56 +01:00
kwolekr
ff7d7080e3 LuaVoxelManip: Add area parameters back to calc_lighting and set_lighting, made optional this time; also fixed a slight bug with night values being ignored 2013-11-30 00:27:39 -05:00
kwolekr
769b2d7c05 LuaVoxelManip: Add get_light_data() and set_light_data() 2013-11-30 00:01:43 -05:00
ShadowNinja
7433d65d3e Rollback fixes and get_node_actions 2013-11-27 18:13:06 -05:00
kwolekr
122875c30c Bump version to 0.4.8 2013-11-24 02:23:49 -05:00
sapier
90e7832408 Fix invalid listname and listsize not handled correctly in set_size 2013-11-16 15:52:41 +01:00
sapier
0f9440fa61 Fix "TODO read modinfo" in modmanager to improve ui usability 2013-11-10 19:37:45 +01:00
PilzAdam
1afd359550 Fix typo in lua_api.txt 2013-11-08 18:16:08 +01:00
4Evergreen4
1d856b734b Add wrapper for minetest.rotate_and_place. 2013-11-07 20:14:26 -05:00
Vanessa Ezekowitz
d886f34003 Add 6d facedir rotation prediction routine 2013-11-06 21:08:36 -05:00
BlockMen
25edae00ea Reworked formspecs and kahrl's hexcolor parser 2013-11-03 22:14:37 +01:00
ShadowNinja
06a5eceb81 Add basic protection support to builtin 2013-11-02 14:01:10 -04:00
Novatux
bd6d4666ab Add a callback: minetest.register_on_craft(itemstack, player,
old_craft_grid, craft_inv) and
minetest.register_craft_predict(itemstack, player, old_craft_grid,
craft_inv)
2013-11-01 15:55:34 +01:00
ShadowNinja
12504a18ec Remove vector metatable setting
This not only makes the vector functions faster, but also makes them more
consistent with other functions.
2013-10-17 09:41:01 +03:00
Novatux
34e0a0ca0f Add tool callback 2013-10-16 21:58:29 +04:00
Sokomine
19742d8d98 Add support for parameter 'visual_scale' for drawtypes 'signlike' and 'torchlike' like used for drawtype 'plantlike' 2013-10-14 21:38:56 +03:00
PilzAdam
a9c0961e0c Add set_name(), set_count(), set_wear() and set_metadata() to Lua ItemStack 2013-09-28 23:46:48 +02:00
PilzAdam
731392866f Allow to manually specify param2 in minetest.item_place() and return success 2013-09-28 23:46:48 +02:00
BlockMen
27947d85f7 Add option to scale image to percentage values 2013-09-20 20:03:58 +02:00
ShadowNinja
c9eb17aba3 Fix comments about length of server step
6b927229f5f9cb9a8163ecec482160975199fa0f Changed the default server step
from 0.05s to 0.1s
2013-09-17 01:47:45 +02:00
PilzAdam
4feea0ac68 Add offset to automatic_face_movement_dir 2013-09-10 23:31:44 +02:00
PilzAdam
dd5c451e03 Allow non-string arguments for minetest.is_yes() 2013-09-10 21:38:44 +02:00
PilzAdam
d820a6bfd8 Add Settings interface for Lua 2013-09-10 18:31:38 +02:00
Novatux
6291fd1cbb Add minetest.get_gametime() API function, that returns the number of seconds since the world was created. 2013-09-08 11:09:50 +02:00
PilzAdam
7860097eda Use player:set_hotbar_image() instead of hardcoded hotbar.png 2013-09-05 00:21:16 +02:00
Kahrl
1ecf51a13f Add minetest.parse_json, engine.parse_json 2013-09-02 02:20:08 +02:00
sapier
09a50d0458 Add translation for main menu
Add engine.gettext() and remove gettext() calls in guiFormspecMenu.cpp
2013-08-17 16:01:43 +02:00
Sfan5
a97c085e9e Fix documentation about colors in formspec 2013-08-15 19:38:54 +02:00
Kahrl
4e1f50035e Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00
PilzAdam
fc72d7fbb6 Fix typos 2013-08-14 00:50:03 +02:00
sapier
fc571ad46d Add support for entities to automatic face movement direction 2013-08-13 23:48:47 +02:00
kwolekr
c06caa14c3 Decoration: Fix schematic probability mess with new MTS file version 2013-08-11 15:34:49 -04:00
BlockMen
7b13d119ed Add support for different drowning damage and allow drowning in other nodetypes 2013-08-06 17:49:39 +02:00
Perttu Ahola
8831669505 Allow mods to listen to cheat detections using minetest.register_on_cheat() 2013-08-04 00:45:49 +03:00
PilzAdam
45589fae58 Add replacements to schematics 2013-08-03 03:22:14 +02:00
sapier
251e3e01c7 Add support for setting stepheight for entities 2013-07-30 19:48:02 +02:00
proller
037e84d377 Better snow fall, finite liquid transform, leveled nodes api 2013-07-28 17:14:31 +04:00
proller
3aedfac968 Weather support 2013-07-27 23:21:48 +04:00
BlockMen
a59f85c1a0 Add support of pressed_texture of image_button
Fix params number

Add pressed texture name

Fix string def

Fix syntax error
2013-07-24 01:02:43 +02:00
hdastwb
a0f5b70568 added (optional) support for 6d facedir in dir_to_facedir and added facedir_to_dir 2013-07-24 00:31:32 +02:00
sapier
baf5614880 Add port to favorites if not 30000
Major modmgr overhaul
Add missing formspec checkbox doc
2013-07-22 18:09:59 +02:00
PilzAdam
8cae659786 Add an option to disable object <-> object collision for Lua entities 2013-07-20 20:43:11 +02:00
PilzAdam
413f0d0353 Add liquid_range to nodedef 2013-07-20 20:41:17 +02:00
PilzAdam
cba90d4441 Make range of tools configureable 2013-07-20 20:37:59 +02:00
RealBadAngel
d19c8b815d Add set_breath and get_breath to lua API. 2013-07-20 20:34:11 +02:00
Kahrl
6027c8d259 Add VoxelArea:position, VoxelArea:iter and VoxelArea:iterp 2013-07-11 22:57:26 +02:00
PilzAdam
c813a3cc53 Remove note in lua-api.txt that there are no vector helper functions 2013-07-08 13:41:46 +02:00
sapier
88d43af276 Fix many formspec menu bugs 2013-07-07 19:49:52 -04:00
ShadowNinja
ae8ff4b8e2 Add vector helpers 2013-07-07 01:49:11 -04:00
Sfan5
307c57dcc4 Use hexadecimal RRGGBB instead of colorkeys, rename getColor to parseColor 2013-07-06 10:32:58 +02:00
sapier
967121a34b Replace C++ mainmenu by formspec powered one 2013-07-02 19:58:20 -04:00
kwolekr
dd6d1afd8e Decoration: Add schematic rotation support 2013-07-01 18:04:51 -04:00
kwolekr
067888d549 LuaVoxelManip: Fix minor bug with set_lighting, remove coordinate params for light and liquid updates 2013-06-29 22:23:00 -04:00
kwolekr
21a4adcd27 Update documentation for get_mapgen_object 2013-06-29 16:24:32 -04:00
kwolekr
3f13dc790c Add voxelarea.lua helper to builtin 2013-06-28 11:07:45 -04:00
kwolekr
9e100bc42b Apply various fixes to several things 2013-06-27 22:35:35 -04:00
kwolekr
6b3169e4d0 LuaVoxelManip: Separate VoxelManip data get/set from emerging/blitting data back to map 2013-06-27 22:35:35 -04:00
kwolekr
2e292b67a0 Add Lua on_mapgen_init callback, and minetest.set_mapgen_params API 2013-06-27 22:35:35 -04:00
kwolekr
18882a4d26 Add Lua PerlinNoiseMap:get#dMap_flat API 2013-06-27 22:35:35 -04:00
kwolekr
8aa930f28e Add minetest.get_mapgen_object to API 2013-06-27 22:35:35 -04:00
kwolekr
d6ac3d8d9a Add LuaVoxelManip 2013-06-27 22:35:35 -04:00
kwolekr
309c5f3641 Decoration: Add support for zero probability, fix breakage from last commit 2013-06-22 20:49:01 -04:00
kwolekr
4d77781ce7 A handful of minor fixes to various things 2013-06-22 17:27:48 -04:00
kwolekr
c1b829077a Decoration: Add Schematic decoration type 2013-06-22 01:11:52 -04:00
Kahrl
469d0b120e Remove deprecated functions that don't work anymore from lua_api.txt 2013-06-20 07:52:04 +02:00
PilzAdam
53066024f6 Add drowning 2013-06-19 15:47:00 +00:00
kwolekr
56093b6614 Decoration: Change divlen to sidelen 2013-06-17 18:23:31 -04:00
kwolekr
0a8519a26f Add initial Decoration support, many misc. improvements & modifications 2013-06-17 03:21:36 -04:00
PilzAdam
6b3e553dd5 Bump version to 0.4.7 2013-06-06 17:14:26 +00:00
Kahrl
6f9d384311 Replace c55.me links 2013-06-03 01:57:42 +02:00
Kahrl
96fe1de832 Add ObjectRef.hud_set_hotbar_itemcount and add TOCLIENT_HUD_SET_PARAM 2013-05-26 00:23:33 +02:00
sapier
ab43377577 Move scriptapi to separate folder (by sapier)
On the lua side, notably minetest.env:<function>(<args>) should now
be replaced by minetest.<function>(<args>).
The old way is and will stay supported for a long time.

Also:
Update and clean up lua_api.txt (by celeron55)
Move EnvRef to lua and remove add_rat and add_firefly (by kahrl)
Add separate src/util/CMakeLists.txt, other minor fixes (by kahrl)
2013-05-25 00:51:02 +02:00
Jeija
3abbe7efd1 Make raillike nodes connect to any other raillike nodes if both are in the group connect_to_raillike 2013-05-22 15:08:24 +02:00
ShadowNinja
127c488355 Use the group "soil" for nodes that saplings grow on 2013-05-20 13:43:13 +02:00
PilzAdam
45fcc9de29 New modsystem
Mods are placed in $path_<user/share>/mods
They can be enabled per world in world.mt or the configure world window
2013-05-19 02:15:36 +02:00
PilzAdam
b76ec317c9 Remove common from CMakeLists.txt, README.txt, lua-api.txt and buildwin.sh 2013-05-18 16:13:32 +02:00
Kahrl
969d2b3eb1 Optional dependencies and properly handle mod name conflicts again 2013-05-03 23:58:22 +02:00
Sfan5
a4183994a4 Add a Way of checking for specific Feature with Lua Adds minetest.get_feature() and minetest.has_feature() 2013-05-01 15:06:01 +02:00
kwolekr
d3f0ce6224 Generalize hud_builtin_enable into hud_set_flags 2013-04-25 19:37:36 -04:00
RealBadAngel
625a4c2e66 Add new drawtype GLASSLIKE_FRAMED 2013-04-24 21:45:18 -04:00
Diego Martínez
e703c5b81f Added support to disable built-in HUD elements 2013-04-24 17:28:00 +03:00
kwolekr
770305e28d Add option to use texture alpha channel 2013-04-23 22:15:51 -04:00
ShadowNinja
4a9b8aae5e Add minetest.get_player_ip() 2013-04-23 09:57:45 +03:00
ShadowNinja
3d4d0cb574 Add option to not prepend "Server -!- " to messages sent with minetest.chat_send_player() 2013-04-23 09:47:08 +03:00
Diego Martínez
9894167bbf Added offset support for HUD items 2013-04-23 09:34:11 +03:00
Diego Martínez
7c37b1891a Added support for alignment in HUD items 2013-04-23 09:34:10 +03:00
kwolekr
527deb947c Add direction parameter to statbars in HUD API
Fix health bar overlap when a larger texture is used
2013-04-20 00:22:12 -04:00
kwolekr
c45c530f74 Fix Lua HUD documentation 2013-04-18 15:26:29 -04:00
kwolekr
666aae3593 Split HUD code off to hud.cpp, make into a class, extensive Lua HUD modification 2013-04-18 02:19:31 -04:00
Jonathon Anderson
49f6e347f0 Lua HUD 2013-04-18 02:14:33 -04:00
RealBadAngel
e7f5cdf9d4 Bugfixes to get_craft_recipe and get_all_craft_recipes.
Improvements to get_all_craft_recipes (see api doc)
2013-04-10 22:33:59 -04:00
sapier
69367aa799 Add Dijkstra A* and A* without prefetching pathfind algorithms 2013-04-06 11:24:03 -04:00
Diego Martínez
2fb0e547a0 Use the nodebox as selection box if it's not set manually 2013-04-05 15:14:37 +02:00
MirceaKitsune
c5a8448c41 Allow modifying movement speed, jump height and gravity per-player via the Lua API. 2013-04-05 02:00:59 +02:00
PilzAdam
f85c1165c2 Update doc/lua-api.txt 2013-04-03 22:41:18 +02:00
kwolekr
8d4b768297 Add Ore generation flags, implement ore absolute height 2013-03-31 20:02:03 -04:00
PilzAdam
5e7e0347cd Add different place sound for nodes 2013-03-29 20:14:18 +01:00
PilzAdam
7d9329ecfe New damage system, add damageGroups to ToolCapabilities, bump protocol version 2013-03-29 20:14:09 +01:00
PilzAdam
a782a88913 Fix parameter list of obj:set_attach() and obj:set_bone_position() 2013-03-28 01:09:01 +01:00
kwolekr
26cad481d0 Vary ore sheet y position by noise 2013-03-24 22:35:23 -04:00
Perttu Ahola
423d69bd40 Fix indentation of lua_api.txt 2013-03-24 21:39:15 +02:00
kwolekr
6767ed74f8 Update lua_api.txt 2013-03-24 15:20:37 -04:00
Jeija
e1ff5b1361 Allow spawning particles from the server, from lua
Spawn single particles or make use of ParticleSpawner for many randomly spawned particles.
Accessible in Lua using minetest.spawn_particle and minetest.add_particlespawner.
Increase Protocol Version to 17.

Conflicts:
	src/clientserver.h
2013-03-23 23:16:29 +01:00
RealBadAngel
6f8d40ef5d 6d facedir 2013-03-23 21:31:05 +01:00
Perttu Ahola
c2250d95c4 Support game-specific minetest.conf 2013-03-21 22:22:15 +02:00
Perttu Ahola
adc52f3f3c lua_api.txt: Document paths, games and common mod loading 2013-03-21 20:04:00 +02:00
RealBadAngel
7f51b2da28 lua methods set_look_pitch and set_look_yaw 2013-03-17 11:39:35 -04:00
Jeija
fc5d2074b9 Allow minetest.after to take a variable number of arguments 2013-03-17 00:23:30 -04:00
RealBadAngel
5af8acfa6e Added method to get all registered recipes for item(node) 2013-03-05 23:32:33 -05:00
kwolekr
ba78194636 Allow any character in formspec strings with escape char 2013-03-05 23:25:02 -05:00
RealBadAngel
f0d70d4e86 Add seed parameter for default and L-system trees 2013-02-24 02:26:25 +01:00
RealBadAngel
b1019a88ba Fix to on_rightclick not able to change wielded_item 2013-02-13 02:06:36 +04:00
RealBadAngel
1163fdfa11 Treegen update. Some new symbols. Speed up code a bit. 2013-01-23 20:40:09 +02:00
sapier
d8a0efa6af add support for saving settings by lua command (server doesn't autosave on exit) 2013-01-21 22:44:41 +02:00
sapier
0b1d09ff4f Fix buttons not working for Lua-triggered formspecs 2013-01-07 19:00:33 +02:00
RealBadAngel
8b75736c6f L-Systems treegen update. 2013-01-07 18:13:14 +04:00
Jeija
46d431e7c3 Implement textarea in formspec, a multiline input field 2013-01-04 20:09:09 +01:00
PilzAdam
5bc14e2fe4 Add on_rightclick(pos, node, clicker) callback for nodes 2013-01-04 17:15:16 +01:00
Perttu Ahola
69bd803a32 Add InvRef:get_location() 2013-01-02 22:53:55 +02:00
sapier
da9707950e Add TOCLIENT_SHOW_FORMSPEC to display formspecs at client from lua 2013-01-02 20:59:37 +02:00
RealBadAngel
b40e599866 L-System treegen 2012-12-30 13:42:19 +04:00
PilzAdam
29c17c14f1 Add ability to change the itemstack in placenode callbacks 2012-12-17 19:49:18 +01:00
RealBadAngel
f4b7e1a570 New elements in formspec, item_image and item_image_button.
Fixed also game bug drawing dragged item behind fields, buttons etc.
2012-12-01 20:39:41 +02:00
PilzAdam
fa76057e7f Add the group attached_node
Nodes in this group will be dropped as items if the node under them or the node in the wallmounted direction is not walkable.
2012-12-01 13:32:32 +01:00
Matthew I
6c8fa83ecd Add shutdown hook interface to Lua API
Scripts can call minetest.register_on_shutdown() to register a
shutdown hook.

Document that minetest.register_on_shutdown() callbacks may not be run

If the server crashes, it is unlikely that callbacks registered using
minetest.register_on_shutdown() will be called.
2012-11-30 19:26:51 +02:00
Perttu Ahola
d67004a3be Bump version to 0.4.4 as this isn't compatible with 0.4.3 2012-11-26 00:56:47 +02:00
MirceaKitsune
3d1c481f0b RealBadAngel's patch which allows the lua api to read pressed player keys. This should make it possible to change the player's animation based on what he is doing
Correct lua api version number

Always update animations and attachments after the entity is added to scene client side. Fixes animations not being applied in client initialization for some reason. Attachments should be re-tested now just to be safe.

Fix a segmentation fault caused by reaching materials that didn't exist in a loop for setting texture
2012-11-25 19:14:24 +02:00
MirceaKitsune
756db8174a A bunch of fixes
No longer hide players who are dead. With models, a death animation should be used instead

Some changes requested by celeron55

Rename a lot of things in the code, and use better lua api function names

Minor code corrections

Bump protocol version up, since the models / animations / attachments code creates new client<->server messages
2012-11-25 19:14:24 +02:00
MirceaKitsune
9259d028ac Update attachments at the ending of the addToScene function for parents. And with this... *drum roll* Client-side attachments are at last functional and stick visibly.
Fix the last segmentation fault (apparently). So far attachments seem to be fully functional, although removing the parent causes children to go to origin 0,0,0 and possibly still cause such a fault (though this should already be addressed)

Fix a bug in falling code where entities get stuck

Also check if the parent has been removed server-side, and detach the child if so. Fixes children going to origin 0,0,0 when their parent is removed.

Unset all attachment properties when permanently detaching (on both the client and server). Also store less data we don't need

Create a separate function for detaching, and also update lua api documentation

When a child is detached, update its position from the server to clients. This WILL cause it to get positioned slightly differently client side, as the server attachment system only copies parent origin and knows not about mesh / bone transformation. This prevents different clients seeing the object detached in different spots which is most correct

Update the position of attached players to clients. An attached player will see himself move, but this is currently VERY ugly and laggy as it is done by the server (it probably must stay this way too)

Use a different approach for locally attached players. This allows for smooth positio transitions to work, as well at the player turning around freely. Still buggy however
2012-11-25 19:14:24 +02:00
MirceaKitsune
e42eeec8f6 Framework for the attachment system, new object property which allows changing the color and alpha of mesh materials
New object property which allows changing the color and alpha of mesh materials. Due to the current lighting systems it doesn't work yet, but the full implementation is there

Framework for the attachment system, with no actual functionality yet

Send bone and player object to the setAttachment function in content_sao.cpp, but we need a way to translate it there and send it to the client

I will also want position and rotation offsets to be possible to apply to attachments

Network object ID from server to client. This will be used to identify the parent client-side and know what to attach to
2012-11-25 18:14:15 +02:00
MirceaKitsune
118285e6ba Get the new animation framework properly working
Store start and end frames as v2f

Also move bone animations to their own function instead of object properties
2012-11-25 18:14:15 +02:00
MirceaKitsune
ba4d93027f Joint positioning and rotation code, and fix a problem related to their lua API
Attempt to move the animation system to a more correct implementation, rather than using object properties. Incomplete and breaks functionality
2012-11-25 18:14:15 +02:00
MirceaKitsune
fb0c431864 Allow the LUA API to set animations to meshes as well as the animation speed. Also update animations only when needed.
Support for animation blending, though for some reason it doesn't work.

Don't enable animation transitions by default for many reaosons

Object property to store individual bone positions. LUA can specify a bone name followed by a bone position. No functionality yet. Bone rotation to be added in the following commit

Same system for bone rotation, plus a few other things I missed
2012-11-25 18:14:15 +02:00
MirceaKitsune
9c8ba42750 Get the mesh working through the memory cache properly. Most credit goes to celeron55 for the help on this code
Get the texture from memory as well

Add .x to the list of supported formats

Update LUA API documentation
2012-11-25 18:14:15 +02:00
RealBadAngel
8e5167d726 Adding background to Formspec 2012-11-08 19:22:37 +01:00
PilzAdam
3cab24fbcf Merge pull request #243 from xyzz/liquid_renewable
Add liquid_renewable property, allow non-renewable liquids.
2012-11-03 12:34:44 -07:00
PilzAdam
0443d36abf Add falling_node to special groups in lua-api.txt 2012-11-01 12:33:24 +01:00
Perttu Ahola
25cf3757b2 Add nodedef.on_blast() to lua_api.txt in order to support chained explosions of any explosives 2012-09-09 23:24:48 +03:00
Perttu Ahola
9cadaf824b Add dtime_s to entity activation 2012-09-09 17:12:29 +03:00
Perttu Ahola
ac628c9b0a Fix ObjectRef:punch() 2012-09-09 12:05:38 +03:00
Ilya Zhuravlev
926830e0df Add liquid_renewable property. 2012-09-07 20:48:12 +04:00
Perttu Ahola
d53a6cd851 Add overridable function for handling dropped items from nodes 2012-09-02 19:38:44 +03:00
Perttu Ahola
3b43c69df4 Add bouncy node group 2012-09-01 12:58:37 +03:00
Perttu Ahola
b17d3e7ad7 Add disable_jump and fall_damage_add_percent node groups 2012-09-01 12:07:27 +03:00
Ilya Zhuravlev
6a16075912 Add InventoryList width property & allow custom crafting grids. 2012-09-01 10:01:41 +03:00
Matthew I
8a3c777c40 Add ban management routines to Lua API
Those functions are:
 * minetest.get_ban_list()
 * minetest.get_ban_description(ip_or_name)
 * minetest.ban_player(name)
 * minetest.unban_player_or_ip(ip_or_name)
2012-08-12 16:45:58 +03:00
Matthew I
548da26ddc Extend Lua API in order to implement chat commands
minetest.get_server_status()
minetest.request_shutdown()
EnvRef:clear_objects()
2012-08-12 16:44:55 +03:00
Perttu Ahola
0190f9b077 Experimental-ish rollback functionality 2012-07-27 02:27:18 +03:00
Perttu Ahola
0c91a0d59d Working group-shapeless and multigroup recipes 2012-07-26 13:49:13 +03:00
Perttu Ahola
0346e68deb Add special return value -1 to inventry callbacks 2012-07-25 16:52:00 +03:00
Perttu Ahola
983e45ae92 Improve inventory callbacks a bit 2012-07-25 15:39:39 +03:00
Perttu Ahola
9eaf93d41d Detached inventory callbacks and reworked node metadata callbacks 2012-07-25 02:36:54 +03:00
Perttu Ahola
2ac20982e0 Detached inventories 2012-07-24 20:57:17 +03:00
Perttu Ahola
e8331f0c1d Add oldnode parameter to minetest.register_on_placenode callback 2012-07-23 20:44:56 +03:00
Perttu Ahola
9af9d8f5d0 Describe node definition fields better in lua_api.txt 2012-07-23 20:17:44 +03:00
Perttu Ahola
16fc8b5fc2 Update lua_api.txt a bit 2012-07-23 08:48:55 +03:00
darkrose
cd6becd442 Implement node timers 2012-07-23 08:18:37 +03:00
Perttu Ahola
6dfefaf229 Formspec button_exit[] and image_button_exit[] 2012-07-22 17:40:48 +03:00
darkrose
d44f8a854b Doc updates for formspec 2012-07-22 17:40:48 +03:00
Perttu Ahola
4cc98d7add minetest.register_on_player_receive_fields() 2012-07-22 17:40:48 +03:00
Matthew I
c259f7c8bd Update Lua API documentation to include minetest.get_modnames() 2012-07-22 13:36:17 +03:00
Perttu Ahola
b0ba05c9ac BITCH, THIS IS 0.4.0. 2012-07-21 03:37:07 +03:00
darkrose
38580fbee7 Add minetest.get_craft_recipe() 2012-07-21 02:33:22 +03:00
Perttu Ahola
16ad10e62f Allow defining player's inventory form in Lua 2012-07-19 14:09:16 +03:00
Perttu Ahola
c57e5083e8 Add pointed_thing to lua_api.txt 2012-06-17 19:47:55 +03:00
Perttu Ahola
22ae83a589 Explain node boxes in lua_api.txt 2012-06-17 17:23:58 +03:00
Perttu Ahola
d159591b9a Mention node drawtypes in lua_api.txt 2012-06-16 23:42:04 +03:00
Perttu Ahola
fd1135c7af Node texture animation 2012-06-16 16:47:28 +03:00
Perttu Ahola
f4a7e11bce Add some missing object properties to doc/lua_api.txt 2012-06-10 15:04:24 +03:00
Perttu Ahola
6a0388bb4b Node placement client-side prediction 2012-06-10 12:46:48 +03:00
Perttu Ahola
81554fbf72 Add minetest.serialize() and minetest.deserialize() 2012-06-07 00:05:00 +03:00
Perttu Ahola
a435cfcd82 Allow groups in crafting recipes 2012-06-06 23:39:17 +03:00
Perttu Ahola
430d6e1cca Fix small errors in lua_api.txt 2012-06-06 00:15:33 +03:00
Perttu Ahola
3a0562bebc Add after_destruct and cache the existence of on_construct, on_destruct and after_destruct for quick skipping when a node does not have them 2012-06-05 23:51:37 +03:00
Perttu Ahola
c3658e7c79 place_node, dig_node and punch_node; an in-game tester tool; remove old code 2012-06-05 23:10:07 +03:00
darkrose
3e419ffb38 Add InvRef:is_empty(listname) and make chests/furnaces not diggable if not empty in minimal game 2012-06-03 22:31:02 +03:00
darkrose
a149c6ecde Add can_dig callback 2012-06-03 22:31:02 +03:00
Perttu Ahola
1709fd854a Implement image[<X>,<Y>;<W>,<H>;<texture name>] and allow floating-point values in formspec 2012-06-03 22:31:02 +03:00
Perttu Ahola
7bf446f671 Reshape inventory menu code 2012-06-03 22:31:02 +03:00
Perttu Ahola
bf8cfce50e Add ObjRef:is_player() and modify ObjRef:get_player_name() to always return a string to aid better inter-object compatibility of code that assumes objects to be players 2012-06-03 22:31:01 +03:00
Perttu Ahola
35df1ee253 Implement locked chest; add after_place_node and after_dig_node node callbacks 2012-06-03 22:31:01 +03:00
Perttu Ahola
353f9fd43c minetest.get_craft_result 2012-06-03 22:31:01 +03:00
Perttu Ahola
3899f83da8 NodeMetaRef:{to,from}_table and lua_api.txt additions 2012-06-03 22:31:01 +03:00
Perttu Ahola
aba7134301 on_metadata_inventory_{move,offer,take} 2012-06-03 22:31:01 +03:00
Perttu Ahola
d7447cdf9e Implement sign using form field protocol 2012-06-03 22:31:01 +03:00
Perttu Ahola
f3ec1452cd Random node metadata things 2012-06-03 22:31:00 +03:00
Perttu Ahola
29f03756bd Attempt to begin to implement chests and furnace in Lua (with problems) 2012-06-03 22:31:00 +03:00
Perttu Ahola
fe8c5546f0 Add node on_construct, on_destruct callbacks and update lua_api.txt 2012-06-03 22:31:00 +03:00
Perttu Ahola
747ff7daf8 Add support for putting modpacks directly into mod directories 2012-05-21 19:49:35 +03:00
Perttu Ahola
9c5cc217bf Add "Registered definitions of stuff" to doc/lua_api.txt 2012-04-14 11:24:18 +03:00
Perttu Ahola
93cdc9b9dc Support static_spawnpoint setting 2012-04-09 23:32:13 +03:00
Perttu Ahola
251c0c8508 Improve doc/lua_api.txt and add minetest.get_item_group(name, group) 2012-04-09 12:36:25 +03:00
Perttu Ahola
4eaaa0ec53 Add minimal documentation about the $world/game/ addition 2012-04-08 23:32:53 +03:00
Perttu Ahola
2b4d21160f minetest.get_node_group(name, group) 2012-04-08 18:39:55 +03:00
Perttu Ahola
e29a5b11e4 EnvRef:find_nodes_in_area(minp, maxp, nodenames) 2012-04-08 14:37:12 +03:00
Perttu Ahola
2eec788544 Improve doc/lua_api.txt 2012-04-07 19:59:03 +03:00
Sergey Gilfanov
5608f12f9b PerlinNoise for Lua. 2012-04-07 13:39:01 +03:00
Perttu Ahola
578fc5bb44 Add EnvRef:find_node_near(pos, radius, nodenames) 2012-04-06 22:44:42 +03:00
Perttu Ahola
f0e7da8a63 Implement dropped items as LuaEntities; leave the old ones as is for compatibility 2012-04-01 16:06:01 +03:00
Perttu Ahola
8ecfd88d92 Remplement and improve /setting in Lua, now called /set 2012-04-01 13:08:52 +03:00
Perttu Ahola
36c9463467 Improve /grant and /revoke output, add /auth_reload 2012-03-31 17:26:44 +03:00
Perttu Ahola
52122c342d Add 'fly' and 'fast' privileges and the underlying privileges-to-client system 2012-03-31 16:25:02 +03:00
Perttu Ahola
96ee73f790 Fix doc/lua_api.txt 2012-03-31 14:27:04 +03:00
Perttu Ahola
dc70f50b59 initial_properties field in entity definition 2012-03-31 13:50:25 +03:00
Perttu Ahola
e297c73913 More documentation in doc/lua_api.txt 2012-03-31 13:08:17 +03:00
Perttu Ahola
280e1a2512 Allow group:groupname in ABM definition and implement minetest.hash_node_position() 2012-03-31 12:30:11 +03:00
Perttu Ahola
4cee9a86ac Improved teleport command 2012-03-30 20:54:57 +03:00
Perttu Ahola
7cad0a2dcd Reimplement authentication handler in Lua; now we have 1) infinite privilege names, 2) minetest.register_authentication_handler() 2012-03-30 18:42:18 +03:00
Perttu Ahola
3241ad3ae8 ObjectRef:set_armor_groups() and ObjectRef:set_properties() - works on players too! 2012-03-30 13:34:21 +03:00
Perttu Ahola
b9ffb5f30d minetest.register_chatcommand(cmd, def) 2012-03-30 01:45:23 +03:00
Perttu Ahola
92ae11bd3b Use GenericCAO in place of LuaEntityCAO and PlayerCAO 2012-03-29 19:42:42 +03:00
Perttu Ahola
440e9cdbef Rework tool_capabilities a bit (maxwear->uses, scale dig time according to leveldiff) 2012-03-29 13:35:20 +03:00
Perttu Ahola
a3a400992e Add EnvRef:set_node() 2012-03-28 22:50:08 +03:00
Perttu Ahola
68625b047f Add range option to PseudoRandom:next() 2012-03-28 22:01:23 +03:00
Perttu Ahola
9a1df7bf38 Add blockseed to on_generated 2012-03-28 22:01:21 +03:00
Perttu Ahola
ae7aa65069 Add minetest.is_singleplayer() 2012-03-28 13:22:48 +03:00
Perttu Ahola
9e0f969b8b doc/lua_api.txt: minetest.get_worldpath(modname) -> minetest.get_worldpath() 2012-03-28 13:01:35 +03:00
Perttu Ahola
04172e3dd0 Add PseudoRandom in Lua API 2012-03-28 00:38:20 +03:00
Perttu Ahola
fa24e6b995 Fix and extend minetest.after(time, func, param) 2012-03-27 08:17:42 +03:00
Perttu Ahola
37b64ff616 Add minetest.after(time, func) 2012-03-27 00:37:31 +03:00
Perttu Ahola
f022af66da Update doc/lua_api.txt 2012-03-25 16:22:02 +03:00