4820 Commits

Author SHA1 Message Date
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
paramat
88795b9f9a Spawn level: Add 'get_spawn_level(x, z)' API
Returns a suitable player spawn y co-ordinate for unmodified terrain.
2019-03-13 14:47:04 +13:00
Paramat
74f64c1c73 Vertical biome blend: Tune PRNG seed for finer detail (#7329) 2019-03-13 14:46:13 +13:00
paramat
8b5b291147 Biomes: Fix vertical biome blend 2019-03-13 14:45:34 +13:00
paramat
f93cac5239 Biome API: Add 'get_biome_name(biome_id)' API
Change name of default biome to a more suitable lowercase 'default'.
2019-03-13 14:43:12 +13:00
paramat
5f7cfce654 Biomes: Add 'get heat', 'get humidity', 'get biome data' APIs
'get biome data' returns biome id, heat and humidity.
Clean up nearby lines in lua_api.txt.
2019-03-13 14:43:10 +13:00
Paramat
f46c0b9c3f Biomes: Add vertical biome blend (#6853)
Add 'vertical blend' parameter to biome registration that defines how
many nodes above the biome's 'y max' limit the blend will extend.
2019-03-13 14:42:17 +13:00
luk3yx
55b566f3c2 Append default formspec theme in CSMs. 2019-03-13 08:38:25 +13:00
rubenwardy
5fb79e38a6 Fix cast from const by accessing string data directly (#8354)
Fixes #8327
2019-03-13 08:17:48 +13:00
paramat
ee99140e3a Simple decorations: Make 'place_offset_y' usable with simple decorations
Necessary for placing the base cube of 'plantlike_rooted' drawtype in the
seabed instead of on it.
Useful for placing decorations sunk into, or buried in, the ground.
2019-03-12 21:27:27 +13:00
paramat
e976ac2bb5 Biomes/decorations/ores: Make relative to 'water_level' setting
Add 'biome_zero_level' argument to 'generateBiomes()', 'deco_zero_level'
argument to 'placeAllDecos()' and 'ore_zero_level' to 'placeAllOres()'
to allow mapgens to vertically shift the registered biomes, decorations
and ores per-mapchunk.
Will also allow many realm possibilities in future mapgens.
2019-03-12 21:21:55 +13:00
luk3yx
c069e219f0 Rename gui_formbg.png to builtin_gui_formbg.png.
• Prevents conflicts with custom subgames/mods that could have a different gui_formbg.png.
 • This texture should not be used outside of the engine and minimal subgame to ensure backwards-compatibility.
2019-03-12 20:56:24 +13:00
luk3yx
61e806f312 Add pause menu background and add a copy of gui_formbg.png. 2019-03-12 17:10:29 +13:00
Dániel Juhász
5cff3e4865 Expose getPointedThing to Lua
This commit introduces Raycast, a Lua user object, which can be
used to perform a raycast on the map. The ray is continuable, so one can
also get hidden nodes (for example to see trough glass).
2019-03-12 16:39:17 +13:00
luk3yx
4003b03eb3 Add formspec prepends (or appends?)
• Implements https://github.com/minetest/minetest/pull/7099 in a backwards-compatible way.
 • Formspec prepends are appended (I don't think prepending them works) to formspecs before sending them to clients. This way older clients will still be able to display formspec prepends.
2019-03-12 14:52:53 +13:00
luk3yx
0cee3e3c3a Allow main menu music to be disabled. 2019-03-12 13:40:16 +13:00
rubenwardy
0d8cdab46f Fix incorrect string length check after cast 2019-03-08 08:14:11 +13:00
Jozef Behran
f001791201 Optimize interaction distance checker (#8193)
The "what" parameter is being passed by value, most likely by
accident as the type is "const std::string". Convert it to a
reference by adding the missing "&".
2019-03-08 08:10:23 +13:00
Paramat
add01886b5 F5 debug info: Use full words for NSEW directions for readability (#7461) 2019-03-06 19:18:46 +13:00
xerox123official
f1810e9d73 Display pitch angle in debug menu 2019-03-06 19:08:56 +13:00
ThomasMonroe314
22fcad4fe9 F5 debug info: Add colons, use lowercase except for FPS and RTT 2019-03-06 17:02:37 +13:00
paramat
bccd7d209c F5 Debug info: More compact, return to 2 lines
All data fits on width 960, most useful data still visible on width 800.
2019-03-06 17:02:21 +13:00
Paramat
a83fb42e88 F5 debug display: Reformat and remove some information (#6125)
For consistency return to 'FPS =', add comma before FPS.
Remove 'R' from 'range_all' as may be re-keymapped.
Remove inconsistent brackets from 'range_all'.
Change 'v_range' to 'view_range'.
Add 'pos = ' before co-ordinates.
Add spaces around '=' in yaw display.
Remove brackets from around 'yaw' and 'seed'.
Move 'pointing_at' to 3rd line.
Remove 'param1' (0 for all solid nodes and unreadable for light sources due to
light bank encoding).
Remove file name of pointed node top tile (this also removes the need to get
ContentFeatures for the node, slightly improving performance).
Replace quotes around node data with brackets, looks better and more consistent.

Add 'guitext3' for third line.
Use 'setVisible' for all 3 lines to control the setting of each text rectangle.
Improve logic of 3rd line to only run code it needs to depending on whether
pointing data is avaialble and whether node is not 'ignore' and not 'unknown'.
2019-03-06 15:47:04 +13:00
Wuzzy
bee6ec13fd Show param1 and param2 in debug screen (#6031)
* Show param1 and param2 in debug screen

* Add units and some formatting to debug screen

* Minor refactor of param1/param2 debug display
2019-03-06 15:47:02 +13:00
luk3yx
7ffdd430bb Set pause_on_lost_focus to true by default. 2019-03-06 15:44:51 +13:00
rubenwardy
397a7e1dd1 Add check to pause game on lost window focus 2019-03-06 15:42:07 +13:00
number Zero
d5c3e7a2af Mesh generation: Fix performance regression caused by 'plantlike_rooted' PR
Regression caused by ef285b2815962a7a01791059ed984cb12fdba4dd
2019-03-06 15:25:18 +13:00
number Zero
54c3c2df3e Add 'plantlike_rooted' drawtype
Useful for underwater plants.
Node consists of a base cube plus a plantlike extension that can pass through
liquid nodes above without creating air bubbles or interfering with liquid flow.
Uses paramtype2 'leveled', param2 defines height of plantlike extension.
2019-03-06 15:23:23 +13:00
Loïc Blot
39d01bb895 Cpp11 initializers: last src root changeset (#6022)
* Cpp11 initializers: last src root changeset

Finish to migrate all src root folder files to C++11 constructor initializers
2019-03-06 15:20:48 +13:00
luk3yx
8f3251799d Fix compilation error 2019-03-06 14:57:10 +13:00
rubenwardy
f2f15a1944 Fix naming conventions of noise userdata 2019-03-06 14:51:48 +13:00
paramat
ec0be7a24d Gennotify: Add 'minetest.get_decoration_id' API
Returns the decoration ID for the provided decoration name string.
For use with gennotify, to know the decoration IDs for use in
'minetest.set_gen_notify'.
2019-03-06 14:34:14 +13:00
Benjamin Lindley
e47243c002 Replace for loop with call to standard library function (#8194)
This loop makes multiple passes over m_stack (type std::list) in order to remove all elements with a specified value. Replacing the loop with a call to std::list::remove does the same job, but in only one pass.
2019-03-06 14:19:57 +13:00
rubenwardy
f53b9d7ee9 Hide uninstall package button on unmodifiable paths (#8255) 2019-03-06 14:19:37 +13:00
SmallJoker
6340e66630 Formspecs: Unify textarea and field parsing functions, fix wrong fallback text
* textarea[], field[]: Unify function, fix wrong fallback text
* Remove apparently superflous mainmenumanager.h incldue
* intlGUIEditBox.cpp: make read-only boxes really read-only
* Use elseif (trivial)
2019-02-22 17:53:06 +13:00
nanoproject
26c7c10507 Player marker on both minimaps (#7350) 2019-02-18 09:05:57 +13:00
Loïc Blot
2dfe9bca06 Some performance optimizations (#5424)
* Some performance optimizations

This is globally removing some memory useless copy

* use a const ref return on std::string Settings::get to prevent data copy on getters which doesn't need to copy it
 * pass some stack created strings to static const as they are not modified anywhere
 * Camera: return nametags per const ref instead of a list pointer, we only need to read it
 * INodeDefManager: getAll should be a result ref writer instead of a return copy
 * INodeDefManager: getAlias should return a const std::string ref
 * Minimap: unroll a Scolor creation in blitMinimapPixersToImageRadar to prvent many variable construct/destruct which are unneeded (we rewrite the content in the loop)
 * CNodeDefManager::updateAliases: prevent a idef getall copy
 * Profiler: constness
 * rollback_interface: create real_name later, and use const ref
 * MapBlockMesh updateFastFaceRow: unroll TileSpec next_tile, which has a cost of 1.8% CPU due to variable allocation/destruction,
 * MapBlockMesh updateFastFaceRow: copy next_tile to tile only if it's a different tilespec
 * MapBlockMesh updateFastFaceRow: use memcpy to copy next_lights to lights to do it in a single cpu operation
2019-02-18 09:05:42 +13:00
Loic Blot
27cd90a370 Fix warnings introduced by 9b8fa99fe30728c1fcfa73cdf74211841bdae9fb 2019-02-17 19:58:42 +13:00
number Zero
7eaab18ab5 Minor changes for IrrLicht 1.9 support 2019-02-17 19:55:56 +13:00
luk3yx
2f382ddee2 Bugfixes
• Fix more compilation errors.
 • Hacky workarounds to get content.minetest.net to send a 0.4-compatible mod list.
   · Send the maximum protocol version of 0 (instead of 33) to work around a bug(?) on content.minetest.net.
2019-02-16 17:34:26 +13:00
Paul Ouellette
f3dfce02e9 Fix pkgmgr game install with RUN_IN_PLACE=0 (#8113) 2019-02-16 16:23:49 +13:00
SmallJoker
0d13f65ffd guiFormspecMenu: Allow fraction values for container[] (#7497)
Switch spacing and pos_offset to v2f32 for percision, add helper function
2019-02-16 15:27:16 +13:00
SmallJoker
1e688e3d59 Formspec: Fallback to 'label' in readonly textarea[]
Guarantees backwards compatibility for this formspec element change
2019-02-16 15:15:08 +13:00
adrido
697fe27668 Formspec: textarea with scrollbar improvements
Increase scrollrate depending on fontsize

Scroll on mousewheel

Allow scrolling and marking text on non writable textareas

Update lua api about readonly mode

Show scrollbar if text overflows
2019-02-16 15:14:58 +13:00
luk3yx
d7e17abfea Fix compilation errors 2019-02-16 15:00:00 +13:00
rubenwardy
2dd9bd9abd Add setting to hide mature content from ContentDB 2019-02-16 14:59:03 +13:00
rubenwardy
76f2c285eb Content store: Fix storage leak by storing screenshots in cache (#8137) 2019-02-16 14:57:36 +13:00
rubenwardy
9177301964 Deprecate modpack.txt and use modpack.conf instead (#7892)
* Deprecate modpack.txt and use modpack.conf instead
2019-02-16 14:56:20 +13:00
rubenwardy
f2ac1455ab Fix ContentDB packages timing out by using download_file instead (#7891) 2019-02-16 14:55:08 +13:00
rubenwardy
b5bd41a0da Update contentdb_url to content.minetest.net 2019-02-16 14:51:37 +13:00