Commit Graph

830 Commits (cheat-master)

Author SHA1 Message Date
you 87e08b1b3a Add minetest.is_player (#7013)
* Add minetest.is_player

* First use for is_player
2018-02-05 15:17:10 +01:00
paramat b7ff40eea2 Lua_api.txt: Document 'wielditem' visual in object properties 2018-02-05 05:07:36 +00:00
Loïc Blot 584d00a01c
Add minetest.bulk_set_node call + optimize Environment::set_node call (#6958)
* Add minetest.bulk_set_node call + experimental mod unittest

* Optimize set_node function to prevent triple lookup on contentfeatures

Do only one lookup for old, and try to merge old and new lookup if node is same than previous node

* Add benchmark function + optimize vector population to have real results
2018-01-30 00:30:02 +01:00
Paramat 01bc817fe0 Intersects_protection(): Move from Minetest Game to builtin (#6952)
A useful function that applies 'core.is_protected()' to a 3D lattice of
points evenly spaced throughout a defined volume, with a parameter for
the maximum spacing of points.
2018-01-23 19:04:58 +01:00
red-001 0425c6b8c8 CSM: Remove screenshot API
Reverted from commit 19960e26c6
(* [CSM] add screenshot api lua)
2018-01-23 05:27:38 +00:00
red-001 49ff1d2ea8 [CSM] Remove `on_connect` callback (#6941)
Fixes #6939
2018-01-21 18:27:27 +01:00
red-001 5dab742645 [CSM] Add functions to create particles and particlespawners. (#6072) 2018-01-20 23:31:53 +01:00
red-001 9649e47214 [CSM] Add basic HUD manipulation. (#6067)
* [CSM] Add basic HUD manipulation.

Workaround for on_connect not working right now.
2018-01-20 14:09:58 +01:00
paramat d45e5da8ca Biomes: Add 'get heat', 'get humidity', 'get biome data' APIs
'get biome data' returns biome id, heat and humidity.
Clean up nearby lines in lua_api.txt.
2018-01-16 08:47:07 +00:00
red-001 4c0d4e4105 Load a texturepack from the 'textures' subfolder of a game 2018-01-16 08:45:17 +00:00
paramat 70a90bc83a Lua_api.txt: Various improvements
Improve documentation for formspec 'position' and 'anchor' elements.
Add missing documentation of 'animation' and 'glow' for particle spawners.
2018-01-15 04:42:14 +00:00
ezhh 5435b07d4e Lua_api.txt: Improve bullet point indentation consistency 2018-01-13 19:37:17 +00:00
ezhh 8349a3db10 Lua_api.txt: Add chat command params info 2018-01-13 14:59:18 +00:00
paramat 62872dabac Lua_api.txt: Fix, improve and add to Object Properties documentation
Correct 'automatic rotate' to be a number instead of a bool.
2018-01-12 05:51:40 +00:00
paramat 05e9e128b9 Lua_api.txt: Improve and complete ABM documentation
Document 'active object count (wider)'.
2018-01-12 05:45:39 +00:00
Sokomine 2992b774fe Lua API docs: Add warning that schematic placing is cached 2018-01-07 11:47:52 +01:00
rubenwardy 0a83c42dfd
Fix naming conventions of noise userdata 2018-01-07 01:06:18 +00:00
Paramat 549cfd9db8 Biomes: Add vertical biome blend (#6853)
Add 'vertical blend' parameter to biome registration that defines how
many nodes above the biome's 'y max' limit the blend will extend.
2018-01-05 00:10:55 +01:00
Thomas--S f3b9d87076 Connected Nodeboxes: Add `disconnected` boxes
The `disconnected_*` boxes are the opposites of the `connect_*` ones,
i.e. when a node has no suitable neighbours on the respective side, the
according disconnected box is drawn.

* disconnected_top
* disconnected_bottom
* disconnected_front
* disconnected_left
* disconnected_back
* disconnected_right
* disconnected (when there is *no* neighbour)
* disconnected_sides (when there are *no* neighbours to the sides)
2018-01-03 04:05:21 +00:00
Dániel Juhász 2153965cf9 Line_of_sight: Improve using VoxelLineIterator
This commit rewrites line_of_sight with VoxelLineIterator.
Stepsize is no longer needed, the results will be always accurate.
2017-12-26 21:51:32 +00:00
Paramat d04c41ad80 Vector functions: Fix vector.direction() function, improve documentation (#6801)
vector.direction() now returns a normalised vector with direction p1 to p2.
2017-12-21 20:57:42 +01:00
Jordan Irwin 18b921015a Allow 'default' parameter in 'settings:get_bool' function
Default value is used when the setting key is not found in the config
file. If default value is not set, 'nil' is returned.

#6188
2017-12-17 15:27:37 +00:00
Ezhh 649eef9e4f Give subgames the ability to disallow specific mapgens (#6792) 2017-12-16 17:02:08 +01:00
ashtrayoz abd8a30c05 Add callback to preserve node metadata as item metadata 2017-12-14 20:54:04 +00:00
ashtrayoz 02cc257fe0 Lua_api.txt: Fix a spelling error 2017-12-10 14:30:37 +00:00
sfan5 4edf087090 Auth handler: Player deletion & Iterator (#6741)
* Add player deletion method to auth handler (fixes #6653)
* Support iterating over the auth database

There was no way to do this previously and a recent commit
broke doing this the "hacky" way by accessing `core.auth_table`.
2017-12-06 17:32:49 +01:00
paramat f470cb7270 Zoom: Set zoom FOV per-player using a player object property
Remove player object property 'can zoom'.
Add player object property 'zoom fov'.
Remove clientside setting for 'zoom fov'.
Object property default is 15 degrees in creative mode, zoom disabled
in survival mode.

Needed due to zoom now loading and/or generating distant world
according to zoom FOV.

Update object properties serialisation version to 3.
2017-12-04 02:25:10 +00:00
sfan5 ab947bd582 Update documentation regarding authentication handler and related functions
Properly document it instead of referencing the builtin handler as
authoritative "example" code.
Also adds definition of get_auth_handler() which was missing previously.
2017-12-01 09:30:03 +01:00
ezhh 6efb453cdb Lua_api.txt: Remove MT version, fix spelling and clean up
Removes references to MT version in intro section.
Update bump_version.sh to no longer manage version information.
2017-12-01 05:43:30 +00:00
Bluebird 8b1a844e69 Fix spelling mistakes in client_lua_api.txt 2017-11-29 02:24:40 +00:00
paramat 18b914ac74 Client lua api documentation: .md -> .txt
For consistency, and for much improved access on Github.

On Github:
.md disables being able to link to a line, needed daily when
quickly referring people to particular lines.
Search returns results in .md files, but you cannot then click
the line number to go to that line in the document, making searching
difficult.
Line numbers are not displayed for .md documents.
2017-11-28 23:45:57 +00:00
ezhh b312ab4455 Fix lua_api.txt indentation issues 2017-11-28 23:45:51 +00:00
Ezhh c0dd4ea46a Fix documentation formatting for on_death callback 2017-11-28 00:38:35 +00:00
Ezhh 76eb3f2b7a Improve documentation for player:set_attribute() 2017-11-25 23:18:50 +00:00
gituser2194 637ea86069 Fix misspellings
"diffferent" to "different"
"occuring" to "occurring"
"determin" to "determine"
"ommited" to "omitted"
"authetification" to "authentication"
"conponent" to "component"
"ommitted" to "omitted"
"celcius" to "Celsius"
"succesful" to "successful"

Misspellings found using GNU Spell version 1.0
2017-11-24 05:41:31 +00:00
paramat 4b553ece09 Stratum ore: Add option for a constant thickness stratum
Add a 'stratum thickness' integer parameter, as an alternative
to providing a 2nd noise parameter for thickness variation.
2017-11-19 00:25:39 +00:00
paramat 24c1c2fd0f Ore API documentation: Update and improve 2017-11-17 19:27:14 +00:00
paramat 4d83eb796b Lua_api.txt: Add documentation of required mapgen aliases 2017-11-13 03:40:11 +00:00
sfan5 b692454f70 Add minetest.safe_write_file() to script API 2017-11-08 16:14:05 +01:00
paramat d693f95fc3 Lua_api.txt: Add documentation for 'eye_height' player object property 2017-11-06 13:54:42 +00:00
Rob Blanckaert 65c5539035 Add sha1 to lua utils. (#6563) 2017-10-30 08:18:18 +01:00
lisacvuk c252ed506e CSM: Add a way to get current locale from CSM 2017-10-29 12:05:16 +00:00
paramat 241fe649f7 Biome API: Add decoration flags for underground decorations
Add "all_floors" and "all_ceilings" flags for simple and schematic
decorations. Decorations are placed on all floor and/or ceiling surfaces.
Decorations are placed before dungeon generation so placement in dungeons
is not possible.

Add 'getSurfaces()' function to mapgen.cpp that returns 2 arrays of y
coordinates for all floor and ceiling surfaces in a specified node column.

Move 'getHeight()' checks into DecoSimple and DecoSchematic. Delete
'getHeight()' functions.
2017-10-29 12:02:55 +00:00
raymoo a637107a4e Allow overriding tool capabilities through itemstack metadata
This makes it possible to modify the tool capabilities of individual
itemstacks by calling a method on itemstack metadata references.
2017-10-29 11:57:38 +00:00
raymoo a5d5728f24 Fix default item callbacks to work with nil users (#5819)
* Fix default item callbacks to work with nil users

* item.lua: Handle node drops for invalid players

The if-condition for the dropping loop is the same as `inv`, which means that the 2nd possible definition of `give_item` is never used.
Remove redundant `local _, dropped_item`
2017-10-28 10:30:50 +02:00
Muhammad Rifqi Priyo Susanto 63c26413b6 Lua_api.txt: Revert changes to NoiseParams format example 2017-10-23 05:30:45 +01:00
Muhammad Rifqi Priyo Susanto a1e1a19ac3 Improvements/fixes for noise parameter input in advanced settings
Formspec input for each individual noise parameter and flag.
Allow noise flags to be set in advanced settings, previously only settable
in minetest.conf.

Standardise 'group format' for noise parameters set in minetest.conf, as
only these support noise flags. However the older 'single line' format is
still accepted to support existing minetest.conf files.
Therefore auto-generate minetest.conf.example with noise parameters in
'group format'.

Setting 'type' in settingtypes.txt is now either 'noise_params_2D' or
'noise_params_3D', the dimension number is displayed in the advanced
settings edit page.
2017-10-23 01:28:13 +01:00
Auke Kok c60abb2aec Correct `prot_vers` in lua_api.txt.
We should avoid providing incorrect struct members in documentation
since people will be coding based on them.
2017-10-19 21:39:45 -07:00
Vitaliy 75320e7e88 Real global textures (#6105)
* Real global textures

* Add world-aligned textures
* Update minimal to support world-aligned tiles
* Update minimal
2017-10-15 09:34:14 +02:00
paramat 9a41a3d0f1 Simple decorations: Make 'place_offset_y' usable with simple decorations
Necessary for placing the base cube of 'plantlike_rooted' drawtype in the
seabed instead of on it.
Useful for placing decorations sunk into, or buried in, the ground.
2017-10-10 19:57:28 +01:00