Commit Graph

234 Commits

Author SHA1 Message Date
Kahrl 0404bbf671 Rewrite client media download and support hash-based remote download
Move most of the media-related code in client.cpp into a new class
ClientMediaDownloader (clientmedia.cpp, clientmedia.h). Among other
things, this class does the following things:

- Download [remote_server][sha1] instead of [remote_server][name]. This
is to support servers that provide the same file name with different
contents.
- Initially fetch [remote_server]index.mth. This file should follow the
Minetest Hashset format (currently version 1) and contain a list of SHA1
hashes that exist on the server.
- The list of needed SHA1s is uploaded (via HTTP POST) when index.mth is
requested, so servers can optionally narrow down the list to the needs
of the client.
- If index.mth is missing (HTTP response code 404), we enter compat mode,
fetching [remote_server][name] as before this commit.
- remote_server can now contain multiple servers, separated by commas.
The downloader code attempts to split requests between the different
servers, as permitted by each server's index.mth. If one server claims
to have a file but actually doesn't (or something fails), we ask a
different server that also claims to have it.
- As before, when none of the remote servers provide a particular
file, we download it via the conventional method, i.e. using
the minetest protocol: TOSERVER_REQUEST_MEDIA / TOCLIENT_MEDIA.
- Bugfix: Every downloaded file's SHA1 is now verified against the SHA1
announced by the minetest server (before loading it and inserting it
into the file cache).
- Bugfix: Only send TOSERVER_RECEIVED_MEDIA when we actually have all
media. This should fix #863.
2013-12-13 18:05:20 +01:00
Kahrl 0ea3e6dbe2 Implement httpfetch module and initialize it from main()
Add curl_parallel_limit setting that will replace media_fetch_threads in
a later commit.

Fix a typo in MutexedQueue::pop_back() that made it impossible to compile
code that used this function. (Noticed this while implementing httpfetch.)
2013-12-13 18:05:10 +01:00
sapier 22a59b3912 Fix win32/msvc i18n (quite UGLY version, blame Microsoft) 2013-11-11 19:56:49 +01:00
Kahrl 2134316c80 Pass VERSION_EXTRA to GenerateVersion.cmake 2013-09-29 16:05:09 +02:00
Kahrl 8bc7ea61b9 Show git hash in version string at top left corner of window 2013-09-28 21:30:17 +02:00
PilzAdam 4ea0e4f606 Add curl, freetype and luaJIT to CMAKE_BUILD_INFO 2013-09-28 15:41:37 +02:00
kwolekr d308352dbd Always use builtin JThread library 2013-09-15 23:00:01 -04:00
Sfan5 3725179736 Use system-wide LevelDB instead of bundled one 2013-09-09 22:50:51 +02:00
Ilya Zhuravlev 58841ef12f Add dummy and LevelDB database backends 2013-09-09 22:50:50 +02:00
Kahrl 4e1f50035e Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00
Kahrl c8930850e3 Remove farmesh 2013-08-13 09:25:13 +02:00
kwolekr ad4c065344 Change debug optimization level back to -O1 2013-07-02 21:48:18 -04:00
sapier 967121a34b Replace C++ mainmenu by formspec powered one 2013-07-02 19:58:20 -04:00
proller 75b8c13b00 New math mapgen with fractal based worlds 2013-06-23 18:07:10 +04:00
sapier ab43377577 Move scriptapi to separate folder (by sapier)
On the lua side, notably minetest.env:<function>(<args>) should now
be replaced by minetest.<function>(<args>).
The old way is and will stay supported for a long time.

Also:
Update and clean up lua_api.txt (by celeron55)
Move EnvRef to lua and remove add_rat and add_firefly (by kahrl)
Add separate src/util/CMakeLists.txt, other minor fixes (by kahrl)
2013-05-25 00:51:02 +02:00
kwolekr 03868ff8e1 Class-ify caves & move to cavegen.cpp, fix cave regression, add caves to Mapgen V7 2013-04-21 01:06:19 -04:00
kwolekr 666aae3593 Split HUD code off to hud.cpp, make into a class, extensive Lua HUD modification 2013-04-18 02:19:31 -04:00
RealBadAngel 9449026839 Use system wide LuaJIT if aviable. 2013-04-08 22:10:00 +02:00
kwolekr fbf76184f0 Revert "Fix to be able to build from dir different than source dir"
This commit broke RUN_IN_PLACE
2013-04-07 01:30:06 -04:00
kwolekr 8ec3fc35c6 Add Mapgen V7, reorganize biomes 2013-04-07 00:50:21 -04:00
Diego Martínez 046534e14b Fix to be able to build from dir different than source dir 2013-04-06 12:31:12 -04:00
sapier 69367aa799 Add Dijkstra A* and A* without prefetching pathfind algorithms 2013-04-06 11:24:03 -04:00
kwolekr 6cf581e360 Fix build on Linux with some glibcs 2013-03-29 21:12:14 -04:00
Jeija e1ff5b1361 Allow spawning particles from the server, from lua
Spawn single particles or make use of ParticleSpawner for many randomly spawned particles.
Accessible in Lua using minetest.spawn_particle and minetest.add_particlespawner.
Increase Protocol Version to 17.

Conflicts:
	src/clientserver.h
2013-03-23 23:16:29 +01:00
Perttu Ahola 34b185e955 Add singlenode mapgen; generates solely the node 'mapgen_singlenode', defaults to air 2013-03-22 19:16:51 +02:00
proller 10c03e1a9d build with ogles2 driver 2013-03-16 22:37:50 -04:00
proller 165498cecf initial mapgen indev version with farscale feature and huge caves 2013-03-16 21:48:32 -04:00
kwolekr 650e932ddf Re-add dungeons in new dungeongen.cpp 2013-03-10 00:42:51 -05:00
sapier bdbdeab005 split scriptapi.cpp
Remerge some files in order to reduce number of additional files

Make necessary changes for split, rename files, reorganize some bits
2013-03-05 00:59:49 -05:00
kwolekr b9d8e59bbf Add emerge.cpp, initial EmergeThread changes
- Neatly placed all emerge related code into a new file, emerge.cpp
- Greatly cleaned up the code in EmergeThread::Thread()
- Reworked Emerge queue.  Now an actual std::queue of v3s16 block positions
- Removed the completely unnecessary map of peer ids requesting blocks
2013-02-25 22:56:18 -05:00
RealBadAngel 4d73d99ebc Add sound volume controls to ingame menu 2013-02-23 16:01:35 +01:00
proller ee07c3f7cf new auto masterserver 2013-02-22 02:04:53 +04:00
Ilya Zhuravlev 30b9a4d6b4 Add Freetype support 2013-02-14 18:46:08 +01:00
Dmitry Marakasov 8e69b9cb26 Server requires gettext library as well 2013-02-12 20:27:50 +01:00
kwolekr d5029958b9 Readded and optimized mapgen V6 2013-01-21 21:41:37 +02:00
kwolekr 11afcbff69 The new mapgen, noise functions, et al. 2013-01-21 21:41:33 +02:00
Jürgen Doser 6af8a34d91 Basic support for configuring which mods to load for each world
settings.h: added function to return all keys used in settings, and a
function to remove a setting

mods.{h,cpp}: added class ModConfiguration that represents a subset of the installed mods.

server.{h,cpp}: server does not load add-on mods that are disabled in
the world.mt file. mods are disabled by a setting of the form
"load_mod_<modname> = false". if no load_mod_<modname> = ... setting
is found, the mod is loaded anyways for backwards compatibilty. server
also complains to errorstream about mods with unstatisfied
dependencies and about mods that are not installed.

guiConfigureWorld.{h,cpp}: shows a treeview of installed add-on mods
and modpacks with little icons in front of their name indicating their
status: a checkmark for enabled mods, a cross for disabled mods, a
question mark for "new" mods

Mods can be enabled/disabled by a checkbox. Mods also show a list of
dependencies and reverse dependencies. double-click on a mod in
dependency or reverse dependency listbox selects the corresponding
mod. Enabling a mod also enables all its dependencies. Disabling a mod
also disables all its reverse dependencies.

For modpacks, show buttons to enable/disable all mods (recursively,
including their dependencies) in it.

Button "Save" saves the current settings to the world.mt file and
returns to the main menu. Button "Cancel" returns to main menu without
saving.

basic keyboard controls (if the proper widget has keyboard focus):

up/down: scroll through tree of mods
left/right: collaps/expand a modpack
space: enable/disable the selected mod
2013-01-21 17:31:50 +02:00
Jeija 6f93c01af9 Add a list of servers to the "Multiplayer" tab
If USE_CURL is set, it also downloads a list from a remote server.
The url of this list is configurable in minetest.conf using the setting "serverlist_url"
The local list of favorite servers is saved in client/serverlist/filename
filename is also configureable using the setting "serverlist_file"
2013-01-21 16:42:56 +02:00
Jeija 61f5ca6b16 Add particles 2013-01-14 15:27:00 +01:00
RealBadAngel b40e599866 L-System treegen 2012-12-30 13:42:19 +04:00
sfan5 05b58501f2 Tweak CMake files for cURL 2012-12-18 21:52:56 +04:00
Ilya Zhuravlev 3578e1d4a7 Added ability to fetch media from remote server (using cURL library) 2012-12-16 15:20:18 +04:00
Kahrl 22e6fb7056 ShaderSource and silly example shaders 2012-12-02 00:46:18 +02:00
Perttu Ahola eca1c96412 Move util/serialize.h out from staticobject.h for smaller header dependencies 2012-11-26 11:18:34 +02:00
Perttu Ahola 2f5686ca48 Move a function from clientserver.h to clientserver.cpp 2012-11-26 10:31:24 +02:00
Matthew I b29d609b0b Move chat commands to Lua and remove servercommand.{cpp,h}
Commands moved:
 /me
 /status
 /time
 /shutdown
 /ban
 /clearobjects
2012-08-12 16:45:58 +03:00
Perttu Ahola 0190f9b077 Experimental-ish rollback functionality 2012-07-27 02:27:18 +03:00
Perttu Ahola aef1332e42 Improve build configuration options 2012-07-23 15:23:33 +03:00
darkrose 506203345b Implement formspec 2012-07-22 17:40:41 +03:00
Perttu Ahola d0ea6f9920 Properly and efficiently use split utility headers 2012-06-17 02:40:36 +03:00