Commit Graph

166 Commits

Author SHA1 Message Date
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 d785456b3f (#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
red-001 d7bc346981 [CSM] Add client-sided chat commands (#5092) 2017-03-13 23:56:05 +01:00
Vladislav Tsendrovskii 7a4878cd0b Save metainfo for falling nodes 2017-03-11 23:42:19 -08:00
tenplus1 d785456b3f Optimize item.lua
Replace slow ItemStack get_definitions with registered_nodes one's and cached playername as it's used multiple times.  Also removed local item = itemstack:peek_item() as it is never used.
2017-03-10 11:24:10 -08:00
zaoqi c9ac722ea9 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)
2017-03-04 18:36:37 +01:00
red-001 4d634ef675 Fix crash that can be caused by the shutdown command. (#5292) 2017-02-25 09:28:25 +01:00
Dániel Juhász 00123ee04d Fixes for colorwallmounted and colorfacedir nodes
Correct node placement prediction for attached colorwallmounted nodes.
Correct placement direction for colorfacedir and colorwallmounted nodes.
Correct detatch mechanism for attached colorwallmounted nodes.
2017-02-18 22:47:24 +00:00
tenplus1 e9cd7187e8 Statbars.lua: Cache enable_damage setting 2017-02-18 22:46:06 +00:00
red-001 3d25914986 Add support for the new arguments of `request_shutdown` to the `/shutdown` chatcommand. (#5252) 2017-02-18 12:16:11 +01:00
Wuzzy f5d4494a51 Add textures for air and ignore items (#5196) 2017-02-10 08:19:31 +01:00
Nathanaël Courant 3e355ab7d5 Make facedir_to_dir and wallmounted_to_dir work with coloured nodes as well. (#5153) 2017-01-31 15:02:30 -08:00
Auke Kok 7fc6719968 core: Add dir_to_yaw and yaw_to_dir helpers
These are needed to go from things like entity yaw to a vector
and vice versa.
2017-01-23 07:38:39 +00:00
Elijah Duffy efa54f9c46 Add chatcommand unregister and override API (#5076)
Introduces two functions to unregister and override chatcommands.
minetest.unregister_chatcommand("<name>") and
minetest.override_chatcommand("<name>", {<redifinition>})
2017-01-20 19:49:20 +01:00
rubenwardy c5967f75f0 Add minetest.player_exists() (#5064) 2017-01-18 11:19:57 +01:00
Ezhh d218baa3ac Improve priv descriptions (#5047) 2017-01-17 15:41:25 +01:00
red-001 2f56a00d9e Remove client-side chat prediction. (#5055)
Network lag isn't really a big issue with chat and chat prediction makes writing mods harder.
2017-01-17 00:09:47 +01:00
Rui ec30d49e02 Add staticdata parameter to add_entity (#5009)
* Add staticdata parameter to add_entity
* Add add_entity_with_staticdata to core.features
2017-01-09 20:39:45 +01:00
sfan5 73fdb63597 builtin/.../falling.lua: Avoid crash when hitting unknown nodes 2017-01-09 16:39:40 +01:00
rubenwardy e8b7179ccd Expose and document chatcommands as minetest.registered_chatcommands 2017-01-04 20:56:07 +00:00
Dorian Wouters a1346c916e Fix /grant & /revoke not working with custom auth handler (#4974)
core.auth_table is not supposed to be accessed directly.
2016-12-31 18:12:26 +01:00
paramat 5e4d6468a3 Builtin/../falling.lua: Avoid crash when object pos over limit
If the object pos is over limit, 'add entity' will not add an entity,
causing 'obj' to be nil.
2016-12-21 13:30:10 +00:00
red-001 fb1406bdff Don't send a join message in singleplayer mode. 2016-12-03 00:13:02 +01:00
sfan5 c38985825f Allow restricting detached inventories to one player
This combats the problem of sending the hundreds of
"creative" / "armor" or whatever detached invs that
exist on popular servers to each and every player
on join or on change of said invs.
2016-11-28 13:41:19 +01:00
orwell96 0d1c9598a0 Make supplying empty formspec strings close the formspec (#4737)
This will only happen if the formname matches or if formname is "".
2016-11-23 02:15:22 +10:00
paramat c6ca7a81cc Tool break: Reduce gain of break sounds 2016-11-20 04:43:09 +00:00
Auke Kok 4a0a6723af Builtin/../item: Enable tool breaking sounds
If a tool wears out and is destroyed, it's itemstack count
goes to 0, and we can optionally play a breaking sound.

This patch implements playing a breaking sound when this
occurs. Sounds need to be added to the tool itemdef
registration as the sound name string in the .sound.breaks
member.
2016-11-18 06:15:08 +00:00