Commit Graph

352 Commits

Author SHA1 Message Date
Elias Fleckenstein
b2ab5fd161
Replace deprecated call to add_player_velocity in builtin (#10968) 2021-02-18 14:39:04 +00:00
rubenwardy
a8f6befd39
Fix short_description fallback order (#10943) 2021-02-17 18:53:44 +00:00
rubenwardy
4db7fb4a3b Replace 'minetest.' with 'core.' in builtin 2021-02-11 10:18:22 +00:00
sfan5
40ad976753 Revise dynamic_add_media API to better accomodate future changes 2021-02-01 23:00:13 +01:00
rubenwardy
6e0e0324a4
Fix minetest.dig_node returning true when node isn't diggable (#10890) 2021-01-31 18:49:51 +00:00
sfan5
83229921e5 Rework use_texture_alpha to provide three opaque/clip/blend modes
The change that turns nodeboxes and meshes opaque when possible is kept,
as is the compatibility code that warns modders to adjust their nodedefs.
2021-01-29 17:34:41 +01:00
sfan5
edd8c3c664 Drop never documented 'alpha' property from nodedef
Includes minimal support code for practical reasons.
We'll need it for a slightly different purpose next commit.
2021-01-29 17:34:41 +01:00
Zughy
45ccfe26fb
Removed some obsolete code (#10562)
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2021-01-21 18:17:09 +00:00
JDiaz
08ee9794fb
Implement on_rightclickplayer callback (#10775)
Co-authored-by: rubenwardy <rw@rubenwardy.com>
2021-01-11 18:03:31 +01:00
Wuzzy
535557cc2e
Fix fallnode rotation of wallmounted nodebox/mesh (#10643) 2020-12-22 14:54:27 +01:00
sfan5
ecd4f45318 Fix certain connected nodeboxes crashing when falling
fixes #10695
2020-12-04 11:28:45 +01:00
Wuzzy
ee1853e9bc
Fix falling image of torchlike if paramtype2="none" (#10612) 2020-11-15 17:37:09 +01:00
sfan5
61bbdd6807 Copy position for can_dig
fixes #10514
2020-11-12 21:08:26 +01:00
DS
be3fe161fc
Do not set a default for description in itemdef table (#10559)
* Do not set a default for description in itemdef table

* improve documentation
2020-11-10 21:03:10 +01:00
DS
f3ae45b2b2
Add a short_description to be used by mods (#8980) 2020-10-09 19:11:21 +01:00
HybridDog
2f4037752b
Add minetest.get_artificial_light and minetest.get_natural_light (#5680)
Add more detailed light detection functions, a function to get the artificial light (torches) and a function to get the sunlight as seen by the player (you can specify timeofday).

Co-authored-by: rubenwardy <rw@rubenwardy.com>
2020-10-06 20:49:46 +02:00
rubenwardy
3250b37e32
Deprecate get_player_velocity and add_player_velocity (#10173) 2020-10-04 00:33:45 +01:00
Elijah Duffy
7d3641021b
Lua API: Add register_on_chatcommand to SSM and CSM (#7862)
Allows catching a chatcommand call just after the command and the
parameters are parsed but before its existence is checked and before the
corresponding function is run. Returning `true` from a callback function
will prevent default handling of the command leaving mods to handle the
command manually.
2020-10-03 17:38:08 +01:00
HybridDog
4b423ee9b1
Chatcommand: Show help message if func returns false without message
#9440
2020-10-03 17:33:43 +01:00
Pierre-Yves Rollo
d3d218940b
Fix #10349 game crashing if dropped an item with undefined light_source (#10351) 2020-08-30 15:34:28 +02:00
LoneWolfHT
c18dbadcb8
Fix dropped craftitems/tools not using light_source values (#9438) 2020-08-30 00:02:21 +01:00
Emojigit
abfea69e5f
Change last-login command to show player name in output (#10263) 2020-08-06 19:30:41 +02:00
SmallJoker
aba8c37531 Falling: Fix error caused by missing param2
Falling nodes that were spawned prior the recent falling node changes did not require param2.
Default to param2 = 0 when none is found in the node data.
2020-07-30 19:03:48 +02:00
Wuzzy
65a6a316d0 Add minetest.is_creative_enabled 2020-05-29 22:45:40 +02:00
sfan5
2fd5f38c45 Change item entity collisionbox so that they don't sink into the ground 2020-05-27 21:58:20 +02:00
sfan5
03dae5fba6 Fix falling entity not falling through players 2020-05-27 21:58:20 +02:00
sorcerykid
15ba75e4cf Add on_authplayer callback and 'last_login' to on_joinplayer (#9574)
Replace on_auth_fail callback with more versatile on_authplayer
    Better clarify account login process in Lua API documentation
    Change initial timestamp for newly registered accounts to -1
2020-05-23 13:25:29 +02:00
Wuzzy
c94d37827d
Rework functionality of leveled nodes (#9852)
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2020-05-19 21:08:37 +02:00
Wuzzy
ab745685c7
Error msg if trying to teleport attached player (#9824) 2020-05-16 21:41:41 +02:00
rubenwardy
2d7e000cfe
Item Entity: Add message to moveresult assertion (#9797) 2020-05-14 17:54:17 +02:00
Zughy
4e997e9d04
Document inf value in rollback commands (#9789) 2020-05-13 13:56:26 +02:00
Wuzzy
6e1372bd89
Add support for statbar “off state” icons (#9462)
This adds support for optional “off state” icons for statbars. “off state icons” can be used to denote the lack of something, like missing hearts or bubbles.

Add "off state" textures to the builtin statbars.

Co-authored-by: SmallJoker <mk939@ymail.com>
2020-05-11 21:40:45 +02:00
sfan5
e8e5d282da Enable collide_with_objects for falling entities
falling nodes intentionally still fall through players
fixes #5313
2020-05-06 14:03:52 +02:00
sfan5
723926a995 Rewrite falling entity to make use of collision info
fixes #4781, fixes #9293
2020-05-06 14:03:52 +02:00
ANAND
a36c9c3e93
Fix breath_bar scaling; delay breath_bar hiding by one second (#8271)
PLAYER_MAX_BREATH_DEFAULT was earlier set to 11, so that 10 bubbles are shown before the breath bar disappears.

Now, PLAYER_MAX_BREATH_DEFAULT is set to 10, and the breath_bar scaling code in builtin has been tweaked to show all 10 bubbles before hiding the breath_bar
2020-04-28 19:30:57 +02:00
sfan5
b9377f26a1 Rewrite builtin item entity to use collision info
fixes #8967
2020-04-27 20:45:46 +02:00
sfan5
3475759d1a Expose collision information to LuaEntity on_step 2020-04-27 20:45:46 +02:00
sfan5
d3f50f216f builtin: Correctly indicate failure in /spawnentity 2020-04-27 06:58:34 +02:00
David Leal
2fe4641c1e
Add new command /revokeme <priv> (#9584) 2020-04-26 21:15:05 +02:00
SmallJoker
27d611fe55
Add default stack size setting (#8873)
New setting "default_stack_max" to alter the default stack sizes of all items when desired.

Co-authored-by: Pascal Abresch <nep@packageloss.eu>
2020-04-13 10:53:10 +02:00
sfan5
ea30b89d3f
Builtin: Make item entities glow less (#9594)
minor adjustment to #9200
2020-04-04 21:27:30 +02:00
Wuzzy
1441281809
Fix some chatcommands not returning a value (#9503) 2020-03-14 15:01:22 +01:00
Wuzzy
580e7e8eb9 Fix pathfinder bugs: returning nil frequently, broken A*, jump through solid nodes (#9339)
* Fix pathfinder fail when startpos is over air
* Note down pathfinder restrictions
* Implement real A* search
* Pathfinder: Implement buildPath non-recursively
* Update find_path documentation
* Pathfinder: Check if jump path is unobstructed
* Pathfinder: Fix drop check first checking upwards
* Pathfinder: Return nil if source or dest are solid
* Pathfinder: Use priority queue for open list
2020-03-05 12:09:44 +01:00
sfan5
0b8d3f99a5 Move core.get_connected_players() implementation to C++
Keeping the ObjectRefs around in a table isn't ideal and this allows
removing the somewhat nonsensical is_player_connected() added in 86ef7147.
2020-02-23 22:24:12 +01:00
Wuzzy
d507047443
Falling nodes: Add support for facedir, colorfacedir, wallmounted, colorwallmounted, color, airlike, signlike, torchlike and glow (#9205) 2020-02-22 01:10:17 +00:00
SmallJoker
3f675490df Builtin: Fix error by digging unknown nodes 2020-02-16 14:13:52 +01:00
sfan5
7d29611c1b Convert sound_play uses in builtin to ephemeral 2020-02-01 20:31:41 +01:00
sfan5
c10e188594 Let node 'place' and 'dug' sounds be heard by other players 2020-02-01 20:31:41 +01:00
Wuzzy
876a15bd75 Fix item eat sound not played if last item (#9239) 2019-12-24 19:12:46 +01:00
ANAND
ec3224dce2 /privs: Delimit output list of privs with commas (#9224) 2019-12-20 19:15:40 +01:00
Wuzzy
4b9fabf172 Builtin: Make dropped light_source nodes glow (#9200) 2019-12-19 19:41:44 +01:00
Bluebird
80af58c8c5 Make core.item_place_node return position of placed node. (#7713) 2019-12-18 19:21:24 +01:00
sfan5
db7e59f472 Correct documentation around minetest.item_place
The code that calls minetest.item_place_object was removed
in 2013 in commit fc61c8809b9a1d47d9f117446764107a56cec956.
2019-12-16 21:24:34 +01:00
ANAND
4b6bff46e1 Use a safer implementation of gsub in core.chat_format_message (#9133)
This search-and-replace implementation does not use Lua pattern-matching
2019-11-25 20:03:34 +01:00
sfan5
15a030ec9f
Improve documentation around banning (#9088)
* Fix ban chatcommand description
* Correct ban API documentation
2019-11-05 19:24:51 +01:00
Alistair Findlay
5f835a72b2 Builtin: Improve /clearobjects message (#9084) 2019-11-02 19:28:55 +01:00
random-geek
f2e62298a5 Change some usages of "deprecated" to "obsolete" (#9062)
"Deprecated" means that something is still in use, but is unsupported and needs to be removed.
"Obsolete" means it is already out of use.
2019-10-29 19:23:12 +01:00
Warr1024
ad96df191b Merge pull request #8166 from Warr1024/fix7020
Fix (or workaround?) for 'Falling nodes with node inventory cause crash when unloaded'
2019-10-05 15:46:57 +02:00
DS
16865a5bf6 Allow grep-ing for on_grant and on_revoke (#8958)
Just two code comments are added.
2019-09-29 13:40:15 +02:00
Hugo Locurcio
d364b6d0a6 Rename "private messages" to "direct messages" (#8971)
These messages can be read by server administrators, which makes them
not actually private.
2019-09-22 21:48:36 +01:00
sfan5
70f9e1aafa
Punchwear (improved) (#8959) 2019-09-22 22:12:21 +02:00
SmallJoker
fec30e37ac
Fix AreaStore's IDs persistence (#8888)
Improve documentation
Read old formats
Fix free ID function. Return first gap in map
2019-09-21 17:54:52 +02:00
SmallJoker
9acd36bf99 Formspecs: Introduce formspec_version to mods 2019-09-14 19:43:08 +02:00
sfan5
c9ec1a8580
Force item entities out of solid nodes (simpler) (#8885) 2019-09-04 22:21:40 +02:00
Wuzzy
9c725609c3 Fix default hand definition not using wieldhand.png 2019-08-23 19:17:50 +02:00
sfan5
291e7730cf Add player knockback on punch to builtin 2019-08-10 19:44:27 +02:00
ANAND
d1c27c7e80 Allow customizing chat message format (#8529) 2019-08-08 17:04:46 +01:00
Beha
8ffe95913b Fix usage of wrong variable in builtin chat command handling (#8762)
This was introduced in commit 8e75785 and resulted in chat commands not
returning their output text.
2019-08-07 19:32:40 +01:00
rubenwardy
8e757859d6
Add luacheck to check builtin (#7895) 2019-08-06 19:30:18 +01:00
Wuzzy
ec3142af99 Group "immortal" also protects players from damage
Document new meaning of immortal=1 for players

Disable breathing if player is immortal

Hide builtin statbars if player immortal (delayed)

Co-authored-by: ClobberXD <ClobberXD@gmail.com>
2019-08-01 14:45:23 +02:00
SmallJoker
8efa1de835 Check for 'action' field in ABMs & LBMs 2019-07-27 21:13:47 +02:00
SmallJoker
69bf964241
Add /help formspec for commands and privileges (#8385)
* Trigger for 'all' as well
* Add description textarea, double-click to copy
2019-07-20 18:22:32 +02:00
SmallJoker
47492386ec
Docs: Clarify where to check for 'protection_bypass' (#8675) 2019-07-14 13:23:38 +02:00
Thomas Rudin
9a07792f4d Save forceloaded blocks file periodically (#8535)
saves the forceloaded blocks periodically.
checks every 10 seconds if the forceloaded blocks got changed in-game
and persists them on-disk if that's the case
2019-06-10 01:07:33 +01:00
SmallJoker
cb00632e23
HTTP API: Allow binary downloads and headers (#8573)
Add minetest.features.httpfetch_binary_data
2019-06-06 19:13:29 +02:00
ANAND
72feab081c builtin/../register.lua: Abort make_wrap_deregistration if param is invalid 2019-05-04 12:56:19 +02:00
DS
60ab2d94f0 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-05 08:17:48 +01:00
SmallJoker
eea1fdaf25 Statbars: Reduce initial update interval
Centralize HUD updating in update_builtin_statbars.
Fixes race condition in 'on joinplayer' that causes stat bar bugs.
Correctly scales stat bars to custom max values set by mods.
2019-02-12 20:45:38 +00:00
Paul Ouellette
11b550e024 Remove incorrect feature flag (#8086)
And document the versions that introduced the features.
2019-01-19 15:17:05 +01:00
Wuzzy
5560ec8178 Add eat sound (#7956) 2018-12-10 09:25:47 +01:00
Ezhh
6b102ce51f Rename hasprivs command to haspriv (#7860) 2018-11-13 20:24:20 +01:00
SmallJoker
0a5e77132a
Add core.remove_detached_inventory (#7684)
Breaks backwards compatibility for good
Bump protocol version
2018-10-10 20:48:58 +02:00
tenplus1
a4f41e7bfc 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 {}
2018-08-30 20:32:33 +02:00
zeuner
ea26076bcb Feature check for commit ac4884c3d677ef51bcce47f95ccd49d874022692 (#7618)
adds `entity_independent_selectionbox` to minetest.features
2018-08-12 13:37:17 +02:00
Ben Deutsch
153fb211ac Replace auth.txt with SQLite auth database (#7279)
* Replace auth.txt with SQLite auth database
2018-08-05 13:13:38 +02:00
SmallJoker
ade7a1cbcf
Builtin: Replace deprecated function calls (#7561) 2018-07-17 20:17:54 +02:00
ClobberXD
a0635f6024 Check if player exists on use of /privs (#7554)
* /privs: Check if player exists
2018-07-16 14:55:03 +02:00
SmallJoker
0cf36454d6 core.spawn_falling_node: Keep metadata (#7476) 2018-07-09 23:33:21 +02:00
ClobberXD
498078bfa0 Builtin/../misc.lua: Replace minetest. with core., improve codestyle (#7540) 2018-07-09 19:11:35 +01:00
SmallJoker
6f22d14206
Make the server status message customizable (#7357)
Remove now redundant setting show_statusline_on_connect
Improve documentation of `minetest.get_server_status`
2018-07-01 12:31:28 +02:00
Anand S
f3b7be97fe Log usage of /pulverize (#7503) 2018-06-30 12:53:43 +02:00
Anand S
da9e4b1f4a Add hasprivs chat command (#7336)
Require 'basic_privs' priv
Only the online players are listed.
2018-06-12 15:39:43 +02:00
SmallJoker
409d04324f Fix the /shutdown command (#7431) 2018-06-11 13:43:12 +02:00
number Zero
90acb9b3a7 Fix typo (GH#7421) 2018-06-10 10:34:13 +02:00
Loïc Blot
ccc3af128c
CSM/SSM: Add on_mods_loaded callback (#7411)
* CSM/SSM: Add on_mods_loaded callback
2018-06-06 12:53:59 +02:00
you
22df02d25b Fix missing ignore textures (#7326) 2018-05-20 14:51:50 +02:00
Wuzzy
6d6b894c7a Small usage changes for air and ignore items (#7305)
* Remove “you hacker you!” from node description
* Prevent placement of ignore in builtin
* Prevent giving of "unknown" explicitly
2018-05-20 14:51:26 +02:00
SmallJoker
36eb823b1c
Builtin auth handler: Speed up file writing (#7252) 2018-04-19 18:36:10 +02:00
SmallJoker
f6eff57f7c Add player inventory callbacks 2018-04-02 17:18:48 +02:00
you
93eb0794d6 ObjectRef: Add add_velocity() (#3208)
Allow changing the velocity of objects relatively to their current velocity
2018-03-31 14:50:17 +02:00