191 Commits

Author SHA1 Message Date
luk3yx
1b2a6cde3c Add chatcommand aliases
• /hasprivs is now an alias for /haspriv.
 • /tp is now an alias for /teleport.
2019-03-13 15:36:56 +13:00
Ezhh
66aeaff750 Rename hasprivs command to haspriv (#7860) 2019-03-13 15:25:01 +13:00
tenplus1
a7f6fb4ef0 get_node_drops: Make empty drop return empty table (#7592)
This stops get_node_drops from returning an empty string when using drop = "" and instead returns the supposed empty table instead {}
2019-03-13 15:24:20 +13:00
SmallJoker
b20bb5717c Make the server status message customizable (#7357)
Remove now redundant setting show_statusline_on_connect
Improve documentation of `minetest.get_server_status`
2019-03-13 15:02:44 +13:00
Anand S
bf27f17b1c Add hasprivs chat command (#7336)
Require 'basic_privs' priv
Only the online players are listed.
2019-03-13 15:00:13 +13:00
SmallJoker
19f6ec9450 Fix the /shutdown command (#7431) 2019-03-13 15:00:03 +13:00
number Zero
31a79083a3 Fix typo (GH#7421) 2019-03-13 14:59:49 +13:00
Loïc Blot
9071062448 CSM/SSM: Add on_mods_loaded callback (#7411)
* CSM/SSM: Add on_mods_loaded callback
2019-03-13 14:59:09 +13:00
ClobberXD
e3dcdbad3a Check if player exists on use of /privs (#7554)
* /privs: Check if player exists
2019-03-13 14:53:40 +13:00
Paramat
74f64c1c73 Vertical biome blend: Tune PRNG seed for finer detail (#7329) 2019-03-13 14:46:13 +13:00
SmallJoker
47b883b4b9 is_area_protected: Rename from intersects_protection (#7073)
* is_area_protected: Rename from intersects_protection
Return first protected position
Clarify docs: Mods may overwrite the function
2019-03-12 15:36:57 +13:00
Paramat
7fb7a79f8d 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.
2019-03-12 15:36:34 +13:00
red-001
6b3d44e5c5 Allow the join/leave message to be overridden by mods. 2019-03-12 15:33:25 +13:00
luk3yx
8f3251799d Fix compilation error 2019-03-06 14:57:10 +13:00
DS
ad846371eb Add sounds for falling and attached nodes (#7719)
* Add sounds for falling and attached nodes

The sound specified in `node_definition.sounds.fall` is used.
When a falling node is spawned at a position or an attached node drops, the sound is played at this position.

* allow all sorts of soundspecs
2019-03-06 14:26:26 +13:00
ashtrayoz
35f2bcf9d4 Add callback to preserve node metadata as item metadata 2019-03-06 14:26:17 +13:00
SmallJoker
2cf9d39184 core.spawn_falling_node: Keep metadata (#7476) 2019-03-06 14:24:05 +13:00
zaoqi
5bc6b0f331 Add minetest.spawn_falling_node(pos) (#5339)
* Add minetest.spawn_falling_node(pos)

* lua_api.txt: Add minetest.spawn_falling_node(pos)

* Update minetest.spawn_falling_node(pos)
2019-03-06 14:23:56 +13:00
Auke Kok
27b33013b0 Sounds: Add falling node sounds
Falling nodes should make a sound. This can only be done here,
so for simplicity we just call the sound_play() here with the node
place sound. We ignore any gain value in the sound spec since a
falling node should be loud, so the 1.0 default gain makes sense
here.
2019-03-06 14:22:12 +13:00
SmallJoker
65c3fc3c9b Builtin: Replace deprecated function calls (#7561) 2019-03-06 14:21:39 +13:00
Loïc Blot
091853c813 Implement minetest.register_can_bypass_userlimit (#6369)
* Implement minetest.register_on_userlimit_check

This new callback permits to bypass the max_users parameter with new mods condition, based on player name or IP
Only one mod needs to permit it.

Move core part for builtin privileges checks to builtin
2019-02-16 13:38:47 +13:00
rubenwardy
ef46c6ef2c Fix mistake when calling on_priv_grant/revoke, and document them (#6341) 2019-02-16 13:37:57 +13:00
rubenwardy
59ba17be14 Add on_grant and on_revoke callbacks (#4713)
* Add register_on_priv_grant/revoke, and on_grant/revoke to privs. Call from /grant and /revoke

* Call on_grant and on_revoke callbacks from set_privs
2019-02-16 13:37:42 +13:00
Wuzzy
9d11e843a9 Add slippery group for nodes (players/items slide) 2019-02-11 13:14:03 +13:00
Wuzzy
d47294bd4e Add eat sound (#7956) 2019-02-10 18:39:09 +13:00
SmallJoker
14d20f5827 Builtin auth handler: Speed up file writing (#7252) 2018-06-03 17:32:00 +02:00
SmallJoker
fe41725e50 core.rotate_node: Do not trigger after_place_node (#6900) 2018-06-03 17:32:00 +02:00
dopik
f8cc92c190 /shutdown can't do countdown when using reconnect and/or shutdown message (#7055)
Delay was converted from the param string and not the delay value, thus never using the actual given delay value when used in combination with other string values in the param, in this case reconnect and the shutdown messsage.
2018-06-03 17:32:00 +02:00
you
2a4fbbbff8 Fix "Ignoring CONTENT_IGNORE redefinition" warning (#4393)
minetest.override_item still passes to core
2018-06-03 17:32:00 +02:00
paramat
6d346a817b Item entity: Delete in 'ignore' nodes 2018-06-03 17:32:00 +02:00
paramat
529f00a240 Falling.lua: Delete falling node entities on contact with 'ignore'
Prevents falling node entities entering the ignore at a world edge and
resting on unloaded nodes 16 nodes below, unreachable, undiggable and
still being processed by 'on step' because they don't revert to nodes.
2018-06-03 17:32:00 +02:00
you
880a25c921 Add minetest.is_player (#7013)
* Add minetest.is_player

* First use for is_player
2018-06-03 17:32:00 +02:00
SmallJoker
8a849e893a Builtin: Fix handle_node_drops crash with nil digger 2018-06-03 17:32:00 +02:00
sfan5
0fe3e7574d Make use of safe file writing in auth handler (fixes #6576) 2018-06-03 17:32:00 +02:00
raymoo
7b8288d605 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`
2018-06-03 17:32:00 +02:00
Dániel Juhász
9d40d89d27 Make dropped items colorable 2018-06-03 17:31:59 +02:00
Dániel Juhász
322e5aaf92 Automatic item and node colorization (#5640)
* Automatic item and node colorization

Now nodes with a palette yield colored item stacks, and colored items
place colored nodes by default. The client predicts the colorization.

* Backwards compatibility

* Use nil

* Style fixes

* Fix code style

* Document changes
2018-06-03 17:31:59 +02:00
Wuzzy
80fe516e4e Remove “inf” argument from shutdown command help (#5880) 2017-06-02 17:16:30 +02:00
Elijah Duffy
dada983ff4 Add /clearinv chat command (#4994)
Allow players to clear their own inventory or that of another player with /clearinv command. server privilege is required to clear another player's inventory, no privileges are required to clear your own inventory.'
2017-05-20 12:56:17 +02:00
ShadowNinja
43d1f375d1 Use a settings object for the main settings
This unifies the settings APIs.

This also unifies the sync and async registration APIs, since the async
registration API did not support adding non-functions to the API table.
2017-05-06 15:33:19 -04:00
Loïc Blot
29ab20c272 Player data to Database (#5475)
* Player data to Database

Add player data into databases (SQLite3 & PG only)

PostgreSQL & SQLite: better POO Design for databases

Add --migrate-players argument to server + deprecation warning

* Remove players directory if empty
2017-04-23 14:35:08 +02:00
Dániel Juhász
f6d1b682d3 Add /fixlight chat command 2017-04-22 01:24:41 +01:00
Loïc Blot
34d32ce55a Implement delayed server shutdown with cancelation (#4664) 2017-04-15 23:19:18 +02:00
Dániel Juhász
58d83a7bb2 Hardware coloring for itemstacks
Adds the possibility to colorize item stacks based on their metadata.

In the item/node definition you can specify palette (an image file)
and color (fallback color if the item has no palette or metadata).
Then you can add palette_index to the metadata.

Dropped itemstacks with different colors do not merge.
2017-04-08 18:39:15 -07:00
red-001
d4e9dd4643 Move chat command handling code from C++ to Lua (#5528) 2017-04-08 20:03:57 +02:00
paramat
ec0c4d33db Map generation limit: Make per-world
The setting limits map generation but affects nothing else.
Add 'mapgen_limit' to global mapgen parameters.
Move 'blockpos_over_mapgen_limit()' to the only place it is called
from: map.cpp.
Allow teleportation to any part of the world even if over the set
mapgen limit.
Simplify the reading of this limit in mgvalleys.
Remove the 'map_generation_limit' setting.
2017-03-27 03:18:09 +01:00
red-001
e70e15134c Change command prefix to "." and add "help" command. 2017-03-26 05:51:14 +01:00
red-001
d31750cb93 Give CSM access to use core.colorize() (#5113) 2017-03-17 19:20:13 +01:00
Auke Kok
b539985ab8 Fix two nul deref if digging unknown nodes. (#5398)
Introduced by d785456b3fa35faf47cb972fde9e8668382c5e22 (#5162)
2017-03-15 08:04:53 +01:00
Loïc Blot
2c19d51409 [CSM] sound_play & sound_stop support + client_lua_api doc (#5096)
* squashed: CSM: Implement register_globalstep
  * Re-use fatal error mechanism from server to disconnect client on CSM error
  * Little client functions cleanups

* squashed: CSM: add core.after function
  * core.after is shared code between client & server
  * ModApiUtil get_us_time feature enabled for client
2017-03-13 23:56:05 +01:00