460 Commits

Author SHA1 Message Date
Jun Zhang
3c28fc24a8 Fix spelling of noise_threshold 2015-12-06 11:38:03 +01:00
est31
a61208d92d Add LuaSecureRandom 2015-11-08 15:57:15 -05:00
est31
405e7acee9 Add server side ncurses terminal
This adds a chat console the server owner can use for administration
or to talk with players.
It runs in its own thread, which makes the user interface immune to
the server's lag, behaving just like a client, except timeout.
As it uses the same console code as the f10 console, things like nick
completion or a scroll buffer basically come for free.
The terminal itself is written in a general way so that adding a
client version later on is just about implementing an interface.

Fatal errors are printed after the console exists and the ncurses
terminal buffer gets cleaned up with endwin(), so that the error still
remains visible.

The server owner can chose their username their entered text will
have in chat and where players can send PMs to.
Once the username is secured with a password to prevent anybody to
take over the server, the owner can execute admin tasks over the
console.

This change includes a contribution by @kahrl who has improved ncurses
library detection.
2015-11-06 08:51:14 +01:00
kwolekr
d93a706ccb 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
4072700558 Add callback parameter for core.emerge_area() 2015-11-02 18:43:09 -05:00
kwolekr
be8bbbe82f SAPI: Fix seed parameter truncation for LuaPseudoRandom constructor
Also fix a potential seed truncation issue on platforms where the
range of ptrdiff_t (the underlying type of lua_Integer) is too small.
2015-10-26 04:04:52 -04:00
kwolekr
be8cc00f50 SAPI: Move core.get_us_time() to Util module 2015-10-26 03:46:36 -04:00
kwolekr
8772291962 SAPI: Throw runtime error instead of if l_get_mapgen_object called in incorrect thread 2015-10-25 23:15:57 -04:00
kwolekr
47189162aa SAPI: Mark all Lua API functions requiring envlock 2015-10-25 23:06:48 -04:00
est31
92a2249160 Correct comment in l_util.cpp
Remove outdated loglevel list from a l_util.cpp comment,
and rather point to the updated code.
2015-10-26 00:32:48 +01: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
est31
77deb12da0 Remove wstrgettext
Everywhere where wstrgettext was used, its output was converted back
to utf8. As wstrgettext internally converts the return value
from utf8 to wstring, it has been a waste. Remove the function, and
use strgettext instead.
2015-10-18 02:29:06 +02:00
ShadowNinja
85dbe50ec1 Rename macros with two leading underscores
These names are reserved for the compiler/library implementations.
2015-10-14 02:39:37 -04: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
kwolekr
321e32b612 Allow setting chunksize in core.set_mapgen_params 2015-10-04 17:26:08 -04:00
kwolekr
3272113636 Hide mapgens from main menu not intended for end users 2015-10-04 17:11:41 -04:00
kwolekr
8c2bf6e89b Add emerge completion callback mechanism
Major refactor of emerge.cpp and Map::init/finishBlockMake
2015-10-04 16:27:50 -04:00
kwolekr
3079eaa37e Define and use limit constants for Irrlicht fixed-width types 2015-10-04 04:00:16 -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
kwolekr
23316c9f92 Add /emergeblocks command and core.emerge_area() Lua API 2015-09-23 15:56:24 -04:00
est31
41bdbf33f9 Various style cleanups + unused code removal
-> Don't pass pointer to whole IGameDef to NodeMetadata constructors
	and deserializers, but only to IItemDefManager, which is needed
-> Remove the unused content_mapnode_get_new_name() method
-> Fix style for MapBlock::deSerialize and MapBlock::deSerialize_pre22,
	improving accuracy of error messages a bit
-> Fix style at other serialisation methods too
-> Improve accuracy of some comments
2015-09-19 20:57:29 +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
est31
9e48f180c9 Areastore: fix "attempt to index a number value"
Before, calling get_areas_in_area for an areastore with both
include_borders and include_data would result in a lua error,
if there was at least one area as result:
attempt to index a number value in function 'get_areas_in_area'
2015-09-03 06:17:02 +02:00
est31
1752042134 l_mainmenu.h: remove unused l_get_dirlist function
The commit
8f9af57314f71aae1cc77e13f9996e13015d776d "Add core.get_dir_list" by @ShadowNinja
has removed the implementation of the l_get_dirlist function and all its usages
from the l_mainmenu.cpp file, but hasn't removed it from the header file.

The reason why this hasn't been detected earlier is that C++ has this interesting
feature to still make it possible to create instances of classes whose never used
private methods are declared but not defined.
2015-08-30 01:17:03 +02:00
Kahrl
799adf20e9 Push error handler afresh each time lua_pcall is used
Fixes "double fault" / "error in error handling" messages
(issue #1423) and instead shows a complete backtrace.
2015-08-27 01:56:06 +02:00
Kahrl
236844f409 Use numeric indices and raw table access with LUA_REGISTRYINDEX 2015-08-27 01:56:06 +02:00
kwolekr
72ee8bc2ba SAPI: Disable unlockable time profiling 2015-08-18 01:26:11 -04:00
kwolekr
09ce485271 SEnv: Remove static_exists from ActiveObjects in deleted blocks 2015-08-16 15:55:07 -04:00
kwolekr
925187a32b minimap: Add ability to disable from server 2015-08-13 15:05:48 -04:00
kwolekr
2fb4917d8e SAPI: Track last executed mod and include in error messages 2015-08-12 23:56:12 -04:00
kwolekr
be00c2f46a Improve Script CPP API diagnostics 2015-08-05 21:13:03 -04:00
paramat
b1fdade2be Biome API: Make fallback biome stone and water, disable filler 2015-08-03 02:34:32 +01:00
est31
d4a7cfcd71 Add AreaStore data structure 2015-07-27 06:42:56 +02:00
SmallJoker
5442818d56 Fix MSVC number conversion warning 2015-07-25 17:38:04 +02:00
est31
cbf8b91940 Fix minetest.get_(all)_craft_recipe(s) regression
Since 03e0dd33a847a83d975282c6caf6b926306e7b57 the calls didn't return an output count
for the recipes.
2015-07-25 17:33:41 +02:00
Loic Blot
8e436bc31c Cleanup server addparticle(spawner) by merge two identical functions. 2015-07-25 12:24:28 +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
Elia Argentieri
44d030306e Added get_player_velocity() method. Fixes #1176 2015-07-20 05:40:44 +02:00
TeTpaAka
48fde1766a Refactor particle code to remove the while loops
Replaces while loops with proper getfield calls
2015-07-18 14:54:07 +02:00
TeTpaAka
2996a06b61 Make acc and vel deprecated in add_particle and search for acceleration and velocity instead
The doc and the actual behaviour differed.
2015-07-18 07:57:20 +02:00
TeTpaAka
1c520f2f20 Fix invisible player when the attached entity is removed 2015-07-18 07:41:43 +02:00
kwolekr
01027450b0 Fix damage flash when damage disabled 2015-07-10 15:58:57 -04:00
est31
dd302e0032 Use UTF-8 instead of narrow
Use wide_to_utf8 and utf8_to_wide instead of wide_to_narrow and narrow_to_wide at almost all places.
Only exceptions: test functions for narrow conversion, and chat, which is done in a separate commit.
2015-07-08 10:12:44 +02: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
paramat
063ca7aa52 Mapgen objects: Enable heatmap and humidmap for all biome api mapgens 2015-06-20 04:16:17 +01:00
Ilya Zhuravlev
415372ca13 Use utf-8 in formspecs 2015-06-13 19:49:55 +02:00
TeTpaAka
db4fc8326e Add return list of individual counts to find_node_in_area 2015-06-13 19:39:18 +02:00
kwolekr
3c87e26ee0 Make get_biome_list() error message more helpful 2015-05-28 20:04:50 -04:00