1
0
mirror of https://github.com/minetest/minetest.git synced 2025-06-30 07:00:23 +02:00
Commit Graph

57 Commits

Author SHA1 Message Date
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
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
Rui
7f2cefa093 Localize digprop_err function 2015-10-12 02:05:11 +02:00
b12bdcce34 Added minetest.wallmounted_to_dir 2015-10-04 03:19:18 +02:00
2a7d01b833 Some map border related fixes
1. Check for entity addition success in spawn_item implementation
2. Check for success in item_drop callback, so that the player
doesn't lose the item if they are outside bounds and try to drop it.
3. When existing player joins game, check that their position is inside
map bounds. If not, set their position to the return value of findSpawnPos().
4. Make findSpawnPos() respect the border

2 fixes a lua crash if a player drops an item outside map bounds.
3 fixes an assertion crash if a player leaves when being outside map bounds,
and then rejoins.
2015-09-29 23:06:15 +02:00
f062bbd7a1 Add /emergeblocks command and core.emerge_area() Lua API 2015-09-23 15:56:24 -04:00
Rui
d493855481 Small fixes of minetest.has_feature 2015-09-03 06:10:17 +02:00
Rui
4124e360cb Minor tweaks __builtin:falling_node 2015-09-01 19:14:08 +02:00
2b04ab874d SAPI: Track last executed mod and include in error messages 2015-08-12 23:56:12 -04:00
c5c609ce3d Add ability to specify coordinates for /spawnentity 2015-07-18 08:35:36 +02:00
ecdfbfc8dc Remove reference to deprecated privilege 2015-06-14 23:53:30 +02:00
aa13baa30a Add minetest.register_on_player_hpchange 2015-06-13 19:40:31 +02:00
8383a61eac Decrease minetest.after globalstep lag
* abort if theres no active timer
* only reduce the timer.time of all timers when its necessary
* move updating timers_to_add into a seperate function
2015-06-06 21:00:38 +02:00
b8a8be9c86 Nicer time setting logging
Now logs

ACTION[ServerThread]: player sets time to 6:03

instead of

ACTION[ServerThread]: player sets time to 6:3
2015-06-02 06:49:05 +02:00
f26421228b Added hour:minute format to time command
* The time command now accepts parameters in the form <hour>:<minute>,
    and if invoked with no parameters returns the current time in said format.
2015-05-16 18:15:34 -04:00
c5b4e54174 Add minetest.register_on_punchplayer 2015-05-15 11:09:55 +02:00
be18bd6a8c Don't crash if an item gets dropped into unloaded space
Items dropped into unloaded map space will crash game so here's a fix...
2015-05-15 00:15:25 +02:00
178f536f08 Item entity merging refactor
Don't ident too much, and add a comment.
2015-05-15 00:06:18 +02:00
75622c30be Add code to support raillike group names 2015-05-12 20:48:55 +02:00
732eb72a0c Fix minetest.clear_* creating new LOCAL table instead of clearing the existing one.
On calling clear_redistered_biomes the registered_biomes table is cleared
by creating a new empty table, but the pointer is not updated to point to
the new one. So after calling more register_biome, the registered_biome
table always contains 0 items, which is an error. Instead, the table is
cleared by removing all its items so the pointer (minetest.registered_*)
remains valid.
2015-04-26 15:45:58 -04:00
fedbbc8883 Add reason to kicked log message and use present tense 2015-04-05 04:18:47 +02:00
bbed01ab62 Radius parameter for /deleteblocks here 2015-03-05 00:10:53 +10:00
1a175c6982 Add /setpassword and /clearpassword logging 2015-02-27 23:00:28 +01:00
27d4e89d32 Fix unused (and so, broken) enable_rollback_recording. This option must be reloaded at server loop but loaded when server starts, for data consistency (not a hot load variable)
ok @ShadowNinja
2015-02-18 09:28:39 +01:00
efa977518a Fix minetest.item_eat's replace_with_item, fixes #2292 2015-02-16 10:24:19 +01:00
15c037614f Hud: Modify Y-positioning of health/breath starbars to prevent overlapping with Hotbar 2015-02-08 12:47:45 -05:00
a8ec7876a6 Prevent null concatenation when /deleteblocks is provided an incorrect format 2015-01-27 22:36:53 -05:00
5aeeb219e3 Simplify deleteblocks chat command argument parsing
Add optional core.pos_to_string decimal place rounding
Move core.string_to_pos to builtin/common/misc_helpers.lua for consistency
2015-01-15 18:05:13 -05:00
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
a4a6cc8eb1 builtin: Unify register wrapper functions and wrap clear_registered_* functions too 2015-01-13 12:36:05 -05:00
a77c85fa6d Remove builtin_biome.lua from builtin and add simple biome minimal 2015-01-11 22:32:48 -05:00
ef0a4e3614 Add registered_ores and registered_decorations 2015-01-05 18:24:15 -05:00
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
7dbb3916cb Temporarily set default biome in builtin
This should probably be removed when minetest_game has proper biomes.
If I hear "the whole map is just stone!" again after this, I am going to detonate.
2014-12-18 09:57:38 -05:00
d7b3046cf6 Make dropped items larger and rotate faster
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-12-04 21:10:12 +10:00
dbae8a8854 Fix some undeclared global variables 2014-11-26 22:50:08 +10:00
a6ba042cf7 Add strict module
Also fix leaking globals found by it.
2014-11-19 12:40:54 -05:00
92815ad54b Improved VoxelArea variable locality, thus performance
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-11-14 00:10:09 +10:00
90b6de173e Add last_login field to auth.txt
Also shortens some related code and adds more parameters to string.split.
2014-11-08 12:49:50 -05:00
b98e8d6da8 Add a better error message when trying to teleport another player without bring privileges 2014-10-07 16:52:52 -04:00
db5aff832b Use round if falling node is misplaced
Fixes: http://i.imgur.com/arAWw1i.png (middle-right)
2014-09-28 13:33:39 +02:00
3ce6888c1c Fix retval of entity.get_staticdata beeing lost while profiling is enabled 2014-08-24 01:56:27 +02:00
08f7ac5704 Remove buildable_to nodes without dropping item when replaced by a falling node 2014-08-22 11:14:15 +02:00
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
5884236046 Rework texture generating code, add texture grouping via ( ... ) 2014-07-29 20:02:56 +02:00
aebbcbf398 Fix indexing error in timer processing 2014-07-16 17:24:39 +02:00
24a631ee2a Fix crash reported here: https://forum.minetest.net/viewtopic.php?f=6&t=9726 2014-07-13 11:05:07 +02:00
9675d9e9cb New feature: drop a item instead a stack while...
sneaking
2014-06-10 18:11:43 +02:00
282f53ddb7 Allow custom liquids to have drops 2014-06-08 23:25:13 +02:00
e7706593c6 Add success and output return values to chat commands 2014-05-28 18:36:46 -04:00