385 Commits

Author SHA1 Message Date
Robert Zenz
b52fd16e28 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
d21809ec2e 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
677ab7463d 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
e2613ec422 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
726f62097c doc: Update node callback documentation 2015-10-04 15:34:56 -04:00
Duane Robertson
3416bf155f 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
0b892a0499 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
23316c9f92 Add /emergeblocks command and core.emerge_area() Lua API 2015-09-23 15:56:24 -04:00
est31
3b175acadd lua_api.txt: fix typo
Thanks to @kaadmy (NeD) for pointing this out.
2015-09-21 18:10:05 +02:00
kwolekr
6831884d5c Ore: Add puff ore type 2015-09-17 03:04:50 -04:00
kwolekr
f24947f903 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
cd033fc5f4 Add more information about how get_node_light works. 2015-09-08 21:14:56 +02:00
est31
9721b4cf60 Bump version to 0.4.13 2015-08-20 04:02:00 +02:00
kwolekr
925187a32b minimap: Add ability to disable from server 2015-08-13 15:05:48 -04:00
rubenwardy
3a5596ccc8 Fix segfaults caused by the Environment not being initialized yet 2015-08-09 23:36:55 +02:00
est31
2bebf6466b Actually document what minetest.is_protected should do 2015-08-02 19:09:55 +02:00
est31
d4a7cfcd71 Add AreaStore data structure 2015-07-27 06:42:56 +02:00
est31
713002778f 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
85f7c44568 Add note that chat messages can be marked as handled. 2015-07-22 05:43:30 +02:00
est31
93d11fe669 Document game main menu image system 2015-07-21 17:17:46 +02:00
Elia Argentieri
44d030306e Added get_player_velocity() method. Fixes #1176 2015-07-20 05:40:44 +02:00
RealBadAngel
dd9ca2e7ed Fix relief mapping issues 2015-07-16 15:36:48 +02:00
paramat
3b67110599 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
af7af11b4a Fix bug when craft input isn't replaced 2015-06-22 19:30:35 +02:00
MirceaKitsune
ee7dfd7ba0 Fix some issues with animations, and allow non-looped animations to be defined 2015-06-22 01:53:38 +02:00
est31
571e159a1a 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
14b9820f48 Add minetest.register_on_player_hpchange 2015-06-13 19:40:31 +02:00
TeTpaAka
db4fc8326e Add return list of individual counts to find_node_in_area 2015-06-13 19:39:18 +02:00
TeTpaAka
4573eef202 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
793f960e04 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
f560198cd7 Add optional buffer param for bulk data array writes in Lua 2015-05-17 00:07:45 -04:00
kwolekr
5292177986 SAPI: Accept either ARGB8 table or ColorString to specify colors 2015-05-16 20:15:03 -04:00
ShadowNinja
d85feedccc Add core.get_dir_list 2015-05-16 18:33:22 -04:00
ShadowNinja
2dd64f03da Add core.request_insecure_environment() 2015-05-16 18:33:19 -04:00
ShadowNinja
310295c511 Add core.mkdir 2015-05-16 18:32:37 -04:00
ShadowNinja
1008aefa8c Add mod security
Due to compatibility concerns, this is temporarily disabled.
2015-05-16 18:32:31 -04:00
TeTpaAka
676750bd57 Generalize core.get/set_nametag_color into core.get/set_nametag_attributes 2015-05-15 16:21:01 -04:00
Brandon
aeaeed77e7 Add minetest.register_on_punchplayer 2015-05-15 11:09:55 +02:00
TeTpaAka
888e2f9b45 Add get and set functions for the nametag color 2015-05-15 11:03:27 +02:00
Novatux
84334c37cc Add code to support raillike group names 2015-05-12 20:48:55 +02:00
est31
de86d6dabf is_player() is no player-only function 2015-05-12 05:52:49 +02:00
kwolekr
4a54c965a5 Schematics: Add per-node force placement option 2015-05-09 18:44:00 -04:00
kwolekr
097b9ead50 Schematics: Add indent-with-space option for schematic Lua table serialization 2015-05-07 02:54:35 -04:00
kwolekr
e8fb94705c NodeResolver: Remove NodeResolveMethod
This simplifies NodeResolver logic and makes some interfaces cleaner.
2015-05-07 02:36:01 -04:00
kwolekr
cba840d188 Add core.find_nodes_with_meta() script API 2015-05-05 16:21:59 -04:00
ShadowNinja
126ded5c24 Add minetest.global_exists() 2015-04-21 22:58:37 +02:00
kwolekr
6495b9b57b Ore: Add biomes parameter 2015-04-20 20:25:33 -04:00
kwolekr
737d4078c9 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
4c5f712673 Schematics: Reorganize (de)serialization and add Lua serialization API 2015-04-13 03:10:52 -04:00
est31
5119498ae2 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