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

5587 Commits

Author SHA1 Message Date
86d7f84b89 Merge pull request #8776 from osjc/FixGetNode
Finish getNode cleanup
2019-08-10 19:45:44 +02:00
cf64054390 Implement adding velocity to player from Lua
The intended usecase is knockback, but there's potential for more.
2019-08-10 19:44:27 +02:00
d1c27c7e80 Allow customizing chat message format (#8529) 2019-08-08 17:04:46 +01:00
cc610c74a7 guiVolumeChange: Fix child not being removed 2019-08-08 18:03:35 +02:00
37923920a0 Avoid crash caused by, and improve, 'findSpawnPos()' (#8728)
Avoid an unsuitable spawn position (which if outside mapgen limits can
cause a crash) if the main 0-3999 loop reaches its end. Fallback to a
spawn at 0,0,0.
Check the mapgen-returned 'spawn_level' value for being outside limits.
When 'air_count' reaches 2, move back down 1 to spawn in the lower
empty node.
If the spawn position is disallowed by 'objectpos_over_limit()', 'break'
from loop instead of 'continue' because positions above are probably
also over limit.
Reset 'air_count' to 0 if an obstruction is found, to make 'air_count'
consecutive empty nodes.
Allow spawn in 'airlike' drawtype nodes such as mod-added vacuum,
alien atmospheres, fog etc.
Add clarifying comments and improve codestyle.
2019-08-07 22:07:51 +01:00
0c533dc436 Game: Fix double BS multiplication 2019-08-07 21:23:01 +02:00
e788ee283f Client::Interact: Use InteractAction enum instead of numeric constants
This replaces the magic numbers used as interaction modes both client-side and server-side, primarily for the sake of ease-of-readability.
2019-08-07 19:21:14 +02:00
e462a9a5ef Unify wield item handling (#8677)
This moves the wield item functions to Player and the tool utils for range calculation
Also 'local_inventory' was removed due to redundancy in Client
2019-08-07 19:16:31 +02:00
003af74213 guiConfirmRegistration: Set focus to text field (#8761) 2019-08-07 19:15:46 +02:00
fa6bc699bc Hide chat when console is open (#8656) 2019-08-07 19:15:33 +02:00
DS
1cef09ff10 Fix inventory_overlay for nodes without inventory_image (#8433) 2019-08-07 12:07:30 +02:00
19426387d4 Optimize usage of TOSERVER_GOTBLOCKS packet 2019-08-07 11:32:16 +02:00
4d7f296717 Do not add group values of zero to group lists. (#8751)
This fixes an issue where when the engine looked up groups (for example,
in ABM node names), NodeDefManager's m_group_to_items would contain nodes
with a group value of zero, resulting in nodes with flammable = 0 being
burned by a fire mod with a group:flammable checking ABM.

It brings consistency to the behaviour described in the api
documentation, where zero and nil groups should be the same.
2019-08-07 10:48:04 +02:00
233cb86e86 Clean up and fix freetype=false crashes (#8641)
A IGUIFont of type bitmap/vector cannot be converted to CGUITTFont
Fixes various segfaults in gameplay
Shorter font cache code, cleaned up (?)
2019-08-06 21:33:13 +02:00
8da35c22d1 Mapgen Flat: Fix and improve getSpawnLevelAtPoint() (#8756)
Previously, this wrongly returned ground level (a position containing
a solid node) as spawn level.
Return ground level + 2 (+ 2 to spawn above biome 'dust' nodes).
Improve codestyle and make more consistent with generateTerrain().
2019-08-06 02:30:28 +01:00
800fa2d8e7 Fix binary-string confusion in client network code 2019-08-04 20:40:35 +02:00
6c2ded4cac Unify GLES support in gui scaling filter 2019-08-04 16:12:52 +02:00
ca363d3ef8 Unify OpenGL ES support 2019-08-04 16:12:52 +02:00
526a9e4b66 Let ENABLE_GLES appear in cmake_config.h and change its functionality 2019-08-04 16:12:52 +02:00
4f7fa8d417 Add formspec testing to test mod in minimal 2019-08-03 19:36:30 +01:00
9541165752 Add styles to most elements 2019-08-03 19:36:30 +01:00
ec3795a55c Add style[] tag with button support 2019-08-03 19:36:30 +01:00
d1a1c5cbf0 Add custom colorable GUIButton implementation 2019-08-03 19:36:30 +01:00
41ad0f4f20 Fix negative offsets not being supported by container[] 2019-08-03 16:20:15 +01:00
1a97d06b5a Correct ServerActiveObject's virtual getArmorGroups() to be const.
Due to commit ec3142a , UnitSAO's getArmorGroups() did not match
ServerActiveObject's, notably resulting in the lua get_armor_groups() call
returning nothing.
2019-08-01 18:14:37 +02:00
3ceef8e6a0 Mainmenu: Use textarea in error formspecs 2019-08-01 15:56:28 +02:00
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
3296952ae5 Allow toolcaps to override the built-in times for dig_immediate 2019-07-31 18:28:21 +02:00
cdc7eb2d4c Sky: Refactor of moon and sun drawing (#8683)
Split sun and moon render parts from the main render function.
2019-07-30 20:25:47 +02:00
b8aaef704d Move the clamping of hp/breath when their maximums change to read_object_properties(). (#8689)
This prevents set_properties() calls that have nothing to do with hp_max or breath_max overriding the saved hp before another mod has the chance to set a player's intended hp_max (such as in on_joinplayer).
2019-07-30 17:29:45 +02:00
115ef6c09c Rename guiScrollBar to GUIScrollBar 2019-07-29 21:45:39 +02:00
4aa9a669cb ContentCAO: Fix broken attachments on join (#8701)
What happened:
1) Object data is received. Client begins to read the data
2) Client initializes all its children (gob_cmd_update_infant)
3) Children try to attach to parent (yet not added)
4) Parent initializes, is added to the environment

And somewhere in between, Irrlicht wrecks up the attachments due to the missing matrix node.

The solution here is to:
1) Use the same structure as ServerActiveObject
2) Attach all children after the parent is really initialized
2019-07-29 19:14:07 +02:00
705630e7d0 guiScrollBar: move directly to clicked pos if clicked into tray 2019-07-28 21:43:07 +02:00
8efa1de835 Check for 'action' field in ABMs & LBMs 2019-07-27 21:13:47 +02:00
fe6c666da2 Prefix RecipePriority elements with PRIORITY_ 2019-07-27 14:42:41 +02:00
395b1b3346 Initialize priority in CraftDefinition constructors
The priority is used by getCraftResult, which may be used before
initHash is called.
2019-07-27 14:42:41 +02:00
c3daf2a8be Fix missing item images clipping in formspecs (#8652)
* Fix clipping of itemimage

* Code style

* More code styling
2019-07-26 19:44:29 +02:00
ce87ef397f Initialise 'seabed_height' to avoid compilation warning (#8715) 2019-07-26 17:51:53 +01:00
0cde6fc552 Re-order mapgens in mainmenu and 'all settings' mapgen selection (#8705)
v6 always last to discourage selection.
Special mapgens flat, fractal, singlenode, next to last. Of these, singlenode
last to discourage selection.
Of the remaining, v5 last due to age, v7 first due to being the default.
2019-07-25 20:46:28 +01:00
245a31d6b7 Mgfractal: Make non-fractal terrain optional (#8702)
Enabled by default.
Only allow spawn on fractal, not on seabed terrain.
Various codestyle and comment improvements.
2019-07-25 19:58:35 +01:00
y
ecd20de64d Removed debug.upvaluejoin to prevent leak of insecure environment 2019-07-24 11:43:09 +02:00
76824bac9f Document the deprecation of hardcoded cave liquids (#8692) 2019-07-20 01:03:52 +01:00
9fe3246154 Optimize getting active objects a bit. #8674 2019-07-16 15:55:17 -07:00
458f617575 Dungeons: Make multiple large rooms possible (#8678)
Re-add the random size range for large rooms.
Remove 'first_room_large' bool.
Add 'large_room_chance' parameter that can disable large rooms,
specify 1 large room, or specify a chance for large rooms.
If 1 or a chance is specified, the first generated room is large,
to take advantage of the intersection checks that are done for the
1st room only.
2019-07-16 20:39:58 +01:00
0c31946943 Move more dungeon parameter selection to mapgens (#8653)
Move 'num_dungeons' to 'DungeonParams'.
Add new parameter 'num_rooms' to replace 'rooms_min' and 'rooms_max',
so that the mapgen has complete control over the number of rooms.
Add new bool 'first_room_large' so that the mapgen chooses this
instead of a hardcoded 1 in 4 chance.
Add new parameter 'room_size_large' to replace 'room_size_large_min'
and 'room_size_large_max', so that the mapgen has complete control
over this.
2019-07-09 20:38:51 +01:00
140aeabd87 Do predict when sneak-place to node with on_rightclick 2019-07-08 14:21:27 +02:00
0971a14a57 Improve ABM time budget handling. #8645 2019-07-07 23:23:00 -07:00
bb14b7e956 Dungeongen: Remove most hardcoded dungeon nodes (#8594)
Biome-defined dungeon nodes was added as a feature to MT 5.0.0.
So now remove most of the hardcoded dungeon node code that assumes a
game has stone, sandstone, desert stone, and no other stone types.
If biome-defined dungeon nodes are not found, dungeon nodes fall back
to the 'cobble' mapgen alias if present, if not present they fall back
to biome-defined 'stone'.
Remove now-unnecessary mapgen aliases from MapgenBasic. Non-mgv6 games
now only need to define 3 to 5 mapgen aliases.

Document dungeon parameters.

Make c_lava_source fallback to c_water_source as both are used as cave
liquids.
2019-06-30 22:55:20 +01:00
93f7e10e0d Optimize and unify mesh processing (#7851) 2019-06-28 03:22:16 +01:00
5e7004e7af Add compatible, consistent coordinate system to FormSpecs. (#8524) 2019-06-27 13:40:49 +01:00