Commit Graph

302 Commits

Author SHA1 Message Date
Elias Fleckenstein a2a808e3b4
Replace deprecated call to add_player_velocity in builtin (#10968) 2022-05-21 16:18:22 +02:00
rubenwardy 4efad46a01
Fix short_description fallback order (#10943) 2022-05-21 16:18:21 +02:00
rubenwardy 76ccee8cdf
Replace 'minetest.' with 'core.' in builtin 2022-05-21 16:18:21 +02:00
sfan5 5677748551
Revise dynamic_add_media API to better accomodate future changes 2022-05-21 16:18:20 +02:00
rubenwardy a63c18ab3e
Fix minetest.dig_node returning true when node isn't diggable (#10890) 2022-05-21 16:18:19 +02:00
sfan5 d5b8f2f904
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.
2022-05-21 16:18:18 +02:00
sfan5 21855b066d
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.
2022-05-21 16:18:18 +02:00
Zughy 7435891dca
Removed some obsolete code (#10562)
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2022-05-21 16:18:16 +02:00
JDiaz e6b64b4a15
Implement on_rightclickplayer callback (#10775)
Co-authored-by: rubenwardy <rw@rubenwardy.com>
2022-05-21 16:18:15 +02:00
Wuzzy c1c73b0493
Fix fallnode rotation of wallmounted nodebox/mesh (#10643) 2022-05-21 16:18:11 +02:00
sfan5 c41e6a9648
Fix certain connected nodeboxes crashing when falling
fixes #10695
2022-05-21 16:18:08 +02:00
Wuzzy 36057e578a
Fix falling image of torchlike if paramtype2="none" (#10612) 2022-05-21 16:18:07 +02:00
sfan5 73211c68d6
Copy position for can_dig
fixes #10514
2022-05-21 16:18:07 +02:00
Desour ae7bdddf51
Do not set a default for description in itemdef table (#10559)
* Do not set a default for description in itemdef table

* improve documentation
2022-05-21 16:18:06 +02:00
Desour 6c78e76633
Add a short_description to be used by mods (#8980) 2022-05-21 16:18:03 +02:00
HybridDog e5e8fba742
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>
2022-05-21 16:18:02 +02:00
rubenwardy 9bac2c659e
Deprecate get_player_velocity and add_player_velocity (#10173) 2022-05-21 16:18:02 +02:00
Elijah Duffy 3001721dd2
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.
2022-05-21 16:18:01 +02:00
HybridDog 8a86eacc9d
Chatcommand: Show help message if func returns false without message
#9440
2022-05-21 16:18:01 +02:00
Pierre-Yves Rollo eae3db8399
Fix #10349 game crashing if dropped an item with undefined light_source (#10351) 2022-05-21 16:17:58 +02:00
LoneWolfHT 32c85cf41b
Fix dropped craftitems/tools not using light_source values (#9438) 2022-05-21 16:17:58 +02:00
1F616EMO 858ae0dfdf
Change `last-login` command to show player name in output (#10263) 2022-05-21 16:17:55 +02:00
SmallJoker b636d018bf
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.
2022-05-21 16:17:54 +02:00
Wuzzy b4d042ef54
Add minetest.is_creative_enabled 2022-05-21 16:17:50 +02:00
sfan5 1abb3ba2f7
Change item entity collisionbox so that they don't sink into the ground 2022-05-21 16:17:50 +02:00
sfan5 5a985e650b
Fix falling entity not falling through players 2022-05-21 16:17:49 +02:00
sorcerykid 83782c6080
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
2022-05-21 16:17:47 +02:00
Wuzzy 26809a296d
Rework functionality of leveled nodes (#9852)
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2022-05-21 16:17:46 +02:00
Wuzzy 10f3a97a91
Error msg if trying to teleport attached player (#9824) 2022-05-21 16:17:44 +02:00
rubenwardy ba458341b2
Item Entity: Add message to moveresult assertion (#9797) 2022-05-21 16:17:43 +02:00
Zughy e0550051b9
Document inf value in rollback commands (#9789) 2022-05-21 16:17:42 +02:00
Wuzzy 143f59d4ad
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>
2022-05-21 16:17:41 +02:00
sfan5 e97eab644a
Enable collide_with_objects for falling entities
falling nodes intentionally still fall through players
fixes #5313
2022-05-21 16:17:41 +02:00
sfan5 789f464a4c
Rewrite falling entity to make use of collision info
fixes #4781, fixes #9293
2022-05-21 16:17:41 +02:00
ANAND 95ada50fdb
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
2022-05-21 16:17:39 +02:00
sfan5 66bd90809b
Rewrite builtin item entity to use collision info
fixes #8967
2022-05-21 16:17:38 +02:00
sfan5 93985fccf5
Expose collision information to LuaEntity on_step 2022-05-21 16:17:38 +02:00
sfan5 031321cbb8
builtin: Correctly indicate failure in /spawnentity 2022-05-21 16:17:38 +02:00
David Leal 346570ad2f
Add new command /revokeme <priv> (#9584) 2022-05-21 16:17:37 +02:00
SmallJoker 3532df05f3
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>
2022-05-21 16:17:36 +02:00
sfan5 fb880865e0
Builtin: Make item entities glow less (#9594)
minor adjustment to #9200
2022-05-21 16:17:34 +02:00
Wuzzy e45995ad1c
Fix some chatcommands not returning a value (#9503) 2022-05-21 16:17:33 +02:00
Wuzzy 783098c161
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
2022-05-21 16:17:31 +02:00
sfan5 36adf45697
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.
2022-05-21 16:17:30 +02:00
Wuzzy a2983962f7
Falling nodes: Add support for facedir, colorfacedir, wallmounted, colorwallmounted, color, airlike, signlike, torchlike and glow (#9205) 2022-05-21 16:17:30 +02:00
SmallJoker 739965416b
Builtin: Fix error by digging unknown nodes 2022-05-21 16:17:30 +02:00
sfan5 d76e2848bb
Convert sound_play uses in builtin to ephemeral 2022-05-21 16:17:29 +02:00
sfan5 6e956c9c07
Let node 'place' and 'dug' sounds be heard by other players 2022-05-21 16:17:29 +02:00
Wuzzy e675431e87
Fix item eat sound not played if last item (#9239) 2022-05-21 16:17:26 +02:00
ANAND fab31e65e0
/privs: Delimit output list of privs with commas (#9224) 2022-05-21 16:17:25 +02:00