Compare commits

..

198 Commits

Author SHA1 Message Date
2a1c57534a Revert "antihacks: Patch fast/teleport vulnerability when attached to an entity"
* This reverts commit 5d5801d1515c113f1347d50a0dafada39a7cb155.
  due is an older branch with no enought code for implementation of getContent
2023-09-17 20:51:19 -04:00
5d5801d151 antihacks: Patch fast/teleport vulnerability when attached to an entity
* backported https://github.com/minetest/minetest/pull/10340/commits
* Fixed God Mode
* use core::radToDeg and a single v3f to multiply attachment_pos with
* Use getLength() for diffvec
2023-09-17 20:05:35 -04:00
a7b542c074 antihacks: Protect per-player detached inventory actions
* backported https://github.com/minetest/minetest/pull/10341
  Unfortunately also requires invhack mods to implement workarounds,
  but they seem to already be doing this.
2023-09-17 19:40:48 -04:00
4e1b1d0364 load warning fix for lua src build in 2023-09-17 17:41:53 -04:00
3ee0fd6f92 Slap u64 on everything time-y
* get_us_time() will overflow and reset to zero every now and then.
  Had it happen several times in one day,
  https://github.com/minetest/minetest/issues/10105
* backported b5eda416ce

Signed-off-by: mckaygerhard <mckaygerhard@gmail.com>
2023-09-17 15:13:12 -04:00
19afb03d0b Fix linking with Postgres libs on older cmake versions
* integrates https://github.com/minetest/minetest/pull/11215
  so it backported a24899bf2d
* closes https://github.com/minetest/minetest/issues/12149
* closes https://github.com/minetest/minetest/issues/11219
* backported 998e4820c9
2023-09-12 21:45:49 -04:00
545ed62909 Fix no locales being generated when APPLY_LOCALE_BLACKLIST=0
* backported 6caed7073c
  from upstream
2023-09-12 21:25:17 -04:00
8d77805791 set nice way to multi publish server list muti site
* nasty but more moral way of
  fea9c0e5d6
2023-09-06 22:49:24 -04:00
0d139df0a3 Invalid float vector dimension range: clamp and warn instead of crash
* backported from https://github.com/minetest/minetest/pull/12389
* issues related:
    * https://github.com/minetest/minetest/issues/11742
    * https://github.com/minetest/minetest/issues/6129
* close https://codeberg.org/minenux/minetest-engine-minetest/issues/4
2022-06-03 16:41:34 -04:00
96185fb4bd desktop and metadata in manespace series 4 2021-11-23 13:53:58 -04:00
9b2cf35c97 use minetest<version> as name per program and files
* permits to handle multiple versions of minetest on same integration
* permits better integration for distributions on linux and mac
* for progress on https://codeberg.org/minenux/minetest-engine/issues/6
* fix missing include dir for subgame.cpp
2021-11-19 17:49:27 -04:00
Loïc Blot
426b5d3149 Fix a crash on Android with Align2Npot2 (#8070)
* Fix a crash on Android with Align2Npot2

glGetString can be NULL. If stored in a string it triggers a SIGSEGV.
Instead do a basic strstr and verify the pointer
* Better Align2Npot2 check (+ performance)
2019-01-07 17:05:54 +01:00
Loïc Blot
dda844be16
Drop libgmp on Android and use mini-gmp (#8047) 2019-01-04 16:41:42 +01:00
Loïc Blot
899dcbf1ee Bump android version code for next Play Store version 2019-01-04 14:16:09 +01:00
Loïc Blot
957c59a678 Revert "upright_sprite: Fix texture position for players"
This reverts commit d58801ab3204757e6c49892a05633281144f4f44.
2019-01-03 12:04:51 +01:00
stujones11
3d15a6774d
Android: Fix start-up crashes on version 4.x (#8003)
* Android: Load shared STL library

* Android: Fix exception with window background image
2018-12-22 19:02:27 +01:00
Loic Blot
3c24f941e0
Add missing variables since previous cherry-pick 2018-12-22 17:28:22 +01:00
Maksim
9d64805ec1
Update Android java code (#7820)
Targets SDK 26 as required by the playstore.
Fixes screen auto-rotation closing game.
Hides on-screen navigation bar if present.

Update gradlew.
Fix display aspect on 18+/:9 displays (like a Samsung Galaxy S9).
Remove small app icons, not required.
Fix xml in unpacking activity.
Support Android permission: On Android 6.0+ you need to manually give write
permission (as required by google).
Background during unpacking (just a demo for now).
Material Design: no more Android 2 interface.
Immersive mode (Android 4.4+ - hide NavBar for fullscreen mode).
2018-12-22 17:25:38 +01:00
rubenwardy
ce4497224f
Android: Fix memory leak when displaying images in the mainmenu (#8011) 2018-12-22 17:20:18 +01:00
stujones11
a873a3f4f8
Include alpha channel reference in MaterialTypeParam 2018-12-22 17:15:39 +01:00
Loic Blot
86e29ae586
Update android version code (rebuild) 2018-12-04 19:11:03 +01:00
Loic Blot
dd5f03731a Bump android version to 20 2018-06-28 19:11:01 +02:00
Loic Blot
5e7faf3f50 Update cURL (7.60.0) & SQLite3 (3.24.0) 2018-06-28 19:11:01 +02:00
stujones11
8427ae529a Android: Use correct temporary path (#7463) 2018-06-28 19:11:01 +02:00
sfan5
2e85254e91 Fix MurmurHash implementation to really be unaligned (#7482) 2018-06-28 19:11:01 +02:00
red-001
971dea7efd Fix crash caused by Lua error during startup (#7473) 2018-06-28 19:11:01 +02:00
red-001
85ce23b165 Fix buffer overrun in SRP (#7484)
The old code got a pointer to the array instead of the first element, this resulted in a buffer overflow when the function was used more than once.
2018-06-28 19:11:01 +02:00
red-001
e66d5e500c Fix small memory leaks in client. (#7492) 2018-06-28 19:11:01 +02:00
Loic Blot
ea86ecf015
Android: gradle 3.1.3 is not available on mavenCentral
Also update wrapper
2018-06-11 20:37:17 +02:00
Loic Blot
4a48cd57e8
Fix android tools version used to build MT 2018-06-11 19:14:10 +02:00
Loic Blot
289c8dfde5
Android: fix clean_assets target 2018-06-11 19:13:56 +02:00
Loic Blot
9dfe9be1f3
Bump android version for next release 2018-06-10 18:28:41 +02:00
Loic Blot
f5c9c760e3
Android: use c++_shared library instead of c++_static
MT doesn't launch without that
2018-06-10 17:48:48 +02:00
SmallJoker
6dc7177a5d Bump version to 0.4.17.1 2018-06-10 17:18:11 +02:00
number Zero
24a2fd4dc4 Fix narrow/utf8 difference in incoming/outcoming messages 2018-06-10 17:18:11 +02:00
SmallJoker
2515207606 Fix crash in log_deprecated when triggered from no function
Based on commit a1598e1b
2018-06-10 17:18:11 +02:00
Loic Blot
119aa5c919 Fix crash due to missing pointer validation
Based on commit 014a1a0
2018-06-10 17:18:11 +02:00
Loic Blot
fb4bfc60de
Android: fix another build typo 2018-06-10 17:11:57 +02:00
Loic Blot
9bbe99b4f8
Android: fix RTTI issue 2018-06-10 17:07:32 +02:00
Loic Blot
0ef9c53a8c
Fix many Android build issues
It remains one issue with MT itself and rtti
2018-06-10 17:01:47 +02:00
stujones11
b5350e27ad
Android: Update build system for ndk-r15x
Add workarounds for ndk-r16.
2018-06-03 23:14:26 +02:00
SmallJoker
ecbb9310de Bump version to 0.4.17 2018-06-03 17:35:20 +02:00
Loic Blot
aac35a6e7c Backport buildbot win32 scripts too 2018-06-03 17:32:00 +02:00
Loic Blot
04fe8cc0a2 Update macosx build from master 2018-06-03 17:32:00 +02:00
Loic Blot
24abdf45b9 Fix windows toolchain due to missing packages, upgrade to more recent toolchain 2018-06-03 17:32:00 +02:00
SmallJoker
263400b3d8 C++03 oldify in various source files 2018-06-03 17:32:00 +02:00
Loic Blot
695d02e6bd More C++03 fixes 2018-06-03 17:32:00 +02:00
rubenwardy
e2815d27f1 Fix luajit include not being found 2018-06-03 17:32:00 +02:00
Paramat
ebfdb21624 Dungeons: Mostly fix missing stair nodes 2018-06-03 17:32:00 +02:00
mazocomp
0088fa6db4 Fix i386 bit build at OpenBSD (#7259) 2018-06-03 17:32:00 +02:00
Loic Blot
e660b05523 Fix C++03 compiling due to C++11 initialization issues in backport 2018-06-03 17:32:00 +02:00
SmallJoker
14d20f5827 Builtin auth handler: Speed up file writing (#7252) 2018-06-03 17:32:00 +02:00
Paramat
0414322d23 Cavegen: Fix variable typo that broke mgvalleys large cave distribution (#7249)
Fix elusive 5 year old bug that caused mgvalleys large caves to be flat and
limited to mapchunk borders.
Error was fixed 2 years ago in 'CavesV6' but not in 'CavesRandomWalk'.
2018-06-03 17:32:00 +02:00
sfan5
a6cfe73cb0 Fix segfault caused by wrong wgettext() 2018-06-03 17:32:00 +02:00
minduser00
1d06a8ef6c Fix for translating empty strings
Fix for incorrect translation of empty strings

In the key change menu, when a button key not have name an empty string is passed to gettext.
The empty string is reserved for gettext to return de header of the .po file an this is shoved in the button
2018-06-03 17:32:00 +02:00
SmallJoker
875972ffa6 upright_sprite: Fix texture position for players Fixes #6471 2018-06-03 17:32:00 +02:00
Loïc Blot
396daf1be1 Huge LBM lookup performance improvement on mapblock loading (#7195)
* Huge LBM lookup performance improvement on mapblock loading
2018-06-03 17:32:00 +02:00
SmallJoker
fe41725e50 core.rotate_node: Do not trigger after_place_node (#6900) 2018-06-03 17:32:00 +02:00
D Tim Cummings
5624cf750f macOS: don't require X11 libraries during compilation (#7149)
The xxf86vm needs to be removed from Apple builds to avoid CMake Error XXF86VM_LIBRARY is NOTFOUND
2018-06-03 17:32:00 +02:00
paramat
1d7fbd035d Minetest ASCII art: Move from actionstream to rawstream 2018-06-03 17:32:00 +02:00
paramat
a6b9acb7af Generate Notifier: Clear events once after all 'on generated' functions 2018-06-03 17:32:00 +02:00
red-001
c40f535df8 Fix liquid post effect colour behaviour in third person view 2018-06-03 17:32:00 +02:00
paramat
79fde0dd52 CollisionMoveSimple: Collide with 'ignore' nodes 2018-06-03 17:32:00 +02:00
paramat
8aaf526730 SAO limits: Allow SAOs to exist outside the set 'mapgen limit' 2018-06-03 17:32:00 +02:00
paramat
c683e050d4 Find nodes in area (under air): Raise volume limit and document it 2018-06-03 17:32:00 +02:00
Muhammad Rifqi Priyo Susanto
c2e39b9363 Delete world dialog: Move buttons to avoid double click deletion
Move confirmation delete button to never overlap initial delete button,
to avoid world deletion by accidental double click.
2018-06-03 17:32:00 +02:00
dopik
f8cc92c190 /shutdown can't do countdown when using reconnect and/or shutdown message (#7055)
Delay was converted from the param string and not the delay value, thus never using the actual given delay value when used in combination with other string values in the param, in this case reconnect and the shutdown messsage.
2018-06-03 17:32:00 +02:00
sfan5
858c41b842 Check argument types inside MetaDataRef Lua API (#7045) 2018-06-03 17:32:00 +02:00
you
2a4fbbbff8 Fix "Ignoring CONTENT_IGNORE redefinition" warning (#4393)
minetest.override_item still passes to core
2018-06-03 17:32:00 +02:00
paramat
6d346a817b Item entity: Delete in 'ignore' nodes 2018-06-03 17:32:00 +02:00
paramat
529f00a240 Falling.lua: Delete falling node entities on contact with 'ignore'
Prevents falling node entities entering the ignore at a world edge and
resting on unloaded nodes 16 nodes below, unreachable, undiggable and
still being processed by 'on step' because they don't revert to nodes.
2018-06-03 17:32:00 +02:00
you
7725030067 Allow dumping userdata (#7012) 2018-06-03 17:32:00 +02:00
red-001
bb28afcfc3 Move setlocale from Lua to C++. 2018-06-03 17:32:00 +02:00
you
880a25c921 Add minetest.is_player (#7013)
* Add minetest.is_player

* First use for is_player
2018-06-03 17:32:00 +02:00
mazocomp
0268c9d7c9 "static constexpr v3s16 light_dirs[8]" fails to compile, sync it with master! (#7261) 2018-06-03 17:32:00 +02:00
mazocomp
f72490950a Fix C++11 feature detection for undefined _MSC_VER (#7255) 2018-06-03 17:32:00 +02:00
sfan5
9d3fa874be Refine movement anticheat again (#7004)
* Account for walking speed in vertical dir
* Avoid undefined behaviour due to division-by-zero
2018-06-03 17:32:00 +02:00
sfan5
842eccee19 Apply physics overrides correctly during anticheat calculations (#6970) 2018-06-03 17:32:00 +02:00
Pedro Gimeno
127b1fa6f8 Fix off-by-one in log output line length (#6896) 2018-06-03 17:32:00 +02:00
Pedro Gimeno
6b5e2618fb Fix buffer parameter not working in LuaPerlinNoiseMap::l_getMapSlice() 2018-06-03 17:32:00 +02:00
you
b2099d4277 Fix Wstringop-overflow warning from util/srp.cpp (#6855)
* Fix Wstringop-overflow warning from util/srp.cpp
2018-06-03 17:32:00 +02:00
rubenwardy
df0a8574dc Fix rounding error in g/set_node caused by truncation to float 2018-06-03 17:32:00 +02:00
number Zero
6698067256 Fix dancing text 2018-06-03 17:32:00 +02:00
nOOb3167
bb219e1059 Fix undefined behaviour on getting pointer to data in empty vector
`&vector[0]` is undefined if vector.empty(), causing build failure on MSVC
2018-06-03 17:32:00 +02:00
Vitaliy
b3167d4e57 Fix wrong scrolling (#6809) 2018-06-03 17:32:00 +02:00
SmallJoker
8a849e893a Builtin: Fix handle_node_drops crash with nil digger 2018-06-03 17:32:00 +02:00
SmallJoker
f9738c1909 Damage: Remove damage ignore timer 2018-06-03 17:32:00 +02:00
Luis Cáceres
6f80e302fd Ensure no item stack is being held before crafting (#4779) 2018-06-03 17:32:00 +02:00
raymoo
48ebbf0fc6 Shut down mapgen threads before other shutdown tasks (#6689)
Solves some issues with ModStorage functionality in mapgen threads
that occurred when mapgen threads continued to run after the main
server thread had stopped. Also shuts down mapgen threads before
shutdown callbacks are called.
2018-06-03 17:32:00 +02:00
sfan5
7d9dbbbf3c Update documentation regarding authentication handler and related functions
Properly document it instead of referencing the builtin handler as
authoritative "example" code.
Also adds definition of get_auth_handler() which was missing previously.
2018-06-03 17:32:00 +02:00
sfan5
7cc1a36b3c Hint at problematic code when logging deprecated calls 2018-06-03 17:32:00 +02:00
Ezhh
3f1094475f Improve documentation for player:set_attribute() 2018-06-03 17:32:00 +02:00
SmallJoker
f72ac42ca0 Inventory: Restrict access from too far away 2018-06-03 17:32:00 +02:00
SmallJoker
8fba3c93d5 core.rotate_node: Run callbacks like with any regular placed node (#6648) 2018-06-03 17:32:00 +02:00
paramat
a90c314c80 Biome dust node: Only place on 'walkable' cubic non-liquid drawtypes
No longer decide placement on 'buildable_to' parameter.
Dust nodes only look acceptable placed on cubic nodes.
Modders may not want to make their plantlike decorations 'buildable_to'.
2018-06-03 17:32:00 +02:00
ezhh
222fab3d20 Improve Settings tab button alignments 2018-06-03 17:32:00 +02:00
paramat
1cf32b22be Lua_api.txt: Add documentation of required mapgen aliases 2018-06-03 17:32:00 +02:00
Ezhh
6f803b9c89 Remove incorrect entry from settingtypes 2018-06-03 17:32:00 +02:00
sfan5
0fe3e7574d Make use of safe file writing in auth handler (fixes #6576) 2018-06-03 17:32:00 +02:00
sfan5
b816c63196 Add minetest.safe_write_file() to script API 2018-06-03 17:32:00 +02:00
Muhammad Rifqi Priyo Susanto
313ca53b36 Fix issue Minetest crash when custom font path is not exist
We try to use default fallback for both mono and main font when custom font path is not exist. This way, if Minetest is not corrupted, we could avoid crash.
2018-06-03 17:32:00 +02:00
Ezhh
a65a46b889 Fix Settings tab formspec alignment (#6585) 2018-06-03 17:32:00 +02:00
Lars Hofhansl
0cfe3a810a Do not scale texture unless necessary.
This avoids scaling textures to 'texture_min_size' unless it is actually
required (because either auto-scaling or bi/trilinear filtering is enabled)
2018-06-03 17:32:00 +02:00
sfan5
6808a3d144 httpfetch: Enable gzip support 2018-06-03 17:32:00 +02:00
Rob Blanckaert
4d9bf75d3a Add sha1 to lua utils. (#6563) 2018-06-03 17:32:00 +02:00
rubenwardy
416c4535c7 Fix day_night_ratio_do_override not being initialised server-side
Causes get_day_night_ratio() to return unpredictable results.
2018-06-03 17:32:00 +02:00
lhofhansl
73baeb82ef Avoid filtering low-res textures for animated meshes (incl. players) (#6562) 2018-06-03 17:32:00 +02:00
raymoo
7b8288d605 Fix default item callbacks to work with nil users (#5819)
* Fix default item callbacks to work with nil users

* item.lua: Handle node drops for invalid players

The if-condition for the dropping loop is the same as `inv`, which means that the 2nd possible definition of `give_item` is never used.
Remove redundant `local _, dropped_item`
2018-06-03 17:32:00 +02:00
Auke Kok
2f969196b8 Correct prot_vers in lua_api.txt.
We should avoid providing incorrect struct members in documentation
since people will be coding based on them.
2018-06-03 17:32:00 +02:00
Esteban I. RM
0041bcc73e Don't try to craft a non-existent item 2018-06-03 17:32:00 +02:00
rubenwardy
cc48c95ca7 Profiler: Fix var args not being passed to callback register function
Fixes #6517
2018-06-03 17:31:59 +02:00
Loïc Blot
0129c9a9dd Thread: fix a crash on Windows due to data race condition on Thread::m_start_finished_mutex (#6515) 2018-06-03 17:31:59 +02:00
Loic Blot
9dc1f2d638 NetworkPacket::putRawPacket: resize m_data to datasize + memcpy
In some cases NetworkPacket was created using default constructor and m_data is not properly sized.
This fixed out of bounds memory copy
Also use memcpy instead of std::vector affectation to enhance packet creation
2018-06-03 17:31:59 +02:00
adrido
d215198fe8 Replace deprecated WINAPI GetVersionInfoEx (#6496)
* Replace deprecated WINAPI GetVersionInfoEx
2018-06-03 17:31:59 +02:00
Rob Blanckaert
c56c3d8d6f Add setting for near plane distance. (#6395)
* Allow setting the near plane

* - Add near_plane limit of 0.5 to prevent x-ray.
- Add more details to near_plane setting.
2018-06-03 17:31:59 +02:00
SmallJoker
0034abb560 Unkown nodes: Provide position on interact (#6505)
* Unkown nodes: Provide position on interact
2018-06-03 17:31:59 +02:00
SmallJoker
200e9cc4a2 ParticleSpawner::step cleanup and rotation fix (#6486)
* Particles: Move spawner code to a separate fucntion
2018-06-03 17:31:59 +02:00
paramat
6b0fb94d60 CAO footstep sounds: Reduce gain to balance volume 2018-06-03 17:31:59 +02:00
raymoo
017815161b Fix attached particle spawners far from spawn (#6479)
* Fix attached particle spawners far from spawn

When far from spawn, attached particle spawners
did not spawn particles.
2018-06-03 17:31:59 +02:00
SmallJoker
ab72100a2c Localplayer: Fix disable_jump effect and getStandingNodePos()
Leave the old move code untouched.
2018-06-03 17:31:59 +02:00
raymoo
9927076b47 Document orientation parameter of set_attach (#6473) 2018-06-03 17:31:59 +02:00
Paramat
bd8d6f8f2f Fix recent commit: std::max -> std::fmax for floats (#6469)
Fixes commit a455297d297c0819a7eff89e51e5f01a5ac731c3
<cmath> header was already present in commit.
2018-06-03 17:31:59 +02:00
paramat
3a9d500396 Positional sound: Limit volume when closer than 1 node
Change OpenAL distance model from AL_INVERSE_DISTANCE to
AL_INVERSE_DISTANCE_CLAMPED to avoid excessive volume when very close
to the sound location, for example MTG doors, and MTG fire sounds which
are combined at an average position and often located in air nodes.

Because AL_REFERENCE_DISTANCE has been reduced to 1 node (the distance
under which gain is clamped), multiply volume by the same factor to keep
sound gains the same as before, since the gain is calculated as:

gain = (AL_REFERENCE_DISTANCE / distance)
2018-06-03 17:31:59 +02:00
sfan5
01b9da870b Fix blocks written by vmanip not being marked as modified
This bug can be triggered by e.g. calling minetest.place_schematic()
and stopping the server immediately afterwards.
2018-06-03 17:31:59 +02:00
DTA7
e8286e8894 Set placer to nil instead of a non-functional one in item_OnPlace (#6449)
* Set placer to nil instead of a non-functional one

This requires nil checks in core.rotate_node and core.rotate_and_place.
2018-06-03 17:31:59 +02:00
paramat
b8f473be21 Leveled nodebox: Change levels from 1/63rds to 1/64ths
Add missing documentation of leveled nodebox to lua_api.txt, plus
a little cleaning up nearby.
2018-06-03 17:31:59 +02:00
tenplus1
b1fae4c7be Fix Rotate Node Placement (#6424)
This properly checks for creative mode or privilege when using fixed rotate_node() function.
2018-06-03 17:31:59 +02:00
sfan5
c2a0333901 ServerEnv: Clean up object lifecycle handling (#6414)
* ServerEnv: Clean up object lifecycle handling
2018-06-03 17:31:59 +02:00
sfan5
5b2461c713 Fix core.wrap_text and make its behaviour consistent with the docs
Code based on initial implementation by @dsohler.
2018-06-03 17:31:59 +02:00
rubenwardy
e9087d1be7 Fix empty legacy meta being persisted 2018-06-03 17:31:59 +02:00
Nathanaël Courant
bb4ef52954 Statbars: fix incorrect half-images in non-standard orientations (fixes #6198) 2018-06-03 17:31:59 +02:00
Paramat
888b99e1b6 Android stepheight: Only increase if 'touching ground' (#6313) 2018-06-03 17:31:59 +02:00
Dániel Juhász
2c450ed93f Fix Android node selection distance (#6187) 2018-06-03 17:31:59 +02:00
Loïc Blot
d9c7af109a serialize: use a temporary for SerializeException Exception must always use temporary instead of global copied exception instances, it's not recommended and should have undefined issues 2018-06-03 17:31:59 +02:00
Loic Blot
12562be393 Typo fix in compat code from commit 1d8d01074fdb52946f81110bebf1d001185b394b 2018-06-03 17:31:59 +02:00
Loïc Blot
151c19a6be ClientInterface: add a function to verify (correctly) if user limit was reached (#6258)
* ClientInterface: add a function to verify (correctly) if user limit was reached

CS_HelloSent is a better indicator of active slots than CS_Created, which are session objects created after init packet reception

Switch existing checks to ClientInterface::isUserLimitReached()

Use range-based for loop for getClientIds() used function too

This will fix #6254 (not the memory overhead if init is flooded)
2018-06-03 17:31:59 +02:00
Dániel Juhász
9d40d89d27 Make dropped items colorable 2018-06-03 17:31:59 +02:00
SmallJoker
037b01eac7 Trigger on_rightclick regardless on the formspec meta field
Document behaviour for older clients.
2018-06-03 17:31:59 +02:00
Fixer
c789c532bb Full viewing range key message clarified
To make it sound less confusing to players
2018-06-03 17:31:59 +02:00
Jens Rottmann
b3ffe675c3 Add tiny Y offset in collisionMoveSimple() to tweak performance
Another small general problem: the player is always standing exactly on the
bondary between 2 nodes e.g. Y=1.5 is exactly between nodes Y=1 and Y=2.
floatToInt() and myround() will round +/-n.5 always 'outwards' to +/-(n+1),
which means they behave differently depending on where you are: they round
upwards above sea level and downwards when underground. This inconsistency
comes from the way the coordinates are calculated, independent of the
specific C++ code.

The result is a tiny bit of lost performance when moving underground,
because 1 node level more than necessary is checked for collisions. This can
be amended by adding a tiny offset to minpos_f.Y, like @paramat suggested.
This is not an elegant solution, but still better than wasting CPU.
2018-06-03 17:31:59 +02:00
Jens Rottmann
90a9e4e69f Fix player coordinate rounding in collisionMoveSimple() (#6197)
To determine the area (nodes) where a player movement took place
collisionMoveSimple() first took the old/new player coordinates and rounded
them to integers, then added the player character's collision box and
implicitely rounded the result. This has 2 problems:

Rounding the position and the box seperately, then adding the resulting
integers means you get twice the rounding error. And implicit rounding
always rounds towards 0.0, unlike floatToInt(), which rounds towards the
closest integer.

Previous (simplified) behavior: round(pos)+(int)box, for example player at
Y=0.9, body is 1.75m high: round(0.9)+(int)1.75 = 1+1 = 2.
==> A character's height of 1.75m always got rounded down to 1m, its width
of +/-0.3 even became 0.

Fixed by adding the floats first, then rounding properly: round(pos+box) =
round(0.9+1.75) = round(2.65) = 3.
2018-06-03 17:31:59 +02:00
Juozas Pocius
e5311a4d56 Fix crash when using --go in command line 2018-06-03 17:31:59 +02:00
SmallJoker
4be7d8b43a Noise: Prevent unittest crash caused by division by zero 2018-06-03 17:31:59 +02:00
SmallJoker
070ab6654a Sneak: Stripped down version
Fix taking damage caused by sneaking over a nodebox gap.
Fix strange behaviour on stair nodeboxes.
Enable jumping from node edges while sneaking.
Enable movement around corners while sneaking on a 1-node-high groove in a wall.
2018-06-03 17:31:59 +02:00
stujones11
ebf9dda2e6 Include TILE_MATERIAL_OPAQUE in shaders header (#6086) 2018-06-03 17:31:59 +02:00
stujones11
c352ff71e8 Tile material: Add 'TILE_MATERIAL_OPAQUE', use for drawtype 'NDT_NORMAL'
Prevents normal drawtype nodes having transparency.
Avoids clients cheating by using 'x-ray' texture packs with transparent textures.
2018-06-03 17:31:59 +02:00
paramat
26d0753d87 Mgv7: Fix undefined 'float_mount_height'
Commit cad10ce3b747b721fd63784915e05f12bc488128 altered the parameter
'float_mount_height' but was missing the necessary line in the constructor
to get the altered value from 'params'.

Fixes 3D floatland terrain generating everywhere.
2018-06-03 17:31:59 +02:00
Jesse McDonald
46ff2e2cef Fix for empty key/value when reading item string with wear but no metadata (#6058) 2018-06-03 17:31:59 +02:00
paramat
a08a93bc9c Mgv7: Clean up divide-by-zero fix 2018-06-03 17:31:59 +02:00
paramat
6e0557e20c Mgv7: Avoid divide-by-zero errors
Some settings of paramters can cause mgv7 variables to be -inf, nan or -nan.
This can cause massive vertical columns of water to appear above sea level.
2018-06-03 17:31:59 +02:00
Dániel Juhász
0c91c65a11 Fix render order of overlays (#6008)
* Fix render order of overlays

* Use C++11 loops

* Fix time_t
2018-06-03 17:31:59 +02:00
Ezhh
849fe19f8c Fix console resize issue when maximising game window (#6023) 2018-06-03 17:31:59 +02:00
Zeno-
cfa6216694 Fix console not being properly resized after window size changed (#6020) 2018-06-03 17:31:59 +02:00
Dániel Juhász
322e5aaf92 Automatic item and node colorization (#5640)
* Automatic item and node colorization

Now nodes with a palette yield colored item stacks, and colored items
place colored nodes by default. The client predicts the colorization.

* Backwards compatibility

* Use nil

* Style fixes

* Fix code style

* Document changes
2018-06-03 17:31:59 +02:00
SmallJoker
03bc584f57 find_nodes_in_area: Extend maximal count to U32_MAX (#5277)
Extend documentation, limit area volume
Remove u16 count limitation

* Prevent integer overflow, replace minp/maxp with pos1/pos2
2018-06-03 17:31:59 +02:00
Loïc Blot
5f796f7a04 Verify HudSetParams input when hotbar textures are set (#6013)
* Verify HudSetParams input when hotbar textures are set

This fix #6011
2018-06-03 17:31:59 +02:00
paramat
7aa52fe4e1 (Re)spawn players within 'mapgen_limit'
Previously, findSpawnPos() did not take the 'mapgen_limit' setting into account,
a small limit often resulted in a spawn out in the void.
Use the recently added 'calcMapgenEdges()' to get max spawn range through a new
mapgenParams function 'getSpawnRangeMax()'.

Previously, when a player respawned into a world, 'objectpos_over_limit()' was
used as a check, which was inaccurate.
Use the recently added 'saoPosOverLimit()' to get exact mapgen edges.

Also fix default value of 'm_sao_limit_min'.
2018-06-03 17:31:59 +02:00
red-001
0664b5f772 Add a server-sided way to remove color codes from incoming chat messages (#5948)
These code be generated by CSM, a modded client or just copy and pasted by the player.

Changes
- Update configuration example and setting translation file.
- Remove colour codes before logging chat.
- Add setting to remove colour codes before processing the chat.
2018-06-03 17:31:59 +02:00
DS
14b039f0b4 fix an example in lua_api (#5604) 2018-06-03 17:31:59 +02:00
red-001
c399f5a541 Fix sending color codes to clients that don't support them. (#5950)
Also remove `disable_escape_sequences` since it's not needed anymore.
2018-06-03 17:31:59 +02:00
DS
f736226c1a make ret variable in /builtin/mainmenu/tab_credits.lua local (#5942) 2018-06-03 17:31:59 +02:00
red-001
e665e75e77 Fix typos/mistakes in the documentation for colour related functions. (#5936) 2018-06-03 17:31:59 +02:00
ShadowNinja
cba783f7fa Fix segmentation fault with tool capabilities (#5899) 2018-06-03 17:31:59 +02:00
sfan5
87b9451820 Revert version scheme changes
This reverts commit 41b7823057bdaddd760f932dce802719301c3a0f.
This reverts commit 7968f1ddaa67432719d5becdda5ca8bec58faa47.
2017-11-20 19:28:58 +01:00
rubenwardy
41b7823057 Fix branch being labelled as 0.4.17 instead of 0.4.17-dev
You should use tags instead of this branch to track the latest release
2017-09-09 20:42:23 +01:00
Loïc Blot
7968f1ddaa
New version scheme (#6292)
* Version changes: current dev version is now 0.4.17

* This change permit to have multi branches with various versions
* Dev version is 0.4.17-dev and next release will be 0.4.17
2017-08-20 17:25:07 +02:00
ShadowNinja
caecdb681c Merge 0.4.16 into stable-0.4 2017-06-03 14:55:10 -04:00
est31
81d56b9491 Merge 0.4.15 changes into stable-0.4
0.4.15 release!
2016-12-22 23:16:00 +01:00
est31
8077612dcb Merge 0.4.14 changes into stable-0.4
0.4.14 release!
2016-05-15 15:20:25 +02:00
est31
07fddf1f6c Merge 0.4.13 changes into stable-0.4
0.4.13 release!
2015-08-20 21:02:42 +02:00
Loic Blot
315b00d150 Bump android version code 2015-03-16 20:37:07 +01:00
est31
0c0248a19c Android: Fix auto-entry of server address and port in mainmenu
Fixes #2497.
2015-03-16 19:46:54 +01:00
Loic Blot
0429ec4cfd Android: update makefile and backport language fix from master 2015-03-15 11:01:39 +01:00
Craig Robbins
a740a48f62 Fix narrow_to_wide_c (ANDROID)
* Ensure converted string is NUL terminated
* Restore logic to that used prior to 9e2a9b5
2015-03-15 10:17:09 +01:00
Loic Blot
b12f569fc6 Releasing android 2015-03-14 19:57:21 +01:00
Perttu Ahola
7993a403f2 Bump version to 0.4.12 2015-02-18 19:50:37 +02:00
Novatux
b0df67d9c0 Add modname convention checking
Fixes #2037
2015-02-18 17:06:09 +01:00
Loic Blot
45ff8569d7 Fix serverlist include 2015-02-18 16:26:23 +01:00
est31
82bfa2ee7b Server: announce MIN/MAX protocol version supported to serverlist. Client: check serverlist
Client now informs about incompatible servers from the list, this permits to prevent the protocol movements.
Server announces its supported protocol versions to master server
2015-02-18 16:17:03 +01:00
fz72
9ef2e5000f Fix map_seed not changed when creating a new world after login to another 2015-02-18 14:02:30 +02:00
BlockMen
678546308e Increase default font_size 2015-02-18 12:59:16 +01:00
BlockMen
6f688c50ee Fix font_size under windows 2015-02-18 12:59:07 +01:00
Perttu Ahola
bb603ff18e Use fixed size for builtin menus on non-android platforms 2015-02-18 13:57:54 +02:00
Loic Blot
4208fdfd22 Fix unused (and so, broken) enable_rollback_recording. This option must be reloaded at server loop but loaded when server starts, for data consistency (not a hot load variable) 2015-02-18 09:36:42 +01:00
Kahrl
4875213168 Grab GUIChatConsole::m_font, fixes segfault when changing font_size 2015-02-18 00:40:11 +10:00
Loic Blot
f92540e8ad Add german and french translation for minetest.desktop
This fixes #1573
2015-02-14 13:12:08 +01:00
Jakub Vaněk
ec0bf899ed Update czech translation 2015-02-14 13:11:50 +01:00
ngosang
2b635a892c Minor fixes in translations 2015-02-14 13:11:33 +01:00
Loic Blot
7f6fc148bd Fix issue #2279. ok @zeno- 2015-02-14 21:02:19 +10:00
ngosang
878e9f7594 Fix .zip extraction (mod store) 2015-02-14 21:00:13 +10:00
Rui
c7249f5983 Fix store.lua bug: default screenshot 2015-02-14 21:00:06 +10:00
Rui
7f07858209 Fix tab_mods.lua: default screenshot patch
https://forum.minetest.net/viewtopic.php?f=6&t=11201
Fixed this bug.
2015-02-14 21:00:01 +10:00
ShadowNinja
9e9688fc61 Fix Android build of narrow_to_wide 2015-02-14 20:59:45 +10:00
Markus Koschany
93e5ab367a Fix FTBFS on GNU/Hurd platform
Minetest fails to build on GNU/Hurd due to a name clash with OSX/Apple,
both are defining the __MACH__ keyword. This commit fixes the issue.
2015-02-14 20:59:35 +10:00
est31
60fa5807b9 README.txt: Simplify initial build steps by using git to fetch sources
Also simplify wget steps and apt-get install zlib1g-dev libjsoncpp-dev
2015-02-14 20:59:00 +10:00
ngosang
9dbca41385 Fix Exit to OS button focus in Pause Menu 2015-02-14 20:58:39 +10:00
est31
61588a43dd Fix crash on passing false as value in table to table.copy(t)
Fixes #2293.
2015-02-14 15:24:09 +10:00
BlockMen
e62927ed71 Fix gettext on MSVC 2015-02-13 01:23:30 +10:00
927 changed files with 108690 additions and 269797 deletions

View File

@ -2,7 +2,7 @@ BasedOnStyle: LLVM
IndentWidth: 8
UseTab: Always
BreakBeforeBraces: Custom
Standard: Cpp11
Standard: Cpp03
BraceWrapping:
AfterClass: true
AfterControlStatement: false
@ -13,12 +13,11 @@ BraceWrapping:
AfterUnion: true
BeforeCatch: false
BeforeElse: false
FixNamespaceComments: false
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
AccessModifierOffset: -8
ColumnLimit: 90
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortFunctionsOnASingleLine: Inline
SortIncludes: false
IncludeCategories:
- Regex: '^".*'
@ -27,5 +26,3 @@ IncludeCategories:
Priority: 1
AlignAfterOpenBracket: DontAlign
ContinuationIndentWidth: 16
ConstructorInitializerIndentWidth: 16
BreakConstructorInitializers: AfterColon

View File

@ -1,5 +0,0 @@
Checks: '-*,modernize-use-emplace,modernize-avoid-bind,misc-throw-by-value-catch-by-reference,misc-unconventional-assign-operator,performance-*'
WarningsAsErrors: '-*,modernize-use-emplace,performance-type-promotion-in-math-fn,performance-faster-string-find,performance-implicit-cast-in-loop'
CheckOptions:
- key: performance-unnecessary-value-param.AllowedTypes
value: v[23]f;v[23][su](16|32)

View File

@ -1,32 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: Unconfirmed bug
assignees: ''
---
##### Minetest version
<!--
Paste Minetest version between quotes below
If you are on a devel version, please add git commit hash
You can use `minetest --version` to find it.
-->
```
```
##### OS / Hardware
<!-- General information about your hardware and operating system -->
Operating system:
CPU:
<!-- For graphical issues only -->
GPU model:
OpenGL version:
##### Summary
<!-- Describe your problem here -->
##### Steps to reproduce
<!-- For bug reports or build issues, explain how the problem happened -->

View File

@ -1,25 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: Feature request
assignees: ''
---
## Problem
A clear and concise description of what the problem is.
ie: Why is this needed?
Ex. I'm always frustrated when [...]
## Solutions
A clear and concise description of what you want to happen.
## Alternatives
A clear and concise description of any alternative solutions or features you've considered.
## Additional context
Add any other context or screenshots about the feature request here.

View File

@ -1,19 +0,0 @@
Add compact, short information about your PR for easier understanding:
- Goal of the PR
- How does the PR work?
- Does it resolve any reported issue?
- If not a bug fix, why is this PR needed? What usecases does it solve?
## To do
This PR is a Work in Progress / Ready for Review.
<!-- ^ delete one -->
- [ ] List
- [ ] Things
- [ ] To do
## How to test
<!-- Example code or instructions -->

17
.github/SECURITY.md vendored
View File

@ -1,17 +0,0 @@
# Security Policy
## Supported Versions
We only support the minenux stable version for security issues.
See the [releases page](https://github.com/minenux/minetest-engine-minetest/releases).
## Reporting a Vulnerability
We ask that you report vulnerabilities only using telegram group: https://t.me/venenux_minetest_bot
to give us time to fix them.
Depending on severity, we will either create a private issue for the vulnerability
and release a patch version of Minetest, or give you permission to file the issue publicly.
For more information on the justification of this policy, see
[Responsible Disclosure](https://en.wikipedia.org/wiki/Responsible_disclosure).

28
.gitignore vendored
View File

@ -1,4 +1,4 @@
## Editors and development environments
## Editors and Development environments
*~
*.swp
*.bak*
@ -21,13 +21,11 @@
tags
!tags/
gtags.files
.idea
.idea/*
# Codelite
*.project
# Visual Studio Code
.vscode/
## Files related to Minetest development cycle
## Files related to minetest development cycle
/*.patch
*.diff
# GNU Patch reject file
@ -37,7 +35,6 @@ gtags.files
/bin/
/games/*
!/games/minimal/
!/games/minetest/
/cache
/textures/*
!/textures/base/
@ -56,42 +53,31 @@ gtags.files
## Configuration/log files
minetest.conf
debug.txt
debug.txt.1
## Other files generated by Minetest
## Other files generated by minetest
screenshot_*.png
testbm.txt
## Doxygen files
doc/Doxyfile
doc/html/
doc/doxygen_*
## MkDocs files
public/
doc/mkdocs/docs/*.md
doc/mkdocs/mkdocs.yml
## Build files
CMakeFiles
Makefile
!build/android/Makefile
build/android/path.cfg
build/android/*.apk
build/android/.externalNativeBuild
cmake_install.cmake
CMakeCache.txt
CPackConfig.cmake
CPackSourceConfig.cmake
src/test_config.h
src/android_version.h
src/android_version_githash.h
src/cmake_config.h
src/cmake_config_githash.h
src/unittest/test_world/world.mt
src/lua/build/
locale/
.directory
.gradle/
*.cbp
*.layout
*.o
@ -103,10 +89,6 @@ locale/
test_config.h
cmake-build-debug/
cmake-build-release/
cmake_config.h
cmake_config_githash.h
CMakeDoxy*
compile_commands.json
## Android build files
build/android/src/main/assets

View File

@ -1,12 +1,15 @@
---
# Github repository is really at minetest.org using the poikilos git.minetest.io
# https://gitlab.com/minenux/minetest-engine-minetest
# Pipelines URL: https://gitlab.com/minenux/minetest-engine-minetest/pipelines
# packages moved to https://build.opensuse.org/project/show/home:venenux:minenux
# in future we only build here, or made apk packs for alpine
# Github repository is cloned every day on Gitlab.com
# https://gitlab.com/minetest/minetest
# Pipelines URL: https://gitlab.com/minetest/minetest/pipelines
stages:
- build
- package
- deploy
variables:
MINETEST_GAME_REPO: "https://github.com/minetest/minetest_game.git"
.build_template: &build_definition
stage: build
@ -14,8 +17,8 @@ stages:
- mkdir cmakebuild
- mkdir -p artifact/minetest/usr/
- cd cmakebuild
- cmake -DCMAKE_INSTALL_PREFIX=../artifact/minetest/usr/ -DBUILD_SERVER=ON -DBUILD_CLIENT=ON -DRUN_IN_PLACE=OFF -DENABLE_CURL=ON -DENABLE_SOUND=ON -DENABLE_LUAJIT=ON -DENABLE_GETTEXT=ON -DENABLE_FREETYPE=ON -DENABLE_SYSTEM_GMP=ON -DENABLE_SYSTEM_JSONCPP=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
- make -j$(nproc)
- cmake -DCMAKE_INSTALL_PREFIX=../artifact/minetest/usr/ -DCMAKE_BUILD_TYPE=Release -DRUN_IN_PLACE=FALSE -DENABLE_GETTEXT=TRUE -DBUILD_SERVER=TRUE ..
- make -j2
- make install
artifacts:
when: on_success
@ -23,8 +26,36 @@ stages:
paths:
- artifact/*
.debpkg_template: &debpkg_template
stage: package
before_script:
- apt-get update -y
- apt-get install -y git
- mkdir -p build/deb/minetest/DEBIAN/
- cp misc/debpkg-control build/deb/minetest/DEBIAN/control
- cp -Rp artifact/minetest/usr build/deb/minetest/
script:
- git clone $MINETEST_GAME_REPO build/deb/minetest/usr/share/minetest/games/minetest
- rm -Rf build/deb/minetest/usr/share/minetest/games/minetest/.git
- sed -i 's/DATEPLACEHOLDER/'$(date +%y.%m.%d)'/g' build/deb/minetest/DEBIAN/control
- sed -i 's/LEVELDB_PLACEHOLDER/'$LEVELDB_PKG'/g' build/deb/minetest/DEBIAN/control
- cd build/deb/ && dpkg-deb -b minetest/
artifacts:
when: on_success
expire_in: 30 day
paths:
- build/deb/*.deb
.debpkg_install: &debpkg_install
stage: deploy
before_script:
- apt-get update -y
- apt-get install -y libc6 libcurl3-gnutls libfreetype6 libirrlicht1.8 $LEVELDB_PKG liblua5.1-0 libluajit-5.1-2 libopenal1 libstdc++6 libvorbisfile3 libx11-6 zlib1g
script:
- dpkg -i build/deb/*.deb
##
## Debian mother of many distros
## Debian
##
# Jessie
@ -33,11 +64,24 @@ build:debian-8:
<<: *build_definition
image: debian:8
before_script:
- echo "" > /etc/apt/apt.conf.d/50venenuxcustom
- echo "APT::Get::AllowUnauthenticated \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- apt-get update -y || true
- apt-get -y --force-yes install build-essential cmake pkg-config debhelper lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev libnl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libjsoncpp-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev libhiredis-dev libspatialindex-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev x11proto-xf86vidmode-dev
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
package:debian-8:
image: debian:8
dependencies:
- build:debian-8
variables:
LEVELDB_PKG: libleveldb1
<<: *debpkg_template
deploy:debian-8:
image: debian:8
dependencies:
- package:debian-8
variables:
LEVELDB_PKG: libleveldb1
<<: *debpkg_install
# Stretch
@ -45,78 +89,135 @@ build:debian-9:
<<: *build_definition
image: debian:9
before_script:
- echo "" > /etc/apt/apt.conf.d/50venenuxcustom
- echo "APT::Get::AllowUnauthenticated \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- apt-get update -y || true
- apt-get -y --force-yes install build-essential cmake pkg-config debhelper lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev libnl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libjsoncpp-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev libhiredis-dev libspatialindex-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev postgresql-server-dev-all libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev mesa-common-dev x11proto-xf86vidmode-dev libzstd-dev
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
# Bullseye
package:debian-9:
image: debian:9
dependencies:
- build:debian-9
variables:
LEVELDB_PKG: libleveldb1v5
<<: *debpkg_template
build:debian-11:
<<: *build_definition
image: debian:11
before_script:
- apt-get update -y || true
- apt-get -y install build-essential cmake pkg-config debhelper lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev libnl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libjsoncpp-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev libhiredis-dev libspatialindex-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev postgresql-server-dev-all libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev mesa-common-dev x11proto-xf86vidmode-dev libzstd-dev
deploy:debian-9:
image: debian:9
dependencies:
- package:debian-9
variables:
LEVELDB_PKG: libleveldb1v5
<<: *debpkg_install
##
## winbuntu the distro for stupid users
## Ubuntu
##
# Focal most close to bullseye
# Trusty
build:ubuntu-20.04:
build:ubuntu-14.04:
<<: *build_definition
image: ubuntu:focal
image: ubuntu:trusty
before_script:
- DEBIAN_FRONTEND=noninteractive apt-get update -y
- DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake pkg-config debhelper lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libjsoncpp-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev libhiredis-dev libspatialindex-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev postgresql-server-dev-all zlib1g-dev doxygen libxrandr-dev mesa-common-dev x11proto-xf86vidmode-dev libzstd-dev
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
# Utopic most close to jessie
package:ubuntu-14.04:
image: ubuntu:trusty
dependencies:
- build:ubuntu-14.04
variables:
LEVELDB_PKG: libleveldb1
<<: *debpkg_template
build:ubuntu-14.10:
deploy:ubuntu-14.04:
image: ubuntu:trusty
dependencies:
- package:ubuntu-14.04
variables:
LEVELDB_PKG: libleveldb1
<<: *debpkg_install
# Xenial
build:ubuntu-16.04:
<<: *build_definition
image: ubuntu:utopic
image: ubuntu:xenial
before_script:
- echo "" > /etc/apt/apt.conf.d/50venenuxcustom
- echo "APT::Get::AllowUnauthenticated \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- rm -rf /etc/apt/sources.list
- echo "deb http://old-releases.ubuntu.com/ubuntu/ utopic main restricted universe multiverse" > /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://old-releases.ubuntu.com/ubuntu/ utopic-updates main restricted universe multiverse" >> /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://old-releases.ubuntu.com/ubuntu utopic-security main restricted universe multiverse" >> /etc/apt/sources.list.d/50debianoficial.list
- apt-get update -y || true
- apt-get -y --force-yes install build-essential cmake pkg-config debhelper lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev libnl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libjsoncpp-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev libhiredis-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev mesa-common-dev x11proto-xf86vidmode-dev
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
# Zesty most close to stretch
package:ubuntu-16.04:
image: ubuntu:xenial
dependencies:
- build:ubuntu-16.04
variables:
LEVELDB_PKG: libleveldb1v5
<<: *debpkg_template
deploy:ubuntu-16.04:
image: ubuntu:xenial
dependencies:
- package:ubuntu-16.04
variables:
LEVELDB_PKG: libleveldb1v5
<<: *debpkg_install
# Yakkety
build:ubuntu-16.10:
<<: *build_definition
image: ubuntu:yakkety
before_script:
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
package:ubuntu-16.10:
image: ubuntu:yakkety
dependencies:
- build:ubuntu-16.10
variables:
LEVELDB_PKG: libleveldb1v5
<<: *debpkg_template
deploy:ubuntu-16.10:
image: ubuntu:yakkety
dependencies:
- package:ubuntu-16.10
variables:
LEVELDB_PKG: libleveldb1v5
<<: *debpkg_install
# Zesty
build:ubuntu-17.04:
<<: *build_definition
image: ubuntu:zesty
before_script:
- echo "" > /etc/apt/apt.conf.d/50venenuxcustom
- echo "APT::Get::AllowUnauthenticated \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- echo "Acquire::AllowInsecureRepositories \"true\";" >> /etc/apt/apt.conf.d/50venenuxcustom
- rm -rf /etc/apt/sources.list
- echo "deb http://old-releases.ubuntu.com/ubuntu/ zesty main restricted universe multiverse" > /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://old-releases.ubuntu.com/ubuntu/ zesty-updates main restricted universe multiverse" >> /etc/apt/sources.list.d/50debianoficial.list
- echo "deb http://old-releases.ubuntu.com/ubuntu zesty-security main restricted universe multiverse" >> /etc/apt/sources.list.d/50debianoficial.list
- apt-get update -y || true
- apt-get -y --force-yes install build-essential cmake pkg-config debhelper dh-systemd dh-autoreconf lsb-release gettext libbz2-dev libcurl4-gnutls-dev libnl-genl-3-dev libnl-3-dev librtmp-dev libidn11-dev libncurses-dev libfreetype6-dev libglu1-mesa-dev libgmp-dev libirrlicht-dev libjpeg-dev libjsoncpp-dev libleveldb-dev libluajit-5.1-dev liblua5.1-dev libogg-dev libopenal-dev libpng-dev libpq-dev libhiredis-dev libspatialindex-dev libsqlite3-dev libvorbis-dev libx11-dev libxxf86vm-dev postgresql-server-dev-all libpq-dev libhiredis-dev zlib1g-dev doxygen libxrandr-dev mesa-common-dev x11proto-xf86vidmode-dev libzstd-dev
- apt-get update -y
- apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
package:ubuntu-17.04:
image: ubuntu:zesty
dependencies:
- build:ubuntu-17.04
variables:
LEVELDB_PKG: libleveldb1v5
<<: *debpkg_template
deploy:ubuntu-17.04:
image: ubuntu:zesty
dependencies:
- package:ubuntu-17.04
variables:
LEVELDB_PKG: libleveldb1v5
<<: *debpkg_install
##
## Feladora shit distro
## Fedora
##
build:fedora-36:
build:fedora-24:
<<: *build_definition
image: fedora:36
image: fedora:24
before_script:
- dnf -y install make automake gcc gcc-c++ kernel-devel cmake pkgconfig bzip2-devel gettext-devel sqlite-devel zlib-devel libpng-devel libjpeg-turbo-devel libXxf86vm-devel mesa-libGL-devel irrlicht-devel desktop-file-utils systemd openal* libvorbis* jsoncpp-devel libcurl-devel libcurl luajit-devel leveldb-devel gmp-devel libappstream-glib freetype-devel spatialindex-devel openssl-devel libogg-devel libpq-devel hiredis-devel libzstd-devel libXi-devel ncurses-devel doxygen
build:fedora-37:
<<: *build_definition
image: fedora:37
before_script:
- dnf -y install make automake gcc gcc-c++ kernel-devel cmake pkgconfig bzip2-devel gettext-devel sqlite-devel zlib-devel libpng-devel libjpeg-turbo-devel libXxf86vm-devel mesa-libGL-devel irrlicht-devel desktop-file-utils systemd openal* libvorbis* jsoncpp-devel libcurl-devel libcurl luajit-devel leveldb-devel gmp-devel libappstream-glib freetype-devel spatialindex-devel openssl-devel libogg-devel libpq-devel hiredis-devel libzstd-devel libXi-devel ncurses-devel doxygen
- dnf -y install make automake gcc gcc-c++ kernel-devel cmake libcurl* openal* libvorbis* libXxf86vm-devel libogg-devel freetype-devel mesa-libGL-devel zlib-devel jsoncpp-devel irrlicht-devel bzip2-libs gmp-devel sqlite-devel luajit-devel leveldb-devel ncurses-devel doxygen spatialindex-devel bzip2-devel

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "games/minetest"]
path = games/minetest
url = https://codeberg.org/minenux/minetest-game-minetest.git

View File

@ -1,74 +0,0 @@
unused_args = false
allow_defined_top = true
ignore = {
"131", -- Unused global variable
"431", -- Shadowing an upvalue
"432", -- Shadowing an upvalue argument
}
read_globals = {
"ItemStack",
"INIT",
"DIR_DELIM",
"dump", "dump2",
"fgettext", "fgettext_ne",
"vector",
"VoxelArea",
"profiler",
"Settings",
string = {fields = {"split", "trim"}},
table = {fields = {"copy", "getn", "indexof", "insert_all"}},
math = {fields = {"hypot"}},
}
globals = {
"core",
"gamedata",
os = { fields = { "tempfolder" } },
"_",
}
files["builtin/client/register.lua"] = {
globals = {
debug = {fields={"getinfo"}},
}
}
files["builtin/common/misc_helpers.lua"] = {
globals = {
"dump", "dump2", "table", "math", "string",
"fgettext", "fgettext_ne", "basic_dump", "game", -- ???
"file_exists", "get_last_folder", "cleanup_path", -- ???
},
}
files["builtin/common/vector.lua"] = {
globals = { "vector" },
}
files["builtin/game/voxelarea.lua"] = {
globals = { "VoxelArea" },
}
files["builtin/game/init.lua"] = {
globals = { "profiler" },
}
files["builtin/common/filterlist.lua"] = {
globals = {
"filterlist",
"compare_worlds", "sort_worlds_alphabetic", "sort_mod_list", -- ???
},
}
files["builtin/mainmenu"] = {
globals = {
"gamedata",
},
read_globals = {
"PLATFORM",
},
}

View File

@ -1,98 +1,39 @@
language: cpp
before_install: ./util/travis/before_install.sh
script: ./util/travis/script.sh
os: linux
dist: bionic
group: edge
sudo: required
notifications:
email: false
matrix:
fast_finish: true
include:
- env: CLANG_FORMAT=clang-format-8
compiler: clang
os: linux
addons:
apt:
packages: ['clang-format-8']
- name: "Builtin Luacheck and Unit Tests"
language: generic
compiler: null
os: linux
addons:
apt:
packages:
- luarocks
before_install:
- luarocks install --local luacheck
- luarocks install --local busted
script:
- $HOME/.luarocks/bin/luacheck builtin
- $HOME/.luarocks/bin/busted builtin
- env: CLANG_TIDY=clang-tidy-8
compiler: clang
os: linux
script: ./util/travis/clangtidy.sh
addons:
apt:
packages: ['clang-tidy-8']
- name: "MinGW cross-compiler (32-bit)"
env: PLATFORM=Win32
- env: PLATFORM=Win32
compiler: gcc
os: linux
- name: "MinGW cross-compiler (64-bit)"
env: PLATFORM=Win64
- env: PLATFORM=Win64
compiler: gcc
os: linux
# - env: PLATFORM=Unix
# compiler: clang
# os: osx
# osx_image: xcode8
- env: PLATFORM=Unix COMPILER=gcc-6
- env: PLATFORM=Unix COMPILER=clang
compiler: clang
os: osx
- env: PLATFORM=Unix COMPILER=g++
compiler: gcc
os: linux
addons:
apt:
packages: ['gcc-6', 'g++-6']
- env: PLATFORM=Unix COMPILER=gcc-8
- env: PLATFORM=Unix COMPILER=clang
compiler: clang
os: linux
- env: PLATFORM=Unix COMPILER=clang VALGRIND=1
compiler: clang
os: linux
dist: trusty
- env: COMPILER=none LINT=1
compiler: clang
os: linux
dist: trusty
- env: PLATFORM=Unix COMPILER=g++-6
compiler: gcc
os: linux
addons:
apt:
packages: ['gcc-8', 'g++-8']
- env: PLATFORM=Unix COMPILER=clang-3.9
compiler: clang
os: linux
addons:
apt:
packages: ['clang-3.9']
- env: PLATFORM=Unix COMPILER=clang-9
compiler: clang
os: linux
addons:
apt:
packages: ['clang-9']
- env: PLATFORM=Unix COMPILER=clang-9 FREETYPE=0
compiler: clang
os: linux
addons:
apt:
packages: ['clang-9']
- env: PLATFORM=Unix COMPILER=clang-9 VALGRIND=1
compiler: clang
os: linux
addons:
apt:
packages: ['valgrind', 'clang-9']
addons:
apt:
sources: &sources
- ubuntu-toolchain-r-test

View File

@ -7,61 +7,20 @@ endif()
# This can be read from ${PROJECT_NAME} after project() is called
project(minetest)
set(PROJECT_NAME_CAPITALIZED "minetest")
set(PROJECT_NAME_CAPITALIZED "Minetest4")
# check compatible compileer must be after project definition and set flags, assume if C++ is installed also CC is installed
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
endif()
if (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
elseif (CMAKE_C_COMPILER_VERSION VERSION_EQUAL 4.6)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu1x")
else()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
endif()
message(STATUS "using gnu compiler and C11/C++11 standars")
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++1y")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
endif()
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 3.5)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
endif()
message(STATUS "using clang compiler and C11/C++11 standars")
else()
if (CMAKE_VERSION VERSION_GREATER 3.0)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 11)
else()
if(APPLE)
# Fix behavior of CMAKE_CXX_STANDARD when targeting macOS.
if (POLICY CMP0025)
cmake_policy(SET CMP0025 NEW)
endif ()
endif ()
endif()
message(STATUS "using some installed compiler without default C11/C++11 standars")
endif()
set(GCC_MINIMUM_VERSION "4.4")
set(CLANG_MINIMUM_VERSION "3.3")
# Also remember to set PROTOCOL_VERSION in network/networkprotocol.h when releasing
set(VERSION_MAJOR 5)
set(VERSION_MINOR 2)
set(VERSION_PATCH 1)
set(VERSION_MAJOR 4)
set(VERSION_MINOR 0)
set(VERSION_PATCH 17)
set(VERSION_TWEAK 3)
set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
# Change to false for releases
set(DEVELOPMENT_BUILD FALSE)
set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_TWEAK}")
if(VERSION_EXTRA)
set(VERSION_STRING ${VERSION_STRING}-${VERSION_EXTRA})
elseif(DEVELOPMENT_BUILD)
@ -126,10 +85,10 @@ elseif(UNIX) # Linux, BSD etc
set(BINDIR "bin")
set(DOCDIR "doc")
set(EXAMPLE_CONF_DIR ".")
set(MANDIR "man")
set(XDG_APPS_DIR "applications")
set(APPDATADIR "metainfo")
set(ICONDIR "icons")
set(MANDIR "unix/man")
set(XDG_APPS_DIR "unix/applications")
set(APPDATADIR "unix/metainfo")
set(ICONDIR "unix/icons")
set(LOCALEDIR "locale")
else()
set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}${VERSION_MAJOR}")
@ -140,7 +99,7 @@ elseif(UNIX) # Linux, BSD etc
set(XDG_APPS_DIR "${CMAKE_INSTALL_PREFIX}/share/applications")
set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/metainfo")
set(ICONDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale")
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}${VERSION_MAJOR}/locale")
endif()
endif()
@ -197,43 +156,38 @@ endif()
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/builtin" DESTINATION "${SHAREDIR}")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/client" DESTINATION "${SHAREDIR}")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/clientmods" DESTINATION "${SHAREDIR}")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/games" DESTINATION "${SHAREDIR}" PATTERN ".git*" EXCLUDE)
if(BUILD_CLIENT)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/textures/base/pack" DESTINATION "${SHAREDIR}/textures/base")
endif()
if(RUN_IN_PLACE)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/mods/mods_here.txt" DESTINATION "${SHAREDIR}/mods")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/textures/texture_packs_here.txt" DESTINATION "${SHAREDIR}/textures")
endif()
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/games/" DESTINATION "${SHAREDIR}/games"
COMPONENT "SUBGAME_MINIMAL" OPTIONAL PATTERN ".git*" EXCLUDE )
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/fonts" DESTINATION "${SHAREDIR}")
if(BUILD_CLIENT)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/client/shaders" DESTINATION "${SHAREDIR}/client")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/textures/base/pack" DESTINATION "${SHAREDIR}/textures/base")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/fonts" DESTINATION "${SHAREDIR}")
if(RUN_IN_PLACE)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/clientmods" DESTINATION "${SHAREDIR}")
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/client/serverlist" DESTINATION "${SHAREDIR}/client")
endif()
endif()
install(FILES "README.md" DESTINATION "${DOCDIR}" COMPONENT "Docs")
install(FILES "doc/lua_api.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
install(FILES "doc/client_lua_api.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
install(FILES "doc/menu_lua_api.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
install(FILES "doc/texture_packs.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
install(FILES "doc/world_format.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
install(FILES "minetest.conf.example" DESTINATION "${EXAMPLE_CONF_DIR}" RENAME "${PROJECT_NAME}${VERSION_MAJOR}.conf.example")
install(FILES "README.txt" DESTINATION "${DOCDIR}")
install(FILES "doc/lua_api.txt" DESTINATION "${DOCDIR}")
install(FILES "doc/menu_lua_api.txt" DESTINATION "${DOCDIR}")
install(FILES "doc/texture_packs.txt" DESTINATION "${DOCDIR}")
install(FILES "doc/world_format.txt" DESTINATION "${DOCDIR}")
install(FILES "minetest.conf.example" DESTINATION "${EXAMPLE_CONF_DIR}" RENAME "minetest${VERSION_MAJOR}.conf.example")
if(UNIX AND NOT APPLE)
install(FILES "doc/minetest.6" DESTINATION "${MANDIR}/man6" RENAME "${PROJECT_NAME}${VERSION_MAJOR}.6")
install(FILES "doc/minetestserver.6" DESTINATION "${MANDIR}/man6" RENAME "${PROJECT_NAME}${VERSION_MAJOR}server.6")
install(FILES "misc/net.minetest.minetest.desktop" DESTINATION "${XDG_APPS_DIR}" RENAME "net.minetest.${PROJECT_NAME}${VERSION_MAJOR}.desktop")
install(FILES "misc/net.minetest.minetest.appdata.xml" DESTINATION "${APPDATADIR}" RENAME "net.minetest.${PROJECT_NAME}${VERSION_MAJOR}.appdata.xml")
install(FILES "misc/minetest.svg" DESTINATION "${ICONDIR}/hicolor/scalable/apps" RENAME "${PROJECT_NAME}${VERSION_MAJOR}.svg")
install(FILES "misc/minetest-xorg-icon-128.png" DESTINATION "${ICONDIR}/hicolor/128x128/apps" RENAME "${PROJECT_NAME}${VERSION_MAJOR}.png")
install(FILES "doc/minetest.6" DESTINATION "${MANDIR}/man6" RENAME "minetest${VERSION_MAJOR}.6")
install(FILES "doc/minetestserver.6" DESTINATION "${MANDIR}/man6" RENAME "minetest${VERSION_MAJOR}server.6")
install(FILES "misc/net.minetest.minetest.desktop" DESTINATION "${XDG_APPS_DIR}" RENAME "net.minetest.minetest${VERSION_MAJOR}.desktop")
install(FILES "misc/net.minetest.minetest.appdata.xml" DESTINATION "${APPDATADIR}" RENAME "net.minetest.minetest${VERSION_MAJOR}.appdata.xml")
install(FILES "misc/minetest.svg" DESTINATION "${ICONDIR}/hicolor/scalable/apps" RENAME "minetest${VERSION_MAJOR}.svg")
install(FILES "misc/minetest-xorg-icon-128.png" DESTINATION "${ICONDIR}/hicolor/128x128/apps" RENAME "minetest${VERSION_MAJOR}.png")
endif()
if(APPLE)
install(FILES "misc/${PROJECT_NAME}-icon.icns" DESTINATION "${SHAREDIR}" RENAME "${PROJECT_NAME}${VERSION_MAJOR}-icon.icns")
install(FILES "misc/minetest-icon.icns" DESTINATION "${SHAREDIR}" RENAME "minetest-icon${VERSION_MAJOR}.icns")
install(FILES "misc/Info.plist" DESTINATION "${BUNDLE_PATH}/Contents")
endif()
@ -242,23 +196,6 @@ find_package(GMP REQUIRED)
find_package(Json REQUIRED)
find_package(Lua REQUIRED)
# JsonCPP doesn't compile well on GCC 4.8 but we use c++11 with gnu standars
if(NOT ENABLE_SYSTEM_JSONCPP)
set(GCC_MINIMUM_VERSION "4.6")
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "${GCC_MINIMUM_VERSION}")
message(FATAL_ERROR "Insufficient gcc version, found ${CMAKE_CXX_COMPILER_VERSION}. "
"Version ${GCC_MINIMUM_VERSION} or higher is required.")
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "${CLANG_MINIMUM_VERSION}")
message(FATAL_ERROR "Insufficient clang version, found ${CMAKE_CXX_COMPILER_VERSION}. "
"Version ${CLANG_MINIMUM_VERSION} or higher is required.")
endif()
endif()
# Subdirectories
# Be sure to add all relevant definitions above this
@ -267,75 +204,21 @@ add_subdirectory(src)
# CPack
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A free open-source voxel game engine with easy modding and game creation.")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "An InfiniMiner game")
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH})
set(CPACK_PACKAGE_VENDOR "celeron55")
set(CPACK_PACKAGE_CONTACT "Perttu Ahola <celeron55@gmail.com>")
include(CPackComponent)
cpack_add_component(Docs
DISPLAY_NAME "Documentation"
DESCRIPTION "Documentation about ${PROJECT_NAME}${VERSION_MAJOR} and Minetest modding"
)
cpack_add_component(SUBGAME_MINETEST_GAME
DISPLAY_NAME "${PROJECT_NAME}${VERSION_MAJOR} Game"
DESCRIPTION "The official subgame for the ${PROJECT_NAME}${VERSION_MAJOR} engine, that can easily extended by mods."
GROUP "Subgames"
)
cpack_add_component(SUBGAME_MINIMAL
DISPLAY_NAME "Minimal development test"
DESCRIPTION "A minimal subgame helping to develop the engine."
DISABLED #DISABLED does not mean it is disabled, and is just not selected by default.
GROUP "Subgames"
)
cpack_add_component_group(Subgames
DESCRIPTION "Games for the ${PROJECT_NAME}${VERSION_MAJOR} engine."
)
if(WIN32)
# Include all dynamically linked runtime libaries such as MSVCRxxx.dll
include(InstallRequiredSystemLibraries)
if(RUN_IN_PLACE)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}${VERSION_MAJOR}-${VERSION_STRING}-win64")
else()
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}${VERSION_MAJOR}-${VERSION_STRING}-win32")
endif()
set(CPACK_GENERATOR ZIP)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}${VERSION_MAJOR}-${VERSION_STRING}-win64")
else()
set(CPACK_GENERATOR WIX ZIP)
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}${VERSION_MAJOR}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}${VERSION_MAJOR}")
set(CPACK_PACKAGE_EXECUTABLES ${PROJECT_NAME}${VERSION_MAJOR} "${PROJECT_NAME}${VERSION_MAJOR}")
set(CPACK_CREATE_DESKTOP_LINKS ${PROJECT_NAME}${VERSION_MAJOR})
set(CPACK_WIX_PRODUCT_ICON "${CMAKE_CURRENT_SOURCE_DIR}/misc/${PROJECT_NAME}${VERSION_MAJOR}-icon.ico")
# Supported languages can be found at
# http://wixtoolset.org/documentation/manual/v3/wixui/wixui_localization.html
#set(CPACK_WIX_CULTURES "ar-SA,bg-BG,ca-ES,hr-HR,cs-CZ,da-DK,nl-NL,en-US,et-EE,fi-FI,fr-FR,de-DE")
set(CPACK_WIX_UI_BANNER "${CMAKE_CURRENT_SOURCE_DIR}/misc/CPACK_WIX_UI_BANNER.BMP")
set(CPACK_WIX_UI_DIALOG "${CMAKE_CURRENT_SOURCE_DIR}/misc/CPACK_WIX_UI_DIALOG.BMP")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/doc/lgpl-2.1.txt")
# The correct way would be to include both x32 and x64 into one installer
# and install the appropriate one.
# CMake does not support that, so there are two separate GUID's
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CPACK_WIX_UPGRADE_GUID "745A0FB3-5552-44CA-A587-A91C397CCC56")
else()
set(CPACK_WIX_UPGRADE_GUID "814A2E2D-2779-4BBD-9ACD-FC3BD51FBBA2")
endif()
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}${VERSION_MAJOR}-${VERSION_STRING}-win32")
endif()
set(CPACK_GENERATOR ZIP)
elseif(APPLE)
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}${VERSION_MAJOR}-${VERSION_STRING}-osx")

View File

@ -10,34 +10,29 @@ Contributions are welcome! Here's how you can help:
## Code
If you are planning to start some significant coding, you would benefit from asking first on [our IRC channel](http://www.minetest.net/irc/) before starting.
1. [Fork](https://help.github.com/articles/fork-a-repo/) the repository and [clone](https://help.github.com/articles/cloning-a-repository/) your fork.
2. Before you start coding, consider opening an [issue at Github](https://github.com/minetest/minetest/issues) to discuss the suitability and implementation of your intended contribution with the core developers. If you are planning to start some very significant coding, you would benefit from first discussing on our IRC development channel [#minetest-dev](http://www.minetest.net/irc/). Note that a proper IRC client is required to speak on this channel.
3. Start coding!
2. Start coding!
- Refer to the [Lua API](https://github.com/minetest/minetest/blob/master/doc/lua_api.txt), [Developer Wiki](http://dev.minetest.net/Main_Page) and other [documentation](https://github.com/minetest/minetest/tree/master/doc).
- Follow the [C/C++](http://dev.minetest.net/Code_style_guidelines) and [Lua](http://dev.minetest.net/Lua_code_style_guidelines) code style guidelines.
- Check your code works as expected and document any changes to the Lua API.
4. Commit & [push](https://help.github.com/articles/pushing-to-a-remote/) your changes to a new branch (not `master`, one change per branch)
3. Commit & [push](https://help.github.com/articles/pushing-to-a-remote/) your changes to a new branch (not `master`, one change per branch)
- Commit messages should:
- Use the present tense.
- Be descriptive. See the commit messages by core developers for examples.
- The first line should:
- Start with a capital letter.
- Be a compact summary of the commit.
- Preferably have less than 70 characters.
- Have no full stop at the end.
- The second line should be empty.
- The following lines should describe the commit, starting a new line for each point.
- Use the present tense
- Have a title which begins with a capital letter
- Be descriptive. (e.g. no `Update init.lua` or `Fix a problem`)
- Have a first line with less than *80 characters* and have a second line that is *empty*
5. Once you are happy with your changes, submit a pull request.
- Open the [pull-request form](https://github.com/minetest/minetest/pull/new/master).
- Add a description explaining what you've done (or if it's a work-in-progress - what you need to do).
4. Once you are happy with your changes, submit a pull request.
- Open the [pull-request form](https://github.com/minetest/minetest/pull/new/master)
- Add a short description explaining briefly what you've done (or if it's a work-in-progress - what you need to do)
### A pull-request is considered merge-able when:
##### A pull-request is considered merge-able when:
1. It follows the roadmap in some way and fits the whole picture of the project: [roadmap introduction](http://c55.me/blog/?p=1491), [roadmap continued](https://forum.minetest.net/viewtopic.php?t=9177)
1. It follows the [roadmap](https://forum.minetest.net/viewtopic.php?t=9177) in some way and fits the whole picture of the project.
2. It works.
3. It follows the code style for [C/C++](http://dev.minetest.net/Code_style_guidelines) or [Lua](http://dev.minetest.net/Lua_code_style_guidelines).
4. The code's interfaces are well designed, regardless of other aspects that might need more work in the future.
@ -50,23 +45,23 @@ If you experience an issue, we would like to know the details - especially when
1. Do a quick search on GitHub to check if the issue has already been reported.
2. Is it an issue with the Minetest *engine*? If not, report it [elsewhere](http://www.minetest.net/development/#reporting-issues).
3. [Open an issue](https://github.com/minetest/minetest/issues/new) and describe the issue you are having - you could include:
- Error logs (check the bottom of the `debug.txt` file).
- Screenshots.
- Ways you have tried to solve the issue, and whether they worked or not.
- Your Minetest version and the content (games, mods or texture packs) you have installed.
- Your platform (e.g. Windows 10 or Ubuntu 15.04 x64).
- Error logs (check the bottom of the `debug.txt` file)
- Screenshots
- Ways you have tried to solve the issue, and whether they worked or not
- Your Minetest version and the content (subgames, mods or texture packs) you have installed
- Your platform (e.g. Windows 10 or Ubuntu 15.04 x64)
After reporting you should aim to answer questions or clarifications as this helps pinpoint the cause of the issue (if you don't do this your issue may be closed after 1 month).
## Feature requests
Feature requests are welcome but take a moment to see if your idea follows the roadmap in some way and fits the whole picture of the project: [roadmap introduction](http://c55.me/blog/?p=1491), [roadmap continued](https://forum.minetest.net/viewtopic.php?t=9177). You should provide a clear explanation with as much detail as possible.
Feature requests are welcome but take a moment to see if your idea follows the [roadmap](https://forum.minetest.net/viewtopic.php?t=9177) in some way and fits the whole picture of the project. You should provide a clear explanation with as much detail as possible.
## Translations
Translations of Minetest are performed using Weblate. You can access the project page with a list of current languages [here](https://hosted.weblate.org/projects/minetest/minetest/).
## Donations
### Donations
If you'd like to monetarily support Minetest development, you can find donation methods on [our website](http://www.minetest.net/development/#donate).

View File

@ -1,41 +0,0 @@
FROM debian:stretch
USER root
RUN apt-get update -y && \
apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev \
libsqlite3-dev libcurl4-gnutls-dev zlib1g-dev libgmp-dev libjsoncpp-dev libidn11-dev git
COPY . /usr/src/minetest5
RUN mkdir -p /usr/src/minetest5/cmakebuild && cd /usr/src/minetest5/cmakebuild && \
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DRUN_IN_PLACE=FALSE \
-DBUILD_SERVER=TRUE \
-DBUILD_CLIENT=FALSE \
-DENABLE_SYSTEM_JSONCPP=1 \
.. && \
make -j2 && \
rm -Rf ../games/minetest_game && git clone --depth 1 https://github.com/minetest/minetest_game ../games/minetest_game && \
rm -Rf ../games/minetest_game/.git && \
make install
FROM debian:stretch
USER root
RUN groupadd minetest5 && useradd -m -g minetest5 -d /var/lib/minetest5 minetest5 && \
apt-get update -y && \
apt-get -y install libcurl3-gnutls libjsoncpp1 liblua5.1-0 libluajit-5.1-2 libpq5 libsqlite3-0 \
libstdc++6 zlib1g libc6 && \
apt-get clean && rm -rf /var/cache/apt/archives/* && \
rm -rf /var/lib/apt/lists/*
WORKDIR /var/lib/minetest5
COPY --from=0 /usr/local/share/minetest5 /usr/local/share/minetest5
COPY --from=0 /usr/local/bin/minetest5server /usr/local/bin/minetest5server
COPY --from=0 /usr/local/share/doc/minetest5/minetest5.conf.example /etc/minetest5/minetest5.conf
USER minetest5
EXPOSE 30000/udp
CMD ["/usr/local/bin/minetest5server", "--config", "/etc/minetest5/minetest5.conf"]

View File

@ -1,171 +0,0 @@
License of Minetest textures and sounds
---------------------------------------
This applies to textures and sounds contained in the main Minetest
distribution.
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
http://creativecommons.org/licenses/by-sa/3.0/
textures/base/pack/refresh.png is under the Apache 2 license
https://www.apache.org/licenses/LICENSE-2.0.html
Authors of media files
-----------------------
Everything not listed in here:
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
ShadowNinja:
textures/base/pack/smoke_puff.png
paramat:
textures/base/pack/menu_header.png
erlehmann:
misc/minetest-icon-24x24.png
misc/minetest-icon.ico
misc/minetest.svg
textures/base/pack/logo.png
JRottm
textures/base/pack/player_marker.png
srifqi
textures/base/pack/chat_hide_btn.png
textures/base/pack/chat_show_btn.png
textures/base/pack/joystick_bg.png
textures/base/pack/joystick_center.png
textures/base/pack/joystick_off.png
textures/base/pack/minimap_btn.png
License of Minetest source code
-------------------------------
Minetest
Copyright (C) 2010-2018 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Irrlicht
---------------
This program uses the Irrlicht Engine. http://irrlicht.sourceforge.net/
The Irrlicht Engine License
Copyright © 2002-2005 Nikolaus Gebhardt
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute
it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you
must not claim that you wrote the original software. If you use
this software in a product, an acknowledgment in the product
documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must
not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
JThread
---------------
This program uses the JThread library. License for JThread follows:
Copyright (c) 2000-2006 Jori Liesenborgs (jori.liesenborgs@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
Lua
---------------
Lua is licensed under the terms of the MIT license reproduced below.
This means that Lua is free software and can be used for both academic
and commercial purposes at absolutely no cost.
For details and rationale, see https://www.lua.org/license.html .
Copyright (C) 1994-2008 Lua.org, PUC-Rio.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Fonts
---------------
Bitstream Vera Fonts Copyright:
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is
a trademark of Bitstream, Inc.
Arimo - Apache License, version 2.0
Digitized data copyright (c) 2010-2012 Google Corporation.
Cousine - Apache License, version 2.0
Digitized data copyright (c) 2010-2012 Google Corporation.
DroidSansFallBackFull:
Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

357
README.md
View File

@ -1,357 +0,0 @@
Minetest5
=========
[![Translation status](https://hosted.weblate.org/widgets/minetest/-/svg-badge.svg)](https://hosted.weblate.org/engage/minetest/?utm_source=widget)
[![License](https://img.shields.io/badge/license-LGPLv2.1%2B-blue.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html)
Minetest is a free open-source voxel game engine with easy modding and game creation.
this source is minetest modified up to 5.2 with namespace execution for distros integration with OS's
also features the client identification patch to property get rid of cheaters.
Copyright (C) 2010-2019 Perttu Ahola <celeron55@gmail.com>
and contributors (see source file comments and the version control log)
In case you downloaded the source code
--------------------------------------
If you downloaded the **Minetest5 Engine** source code from git, in which this file is
contained, you probably want to download the Minetest5 Game at https://codeberg.org/minenux/minetest-game-minetest/src/branch/stable-5.2
project too. See its README.md information. Those sources are a little modification of original Minetest.
For Minetest4 series of same engine please use the respective branch.
Table of Contents
------------------
1. [Further Documentation](#further-documentation)
2. [Default Controls](#default-controls)
3. [Paths](#paths)
4. [Configuration File](#configuration-file)
5. [Command-line Options](#command-line-options)
6. [Compiling](#compiling)
7. [Docker](#docker)
8. [Version Scheme](#version-scheme)
Further documentation
----------------------
- This sources https://codeberg.org/minenux/minetest-engine/src/branch/stable-5.2-namespace
- Minetest4 sources https://codeberg.org/minenux/minetest-engine/src/branch/stable-4.0-namespace
- Wiki of this project (minenux) https://codeberg.org/venenux/venenux-minetest/wiki
- Original Minetest Website: http://minetest.org/
- Original Minetest Wiki: http://wiki.minetest.org/
- Minetest Forum: http://forum.minetest.org/
- Original Minetest GitHub: https://github.com/minetest/minetest/
- [doc/](doc/) directory of source distribution
Generals of game
----------------
This is **an engine that can acts as server and client**, it has **two main components**:
1. the **games** (that contains the mods and definition of how to play) and
2. the **world** (that contains the creeated and playable data).
Paths places of those are in the [Paths](#paths) sections of this file.
Players used the client role of the program, that joins to a server that can be the same invoked
or a remote server, currently many phone clients (apps like minetest that stolen its name)
just used those remote servers to play.
Default controls
----------------
All controls are re-bindable using settings.
Some can be changed in the key config dialog in the settings tab.
| Button | Action |
|-------------------------------|----------------------------------------------------------------|
| Move mouse | Look around |
| W, A, S, D | Move |
| Space | Jump/move up |
| Shift | Sneak/move down |
| Q | Drop itemstack |
| Shift + Q | Drop single item |
| Left mouse button | Dig/punch/take item |
| Right mouse button | Place/use |
| Shift + right mouse button | Build (without using) |
| I | Inventory menu |
| Mouse wheel | Select item |
| 0-9 | Select item |
| Z | Zoom (needs zoom privilege) |
| T | Chat |
| / | Command |
| Esc | Pause menu/abort/exit (pauses only singleplayer game) |
| R | Enable/disable full range view |
| + | Increase view range |
| - | Decrease view range |
| K | Enable/disable fly mode (needs fly privilege) |
| P | Enable/disable pitch move mode |
| J | Enable/disable fast mode (needs fast privilege) |
| H | Enable/disable noclip mode (needs noclip privilege) |
| E | Move fast in fast mode |
| F1 | Hide/show HUD |
| F2 | Hide/show chat |
| F3 | Disable/enable fog |
| F4 | Disable/enable camera update (Mapblocks are not updated anymore when disabled, disabled in release builds) |
| F5 | Cycle through debug information screens |
| F6 | Cycle through profiler info screens |
| F7 | Cycle through camera modes |
| F9 | Cycle through minimap modes |
| Shift + F9 | Change minimap orientation |
| F10 | Show/hide console |
| F12 | Take screenshot |
Paths
-----
Locations:
* `bin` - Compiled binaries
* `share` - Distributed read-only data
* `user` - User-created modifiable data
Where each location is on each platform:
* Others OS's / RUN_IN_PLACE source:
* `bin` = `bin`
* `share` = `.`
* `user` = `.`
* Linux installed:
* `bin` = `/usr/bin`
* `share` = `/usr/share/minetest5`
* `user` = `~/.minetest5`
* macOS:
* `bin` = `Contents/MacOS`
* `share` = `Contents/Resources`
* `user` = `Contents/User OR ~/Library/Application Support/minetest5`
Worlds can be found as separate folders in: `user/worlds/`
Configuration file
------------------
- Default location:
`user/minetest5.conf`
- This file is created by closing Minetest for the first time.
- A specific file can be specified on the command line:
`--config <path-to-file>`
- A run-in-place build will look for the configuration file in
`location_of_bin/../minetest5.conf` and also `location_of_bin/../../minetest5.conf`
Command-line options
--------------------
- Use `--help`
Compiling
---------
### Compiling on GNU/Linux
#### Dependencies
| Dependency | Version | Commentary |
|------------|---------|------------|
| GCC | 4.9+ | Can be replaced with Clang 3.4+ |
| CMake | 2.6+ | |
| Irrlicht | 1.6.0+ | Custom version recommended, see https://github.com/minetest/irrlicht |
| SQLite3 | 3.0+ | |
| LuaJIT | 2.0+ | Bundled Lua 5.1 is used if not present |
| GMP | 5.0.0+ | Bundled mini-GMP is used if not present |
| JsonCPP | 1.0.0+ | Bundled JsonCPP is used if not present |
For Debian/Ubuntu users:
sudo apt install g++ make libc6-dev libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
For Fedora users:
sudo dnf install make automake gcc gcc-c++ kernel-devel cmake libcurl-devel openal-soft-devel libvorbis-devel libXxf86vm-devel libogg-devel freetype-devel mesa-libGL-devel zlib-devel jsoncpp-devel irrlicht-devel bzip2-libs gmp-devel sqlite-devel luajit-devel leveldb-devel ncurses-devel doxygen spatialindex-devel bzip2-devel
For Arch users:
sudo pacman -S base-devel libcurl-gnutls cmake libxxf86vm irrlicht libpng sqlite libogg libvorbis openal freetype2 jsoncpp gmp luajit leveldb ncurses
For Alpine users:
sudo apk add build-base irrlicht-dev cmake bzip2-dev libpng-dev jpeg-dev libxxf86vm-dev mesa-dev sqlite-dev libogg-dev libvorbis-dev openal-soft-dev curl-dev freetype-dev zlib-dev gmp-dev jsoncpp-dev luajit-dev
#### Download
You can install Git for easily keeping your copy up to date.
If you dont want Git, read below on how to get the source without Git.
This is an example for installing Git on Debian/Ubuntu:
sudo apt install git
For Fedora users:
sudo dnf install git
Download source (this is the URL to the latest of source repository, which might not work at all times) using Git:
git clone --recursive https://codeberg.org/minenux/minetest-engine.git minetest
cd minetest
Download minetest_game (otherwise only the "Minimal development test" game is available) using Git:
git submodule init && git submodule update --recursive
Download source, without using Git:
wget https://codeberg.org/minenux/minetest-engine/archive/stable-5.2.tar.gz
tar xf stable-5.2.tar.gz
cd stable-5.2
Download minetest_game, without using Git:
cd games/
wget https://codeberg.org/minenux/minetest-game-minetest/archive/stable-5.2.tar.gz
tar xf stable-5.2.tar.gz
mv minetest-game-minetest_stable-5.2 minetest
cd ..
#### Build
Build a version that runs directly from the source directory there program are:
cmake . -DRUN_IN_PLACE=TRUE
make -j$(nproc)
Run it:
./bin/minetest
- Use `cmake . -LH` to see all CMake options and their current state.
- If you want to install it system-wide (or are making a distribution package),
you will want to use `-DRUN_IN_PLACE=FALSE`.
- You can build a bare server by specifying `-DBUILD_SERVER=TRUE`.
- You can disable the client build by specifying `-DBUILD_CLIENT=FALSE`.
- You can select between Release and Debug build by `-DCMAKE_BUILD_TYPE=<Debug or Release>`.
- Debug build is slower, but gives much more useful output in a debugger.
- If you build a bare server you don't need to have Irrlicht installed.
- In that case use `-DIRRLICHT_SOURCE_DIR=/the/irrlicht/source`.
### CMake options
General options and their default values:
BUILD_CLIENT=TRUE - Build Minetest client
BUILD_SERVER=FALSE - Build Minetest server
CMAKE_BUILD_TYPE=Release - Type of build (Release vs. Debug)
Release - Release build
Debug - Debug build
SemiDebug - Partially optimized debug build
RelWithDebInfo - Release build with debug information
MinSizeRel - Release build with -Os passed to compiler to make executable as small as possible
ENABLE_CURL=ON - Build with cURL; Enables use of online mod repo, public serverlist and remote media fetching via http
ENABLE_CURSES=ON - Build with (n)curses; Enables a server side terminal (command line option: --terminal)
ENABLE_FREETYPE=ON - Build with FreeType2; Allows using TTF fonts
ENABLE_GETTEXT=ON - Build with Gettext; Allows using translations
ENABLE_GLES=OFF - Build for OpenGL ES instead of OpenGL (requires support by Irrlicht)
ENABLE_LEVELDB=ON - Build with LevelDB; Enables use of LevelDB map backend
ENABLE_POSTGRESQL=ON - Build with libpq; Enables use of PostgreSQL map backend (PostgreSQL 9.5 or greater recommended)
ENABLE_REDIS=ON - Build with libhiredis; Enables use of Redis map backend
ENABLE_SPATIAL=ON - Build with LibSpatial; Speeds up AreaStores
ENABLE_SOUND=ON - Build with OpenAL, libogg & libvorbis; in-game sounds
ENABLE_LUAJIT=ON - Build with LuaJIT (much faster than non-JIT Lua)
ENABLE_SYSTEM_GMP=ON - Use GMP from system (much faster than bundled mini-gmp)
ENABLE_SYSTEM_JSONCPP=OFF - Use JsonCPP from system
OPENGL_GL_PREFERENCE=LEGACY - Linux client build only; See CMake Policy CMP0072 for reference
RUN_IN_PLACE=FALSE - Create a portable install (worlds, settings etc. in current directory)
USE_GPROF=FALSE - Enable profiling using GProf
VERSION_EXTRA= - Text to append to version (e.g. VERSION_EXTRA=foobar -> Minetest 0.4.9-foobar)
Library specific options:
BZIP2_INCLUDE_DIR - Linux only; directory where bzlib.h is located
BZIP2_LIBRARY - Linux only; path to libbz2.a/libbz2.so
CURL_DLL - Only if building with cURL on Windows; path to libcurl.dll
CURL_INCLUDE_DIR - Only if building with cURL; directory where curl.h is located
CURL_LIBRARY - Only if building with cURL; path to libcurl.a/libcurl.so/libcurl.lib
EGL_INCLUDE_DIR - Only if building with GLES; directory that contains egl.h
EGL_LIBRARY - Only if building with GLES; path to libEGL.a/libEGL.so
FREETYPE_INCLUDE_DIR_freetype2 - Only if building with FreeType 2; directory that contains an freetype directory with files such as ftimage.h in it
FREETYPE_INCLUDE_DIR_ft2build - Only if building with FreeType 2; directory that contains ft2build.h
FREETYPE_LIBRARY - Only if building with FreeType 2; path to libfreetype.a/libfreetype.so/freetype.lib
FREETYPE_DLL - Only if building with FreeType 2 on Windows; path to libfreetype.dll
GETTEXT_DLL - Only when building with gettext on Windows; path to libintl3.dll
GETTEXT_ICONV_DLL - Only when building with gettext on Windows; path to libiconv2.dll
GETTEXT_INCLUDE_DIR - Only when building with gettext; directory that contains iconv.h
GETTEXT_LIBRARY - Only when building with gettext on Windows; path to libintl.dll.a
GETTEXT_MSGFMT - Only when building with gettext; path to msgfmt/msgfmt.exe
IRRLICHT_DLL - Only on Windows; path to Irrlicht.dll
IRRLICHT_INCLUDE_DIR - Directory that contains IrrCompileConfig.h
IRRLICHT_LIBRARY - Path to libIrrlicht.a/libIrrlicht.so/libIrrlicht.dll.a/Irrlicht.lib
LEVELDB_INCLUDE_DIR - Only when building with LevelDB; directory that contains db.h
LEVELDB_LIBRARY - Only when building with LevelDB; path to libleveldb.a/libleveldb.so/libleveldb.dll.a
LEVELDB_DLL - Only when building with LevelDB on Windows; path to libleveldb.dll
PostgreSQL_INCLUDE_DIR - Only when building with PostgreSQL; directory that contains libpq-fe.h
PostgreSQL_LIBRARY - Only when building with PostgreSQL; path to libpq.a/libpq.so/libpq.lib
REDIS_INCLUDE_DIR - Only when building with Redis; directory that contains hiredis.h
REDIS_LIBRARY - Only when building with Redis; path to libhiredis.a/libhiredis.so
SPATIAL_INCLUDE_DIR - Only when building with LibSpatial; directory that contains spatialindex/SpatialIndex.h
SPATIAL_LIBRARY - Only when building with LibSpatial; path to libspatialindex_c.so/spatialindex-32.lib
LUA_INCLUDE_DIR - Only if you want to use LuaJIT; directory where luajit.h is located
LUA_LIBRARY - Only if you want to use LuaJIT; path to libluajit.a/libluajit.so
MINGWM10_DLL - Only if compiling with MinGW; path to mingwm10.dll
OGG_DLL - Only if building with sound on Windows; path to libogg.dll
OGG_INCLUDE_DIR - Only if building with sound; directory that contains an ogg directory which contains ogg.h
OGG_LIBRARY - Only if building with sound; path to libogg.a/libogg.so/libogg.dll.a
OPENAL_DLL - Only if building with sound on Windows; path to OpenAL32.dll
OPENAL_INCLUDE_DIR - Only if building with sound; directory where al.h is located
OPENAL_LIBRARY - Only if building with sound; path to libopenal.a/libopenal.so/OpenAL32.lib
OPENGLES2_INCLUDE_DIR - Only if building with GLES; directory that contains gl2.h
OPENGLES2_LIBRARY - Only if building with GLES; path to libGLESv2.a/libGLESv2.so
SQLITE3_INCLUDE_DIR - Directory that contains sqlite3.h
SQLITE3_LIBRARY - Path to libsqlite3.a/libsqlite3.so/sqlite3.lib
VORBISFILE_DLL - Only if building with sound on Windows; path to libvorbisfile-3.dll
VORBISFILE_LIBRARY - Only if building with sound; path to libvorbisfile.a/libvorbisfile.so/libvorbisfile.dll.a
VORBIS_DLL - Only if building with sound on Windows; path to libvorbis-0.dll
VORBIS_INCLUDE_DIR - Only if building with sound; directory that contains a directory vorbis with vorbisenc.h inside
VORBIS_LIBRARY - Only if building with sound; path to libvorbis.a/libvorbis.so/libvorbis.dll.a
XXF86VM_LIBRARY - Only on Linux; path to libXXf86vm.a/libXXf86vm.so
ZLIB_DLL - Only on Windows; path to zlib1.dll
ZLIB_INCLUDE_DIR - Directory that contains zlib.h
ZLIB_LIBRARY - Path to libz.a/libz.so/zlib.lib
Docker
------
Images are built on each commit and available using the following tag scheme:
* `registry.gitlab.com/minetest/minetest/server:latest` (latest build)
* `registry.gitlab.com/minetest/minetest/server:<branch/tag>` (current branch or current tag)
* `registry.gitlab.com/minetest/minetest/server:<commit-id>` (current commit id)
If you want to test it on a Docker server you can easily run:
sudo docker run registry.gitlab.com/minetest/minetest/server:<docker tag>
If you want to use it in a production environment you should use volumes bound to the Docker host
to persist data and modify the configuration:
sudo docker create -v /home/minetest/data/:/var/lib/minetest/ -v /home/minetest/conf/:/etc/minetest/ registry.gitlab.com/minetest/minetest/server:master
Data will be written to `/home/minetest/data` on the host, and configuration will be read from `/home/minetest/conf/minetest.conf`.
**Note:** If you don't understand the previous commands please read the official Docker documentation before use.
You can also host your Minetest server inside a Kubernetes cluster. See our example implementation in [`misc/kubernetes.yml`](misc/kubernetes.yml).
Version scheme
--------------
We use `major.minor.patch` since 5.0.0-dev. Prior to that we used `0.major.minor`.
In minenux we used `4.minor.patch` for 0.4.X and `5.2.patch` for 5.2.X
- Major in minenux is used only to those two releases, until 6.X comes in.
- Minor in 4.X will be always "0" cos will be only backported things.
- Patch is incremented when release contains bugfixes and veryminor/trivial features.
In minenux we do not use "-dev" notation, next release is never reached until
a new tag. We only backports patchs and push bugfixes, fetures are avoided as possible.

557
README.txt Normal file
View File

@ -0,0 +1,557 @@
Minetest
========
An InfiniMiner/Minecraft inspired game.
Copyright (c) 2010-2017 Perttu Ahola <celeron55@gmail.com>
and contributors (see source file comments and the version control log)
In case you downloaded the source code:
---------------------------------------
If you downloaded the Minetest Engine source code in which this file is
contained, you probably want to download the minetest_game project too:
https://github.com/minetest/minetest_game/
See the README.txt in it.
Further documentation
----------------------
- Website: http://minetest.net/
- Wiki: http://wiki.minetest.net/
- Developer wiki: http://dev.minetest.net/
- Forum: http://forum.minetest.net/
- Github: https://github.com/minetest/minetest/
- doc/ directory of source distribution
This game is not finished
--------------------------
- Don't expect it to work as well as a finished game will.
- Please report any bugs. When doing that, debug.txt is useful.
Default controls
-----------------
- Move mouse: Look around
- W, A, S, D: Move
- Space: Jump/move up
- Shift: Sneak/move down
- Q: Drop itemstack
- Shift + Q: Drop single item
- Left mouse button: Dig/punch/take item
- Right mouse button: Place/use
- Shift + right mouse button: Build (without using)
- I: Inventory menu
- Mouse wheel: Select item
- 0-9: Select item
- Z: Zoom (needs zoom privilege)
- T: Chat
- /: Command
- Esc: Pause menu/abort/exit (pauses only singleplayer game)
- R: Enable/disable full range view
- +: Increase view range
- -: Decrease view range
- K: Enable/disable fly mode (needs fly privilege)
- J: Enable/disable fast mode (needs fast privilege)
- H: Enable/disable noclip mode (needs noclip privilege)
- F1: Hide/show HUD
- F2: Hide/show chat
- F3: Disable/enable fog
- F4: Disable/enable camera update (Mapblocks are not updated anymore when disabled, disabled in release builds)
- F5: Cycle through debug info screens
- F6: Cycle through profiler info screens
- F7: Cycle through camera modes
- F8: Toggle cinematic mode
- F9: Cycle through minimap modes
- Shift + F9: Change minimap orientation
- F10: Show/hide console
- F12: Take screenshot
- P: Write stack traces into debug.txt
Most controls are settable in the configuration file, see the section below.
Paths
------
$bin - Compiled binaries
$share - Distributed read-only data
$user - User-created modifiable data
Windows .zip / RUN_IN_PLACE source:
$bin = bin
$share = .
$user = .
Linux installed:
$bin = /usr/bin
$share = /usr/share/minetest
$user = ~/.minetest
macOS:
$bin = Contents/MacOS
$share = Contents/Resources
$user = Contents/User OR ~/Library/Application Support/minetest
World directory
----------------
- Worlds can be found as separate folders in:
$user/worlds/
Configuration file:
-------------------
- Default location:
$user/minetest.conf
- It is created by Minetest when it is ran the first time.
- A specific file can be specified on the command line:
--config <path-to-file>
- A run-in-place build will look for the configuration file in
$location_of_exe/../minetest.conf and also $location_of_exe/../../minetest.conf
Command-line options:
---------------------
- Use --help
Compiling on GNU/Linux:
-----------------------
Install dependencies. Here's an example for Debian/Ubuntu:
$ sudo apt-get install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev
For Fedora users:
$ sudo dnf install make automake gcc gcc-c++ kernel-devel cmake libcurl* openal* libvorbis* libXxf86vm-devel libogg-devel freetype-devel mesa-libGL-devel zlib-devel jsoncpp-devel irrlicht-devel bzip2-libs gmp-devel sqlite-devel luajit-devel leveldb-devel ncurses-devel doxygen spatialindex-devel bzip2-devel
You can install git for easily keeping your copy up to date.
If you dont want git, read below on how to get the source without git.
This is an example for installing git on Debian/Ubuntu:
$ sudo apt-get install git
For Fedora users:
$ sudo dnf install git
Download source (this is the URL to the latest of source repository, which might not work at all times) using git:
$ git clone --depth 1 https://github.com/minetest/minetest.git
$ cd minetest
Download minetest_game (otherwise only the "Minimal development test" game is available) using git:
$ git clone --depth 1 https://github.com/minetest/minetest_game.git games/minetest_game
Download source, without using git:
$ wget https://github.com/minetest/minetest/archive/master.tar.gz
$ tar xf master.tar.gz
$ cd minetest-master
Download minetest_game, without using git:
$ cd games/
$ wget https://github.com/minetest/minetest_game/archive/master.tar.gz
$ tar xf master.tar.gz
$ mv minetest_game-master minetest_game
$ cd ..
Build a version that runs directly from the source directory:
$ cmake . -DRUN_IN_PLACE=TRUE
$ make -j <number of processors>
Run it:
$ ./bin/minetest
- Use cmake . -LH to see all CMake options and their current state
- If you want to install it system-wide (or are making a distribution package),
you will want to use -DRUN_IN_PLACE=FALSE
- You can build a bare server by specifying -DBUILD_SERVER=TRUE
- You can disable the client build by specifying -DBUILD_CLIENT=FALSE
- You can select between Release and Debug build by -DCMAKE_BUILD_TYPE=<Debug or Release>
- Debug build is slower, but gives much more useful output in a debugger
- If you build a bare server, you don't need to have Irrlicht installed.
In that case use -DIRRLICHT_SOURCE_DIR=/the/irrlicht/source
CMake options
-------------
General options:
BUILD_CLIENT - Build Minetest client
BUILD_SERVER - Build Minetest server
CMAKE_BUILD_TYPE - Type of build (Release vs. Debug)
Release - Release build
Debug - Debug build
SemiDebug - Partially optimized debug build
RelWithDebInfo - Release build with Debug information
MinSizeRel - Release build with -Os passed to compiler to make executable as small as possible
ENABLE_CURL - Build with cURL; Enables use of online mod repo, public serverlist and remote media fetching via http
ENABLE_CURSES - Build with (n)curses; Enables a server side terminal (command line option: --terminal)
ENABLE_FREETYPE - Build with FreeType2; Allows using TTF fonts
ENABLE_GETTEXT - Build with Gettext; Allows using translations
ENABLE_GLES - Search for Open GLES headers & libraries and use them
ENABLE_LEVELDB - Build with LevelDB; Enables use of LevelDB map backend
ENABLE_POSTGRESQL - Build with libpq; Enables use of PostgreSQL map backend (PostgreSQL 9.5 or greater recommended)
ENABLE_REDIS - Build with libhiredis; Enables use of Redis map backend
ENABLE_SPATIAL - Build with LibSpatial; Speeds up AreaStores
ENABLE_SOUND - Build with OpenAL, libogg & libvorbis; in-game Sounds
ENABLE_LUAJIT - Build with LuaJIT (much faster than non-JIT Lua)
ENABLE_SYSTEM_GMP - Use GMP from system (much faster than bundled mini-gmp)
RUN_IN_PLACE - Create a portable install (worlds, settings etc. in current directory)
USE_GPROF - Enable profiling using GProf
VERSION_EXTRA - Text to append to version (e.g. VERSION_EXTRA=foobar -> Minetest 0.4.9-foobar)
Library specific options:
BZIP2_INCLUDE_DIR - Linux only; directory where bzlib.h is located
BZIP2_LIBRARY - Linux only; path to libbz2.a/libbz2.so
CURL_DLL - Only if building with cURL on Windows; path to libcurl.dll
CURL_INCLUDE_DIR - Only if building with cURL; directory where curl.h is located
CURL_LIBRARY - Only if building with cURL; path to libcurl.a/libcurl.so/libcurl.lib
EGL_INCLUDE_DIR - Only if building with GLES; directory that contains egl.h
EGL_LIBRARY - Only if building with GLES; path to libEGL.a/libEGL.so
FREETYPE_INCLUDE_DIR_freetype2 - Only if building with Freetype2; directory that contains an freetype directory with files such as ftimage.h in it
FREETYPE_INCLUDE_DIR_ft2build - Only if building with Freetype2; directory that contains ft2build.h
FREETYPE_LIBRARY - Only if building with Freetype2; path to libfreetype.a/libfreetype.so/freetype.lib
FREETYPE_DLL - Only if building with Freetype2 on Windows; path to libfreetype.dll
GETTEXT_DLL - Only when building with Gettext on Windows; path to libintl3.dll
GETTEXT_ICONV_DLL - Only when building with Gettext on Windows; path to libiconv2.dll
GETTEXT_INCLUDE_DIR - Only when building with Gettext; directory that contains iconv.h
GETTEXT_LIBRARY - Only when building with Gettext on Windows; path to libintl.dll.a
GETTEXT_MSGFMT - Only when building with Gettext; path to msgfmt/msgfmt.exe
IRRLICHT_DLL - Only on Windows; path to Irrlicht.dll
IRRLICHT_INCLUDE_DIR - Directory that contains IrrCompileConfig.h
IRRLICHT_LIBRARY - Path to libIrrlicht.a/libIrrlicht.so/libIrrlicht.dll.a/Irrlicht.lib
LEVELDB_INCLUDE_DIR - Only when building with LevelDB; directory that contains db.h
LEVELDB_LIBRARY - Only when building with LevelDB; path to libleveldb.a/libleveldb.so/libleveldb.dll.a
LEVELDB_DLL - Only when building with LevelDB on Windows; path to libleveldb.dll
PostgreSQL_INCLUDE_DIR - Only when building with PostgreSQL; directory that contains libpq-fe.h
POSTGRESQL_LIBRARY - Only when building with PostgreSQL; path to libpq.a/libpq.so
REDIS_INCLUDE_DIR - Only when building with Redis; directory that contains hiredis.h
REDIS_LIBRARY - Only when building with Redis; path to libhiredis.a/libhiredis.so
SPATIAL_INCLUDE_DIR - Only when building with LibSpatial; directory that contains spatialindex/SpatialIndex.h
SPATIAL_LIBRARY - Only when building with LibSpatial; path to libspatialindex_c.so/spatialindex-32.lib
LUA_INCLUDE_DIR - Only if you want to use LuaJIT; directory where luajit.h is located
LUA_LIBRARY - Only if you want to use LuaJIT; path to libluajit.a/libluajit.so
MINGWM10_DLL - Only if compiling with MinGW; path to mingwm10.dll
OGG_DLL - Only if building with sound on Windows; path to libogg.dll
OGG_INCLUDE_DIR - Only if building with sound; directory that contains an ogg directory which contains ogg.h
OGG_LIBRARY - Only if building with sound; path to libogg.a/libogg.so/libogg.dll.a
OPENAL_DLL - Only if building with sound on Windows; path to OpenAL32.dll
OPENAL_INCLUDE_DIR - Only if building with sound; directory where al.h is located
OPENAL_LIBRARY - Only if building with sound; path to libopenal.a/libopenal.so/OpenAL32.lib
OPENGLES2_INCLUDE_DIR - Only if building with GLES; directory that contains gl2.h
OPENGLES2_LIBRARY - Only if building with GLES; path to libGLESv2.a/libGLESv2.so
SQLITE3_INCLUDE_DIR - Directory that contains sqlite3.h
SQLITE3_LIBRARY - Path to libsqlite3.a/libsqlite3.so/sqlite3.lib
VORBISFILE_DLL - Only if building with sound on Windows; path to libvorbisfile-3.dll
VORBISFILE_LIBRARY - Only if building with sound; path to libvorbisfile.a/libvorbisfile.so/libvorbisfile.dll.a
VORBIS_DLL - Only if building with sound on Windows; path to libvorbis-0.dll
VORBIS_INCLUDE_DIR - Only if building with sound; directory that contains a directory vorbis with vorbisenc.h inside
VORBIS_LIBRARY - Only if building with sound; path to libvorbis.a/libvorbis.so/libvorbis.dll.a
XXF86VM_LIBRARY - Only on Linux; path to libXXf86vm.a/libXXf86vm.so
ZLIB_DLL - Only on Windows; path to zlib1.dll
ZLIBWAPI_DLL - Only on Windows; path to zlibwapi.dll
ZLIB_INCLUDE_DIR - Directory that contains zlib.h
ZLIB_LIBRARY - Path to libz.a/libz.so/zlibwapi.lib
Compiling on Windows:
---------------------
- This section is outdated. In addition to what is described here:
- In addition to minetest, you need to download minetest_game.
- If you wish to have sound support, you need libogg, libvorbis and libopenal
- You need:
* CMake:
http://www.cmake.org/cmake/resources/software.html
* MinGW or Visual Studio
http://www.mingw.org/
http://msdn.microsoft.com/en-us/vstudio/default
* Irrlicht SDK 1.7:
http://irrlicht.sourceforge.net/downloads.html
* Zlib headers (zlib125.zip)
http://www.winimage.com/zLibDll/index.html
* Zlib library (zlibwapi.lib and zlibwapi.dll from zlib125dll.zip):
http://www.winimage.com/zLibDll/index.html
* SQLite3 headers and library
https://www.sqlite.org/download.html
* Optional: gettext library and tools:
http://gnuwin32.sourceforge.net/downlinks/gettext.php
- This is used for other UI languages. Feel free to leave it out.
* And, of course, Minetest:
http://minetest.net/download
- Steps:
- Select a directory called DIR hereafter in which you will operate.
- Make sure you have CMake and a compiler installed.
- Download all the other stuff to DIR and extract them into there.
("extract here", not "extract to packagename/")
NOTE: zlib125dll.zip needs to be extracted into zlib125dll
NOTE: You need to extract sqlite3.h & sqlite3ext.h from sqlite3 source
and sqlite3.dll & sqlite3.def from sqlite3 precompiled binaries
into "sqlite3" directory, and generate sqlite3.lib using command
"LIB /DEF:sqlite3.def /OUT:sqlite3.lib"
- All those packages contain a nice base directory in them, which
should end up being the direct subdirectories of DIR.
- You will end up with a directory structure like this (+=dir, -=file):
-----------------
+ DIR
- zlib-1.2.5.tar.gz
- zlib125dll.zip
- irrlicht-1.8.3.zip
- sqlite-amalgamation-3130000.zip (SQLite3 headers)
- sqlite-dll-win32-x86-3130000.zip (SQLite3 library for 32bit system)
- 110214175330.zip (or whatever, this is the minetest source)
+ zlib-1.2.5
- zlib.h
+ win32
...
+ zlib125dll
- readme.txt
+ dll32
...
+ irrlicht-1.8.3
+ lib
+ include
...
+ sqlite3
sqlite3.h
sqlite3ext.h
sqlite3.lib
sqlite3.dll
+ gettext (optional)
+bin
+include
+lib
+ minetest
+ src
+ doc
- CMakeLists.txt
...
-----------------
- Start up the CMake GUI
- Select "Browse Source..." and select DIR/minetest
- Now, if using MSVC:
- Select "Browse Build..." and select DIR/minetest-build
- Else if using MinGW:
- Select "Browse Build..." and select DIR/minetest
- Select "Configure"
- Select your compiler
- It will warn about missing stuff, ignore that at this point. (later don't)
- Make sure the configuration is as follows
(note that the versions may differ for you):
-----------------
BUILD_CLIENT [X]
BUILD_SERVER [ ]
CMAKE_BUILD_TYPE Release
CMAKE_INSTALL_PREFIX DIR/minetest-install
IRRLICHT_SOURCE_DIR DIR/irrlicht-1.8.3
RUN_IN_PLACE [X]
WARN_ALL [ ]
ZLIB_DLL DIR/zlib125dll/dll32/zlibwapi.dll
ZLIB_INCLUDE_DIR DIR/zlib-1.2.5
ZLIB_LIBRARIES DIR/zlib125dll/dll32/zlibwapi.lib
GETTEXT_BIN_DIR DIR/gettext/bin
GETTEXT_INCLUDE_DIR DIR/gettext/include
GETTEXT_LIBRARIES DIR/gettext/lib/intl.lib
GETTEXT_MSGFMT DIR/gettext/bin/msgfmt
-----------------
- If CMake complains it couldn't find SQLITE3, choose "Advanced" box on the
right top corner, then specify the location of SQLITE3_INCLUDE_DIR and
SQLITE3_LIBRARY manually.
- If you want to build 64-bit minetest, you will need to build 64-bit version
of irrlicht engine manually, as only 32-bit pre-built library is provided.
- Hit "Configure"
- Hit "Configure" once again 8)
- If something is still coloured red, you have a problem.
- Hit "Generate"
If using MSVC:
- Open the generated minetest.sln
- The project defaults to the "Debug" configuration. Make very sure to
select "Release", unless you want to debug some stuff (it's slower
and might not even work at all)
- Build the ALL_BUILD project
- Build the INSTALL project
- You should now have a working game with the executable in
DIR/minetest-install/bin/minetest.exe
- Additionally you may create a zip package by building the PACKAGE
project.
If using MinGW:
- Using the command line, browse to the build directory and run 'make'
(or mingw32-make or whatever it happens to be)
- You may need to copy some of the downloaded DLLs into bin/, see what
running the produced executable tells you it doesn't have.
- You should now have a working game with the executable in
DIR/minetest/bin/minetest.exe
Windows releases of minetest are built using a bat script like this:
--------------------------------------------------------------------
set sourcedir=%CD%
set installpath="C:\tmp\minetest_install"
set irrlichtpath="C:\tmp\irrlicht-1.7.2"
set builddir=%sourcedir%\bvc10
mkdir %builddir%
pushd %builddir%
cmake %sourcedir% -G "Visual Studio 10" -DIRRLICHT_SOURCE_DIR=%irrlichtpath% -DRUN_IN_PLACE=TRUE -DCMAKE_INSTALL_PREFIX=%installpath%
if %errorlevel% neq 0 goto fail
"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" ALL_BUILD.vcxproj /p:Configuration=Release
if %errorlevel% neq 0 goto fail
"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" INSTALL.vcxproj /p:Configuration=Release
if %errorlevel% neq 0 goto fail
"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" PACKAGE.vcxproj /p:Configuration=Release
if %errorlevel% neq 0 goto fail
popd
echo Finished.
exit /b 0
:fail
popd
echo Failed.
exit /b 1
License of Minetest textures and sounds
---------------------------------------
This applies to textures and sounds contained in the main Minetest
distribution.
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
http://creativecommons.org/licenses/by-sa/3.0/
Authors of media files
-----------------------
Everything not listed in here:
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
ShadowNinja:
textures/base/pack/smoke_puff.png
Paramat:
textures/base/pack/menu_header.png
erlehmann:
misc/minetest-icon-24x24.png
misc/minetest-icon.ico
misc/minetest.svg
textures/base/pack/logo.png
License of Minetest source code
-------------------------------
Minetest
Copyright (C) 2010-2017 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Irrlicht
---------------
This program uses the Irrlicht Engine. http://irrlicht.sourceforge.net/
The Irrlicht Engine License
Copyright © 2002-2005 Nikolaus Gebhardt
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute
it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you
must not claim that you wrote the original software. If you use
this software in a product, an acknowledgment in the product
documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must
not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
JThread
---------------
This program uses the JThread library. License for JThread follows:
Copyright (c) 2000-2006 Jori Liesenborgs (jori.liesenborgs@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
Lua
---------------
Lua is licensed under the terms of the MIT license reproduced below.
This means that Lua is free software and can be used for both academic
and commercial purposes at absolutely no cost.
For details and rationale, see https://www.lua.org/license.html .
Copyright (C) 1994-2008 Lua.org, PUC-Rio.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Fonts
---------------
Bitstream Vera Fonts Copyright:
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is
a trademark of Bitstream, Inc.
Arimo - Apache License, version 2.0
Digitized data copyright (c) 2010-2012 Google Corporation.
Cousine - Apache License, version 2.0
Digitized data copyright (c) 2010-2012 Google Corporation.
DroidSansFallBackFull:
Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -13,6 +13,10 @@ ANDR_ROOT = $(shell pwd)
PROJ_ROOT = $(shell realpath $(ANDR_ROOT)/../..)
APP_ROOT = $(ANDR_ROOT)/src/main
GAMES_TO_COPY = minetest_game
MODS_TO_COPY =
VERSION_MAJOR := $(shell cat $(PROJ_ROOT)/CMakeLists.txt | \
grep ^set\(VERSION_MAJOR\ | sed 's/)/ /' | cut -f2 -d' ')
VERSION_MINOR := $(shell cat $(PROJ_ROOT)/CMakeLists.txt | \
@ -27,12 +31,11 @@ TARGET_HOST = arm-linux
TARGET_ABI = armeabi-v7a
TARGET_LIBDIR = armeabi-v7a
TARGET_TOOLCHAIN = arm-linux-androideabi-
TARGET_CFLAGS_ADDON = -mfloat-abi=softfp -mfpu=vfpv3 -O3
TARGET_CFLAGS_ADDON = -mfloat-abi=softfp -mfpu=vfpv3 -O3 -D__ANDROID_API__=$(API)
TARGET_CXXFLAGS_ADDON = $(TARGET_CFLAGS_ADDON)
TARGET_ARCH = armv7
CROSS_CC = clang
CROSS_CXX = clang++
COMPILER_VERSION = clang
CROSS_PREFIX = arm-linux-androideabi-
COMPILER_VERSION = 4.9
HAVE_LEVELDB = 0
################################################################################
@ -43,8 +46,7 @@ HAVE_LEVELDB = 0
#TARGET_LIBDIR = mips
#TARGET_TOOLCHAIN = mipsel-linux-android-
#TARGET_ARCH = mips32
#CROSS_CC = mipsel-linux-android-gcc
#CROSS_CXX = mipsel-linux-android-g++
#CROSS_PREFIX = mipsel-linux-android-
#COMPILER_VERSION = 4.9
#HAVE_LEVELDB = 0
@ -55,10 +57,9 @@ HAVE_LEVELDB = 0
#TARGET_ABI = x86
#TARGET_LIBDIR = x86
#TARGET_TOOLCHAIN = x86-
#CROSS_PREFIX = i686-linux-android-
#TARGET_ARCH = x86
#CROSS_CC = clang
#CROSS_CXX = clang++
#COMPILER_VERSION = clang
#COMPILER_VERSION = 4.9
#HAVE_LEVELDB = 0
################################################################################
@ -84,17 +85,17 @@ OGG_TIMESTAMP = $(OGG_DIR)timestamp
OGG_TIMESTAMP_INT = $(ANDR_ROOT)/deps/ogg_timestamp
OGG_URL_GIT = https://gitlab.com/minetest/libvorbis-libogg-android
IRRLICHT_REVISION = 5150
IRRLICHT_REVISION = 5145
IRRLICHT_DIR = $(ANDR_ROOT)/deps/irrlicht/
IRRLICHT_LIB = $(IRRLICHT_DIR)lib/Android/libIrrlicht.a
IRRLICHT_TIMESTAMP = $(IRRLICHT_DIR)timestamp
IRRLICHT_TIMESTAMP_INT = $(ANDR_ROOT)/deps/irrlicht_timestamp
IRRLICHT_URL_SVN = https://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@$(IRRLICHT_REVISION)
OPENSSL_VERSION = 1.0.2n
OPENSSL_VERSION = 1.0.2k
OPENSSL_BASEDIR = openssl-$(OPENSSL_VERSION)
OPENSSL_DIR = $(ANDR_ROOT)/deps/$(OPENSSL_BASEDIR)/
OPENSSL_LIB = $(OPENSSL_DIR)/libssl.a
OPENSSL_LIB = $(OPENSSL_DIR)/libssl.so.1.0.0
OPENSSL_TIMESTAMP = $(OPENSSL_DIR)timestamp
OPENSSL_TIMESTAMP_INT = $(ANDR_ROOT)/deps/openssl_timestamp
OPENSSL_URL = https://www.openssl.org/source/openssl-$(OPENSSL_VERSION).tar.gz
@ -112,7 +113,7 @@ FREETYPE_TIMESTAMP = $(FREETYPE_DIR)timestamp
FREETYPE_TIMESTAMP_INT = $(ANDR_ROOT)/deps/freetype_timestamp
FREETYPE_URL_GIT = https://github.com/cdave1/freetype2-android
ICONV_VERSION = 1.16
ICONV_VERSION = 1.14
ICONV_DIR = $(ANDR_ROOT)/deps/libiconv/
ICONV_LIB = $(ICONV_DIR)/lib/.libs/libiconv.so
ICONV_TIMESTAMP = $(ICONV_DIR)timestamp
@ -165,7 +166,7 @@ delconfig:
local.properties:
@echo "Please specify path of ANDROID NDK"; \
echo "e.g. $$HOME/Android/Sdk/ndk-bundle/"; \
echo "e.g. $$HOME/Android/ndk-r11c/"; \
read ANDROID_NDK ; \
if [ ! -d $$ANDROID_NDK ] ; then \
echo "$$ANDROID_NDK is not a valid folder"; \
@ -173,7 +174,7 @@ local.properties:
fi; \
echo "ndk.dir = $$ANDROID_NDK" > local.properties; \
echo "Please specify path of ANDROID SDK"; \
echo "e.g. $$HOME/Android/Sdk/"; \
echo "e.g. $$HOME/Android/sdk/"; \
read SDKFLDR ; \
if [ ! -d $$SDKFLDR ] ; then \
echo "$$SDKFLDR is not a valid folder"; \
@ -211,10 +212,7 @@ $(OPENAL_LIB): $(OPENAL_TIMESTAMP)
cd ${OPENAL_DIR}; \
export APP_PLATFORM=${APP_PLATFORM}; \
export TARGET_ABI=${TARGET_ABI}; \
export TARGET_CFLAGS_ADDON="${TARGET_CFLAGS_ADDON}"; \
export TARGET_CXXFLAGS_ADDON="${TARGET_CXXFLAGS_ADDON}"; \
export COMPILER_VERSION=${COMPILER_VERSION}; \
${ANDROID_NDK}/ndk-build \
${ANDROID_NDK}/ndk-build NDEBUG=${NDEBUG} \
NDK_APPLICATION_MK=${ANDR_ROOT}/jni/Deps.mk || exit 1; \
touch ${OPENAL_TIMESTAMP}; \
touch ${OPENAL_TIMESTAMP_INT}; \
@ -285,7 +283,6 @@ openssl_download :
tar -xzf ${OPENSSL_BASEDIR}.tar.gz; \
cd ${OPENSSL_BASEDIR}; \
patch -p1 < ${ANDR_ROOT}/patches/openssl_arch.patch; \
sed -i 's/-mandroid //g' Configure; \
fi
openssl : $(OPENSSL_LIB)
@ -307,15 +304,11 @@ $(OPENSSL_LIB): $(OPENSSL_TIMESTAMP)
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
--platform=${APP_PLATFORM} \
--stl=libc++ \
--install-dir=$${TOOLCHAIN}; \
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
export CFLAGS="$${CFLAGS} ${TARGET_CFLAGS_ADDON}"; \
export LDFLAGS="$${LDFLAGS} ${TARGET_LDFLAGS_ADDON}"; \
CC=${CROSS_CC} ./Configure -DL_ENDIAN no-asm android-${TARGET_ARCH} \
-D__ANDROID_API__=$(API); \
CC=${CROSS_CC} ANDROID_DEV=/tmp/ndk-${TARGET_HOST} make depend; \
CC=${CROSS_CC} ANDROID_DEV=/tmp/ndk-${TARGET_HOST} make build_libs; \
CC=${CROSS_PREFIX}gcc ./Configure -DL_ENDIAN android-${TARGET_ARCH};\
CC=${CROSS_PREFIX}gcc ANDROID_DEV=/tmp/ndk-${TARGET_HOST} make depend; \
CC=${CROSS_PREFIX}gcc ANDROID_DEV=/tmp/ndk-${TARGET_HOST} make build_libs; \
touch ${OPENSSL_TIMESTAMP}; \
touch ${OPENSSL_TIMESTAMP_INT}; \
$(RM) -rf $${TOOLCHAIN}; \
@ -357,18 +350,17 @@ $(LEVELDB_LIB): $(LEVELDB_TIMESTAMP)
if [ $$REFRESH -ne 0 ] ; then \
echo "changed timestamp for leveldb detected building..."; \
cd deps/leveldb; \
export CROSS_PREFIX=${TARGET_TOOLCHAIN}; \
export CROSS_PREFIX=${CROSS_PREFIX}; \
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-leveldb; \
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
--platform=${APP_PLATFORM} \
--stl=libc++ \
--install-dir=$${TOOLCHAIN}; \
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
export CC=${CROSS_CC}; \
export CXX=${CROSS_CXX}; \
export CC=${CROSS_PREFIX}gcc; \
export CXX=${CROSS_PREFIX}g++; \
export CFLAGS="$${CFLAGS} ${TARGET_CFLAGS_ADDON}"; \
export CPPFLAGS="$${CPPFLAGS} ${TARGET_CXXFLAGS_ADDON}"; \
export CPPFLAGS="$${CPPFLAGS} ${TARGET_CXXFLAGS_ADDON}"; \
export LDFLAGS="$${LDFLAGS} ${TARGET_LDFLAGS_ADDON}"; \
export TARGET_OS=OS_ANDROID_CROSSCOMPILE; \
$(MAKE) || exit 1; \
@ -381,7 +373,7 @@ $(LEVELDB_LIB): $(LEVELDB_TIMESTAMP)
endif
clean_leveldb :
./gradlew cleanLevelDB
$(RM) -rf deps/leveldb
$(FREETYPE_TIMESTAMP) : freetype_download
@LAST_MODIF=$$(find ${FREETYPE_DIR} -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "); \
@ -416,10 +408,7 @@ $(FREETYPE_LIB) : $(FREETYPE_TIMESTAMP)
cd ${FREETYPE_DIR}/Android/jni; \
export APP_PLATFORM=${APP_PLATFORM}; \
export TARGET_ABI=${TARGET_ABI}; \
export TARGET_CFLAGS_ADDON="${TARGET_CFLAGS_ADDON}"; \
export TARGET_CXXFLAGS_ADDON="${TARGET_CXXFLAGS_ADDON}"; \
export COMPILER_VERSION=${COMPILER_VERSION}; \
${ANDROID_NDK}/ndk-build \
${ANDROID_NDK}/ndk-build NDEBUG=${NDEBUG} \
NDK_APPLICATION_MK=${ANDR_ROOT}/jni/Deps.mk || exit 1; \
touch ${FREETYPE_TIMESTAMP}; \
touch ${FREETYPE_TIMESTAMP_INT}; \
@ -428,7 +417,7 @@ $(FREETYPE_LIB) : $(FREETYPE_TIMESTAMP)
fi
clean_freetype :
./gradlew cleanFreetype
$(RM) -rf ${FREETYPE_DIR}
$(ICONV_TIMESTAMP) : iconv_download
@LAST_MODIF=$$(find ${ICONV_DIR} -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "); \
@ -445,6 +434,9 @@ iconv_download :
tar -xzf libiconv-${ICONV_VERSION}.tar.gz || exit 1; \
rm libiconv-${ICONV_VERSION}.tar.gz; \
ln -s libiconv-${ICONV_VERSION} libiconv; \
cd ${ICONV_DIR}; \
patch -p1 < ${ANDR_ROOT}/patches/libiconv_android.patch; \
patch -p1 < ${ANDR_ROOT}/patches/libiconv_stdio.patch; \
fi
iconv : $(ICONV_LIB)
@ -464,17 +456,16 @@ $(ICONV_LIB) : $(ICONV_TIMESTAMP)
mkdir -p ${ICONV_DIR}; \
echo "changed timestamp for iconv detected building..."; \
cd ${ICONV_DIR}; \
\
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-iconv; \
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
--platform=${APP_PLATFORM} \
--stl=libc++ \
--install-dir=$${TOOLCHAIN}; \
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
export CFLAGS="$${CFLAGS} ${TARGET_CFLAGS_ADDON}"; \
export LDFLAGS="$${LDFLAGS} ${TARGET_LDFLAGS_ADDON} -lstdc++"; \
export CC=${CROSS_CC}; \
export CXX=${CROSS_CXX}; \
export CC=${CROSS_PREFIX}gcc; \
export CXX=${CROSS_PREFIX}g++; \
export TARGET_OS=OS_ANDROID_CROSSCOMPILE; \
./configure --host=${TARGET_HOST} || exit 1; \
sed -i 's/LIBICONV_VERSION_INFO) /LIBICONV_VERSION_INFO) -avoid-version /g' lib/Makefile; \
@ -488,7 +479,7 @@ $(ICONV_LIB) : $(ICONV_TIMESTAMP)
fi
clean_iconv :
./gradlew cleanIconv
$(RM) -rf ${ICONV_DIR}
#Note: Texturehack patch is required for gpu's not supporting color format
# correctly. Known bad GPU:
@ -533,11 +524,8 @@ $(IRRLICHT_LIB): $(IRRLICHT_TIMESTAMP) $(FREETYPE_LIB)
cd deps/irrlicht/source/Irrlicht/Android; \
export APP_PLATFORM=${APP_PLATFORM}; \
export TARGET_ABI=${TARGET_ABI}; \
export TARGET_CFLAGS_ADDON="${TARGET_CFLAGS_ADDON}"; \
export TARGET_CXXFLAGS_ADDON="${TARGET_CXXFLAGS_ADDON}"; \
export COMPILER_VERSION=${COMPILER_VERSION}; \
${ANDROID_NDK}/ndk-build \
NDK_APPLICATION_MK=${ANDR_ROOT}/jni/Deps.mk || exit 1; \
${ANDROID_NDK}/ndk-build NDEBUG=${NDEBUG} \
NDK_APPLICATION_MK=${ANDR_ROOT}/jni/Irrlicht.mk || exit 1; \
touch ${IRRLICHT_TIMESTAMP}; \
touch ${IRRLICHT_TIMESTAMP_INT}; \
else \
@ -545,7 +533,7 @@ $(IRRLICHT_LIB): $(IRRLICHT_TIMESTAMP) $(FREETYPE_LIB)
fi
clean_irrlicht :
./gradlew cleanIrrlicht
$(RM) -rf deps/irrlicht
$(CURL_TIMESTAMP) : curl_download
@LAST_MODIF=$$(find ${CURL_DIR} -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "); \
@ -581,16 +569,15 @@ $(CURL_LIB): $(CURL_TIMESTAMP) $(OPENSSL_LIB)
mkdir -p ${CURL_DIR}; \
echo "changed timestamp for curl detected building..."; \
cd deps/curl-${CURL_VERSION}; \
export CROSS_PREFIX=${TARGET_TOOLCHAIN}; \
export CROSS_PREFIX=${CROSS_PREFIX}; \
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-curl; \
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
--platform=${APP_PLATFORM} \
--stl=libc++ \
--install-dir=$${TOOLCHAIN}; \
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
export CC=${CROSS_CC}; \
export CXX=${CROSS_CXX}; \
export CC=${CROSS_PREFIX}gcc; \
export CXX=${CROSS_PREFIX}g++; \
export TARGET_OS=OS_ANDROID_CROSSCOMPILE; \
export CPPFLAGS="$${CPPFLAGS} -I${OPENSSL_DIR}/include ${TARGET_CFLAGS_ADDON}"; \
export CFLAGS="$${CFLAGS} ${TARGET_CFLAGS_ADDON}"; \
@ -605,7 +592,8 @@ $(CURL_LIB): $(CURL_TIMESTAMP) $(OPENSSL_LIB)
fi
clean_curl :
./gradlew cleanCURL
$(RM) -rf deps/curl-${CURL_VERSION} \
$(RM) -f deps/curl
sqlite3_download: deps/${SQLITE3_FOLDER}/sqlite3.c
@ -617,7 +605,8 @@ deps/${SQLITE3_FOLDER}/sqlite3.c :
cd ${SQLITE3_FOLDER};
clean_sqlite3:
./gradlew cleanSQLite3
cd deps && $(RM) -rf ${SQLITE3_FOLDER} && $(RM) -f ${SQLITE3_FOLDER}.zip && \
$(RM) -f sqlite
$(ASSETS_TIMESTAMP) : $(IRRLICHT_LIB)
@mkdir -p ${ANDR_ROOT}/deps; \
@ -659,7 +648,26 @@ assets : $(ASSETS_TIMESTAMP)
if [ $$REFRESH -ne 0 ] ; then \
echo "assets changed, refreshing..."; \
$(MAKE) clean_assets; \
./gradlew copyAssets; \
mkdir -p ${APP_ROOT}/assets/Minetest; \
cp ${PROJ_ROOT}/minetest.conf.example ${APP_ROOT}/assets/Minetest; \
cp ${PROJ_ROOT}/README.txt ${APP_ROOT}/assets/Minetest; \
cp -r ${PROJ_ROOT}/builtin ${APP_ROOT}/assets/Minetest; \
mkdir -p ${APP_ROOT}/assets/Minetest/client; \
cp -r ${PROJ_ROOT}/client/shaders ${APP_ROOT}/assets/Minetest/client; \
cp ${PROJ_ROOT}/doc/lgpl-2.1.txt ${APP_ROOT}/assets/Minetest/LICENSE.txt; \
mkdir -p ${APP_ROOT}/assets/Minetest/fonts; \
cp -r ${PROJ_ROOT}/fonts/*.ttf ${APP_ROOT}/assets/Minetest/fonts/; \
mkdir -p ${APP_ROOT}/assets/Minetest/games; \
for game in ${GAMES_TO_COPY}; do \
cp -r ${PROJ_ROOT}/games/$$game ${APP_ROOT}/assets/Minetest/games/; \
done; \
mkdir -p ${APP_ROOT}/assets/Minetest/mods; \
for mod in ${MODS_TO_COPY}; do \
cp -r ${PROJ_ROOT}/mods/$$mod ${APP_ROOT}/assets/Minetest/mods/; \
done; \
cp -r ${PROJ_ROOT}/po ${APP_ROOT}/assets/Minetest; \
cp -r ${PROJ_ROOT}/textures ${APP_ROOT}/assets/Minetest; \
mkdir -p ${APP_ROOT}/assets/Minetest/media; \
cp -r ${IRRLICHT_DIR}/media/Shaders ${APP_ROOT}/assets/Minetest/media; \
cd ${APP_ROOT}/assets || exit 1; \
find . -name "timestamp" -exec rm {} \; ; \
@ -676,7 +684,7 @@ assets : $(ASSETS_TIMESTAMP)
fi
clean_assets :
./gradlew cleanAssets
@$(RM) -r ${APP_ROOT}/assets
apk: local.properties assets $(ICONV_LIB) $(IRRLICHT_LIB) $(CURL_LIB) $(LEVELDB_TARGET) \
$(OPENAL_LIB) $(OGG_LIB) prep_srcdir $(ANDR_ROOT)/jni/src/android_version.h \
@ -685,44 +693,44 @@ apk: local.properties assets $(ICONV_LIB) $(IRRLICHT_LIB) $(CURL_LIB) $(LEVELDB_
export HAVE_LEVELDB=${HAVE_LEVELDB}; \
export APP_PLATFORM=${APP_PLATFORM}; \
export TARGET_ABI=${TARGET_ABI}; \
export TARGET_CFLAGS_ADDON="${TARGET_CFLAGS_ADDON}"; \
export TARGET_CXXFLAGS_ADDON="${TARGET_CXXFLAGS_ADDON}"; \
export COMPILER_VERSION=${COMPILER_VERSION}; \
export GPROF=${GPROF}; \
${ANDROID_NDK}/ndk-build || exit 1; \
if [ ! -e ${APP_ROOT}/jniLibs ]; then \
ln -s ${ANDR_ROOT}/libs ${APP_ROOT}/jniLibs || exit 1; \
ln -s ${ANDR_ROOT}/libs ${APP_ROOT}/jniLibs || exit 1; \
fi; \
export VERSION_STR="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" && \
export BUILD_TYPE_C=$$(echo "$${BUILD_TYPE}" | sed 's/./\U&/') && \
./gradlew assemble$$BUILD_TYPE_C && \
echo "APK stored at: build/outputs/apk/$$BUILD_TYPE/Minetest-$$BUILD_TYPE.apk" && \
echo "APK stored at: build/outputs/apk/Minetest-$$BUILD_TYPE.apk" && \
echo "You can install it with \`make install_$$BUILD_TYPE\`"
# These Intentionally doesn't depend on their respective build steps,
# because it takes a while to verify that everything's up-to-date.
install_debug:
${ANDROID_SDK}/platform-tools/adb install -r build/outputs/apk/debug/Minetest-debug.apk
${ANDROID_SDK}/platform-tools/adb install -r build/outputs/apk/Minetest-debug.apk
install_release:
${ANDROID_SDK}/platform-tools/adb install -r build/outputs/apk/release/Minetest-release.apk
${ANDROID_SDK}/platform-tools/adb install -r build/outputs/apk/Minetest-release.apk
prep_srcdir :
@if [ ! -e ${ANDR_ROOT}/jni/src ]; then \
ln -s ${PROJ_ROOT}/src ${ANDR_ROOT}/jni/src; \
ln -s ${PROJ_ROOT}/src ${ANDR_ROOT}/jni/src; \
fi; \
if [ ! -e ${ANDR_ROOT}/jni/lib ]; then \
ln -s ${PROJ_ROOT}/lib ${ANDR_ROOT}/jni/lib; \
ln -s ${PROJ_ROOT}/lib ${ANDR_ROOT}/jni/lib; \
fi
clean_apk :
./gradlew clean
clean_all :
./gradlew cleanAll
@$(MAKE) clean_apk; \
$(MAKE) clean_assets clean_iconv clean_irrlicht clean_leveldb clean_curl \
clean_openssl clean_openal clean_ogg; \
sleep 1; \
$(RM) -r gen libs obj deps bin Debug and_env
$(ANDR_ROOT)/jni/src/android_version_githash.h : prep_srcdir
@export VERSION_FILE=${ANDR_ROOT}/jni/src/android_version_githash.h; \
@export VERSION_FILE=${ANDR_ROOT}/jni/src/android_version_githash.h; \
export VERSION_FILE_NEW=$${VERSION_FILE}.new; \
{ \
echo "#ifndef ANDROID_MT_VERSION_GITHASH_H"; \

View File

@ -1,52 +1,48 @@
buildscript {
repositories {
google()
maven { url 'https://maven.google.com' }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
classpath 'com.android.tools.build:gradle:3.1.3'
}
}
allprojects {
repositories {
google()
maven { url 'https://maven.google.com' }
jcenter()
}
}
def curl_version = "7.60.0"
def gmp_version = "6.1.2"
def irrlicht_revision = "5150"
def openal_version = "1.18.2"
def openssl_version = "1.0.2n"
def sqlite3_version = "3240000"
def sqlite3_version = "3260000"
apply plugin: "com.android.application"
android {
compileSdkVersion 29
buildToolsVersion '29.0.2'
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
versionCode 26
versionCode 22
versionName "${System.env.VERSION_STR}.${versionCode}"
minSdkVersion 14
targetSdkVersion 29
targetSdkVersion 28
applicationId "net.minetest.minetest"
manifestPlaceholders = [package: "net.minetest.minetest", project: project.name]
ndk {
// Specifies the ABI configurations of your native
// libraries Gradle should build and package with your APK.
// abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
abiFilters 'armeabi-v7a', 'x86', 'arm64-v8a'
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64',
'arm64-v8a'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
disable "OldTargetApi", "GoogleAppIndexingWarning"
}
@ -76,48 +72,6 @@ task cleanAssets(type: Delete) {
delete 'src/main/assets'
}
task copyAssets {
dependsOn 'cleanAssets'
mkdir "src/main/assets"
def mtAssetsFolder = "src/main/assets/Minetest"
def projRoot = "../.."
def gameToCopy = "minetest_game"
doLast {
mkdir "${mtAssetsFolder}"
mkdir "${mtAssetsFolder}/client"
mkdir "${mtAssetsFolder}/fonts"
mkdir "${mtAssetsFolder}/games"
mkdir "${mtAssetsFolder}/media"
copy {
from "${projRoot}/minetest.conf.example", "${projRoot}/README.md" into mtAssetsFolder
}
copy {
from "${projRoot}/doc/lgpl-2.1.txt" into "${mtAssetsFolder}/LICENSE.txt"
}
copy {
from "${projRoot}/builtin" into "${mtAssetsFolder}/builtin"
}
copy {
from "${projRoot}/client/shaders" into "${mtAssetsFolder}/client/shaders"
}
copy {
from "${projRoot}/fonts" include "*.ttf" into "${mtAssetsFolder}/fonts"
}
copy {
from "${projRoot}/games/${gameToCopy}" into "${mtAssetsFolder}/games/${gameToCopy}"
}
copy {
from "${projRoot}/po" into "${mtAssetsFolder}/po"
}
copy {
from "${projRoot}/textures" into "${mtAssetsFolder}/textures"
}
}
}
task cleanIconv(type: Delete) {
delete 'deps/libiconv'
}
@ -158,9 +112,14 @@ task cleanSQLite3(type: Delete) {
delete 'deps/sqlite-amalgamation-' + sqlite3_version + '.zip'
}
task cleanGMP(type: Delete) {
delete 'deps/gmp'
delete 'deps/gmp-' + gmp_version
}
task cleanAll(type: Delete, dependsOn: [clean, cleanAssets, cleanIconv,
cleanFreetype, cleanIrrlicht, cleanLevelDB, cleanSQLite3, cleanCURL,
cleanOpenSSL, cleanOpenAL, cleanOgg]) {
cleanFreetype, cleanIrrlicht, cleanLevelDB, cleanSQLite3, cleanCURL,
cleanOpenSSL, cleanOpenAL, cleanOgg, cleanGMP]) {
delete 'deps'
delete 'gen'
delete 'libs'
@ -171,5 +130,5 @@ task cleanAll(type: Delete, dependsOn: [clean, cleanAssets, cleanIconv,
}
dependencies {
implementation 'androidx.core:core:1.1.0'
implementation 'com.android.support:support-v4:28.0.0'
}

View File

@ -1,2 +0,0 @@
android.enableJetifier=true
android.useAndroidX=true

View File

@ -1 +1,6 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
#Mon Oct 15 00:47:03 CEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip

View File

@ -1,411 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="aux_btn.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/aux_btn.png"
inkscape:export-xdpi="24.000002"
inkscape:export-ydpi="24.000002">
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4628">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4614" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4616" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1"
id="feFlood4618" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4620" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4622" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4624" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4626" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Sharpen More"
id="filter5109"
inkscape:menu="Image Effects"
inkscape:menu-tooltip="Sharpen edges and boundaries within the object, force=0.3">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5095" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5097" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,67,0)"
result="flood1"
id="feFlood5099" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5101" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5103" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5105" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="fbSourceGraphic"
id="feComposite5107" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5111" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5113"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5115"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5117"
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5119"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5121"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5123"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5125"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7007" />
<feConvolveMatrix
id="feConvolveMatrix7009"
order="3 3"
kernelMatrix="0 -0.15 0 -0.15 1.6 -0.15 0 -0.15 0"
divisor="1"
in="fbSourceGraphic"
targetX="1"
targetY="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7011" />
<feConvolveMatrix
id="feConvolveMatrix7013"
targetY="1"
targetX="1"
in="fbSourceGraphic"
divisor="1"
kernelMatrix="0 -0.3 0 -0.3 2.2 -0.3 0 -0.3 0"
order="3 3"
result="result1" />
<feBlend
in2="fbSourceGraphic"
id="feBlend7015"
mode="normal"
result="result2" />
</filter>
<marker
style="overflow:visible"
refY="0.0"
refX="0.0"
orient="auto"
id="DistanceX">
<path
id="path7410"
style="stroke:#000000; stroke-width:0.5"
d="M 3,-3 L -3,3 M 0,-5 L 0,5" />
</marker>
<pattern
y="0"
x="0"
width="8"
patternUnits="userSpaceOnUse"
id="Hatch"
height="8">
<path
id="path7413"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M8 4 l-4,4" />
<path
id="path7415"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M6 2 l-4,4" />
<path
id="path7417"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M4 0 l-4,4" />
</pattern>
<symbol
id="*Model_Space" />
<symbol
id="*Paper_Space" />
<symbol
id="*Paper_Space0" />
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4883">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4869" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4871" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,21,0)"
result="flood1"
id="feFlood4873" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4875" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4877" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4879" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4881" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="-341.34157"
inkscape:cy="210.02973"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:snap-grids="false"
inkscape:snap-page="true"
showguides="true"
inkscape:snap-bbox="true"
inkscape:snap-to-guides="true"
inkscape:snap-object-midpoints="false"
inkscape:snap-others="true"
inkscape:snap-bbox-midpoints="true">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="4"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline">
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7055"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7035"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7005"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path5127"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.47851181px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#d9d9d9;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
x="67.78315"
y="85.59491"
id="text4716"
transform="scale(1.0078883,0.99217343)"><tspan
sodipodi:role="line"
id="tspan4714"
x="67.78315"
y="85.59491"
style="fill:#d9d9d9;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">AUX</tspan></text>
<flowRoot
xml:space="preserve"
id="flowRoot4718"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"
transform="scale(0.26458333)"><flowRegion
id="flowRegion4720"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"><rect
id="rect4722"
width="157.5838"
height="136.37059"
x="264.65997"
y="124.10143"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" /></flowRegion><flowPara
id="flowPara4724" /></flowRoot> </g>
</svg>

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,108 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="camera_btn.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/camera_btn.png"
inkscape:export-xdpi="24"
inkscape:export-ydpi="24">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.56808712"
inkscape:cx="108.02318"
inkscape:cy="100.37635"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.52916666"
spacingy="0.52916666"
empspacing="4"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-161.53332)">
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:5.70848799;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 67.733332,254.66665 c 0,0 -8.668881,0 -18.300771,-3.15268 -9.631892,-3.1527 -18.2943,-9.47798 -24.078829,-22.06889 5.706713,-9.81112 13.792733,-18.56809 24.089264,-22.0987 9.587884,-3.28767 18.290339,-3.12291 18.290339,-3.12291 0,0 7.735344,-0.0794 18.31234,3.12292 9.690806,2.93407 18.313585,9.42827 24.067265,22.09869 -5.76759,12.59091 -14.445437,18.91619 -24.0777,22.06889 -9.63227,3.15268 -18.301908,3.15268 -18.301908,3.15268 z"
id="path58-3-6"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cscscscsc" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.73025268;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 64.488929,217.53903 c -0.857939,0.17659 0.965211,0.45252 1.127737,0.80919 3.74151,2.22182 4.135021,8.10158 0.722172,10.79555 -2.788479,2.49816 -7.570549,1.85517 -9.647324,-1.24231 -0.478813,6.23671 4.305402,12.62817 10.72756,13.07655 5.379142,0.53291 10.304075,-3.82096 11.146917,-9.02134 1.316631,-6.22759 -2.756791,-13.29903 -9.184051,-14.59275 -1.613453,-0.33844 -3.308229,-0.28143 -4.893011,0.17511 z"
id="path4487"
inkscape:connector-curvature="0" />
<ellipse
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4489"
cx="68.000587"
cy="229.40236"
rx="24.328558"
ry="24.538925" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -1,96 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="chat_btn.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/chat_btn.png"
inkscape:export-xdpi="24"
inkscape:export-ydpi="24">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="-49.76592"
inkscape:cy="230.35684"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="16"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-161.53332)">
<path
style="fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 38.099995,186.93332 H 97.36666 l 12.70001,13.36842 v 44.56141 l -12.095255,13.02565 -13.304754,13.71119 5e-6,-16.93334 H 38.1 l -12.7,-12.7 -5e-6,-41.66491 z"
id="path4573"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccc" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -1,139 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="chat_hide_btn.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/chat_hide_btn.png"
inkscape:export-xdpi="24"
inkscape:export-ydpi="24">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="122.83767"
inkscape:cy="254.28074"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="8"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-161.53332)"
style="display:inline">
<path
style="fill:none;stroke:#ffffff;stroke-width:22.67716599;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 352,96.000006 144,96 96,146.52539 V 304 l 24,24.00001 m 88,24 L 320,352 v 64 L 370.28516,364.17773 416,314.94727 V 146.52539"
transform="matrix(0.26458333,0,0,0.26458333,0,161.53332)"
id="path4573"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccc" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:6;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 38.1,199.63332 h 38.099999 v 8.46667 H 38.1 v -8.46667"
id="path4737"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:22.67716599;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 144,272 v 32 l 16,10e-6 32,-32 z m 128,0 -32,32 h 48 v -32 z"
transform="matrix(0.26458333,0,0,0.26458333,0,161.53332)"
id="path4737-5"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:22.67716599;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 256,208.00001 224,208 v 32 m 112,-32 -32,32 h 64 v -32 z"
transform="matrix(0.26458333,0,0,0.26458333,0,161.53332)"
id="path4737-6"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:22.67716599;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 304,144 v 16.00001 l 16,-16 z"
transform="matrix(0.26458333,0,0,0.26458333,0,161.53332)"
id="path4737-2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 38.1,216.56665 h 16.933333 v 8.46667 H 38.1 v -8.46667"
id="path4737-2-9"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 80.433332,233.49999 h 16.933333 v 8.46667 H 80.433332 v -8.46667"
id="path4737-2-1"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 23.283335,267.36666 4.23333,4.23333 88.900005,-88.9 -4.23333,-4.23333 z"
id="path4499"
inkscape:connector-curvature="0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -1,133 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="chat_show_btn.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/chat_show_btn.png"
inkscape:export-xdpi="24.000002"
inkscape:export-ydpi="24.000002">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="-52.637496"
inkscape:cy="236.47723"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
showguides="false">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="16"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-161.53332)">
<path
style="fill:none;stroke:#ffffff;stroke-width:6.15586996;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 38.099995,186.93332 H 97.36666 l 12.70001,13.36842 v 44.56141 l -12.095255,13.02565 -13.304754,13.71119 5e-6,-16.93334 H 38.1 l -12.7,-12.7 -5e-6,-41.66491 z"
id="path4573"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccc" />
<path
style="fill:none;fill-opacity:1;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 38.1,199.63332 h 38.099999 v 8.46667 H 38.1 v -8.46667"
id="path4737"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-opacity:1;stroke:none;stroke-width:0.30048177;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 38.1,233.49998 h 38.099999 v 8.46667 H 38.1 v -8.46667"
id="path4737-5"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-opacity:1;stroke:none;stroke-width:0.30048177;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 59.266666,216.56665 h 38.099999 v 8.46667 H 59.266666 v -8.46667"
id="path4737-6"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-opacity:1;stroke:none;stroke-width:0.20032115;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 80.433331,199.63332 h 16.933334 v 8.46667 H 80.433331 v -8.46667"
id="path4737-2"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-opacity:1;stroke:none;stroke-width:0.20032115;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 38.1,216.56665 h 16.933333 v 8.46667 H 38.1 v -8.46667"
id="path4737-2-9"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-opacity:1;stroke:none;stroke-width:0.20032115;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 80.433332,233.49999 h 16.933333 v 8.46667 H 80.433332 v -8.46667"
id="path4737-2-1"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.8897638;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 332.249,369.02277 c -0.0402,-18.48612 -0.4849,-21.66096 -3.48875,-24.9094 -3.91749,-4.23646 1.11742,-4.01917 -93.12942,-4.01917 h -86.6347 l -20.5311,-20.54025 -20.53109,-20.54025 0.0344,-73.92404 0.0344,-73.92403 20.50131,-21.579 20.50132,-21.57899 106.90272,-0.0281 106.90273,-0.0281 20.77585,21.85532 20.77584,21.85531 v 79.11261 79.1126 l -24.59489,26.35352 c -13.5272,14.49442 -29.74434,31.65707 -36.0381,38.13922 l -11.44321,11.78571 -0.0373,-17.14286 z m -43.95792,-81.07142 v -16.07143 l -72.32143,-0.18197 -72.32143,-0.18198 v 16.43538 16.43537 l 72.32143,-0.18197 72.32143,-0.18198 z m 80,0 v -16.07143 l -32.32143,-0.18585 -32.32143,-0.18585 v 16.44313 16.44312 l 32.32143,-0.18585 32.32143,-0.18585 z M 208.64822,224.02277 v -16.07142 h -32.5 -32.5 v 16.07142 16.07143 h 32.5 32.5 z m 160,0 v -16.07142 h -72.5 -72.5 v 16.07142 16.07143 h 72.5 72.5 z M 288.29108,160.0942 v -16.07143 l -72.32143,-0.18197 -72.32143,-0.18197 v 16.43537 16.43537 l 72.32143,-0.18197 72.32143,-0.18197 z m 80,0 v -16.07143 l -32.32143,-0.18585 -32.32143,-0.18585 v 16.44313 16.44313 l 32.32143,-0.18585 32.32143,-0.18585 z"
id="path5484"
inkscape:connector-curvature="0"
transform="matrix(0.26458333,0,0,0.26458333,0,161.53332)" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -1,93 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="checkbox_tick.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="-28.833943"
inkscape:cy="228.57143"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="16"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.1254902" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-161.53332)">
<path
style="fill:#1a1a1a;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 42.333333,284.29999 4.2333333,246.19999 21.166666,229.26665 42.333333,250.43332 114.3,178.46665 131.23333,195.39999 Z"
id="path14"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.0 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 21 KiB

View File

@ -1,542 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="down.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/down.png"
inkscape:export-xdpi="48.000004"
inkscape:export-ydpi="48.000004">
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4628">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4614" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4616" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1"
id="feFlood4618" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4620" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4622" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4624" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4626" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Sharpen More"
id="filter5109"
inkscape:menu="Image Effects"
inkscape:menu-tooltip="Sharpen edges and boundaries within the object, force=0.3">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5095" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5097" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,67,0)"
result="flood1"
id="feFlood5099" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5101" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5103" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5105" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="fbSourceGraphic"
id="feComposite5107" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5111" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5113"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5115"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5117"
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5119"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5121"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5123"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5125"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7007" />
<feConvolveMatrix
id="feConvolveMatrix7009"
order="3 3"
kernelMatrix="0 -0.15 0 -0.15 1.6 -0.15 0 -0.15 0"
divisor="1"
in="fbSourceGraphic"
targetX="1"
targetY="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7011" />
<feConvolveMatrix
id="feConvolveMatrix7013"
targetY="1"
targetX="1"
in="fbSourceGraphic"
divisor="1"
kernelMatrix="0 -0.3 0 -0.3 2.2 -0.3 0 -0.3 0"
order="3 3"
result="result1" />
<feBlend
in2="fbSourceGraphic"
id="feBlend7015"
mode="normal"
result="result2" />
</filter>
<marker
style="overflow:visible"
refY="0.0"
refX="0.0"
orient="auto"
id="DistanceX">
<path
id="path7410"
style="stroke:#000000; stroke-width:0.5"
d="M 3,-3 L -3,3 M 0,-5 L 0,5" />
</marker>
<pattern
y="0"
x="0"
width="8"
patternUnits="userSpaceOnUse"
id="Hatch"
height="8">
<path
id="path7413"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M8 4 l-4,4" />
<path
id="path7415"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M6 2 l-4,4" />
<path
id="path7417"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M4 0 l-4,4" />
</pattern>
<symbol
id="*Model_Space" />
<symbol
id="*Paper_Space" />
<symbol
id="*Paper_Space0" />
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4883">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4869" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4871" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,21,0)"
result="flood1"
id="feFlood4873" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4875" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4877" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4879" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4881" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5059">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5045" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5047" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,14,0)"
result="flood1"
id="feFlood5049" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5051" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5053" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5055" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5057" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5227">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5213" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5215" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1"
id="feFlood5217" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5219" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5221" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5223" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5225" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5418">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5404" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5406" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1"
id="feFlood5408" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5410" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5412" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5414" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5416" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.49497475"
inkscape:cx="-237.64887"
inkscape:cy="241.15373"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:snap-grids="false"
inkscape:snap-page="true"
showguides="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="true">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="4"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline">
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7055"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7035"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7005"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path5127"
inkscape:connector-curvature="0" />
<flowRoot
xml:space="preserve"
id="flowRoot4718"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"
transform="scale(0.26458333)"><flowRegion
id="flowRegion4720"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"><rect
id="rect4722"
width="157.5838"
height="136.37059"
x="264.65997"
y="124.10143"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" /></flowRegion><flowPara
id="flowPara4724" /></flowRoot> <path
style="display:inline;fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 17.018648,43.065371 V 56.520637 L 67.733324,92.401356 118.44801,56.520637 V 43.065371 Z"
id="path5426"
inkscape:connector-curvature="0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,173 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="drop_btn.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/drop_btn.png"
inkscape:export-xdpi="24.000002"
inkscape:export-ydpi="24.000002">
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4628">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4614" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4616" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1"
id="feFlood4618" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4620" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4622" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4624" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4626" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.49497475"
inkscape:cx="-435.15132"
inkscape:cy="209.28829"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:snap-grids="true"
inkscape:snap-page="true"
showguides="false">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="4"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline">
<path
style="fill:#ffffff;fill-opacity:0.50196078;stroke:#ffffff;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 21.166666,29.761616 21.166667,-7.055555 21.166666,7.055555 -21.166666,8.338385 z"
id="path4693"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#ffffff;fill-opacity:0.25098039;stroke:#ffffff;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 21.166666,30.40303 v 26.939394 l 21.166667,7.69697 V 38.099999 Z"
id="path4699"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:0.0627451;stroke:#ffffff;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 42.333333,38.099999 v 26.939395 l 21.166666,-7.69697 V 30.40303 Z"
id="path4701"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 110.06667,110.06667 H 67.733332"
id="path4727"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 88.899999,97.366665 0,-16.933331 C 89.263773,55.921256 75.773505,47.130445 55.033333,46.566666"
id="path4729"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<path
style="fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 101.6,84.666667 -12.700001,12.699998 -12.7,-12.699998"
id="path4737"
inkscape:connector-curvature="0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -1,190 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="fast_btn.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/fast_btn.png"
inkscape:export-xdpi="24.000002"
inkscape:export-ydpi="24.000002">
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4628">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4614" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4616" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1"
id="feFlood4618" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4620" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4622" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4624" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4626" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="-123.33594"
inkscape:cy="234.93088"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:snap-grids="true"
inkscape:snap-page="true"
showguides="false">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="4"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline">
<path
style="fill:none;stroke:#ffffff;stroke-width:8;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 52.349702,78.770237 c 8.223364,2.478851 17.933206,1.627099 22.678571,-5.85863 L 86.367558,52.311904"
id="path4630"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<path
style="fill:none;stroke:#ffffff;stroke-width:8;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 99.195826,95.244627 C 95.407287,83.585464 90.120793,78.524425 79.752975,74.045534 L 90.856024,53.96555"
id="path4632"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<path
style="fill:none;stroke:#ffffff;stroke-width:8;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 64.539433,56.942114 c 4.52339,-7.945233 16.596076,-10.248496 24.001489,-4.535715 6.443481,4.79704 18.068938,2.827548 22.314838,-3.012345"
id="path4495"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<ellipse
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.947;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4496"
cx="95.061012"
cy="40.783634"
rx="6.9582553"
ry="7.1472435" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.22683655px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 47.624999,35.454168 1.058334,-1.5875 h 29.633333 l -0.921774,1.663097 z"
id="path4509"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.22683655px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 21.030106,52.841071 1.058334,-1.5875 h 29.633333 l -0.921774,1.663097 z"
id="path4509-3"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.22683655px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 29.496773,69.774404 1.058334,-1.5875 H 60.18844 l -0.921774,1.663097 z"
id="path4509-56"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.22683655px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 18.91344,88.824411 1.058334,-1.5875 h 29.633333 l -0.921774,1.66309 z"
id="path4509-2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.8 KiB

View File

@ -1,168 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="fly_btn.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/fly_btn.png"
inkscape:export-xdpi="24.000002"
inkscape:export-ydpi="24.000002">
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4628">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4614" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4616" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1"
id="feFlood4618" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4620" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4622" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4624" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4626" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="53.55965"
inkscape:cy="198.9488"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:snap-grids="false"
inkscape:snap-page="true"
showguides="false"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="true"
inkscape:snap-to-guides="false">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="4"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline">
<path
style="fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 25.670229,38.593108 109.83886,56.716287 83.057927,68.798408 75.262818,96.914386 71.580388,74.83947 44.799461,86.921586 25.670229,38.593108"
id="path4666"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 25.670229,38.593106 71.580388,74.839464"
id="path4668"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 25.670229,38.593106 83.057927,68.798404"
id="path4670"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 75.262817,96.914386 60.102847,80.880526"
id="path4672"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -1,194 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="gear_icon.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/gear_icon.png"
inkscape:export-xdpi="24"
inkscape:export-ydpi="24">
<defs
id="defs2">
<marker
style="overflow:visible"
refY="0.0"
refX="0.0"
orient="auto"
id="DistanceX">
<path
id="path4687"
style="stroke:#000000; stroke-width:0.5"
d="M 3,-3 L -3,3 M 0,-5 L 0,5" />
</marker>
<pattern
y="0"
x="0"
width="8"
patternUnits="userSpaceOnUse"
id="Hatch"
height="8">
<path
id="path4690"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M8 4 l-4,4" />
<path
id="path4692"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M6 2 l-4,4" />
<path
id="path4694"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M4 0 l-4,4" />
</pattern>
<marker
style="overflow:visible"
refY="0.0"
refX="0.0"
orient="auto"
id="DistanceX-3">
<path
id="path4756"
style="stroke:#000000; stroke-width:0.5"
d="M 3,-3 L -3,3 M 0,-5 L 0,5" />
</marker>
<pattern
y="0"
x="0"
width="8"
patternUnits="userSpaceOnUse"
id="Hatch-6"
height="8">
<path
id="path4759"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M8 4 l-4,4" />
<path
id="path4761"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M6 2 l-4,4" />
<path
id="path4763"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M4 0 l-4,4" />
</pattern>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.5"
inkscape:cx="-308.644"
inkscape:cy="171.10144"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:snap-page="true"
inkscape:snap-grids="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="false"
inkscape:snap-object-midpoints="true"
inkscape:snap-to-guides="false"
inkscape:showpageshadow="false"
inkscape:snap-smooth-nodes="true"
inkscape:object-nodes="false">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="2.1166666"
spacingy="2.1166666"
empspacing="2"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-161.53332)">
<g
id="g4792"
transform="matrix(0.68725287,0,0,0.65623884,67.477909,-509.24679)"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.74041259;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">
<g
id="g4772"
inkscape:label="OpenJsCad"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.74041259;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 256,80.943359 -8.28125,0.72461 -3.63477,5.410156 -5.61328,12.685547 -2.28906,9.259768 -0.35156,5.1875 0.0937,0.86133 0.70703,2.44726 0.60547,9.80664 -2.66602,5.47461 -21.5957,5.78711 -5.04492,-3.40625 -4.37696,-8.79687 -0.61132,-2.47071 -0.35157,-0.79297 -2.89648,-4.31836 -6.60938,-6.87304 -11.20507,-8.17969 -5.84961,-2.86719 -7.53516,3.51367 -6.80859,4.76954 -0.44336,6.50195 1.48047,13.79297 2.64453,9.16406 2.28906,4.66992 0.51172,0.69922 1.83398,1.76563 5.42774,8.18945 0.42773,6.07422 -15.81054,15.81445 -6.07032,-0.42773 -8.18945,-5.42969 -1.76367,-1.83399 -0.69922,-0.51171 -4.66992,-2.28907 -9.15821,-2.64843 -13.79297,-1.47852 -6.5,0.44141 -4.76757,6.8125 -3.51367,7.53515 2.86914,5.85157 8.17382,11.20703 6.87305,6.61132 4.31641,2.90039 0.79297,0.34961 2.4707,0.61133 8.79492,4.37696 3.4043,5.04687 -5.78516,21.60156 -5.47265,2.66602 -9.80469,-0.60547 -2.44727,-0.70703 -0.85937,-0.0918 -5.1875,0.35156 -9.257816,2.28907 -12.68164,5.61523 -5.408203,3.63281 -0.72461,8.28516 0.72461,8.28516 5.408203,3.63281 12.68164,5.61523 9.257816,2.28907 5.1875,0.35156 0.85937,-0.0918 2.44727,-0.70703 9.80469,-0.60547 5.47265,2.66602 5.78516,21.60156 -3.4043,5.04687 -8.79492,4.37696 -2.4707,0.61133 -0.79297,0.34961 -4.31641,2.90039 -6.87305,6.61132 -8.17382,11.20703 -2.86914,5.85157 3.51367,7.53515 4.76757,6.8125 6.5,0.44141 13.79297,-1.47852 9.15821,-2.64843 4.66992,-2.28907 0.69922,-0.50976 1.76367,-1.83594 8.18945,-5.42969 6.07032,-0.42773 15.81054,15.81445 -0.42773,6.07422 -5.42774,8.18945 -1.83398,1.76563 -0.51172,0.69922 -2.28906,4.66992 -2.64453,9.16406 -1.48047,13.79297 0.44336,6.50195 6.80859,4.76758 7.53516,3.51758 5.84961,-2.86914 11.20507,-8.17969 6.60938,-6.87304 2.89648,-4.31836 0.35157,-0.79297 0.61132,-2.47071 4.37696,-8.79687 5.04492,-3.40625 21.5957,5.78711 2.66602,5.47461 -0.60547,9.80664 -0.70703,2.44726 -0.0937,0.85938 0.35156,5.18945 2.28906,9.25977 5.61328,12.68555 3.63477,5.41015 8.28125,0.72461 8.28125,-0.72461 3.63477,-5.41015 5.61328,-12.68555 2.28906,-9.25977 0.35156,-5.18945 -0.0937,-0.85938 -0.70703,-2.44726 -0.60547,-9.80664 2.66602,-5.47461 21.5957,-5.78711 5.04492,3.40625 4.37696,8.79687 0.61132,2.47071 0.35157,0.79297 2.89648,4.31836 6.60938,6.87304 11.20507,8.17969 5.84961,2.86914 7.53516,-3.51758 6.80859,-4.76758 0.44336,-6.50195 -1.48047,-13.79297 -2.64453,-9.16406 -2.28906,-4.66992 -0.51172,-0.69922 -1.83398,-1.76563 -5.42774,-8.18945 -0.42773,-6.07422 15.81054,-15.81445 6.07032,0.42773 8.18945,5.42969 1.76367,1.83594 0.69922,0.50976 4.66992,2.28907 9.15821,2.64843 13.79297,1.47852 6.5,-0.44141 v -0.002 l 4.76757,-6.81055 3.51367,-7.53711 -2.86914,-5.85156 -8.17382,-11.20508 -6.87305,-6.61328 -4.31641,-2.89843 -0.79297,-0.34961 -2.4707,-0.61133 -8.79492,-4.37891 -3.4043,-5.04492 5.78516,-21.60352 5.47265,-2.66797 9.80469,0.60938 2.44727,0.70703 0.85937,0.0918 5.1875,-0.35156 9.25782,-2.28907 12.68164,-5.61718 5.4082,-3.63282 0.72461,-8.28515 -0.72461,-8.28321 -5.4082,-3.63476 -12.68164,-5.61524 -9.25782,-2.28711 -5.1875,-0.35351 -0.85937,0.0937 -2.44727,0.70508 -9.80469,0.60937 -5.47265,-2.66797 -5.78516,-21.59961 3.4043,-5.04882 8.79492,-4.37696 2.4707,-0.61133 0.79297,-0.35156 4.31641,-2.89844 6.87305,-6.61132 8.17382,-11.20703 2.86914,-5.85157 -3.51367,-7.53711 -4.76757,-6.81054 -6.5,-0.44336 -13.79297,1.48047 -9.15821,2.64648 -4.66992,2.28906 -0.69922,0.51172 -1.76367,1.83594 -8.18945,5.42773 -6.07032,0.42774 -15.81054,-15.81446 0.42773,-6.07226 5.42774,-8.18945 1.83398,-1.76563 0.51172,-0.69922 2.28906,-4.67187 2.64453,-9.16016 1.48047,-13.79492 -0.44336,-6.50195 -6.80859,-4.76954 -7.53516,-3.51562 -5.84961,2.87109 -11.20507,8.17578 -6.60938,6.875 -2.89648,4.31836 -0.35157,0.79102 -0.61132,2.47266 -4.37696,8.79687 -5.04492,3.4082 -21.5957,-5.79101 -2.66602,-5.47266 0.60547,-9.80664 0.70703,-2.44726 0.0937,-0.85938 -0.35156,-5.19141 -2.28906,-9.259761 -5.61328,-12.683594 -3.63477,-5.412109 z m 0,97.111331 A 77.946197,77.946197 0 0 1 333.94531,256 77.946197,77.946197 0 0 1 256,333.94531 77.946197,77.946197 0 0 1 178.05469,256 77.946197,77.946197 0 0 1 256,178.05469 Z"
transform="matrix(0.38495268,0,0,0.40318156,-98.176247,1022.1341)"
id="path4768"
inkscape:connector-curvature="0" />
</g>
<g
id="g4774"
inkscape:label="0"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.74041259;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 9.7 KiB

View File

@ -1,509 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="inventory_btn.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/inventory_btn.png"
inkscape:export-xdpi="24.000002"
inkscape:export-ydpi="24.000002">
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4628">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4614" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4616" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1"
id="feFlood4618" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4620" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4622" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4624" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4626" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Sharpen More"
id="filter5109"
inkscape:menu="Image Effects"
inkscape:menu-tooltip="Sharpen edges and boundaries within the object, force=0.3">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5095" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5097" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,67,0)"
result="flood1"
id="feFlood5099" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5101" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5103" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5105" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="fbSourceGraphic"
id="feComposite5107" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5111" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5113"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5115"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5117"
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5119"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5121"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5123"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5125"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7007" />
<feConvolveMatrix
id="feConvolveMatrix7009"
order="3 3"
kernelMatrix="0 -0.15 0 -0.15 1.6 -0.15 0 -0.15 0"
divisor="1"
in="fbSourceGraphic"
targetX="1"
targetY="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7011" />
<feConvolveMatrix
id="feConvolveMatrix7013"
targetY="1"
targetX="1"
in="fbSourceGraphic"
divisor="1"
kernelMatrix="0 -0.3 0 -0.3 2.2 -0.3 0 -0.3 0"
order="3 3"
result="result1" />
<feBlend
in2="fbSourceGraphic"
id="feBlend7015"
mode="normal"
result="result2" />
</filter>
<marker
style="overflow:visible"
refY="0.0"
refX="0.0"
orient="auto"
id="DistanceX">
<path
id="path7410"
style="stroke:#000000; stroke-width:0.5"
d="M 3,-3 L -3,3 M 0,-5 L 0,5" />
</marker>
<pattern
y="0"
x="0"
width="8"
patternUnits="userSpaceOnUse"
id="Hatch"
height="8">
<path
id="path7413"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M8 4 l-4,4" />
<path
id="path7415"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M6 2 l-4,4" />
<path
id="path7417"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M4 0 l-4,4" />
</pattern>
<symbol
id="*Model_Space" />
<symbol
id="*Paper_Space" />
<symbol
id="*Paper_Space0" />
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4883">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4869" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4871" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,21,0)"
result="flood1"
id="feFlood4873" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4875" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4877" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4879" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4881" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5059">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5045" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5047" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,14,0)"
result="flood1"
id="feFlood5049" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5051" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5053" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5055" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5057" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="51.254762"
inkscape:cy="221.96083"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:snap-grids="true"
inkscape:snap-page="true"
showguides="false">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="4"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Layer 3"
style="display:inline" />
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline">
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7055"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7035"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7005"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path5127"
inkscape:connector-curvature="0" />
<flowRoot
xml:space="preserve"
id="flowRoot4718"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"
transform="scale(0.26458333)"><flowRegion
id="flowRegion4720"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"><rect
id="rect4722"
width="157.5838"
height="136.37059"
x="264.65997"
y="124.10143"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" /></flowRegion><flowPara
id="flowPara4724" /></flowRoot> <rect
style="display:inline;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5028"
width="21.166668"
height="21.166664"
x="27.516666"
y="27.516668" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5028-6"
width="21.166668"
height="21.166664"
x="57.149998"
y="27.516668" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5028-2"
width="21.166668"
height="21.166664"
x="86.783333"
y="27.516668" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5028-1"
width="21.166668"
height="21.166664"
x="27.516665"
y="57.150002" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5028-6-7"
width="21.166668"
height="21.166664"
x="57.149998"
y="57.150002" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5028-2-8"
width="21.166668"
height="21.166664"
x="86.783333"
y="57.150002" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5028-5"
width="21.166668"
height="21.166664"
x="27.516666"
y="86.783333" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5028-6-74"
width="21.166668"
height="21.166664"
x="57.149998"
y="86.783333" />
<rect
style="display:inline;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5028-2-1"
width="21.166668"
height="21.166664"
x="86.783333"
y="86.783333" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,876 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="joystick_bg.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/joystick_bg.png"
inkscape:export-xdpi="144.00002"
inkscape:export-ydpi="144.00002">
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4628">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4614" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4616" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1"
id="feFlood4618" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4620" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4622" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4624" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4626" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Sharpen More"
id="filter5109"
inkscape:menu="Image Effects"
inkscape:menu-tooltip="Sharpen edges and boundaries within the object, force=0.3">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5095" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5097" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,67,0)"
result="flood1"
id="feFlood5099" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5101" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5103" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5105" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="fbSourceGraphic"
id="feComposite5107" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5111" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5113"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5115"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5117"
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5119"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5121"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5123"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5125"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7007" />
<feConvolveMatrix
id="feConvolveMatrix7009"
order="3 3"
kernelMatrix="0 -0.15 0 -0.15 1.6 -0.15 0 -0.15 0"
divisor="1"
in="fbSourceGraphic"
targetX="1"
targetY="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7011" />
<feConvolveMatrix
id="feConvolveMatrix7013"
targetY="1"
targetX="1"
in="fbSourceGraphic"
divisor="1"
kernelMatrix="0 -0.3 0 -0.3 2.2 -0.3 0 -0.3 0"
order="3 3"
result="result1" />
<feBlend
in2="fbSourceGraphic"
id="feBlend7015"
mode="normal"
result="result2" />
</filter>
<marker
style="overflow:visible"
refY="0.0"
refX="0.0"
orient="auto"
id="DistanceX">
<path
id="path7410"
style="stroke:#000000; stroke-width:0.5"
d="M 3,-3 L -3,3 M 0,-5 L 0,5" />
</marker>
<pattern
y="0"
x="0"
width="8"
patternUnits="userSpaceOnUse"
id="Hatch"
height="8">
<path
id="path7413"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M8 4 l-4,4" />
<path
id="path7415"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M6 2 l-4,4" />
<path
id="path7417"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M4 0 l-4,4" />
</pattern>
<symbol
id="*Model_Space" />
<symbol
id="*Paper_Space" />
<symbol
id="*Paper_Space0" />
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4883">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4869" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4871" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,21,0)"
result="flood1"
id="feFlood4873" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4875" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4877" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4879" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4881" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5059">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5045" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5047" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,14,0)"
result="flood1"
id="feFlood5049" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5051" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5053" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5055" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5057" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5227">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5213" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5215" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1"
id="feFlood5217" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5219" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5221" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5223" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5225" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5418">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5404" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5406" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1"
id="feFlood5408" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5410" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5412" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5414" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5416" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5914">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5900" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5902" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1"
id="feFlood5904" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5906" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5908" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5910" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="fbSourceGraphic"
id="feComposite5912" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5916" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5918"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5920"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5922"
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5924"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5926"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5928"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5930"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5932" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5934"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5936"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5938"
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5940"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5942"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5944"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5946"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5948" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5950"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5952"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5954"
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5956"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5958"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5960"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5962"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5964" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5966"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5968"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5970"
flood-opacity="1"
flood-color="rgb(159,28,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5972"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5974"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5976"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5978"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5980" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5982"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5984"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5986"
flood-opacity="1"
flood-color="rgb(159,28,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5988"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5990"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5992"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5994"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5996" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5998"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix6000"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood6002"
flood-opacity="1"
flood-color="rgb(159,0,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend6004"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend6006"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix6008"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite6010"
in="colormatrix2"
operator="in"
k2="1"
result="composite2" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="142.53646"
inkscape:cy="181.89104"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:snap-grids="false"
inkscape:snap-page="true"
showguides="true">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="4"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline">
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7055"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7035"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7005"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path5127"
inkscape:connector-curvature="0" />
<flowRoot
xml:space="preserve"
id="flowRoot4718"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"
transform="scale(0.26458333)"><flowRegion
id="flowRegion4720"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"><rect
id="rect4722"
width="157.5838"
height="136.37059"
x="264.65997"
y="124.10143"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" /></flowRegion><flowPara
id="flowPara4724" /></flowRoot> <circle
style="fill:#ffffff;fill-opacity:0.1254902;stroke:#ffffff;stroke-width:1.99994016;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.50196078"
id="path5898"
cx="67.733498"
cy="67.73317"
r="66.733528" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@ -1,877 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="joystick_center.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/joystick_center.png"
inkscape:export-xdpi="24.000002"
inkscape:export-ydpi="24.000002">
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4628">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4614" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4616" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1"
id="feFlood4618" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4620" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4622" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4624" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4626" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Sharpen More"
id="filter5109"
inkscape:menu="Image Effects"
inkscape:menu-tooltip="Sharpen edges and boundaries within the object, force=0.3">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5095" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5097" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,67,0)"
result="flood1"
id="feFlood5099" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5101" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5103" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5105" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="fbSourceGraphic"
id="feComposite5107" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5111" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5113"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5115"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5117"
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5119"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5121"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5123"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5125"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7007" />
<feConvolveMatrix
id="feConvolveMatrix7009"
order="3 3"
kernelMatrix="0 -0.15 0 -0.15 1.6 -0.15 0 -0.15 0"
divisor="1"
in="fbSourceGraphic"
targetX="1"
targetY="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7011" />
<feConvolveMatrix
id="feConvolveMatrix7013"
targetY="1"
targetX="1"
in="fbSourceGraphic"
divisor="1"
kernelMatrix="0 -0.3 0 -0.3 2.2 -0.3 0 -0.3 0"
order="3 3"
result="result1" />
<feBlend
in2="fbSourceGraphic"
id="feBlend7015"
mode="normal"
result="result2" />
</filter>
<marker
style="overflow:visible"
refY="0.0"
refX="0.0"
orient="auto"
id="DistanceX">
<path
id="path7410"
style="stroke:#000000; stroke-width:0.5"
d="M 3,-3 L -3,3 M 0,-5 L 0,5" />
</marker>
<pattern
y="0"
x="0"
width="8"
patternUnits="userSpaceOnUse"
id="Hatch"
height="8">
<path
id="path7413"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M8 4 l-4,4" />
<path
id="path7415"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M6 2 l-4,4" />
<path
id="path7417"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M4 0 l-4,4" />
</pattern>
<symbol
id="*Model_Space" />
<symbol
id="*Paper_Space" />
<symbol
id="*Paper_Space0" />
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4883">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4869" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4871" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,21,0)"
result="flood1"
id="feFlood4873" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4875" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4877" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4879" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4881" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5059">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5045" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5047" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,14,0)"
result="flood1"
id="feFlood5049" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5051" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5053" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5055" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5057" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5227">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5213" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5215" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1"
id="feFlood5217" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5219" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5221" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5223" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5225" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5418">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5404" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5406" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1"
id="feFlood5408" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5410" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5412" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5414" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5416" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5914">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5900" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5902" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1"
id="feFlood5904" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5906" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5908" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5910" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="fbSourceGraphic"
id="feComposite5912" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5916" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5918"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5920"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5922"
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5924"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5926"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5928"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5930"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5932" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5934"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5936"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5938"
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5940"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5942"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5944"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5946"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5948" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5950"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5952"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5954"
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5956"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5958"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5960"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5962"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5964" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5966"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5968"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5970"
flood-opacity="1"
flood-color="rgb(159,28,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5972"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5974"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5976"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5978"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5980" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5982"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5984"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5986"
flood-opacity="1"
flood-color="rgb(159,28,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5988"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5990"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5992"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5994"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5996" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5998"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix6000"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood6002"
flood-opacity="1"
flood-color="rgb(159,0,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend6004"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend6006"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix6008"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite6010"
in="colormatrix2"
operator="in"
k2="1"
result="composite2" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="170.02349"
inkscape:cy="266.32864"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:snap-grids="true"
inkscape:snap-page="true"
showguides="true">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="4"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline">
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7055"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7035"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7005"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path5127"
inkscape:connector-curvature="0" />
<flowRoot
xml:space="preserve"
id="flowRoot4718"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"
transform="scale(0.26458333)"><flowRegion
id="flowRegion4720"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"><rect
id="rect4722"
width="157.5838"
height="136.37059"
x="264.65997"
y="124.10143"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" /></flowRegion><flowPara
id="flowPara4724" /></flowRoot> <ellipse
style="display:inline;fill:#ffffff;fill-opacity:0.31372549;stroke:#ffffff;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.62745098"
id="path5898-8"
cx="67.733505"
cy="67.73317"
rx="64.816437"
ry="64.816429" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@ -1,882 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="joystick_off.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/joystick_off.png"
inkscape:export-xdpi="96.000008"
inkscape:export-ydpi="96.000008">
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4628">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4614" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4616" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1"
id="feFlood4618" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4620" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4622" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4624" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4626" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Sharpen More"
id="filter5109"
inkscape:menu="Image Effects"
inkscape:menu-tooltip="Sharpen edges and boundaries within the object, force=0.3">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5095" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5097" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,67,0)"
result="flood1"
id="feFlood5099" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5101" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5103" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5105" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="fbSourceGraphic"
id="feComposite5107" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5111" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5113"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5115"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5117"
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5119"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5121"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5123"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5125"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7007" />
<feConvolveMatrix
id="feConvolveMatrix7009"
order="3 3"
kernelMatrix="0 -0.15 0 -0.15 1.6 -0.15 0 -0.15 0"
divisor="1"
in="fbSourceGraphic"
targetX="1"
targetY="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7011" />
<feConvolveMatrix
id="feConvolveMatrix7013"
targetY="1"
targetX="1"
in="fbSourceGraphic"
divisor="1"
kernelMatrix="0 -0.3 0 -0.3 2.2 -0.3 0 -0.3 0"
order="3 3"
result="result1" />
<feBlend
in2="fbSourceGraphic"
id="feBlend7015"
mode="normal"
result="result2" />
</filter>
<marker
style="overflow:visible"
refY="0.0"
refX="0.0"
orient="auto"
id="DistanceX">
<path
id="path7410"
style="stroke:#000000; stroke-width:0.5"
d="M 3,-3 L -3,3 M 0,-5 L 0,5" />
</marker>
<pattern
y="0"
x="0"
width="8"
patternUnits="userSpaceOnUse"
id="Hatch"
height="8">
<path
id="path7413"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M8 4 l-4,4" />
<path
id="path7415"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M6 2 l-4,4" />
<path
id="path7417"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M4 0 l-4,4" />
</pattern>
<symbol
id="*Model_Space" />
<symbol
id="*Paper_Space" />
<symbol
id="*Paper_Space0" />
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4883">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4869" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4871" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,21,0)"
result="flood1"
id="feFlood4873" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4875" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4877" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4879" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4881" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5059">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5045" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5047" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,14,0)"
result="flood1"
id="feFlood5049" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5051" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5053" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5055" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5057" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5227">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5213" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5215" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1"
id="feFlood5217" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5219" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5221" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5223" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5225" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5418">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5404" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5406" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1"
id="feFlood5408" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5410" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5412" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5414" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5416" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5914">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5900" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5902" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1"
id="feFlood5904" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5906" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5908" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5910" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="fbSourceGraphic"
id="feComposite5912" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5916" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5918"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5920"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5922"
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5924"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5926"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5928"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5930"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5932" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5934"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5936"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5938"
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5940"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5942"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5944"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5946"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5948" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5950"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5952"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5954"
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5956"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5958"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5960"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5962"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5964" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5966"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5968"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5970"
flood-opacity="1"
flood-color="rgb(159,28,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5972"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5974"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5976"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5978"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5980" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5982"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5984"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5986"
flood-opacity="1"
flood-color="rgb(159,28,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5988"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5990"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5992"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5994"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5996" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5998"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix6000"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood6002"
flood-opacity="1"
flood-color="rgb(159,0,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend6004"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend6006"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix6008"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite6010"
in="colormatrix2"
operator="in"
k2="1"
result="composite2" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="1.1361742"
inkscape:cx="47.851245"
inkscape:cy="254.8605"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:snap-grids="true"
inkscape:snap-page="true"
showguides="true">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="4"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline">
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7055"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7035"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7005"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path5127"
inkscape:connector-curvature="0" />
<flowRoot
xml:space="preserve"
id="flowRoot4718"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"
transform="scale(0.26458333)"><flowRegion
id="flowRegion4720"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"><rect
id="rect4722"
width="157.5838"
height="136.37059"
x="264.65997"
y="124.10143"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" /></flowRegion><flowPara
id="flowPara4724" /></flowRoot> <circle
style="fill:none;fill-opacity:0.1254902;stroke:#ffffff;stroke-width:1.99994016;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.50196078"
id="path5898"
cx="67.731476"
cy="67.735199"
r="66.733528" />
<circle
style="display:inline;fill:#ffffff;fill-opacity:0.1254902;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.50196078"
id="path5898-8"
cx="68.06868"
cy="67.452492"
r="22.219723" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@ -1,547 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="jump_btn.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/jump_btn.png"
inkscape:export-xdpi="48.000004"
inkscape:export-ydpi="48.000004">
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4628">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4614" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4616" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1"
id="feFlood4618" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4620" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4622" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4624" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4626" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Sharpen More"
id="filter5109"
inkscape:menu="Image Effects"
inkscape:menu-tooltip="Sharpen edges and boundaries within the object, force=0.3">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5095" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5097" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,67,0)"
result="flood1"
id="feFlood5099" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5101" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5103" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5105" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="fbSourceGraphic"
id="feComposite5107" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5111" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5113"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5115"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5117"
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5119"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5121"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5123"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5125"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7007" />
<feConvolveMatrix
id="feConvolveMatrix7009"
order="3 3"
kernelMatrix="0 -0.15 0 -0.15 1.6 -0.15 0 -0.15 0"
divisor="1"
in="fbSourceGraphic"
targetX="1"
targetY="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7011" />
<feConvolveMatrix
id="feConvolveMatrix7013"
targetY="1"
targetX="1"
in="fbSourceGraphic"
divisor="1"
kernelMatrix="0 -0.3 0 -0.3 2.2 -0.3 0 -0.3 0"
order="3 3"
result="result1" />
<feBlend
in2="fbSourceGraphic"
id="feBlend7015"
mode="normal"
result="result2" />
</filter>
<marker
style="overflow:visible"
refY="0.0"
refX="0.0"
orient="auto"
id="DistanceX">
<path
id="path7410"
style="stroke:#000000; stroke-width:0.5"
d="M 3,-3 L -3,3 M 0,-5 L 0,5" />
</marker>
<pattern
y="0"
x="0"
width="8"
patternUnits="userSpaceOnUse"
id="Hatch"
height="8">
<path
id="path7413"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M8 4 l-4,4" />
<path
id="path7415"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M6 2 l-4,4" />
<path
id="path7417"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M4 0 l-4,4" />
</pattern>
<symbol
id="*Model_Space" />
<symbol
id="*Paper_Space" />
<symbol
id="*Paper_Space0" />
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4883">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4869" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4871" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,21,0)"
result="flood1"
id="feFlood4873" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4875" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4877" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4879" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4881" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5059">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5045" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5047" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,14,0)"
result="flood1"
id="feFlood5049" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5051" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5053" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5055" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5057" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5227">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5213" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5215" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1"
id="feFlood5217" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5219" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5221" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5223" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5225" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5418">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5404" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5406" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1"
id="feFlood5408" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5410" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5412" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5414" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5416" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="128.02635"
inkscape:cy="237.11312"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:snap-grids="false"
inkscape:snap-page="true"
showguides="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="true">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="4"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Layer 3"
style="display:inline" />
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline">
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7055"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7035"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7005"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path5127"
inkscape:connector-curvature="0" />
<flowRoot
xml:space="preserve"
id="flowRoot4718"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"
transform="scale(0.26458333)"><flowRegion
id="flowRegion4720"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"><rect
id="rect4722"
width="157.5838"
height="136.37059"
x="264.65997"
y="124.10143"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" /></flowRegion><flowPara
id="flowPara4724" /></flowRoot> <path
style="display:inline;fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 17.018648,92.401289 V 78.946023 L 67.733324,43.065304 118.44801,78.946023 v 13.455266 z"
id="path5426"
inkscape:connector-curvature="0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,159 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="minimap_btn.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/minimap_btn.png"
inkscape:export-xdpi="24.000002"
inkscape:export-ydpi="24.000002">
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4628">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4614" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4616" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1"
id="feFlood4618" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4620" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4622" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4624" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4626" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.56808711"
inkscape:cx="140.1995"
inkscape:cy="242.801"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:snap-grids="true"
inkscape:snap-page="true"
showguides="false">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="4"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline">
<path
style="fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 25.4,25.400001 52.859457,36.945456 V 110.06667 L 25.4,98.521213 Z"
id="path4857"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="display:inline;fill:none;stroke:#ffffff;stroke-width:6;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 82.607193,25.496213 110.06667,37.041668 V 110.16289 L 82.607192,98.617425 Z"
id="path4857-9"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="display:inline;fill:#ffffff;fill-opacity:0.1254902;stroke:#ffffff;stroke-width:6;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 52.859457,36.900035 82.607203,25.400001 V 98.233546 L 52.859457,109.73359 Z"
id="path4857-1"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -1,173 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="noclip_btn.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/noclip_btn.png"
inkscape:export-xdpi="24.000002"
inkscape:export-ydpi="24.000002">
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4628">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4614" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4616" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1"
id="feFlood4618" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4620" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4622" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4624" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4626" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="166.57784"
inkscape:cy="222.80905"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:snap-grids="true"
inkscape:snap-page="true"
showguides="false">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="4"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline">
<path
style="fill:none;stroke:#ffffff;stroke-width:8;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 20.760344,79.838021 c 8.223364,2.478851 17.933206,1.627099 22.678571,-5.85863 L 54.7782,53.379688"
id="path4630"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<path
style="fill:none;stroke:#ffffff;stroke-width:8;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 67.606468,96.312411 C 63.817929,84.653248 58.531435,79.592209 48.163617,75.113318 L 59.266666,55.033334"
id="path4632"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<path
style="fill:none;stroke:#ffffff;stroke-width:8;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 32.950075,58.009898 c 4.52339,-7.945233 16.596076,-10.248496 24.001489,-4.535715 6.443481,4.79704 18.068938,2.827548 22.314838,-3.012345"
id="path4495"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<ellipse
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.94658476;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4496"
cx="63.471653"
cy="41.851418"
rx="6.9582553"
ry="7.1472435" />
<rect
style="fill:#ffffff;fill-opacity:0.25098041;stroke:#ffffff;stroke-width:1.668;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4645"
width="71.966667"
height="76.199997"
x="41.166401"
y="29.295174" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -1,456 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="rangeview_btn.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/rangeview_btn.png"
inkscape:export-xdpi="24.000002"
inkscape:export-ydpi="24.000002">
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4628">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4614" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4616" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1"
id="feFlood4618" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4620" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4622" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4624" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4626" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Sharpen More"
id="filter5109"
inkscape:menu="Image Effects"
inkscape:menu-tooltip="Sharpen edges and boundaries within the object, force=0.3">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5095" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5097" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,67,0)"
result="flood1"
id="feFlood5099" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5101" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5103" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5105" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="fbSourceGraphic"
id="feComposite5107" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5111" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5113"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5115"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5117"
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5119"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5121"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5123"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5125"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7007" />
<feConvolveMatrix
id="feConvolveMatrix7009"
order="3 3"
kernelMatrix="0 -0.15 0 -0.15 1.6 -0.15 0 -0.15 0"
divisor="1"
in="fbSourceGraphic"
targetX="1"
targetY="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7011" />
<feConvolveMatrix
id="feConvolveMatrix7013"
targetY="1"
targetX="1"
in="fbSourceGraphic"
divisor="1"
kernelMatrix="0 -0.3 0 -0.3 2.2 -0.3 0 -0.3 0"
order="3 3"
result="result1" />
<feBlend
in2="fbSourceGraphic"
id="feBlend7015"
mode="normal"
result="result2" />
</filter>
<marker
style="overflow:visible"
refY="0.0"
refX="0.0"
orient="auto"
id="DistanceX">
<path
id="path7410"
style="stroke:#000000; stroke-width:0.5"
d="M 3,-3 L -3,3 M 0,-5 L 0,5" />
</marker>
<pattern
y="0"
x="0"
width="8"
patternUnits="userSpaceOnUse"
id="Hatch"
height="8">
<path
id="path7413"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M8 4 l-4,4" />
<path
id="path7415"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M6 2 l-4,4" />
<path
id="path7417"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M4 0 l-4,4" />
</pattern>
<symbol
id="*Model_Space" />
<symbol
id="*Paper_Space" />
<symbol
id="*Paper_Space0" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="166.63539"
inkscape:cy="248.08632"
inkscape:document-units="mm"
inkscape:current-layer="svg8"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:snap-grids="false"
inkscape:snap-page="true"
showguides="false">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="4"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline">
<path
style="fill:#ffffff;stroke-width:1;stroke:#ffffff;stroke-opacity:1;fill-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d=""
id="path7055"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;stroke-width:1;stroke:#ffffff;stroke-opacity:1;fill-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d=""
id="path7035"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;stroke-width:1;stroke:#ffffff;stroke-opacity:1;fill-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d=""
id="path7005"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;stroke-width:1;stroke:#ffffff;stroke-opacity:1;fill-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d=""
id="path5127"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:3.77952761;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 150.08631,391.94585 C 127.2399,389.49917 105.94293,375.91818 94.0332,356.20102 86.417382,343.59265 83.080086,330.51463 83.588961,315.27269 c 0.288383,-8.63772 1.22906,-14.19631 3.585813,-21.18907 0.744516,-2.20907 10.578738,-22.66466 21.853826,-45.45687 11.27509,-22.79221 22.70752,-45.91291 25.4054,-51.37934 5.65921,-11.46666 7.92364,-14.85355 13.47663,-20.15687 9.3888,-8.96668 21.0224,-13.60185 34.10046,-13.58663 15.57027,0.0181 29.17184,6.54335 38.91458,18.66892 4.42466,5.50682 7.71172,12.24131 9.40778,19.27457 l 1.32267,5.48487 1.89404,7.6e-4 c 1.80502,7.5e-4 1.89404,-0.0773 1.89404,-1.66087 0,-2.38449 1.37433,-7.32366 2.62141,-9.42102 4.34092,-7.30059 13.17739,-11.60831 20.98951,-10.23223 8.90426,1.56845 16.14022,8.89813 17.09233,17.31369 l 0.3384,2.99108 h 1.90437 1.90437 l 0.82037,-3.6618 c 1.97195,-8.80199 6.717,-17.42698 13.15423,-23.91027 6.44087,-6.48695 14.23724,-11.09036 22.74482,-13.4298 3.44476,-0.94724 5.34406,-1.11181 12.87945,-1.11592 8.2237,-0.004 9.15393,0.0921 13.36642,1.38764 11.19974,3.4445 21.27498,10.65667 27.47414,19.66684 2.43995,3.54634 51.82554,103.72263 53.56888,108.66187 4.86293,13.77773 5.3328,30.48234 1.25486,44.6126 -7.75149,26.85937 -29.41571,46.87461 -57.03616,52.69485 -7.41065,1.56158 -20.20927,1.68497 -27.769,0.2677 -10.44443,-1.95808 -21.29618,-6.51537 -29.79851,-12.51414 -5.61285,-3.96011 -13.68691,-11.97138 -17.55818,-17.42164 -5.93008,-8.3488 -10.31705,-18.5166 -12.57558,-29.14677 -0.9513,-4.47749 -1.12676,-7.36003 -1.388,-22.80306 l -0.29904,-17.67767 -1.72317,-3.17794 c -1.98763,-3.66567 -6.54416,-8.1288 -10.17974,-9.97108 -3.00155,-1.521 -7.96438,-2.74331 -11.17947,-2.75342 -9.0329,-0.0284 -18.18038,5.63658 -22.00735,13.62902 l -1.57171,3.28243 -0.0408,14.1427 c -0.0539,18.69996 -0.78106,24.89804 -4.07384,34.72632 -2.2638,6.75698 -4.66197,11.60267 -8.86796,17.91843 -11.87929,17.83801 -31.39221,29.77252 -52.98796,32.40855 -4.28534,0.52308 -12.49549,0.62647 -16.41498,0.20673 z m 17.51181,-12.02116 c 24.5782,-3.98628 44.48858,-21.86418 50.90845,-45.71164 7.03076,-26.11666 -3.52165,-54.08171 -26.00322,-68.91142 -18.6353,-12.29256 -42.96948,-13.7508 -62.79635,-3.7631 -6.56442,3.3068 -10.82228,6.4025 -16.2475,11.81283 -12.18826,12.1548 -18.426507,27.20212 -18.426507,44.44671 0,16.25308 5.718027,30.90801 16.717117,42.84489 8.79197,9.54157 22.47266,17.01469 34.80066,19.00997 2.08344,0.33719 4.129,0.67988 4.54569,0.76152 2.33806,0.45809 12.52096,0.15587 16.50166,-0.48976 z m 199.67098,-0.46635 c 21.74737,-4.70543 39.22231,-19.90775 46.64822,-40.58158 4.67986,-13.02877 4.67986,-29.12861 0,-42.15737 -9.00601,-25.07287 -32.72555,-41.79925 -59.27512,-41.79925 -29.97234,0 -55.28352,20.70748 -61.73156,50.50356 -0.78837,3.64299 -1.03837,6.62229 -1.03837,12.37437 0,8.49596 0.94045,14.06163 3.61188,21.37559 7.82601,21.42637 26.67144,37.08767 49.05652,40.76791 5.46425,0.89835 17.52859,0.64186 22.72843,-0.48323 z M 237.11052,255.93654 c 2.061,-5.80288 9.76676,-11.6013 16.44795,-12.37673 8.46341,-0.98229 17.00015,3.70335 20.60499,11.30963 1.35941,2.86835 1.5302,3.0277 3.27087,3.05174 l 1.83657,0.0254 0.37277,-13.91749 c 0.20502,-7.65462 0.25259,-14.81346 0.10571,-15.90854 -0.81263,-6.05855 -6.90622,-13.74979 -13.24302,-16.71514 -12.19154,-5.70511 -26.74913,-0.60024 -32.61887,11.43837 -1.71657,3.52062 -1.72459,3.57069 -1.90176,11.8693 -0.0979,4.58356 -0.0177,11.79984 0.17822,16.03617 l 0.35614,7.70241 h 1.84858 c 1.76097,0 1.89091,-0.11919 2.74185,-2.51507 z"
id="path7617"
inkscape:connector-curvature="0"
transform="scale(0.26458333)" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:3.77952761;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 226.35138,166.86581 c -8.68374,-8.45091 -19.24579,-14.06812 -31.56582,-16.78764 -1.94455,-0.42924 -6.62953,-0.91183 -10.41107,-1.07243 l -6.87554,-0.29199 3.79476,-8.23483 c 4.15041,-9.00661 6.33398,-12.02822 10.83115,-14.98806 5.73143,-3.77218 12.11755,-5.07486 18.37716,-3.74869 6.79635,1.43989 12.12205,4.97666 15.80992,10.49928 3.65897,5.47936 4.06888,7.72634 4.43093,24.289 0.17485,7.99863 0.22458,14.53663 0.11051,14.52888 -0.11408,-0.008 -2.13997,-1.89483 -4.502,-4.19352 z"
id="path7619"
inkscape:connector-curvature="0"
transform="scale(0.26458333)" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:3.77952761;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 281.04946,156.67874 c 0.29695,-15.67547 0.53041,-17.35662 3.11733,-22.44879 1.64145,-3.23106 6.08971,-7.81924 9.49653,-9.79523 1.32451,-0.76823 4.2792,-1.87338 6.56599,-2.45589 3.62852,-0.92429 4.68255,-0.99503 8.28005,-0.55573 6.90922,0.84371 13.7575,4.77525 17.28082,9.92078 1.38217,2.01854 8.14389,16.19869 8.14389,17.07872 0,0.2351 -2.10238,0.42837 -4.67196,0.42949 -8.99282,0.004 -18.25222,2.12274 -26.55807,6.0773 -7.17709,3.41713 -11.63607,6.48677 -17.19557,11.83773 l -4.73649,4.55883 z"
id="path7621"
inkscape:connector-curvature="0"
transform="scale(0.26458333)" />
</g>
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Layer 3"
style="display:inline" />
<g
id="g7475"
inkscape:label="0"
transform="matrix(0.14221997,0,0,0.14221997,-31.981034,55.479631)"
style="stroke:#ffffff;stroke-width:7.03136135;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round">
<path
id="path7425"
style="fill:none;stroke:#ffffff;stroke-width:7.03136135;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round"
d="m 394.42769,131.14785 a 142.37722,142.37722 0 1 0 266.38087,69.95976"
inkscape:connector-curvature="0" />
<path
id="path7433"
style="fill:none;stroke:#ffffff;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round;stroke-linecap:round"
d="M 658.56907,-59.664378 A 115.98533,115.98533 0 0 0 548.79351,-108.70519 m 108.73351,-11.03878 1.04205,60.079592 m -1.04205,-60.079592 a 49.685709,49.685709 0 0 0 -92.6985,-23.81259 m 0,0 -16.03501,34.85137" />
<path
id="path7435"
style="fill:none;stroke:#ffffff;stroke-width:7.03136135;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round"
d="m 660.1707,35.074784 0.45347,54.803856"
inkscape:connector-curvature="0" />
<path
id="path7437"
style="fill:none;stroke:#ffffff;stroke-width:7.03136135;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round"
d="M 474.48909,-30.517229 387.62757,144.87909"
inkscape:connector-curvature="0" />
<path
id="path7439"
style="fill:none;stroke:#ffffff;stroke-width:7.03136135;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round"
d="M 659.19164,-5.530313 A 96.39108,96.39108 0 0 0 474.48909,-30.517229"
inkscape:connector-curvature="0" />
<path
id="path7441"
style="fill:none;stroke:#ffffff;stroke-width:7.03136135;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round"
d="M 740.97478,202.17383 A 142.37722,142.37722 0 1 0 1007.3517,131.14785"
inkscape:connector-curvature="0" />
<path
id="path7449"
style="fill:none;stroke:#ffffff;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round;stroke-linecap:round"
d="m 852.98584,-108.70519 a 115.98533,115.98533 0 0 0 -109.77556,49.040812 m 1.04205,-60.079592 -1.04205,60.079592 m 93.74055,-83.892182 a 49.685709,49.685709 0 0 0 -92.6985,23.81259 m 92.6985,-23.81259 16.03501,34.85137" />
<path
id="path7451"
style="fill:none;stroke:#ffffff;stroke-width:7.03136135;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round"
d="m 741.61776,33.973249 -0.4549,54.976979"
inkscape:connector-curvature="0" />
<path
id="path7453"
style="fill:none;stroke:#ffffff;stroke-width:7.03136135;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round"
d="M 927.29026,-30.517229 1014.1518,144.87909"
inkscape:connector-curvature="0" />
<path
id="path7455"
style="fill:none;stroke:#ffffff;stroke-width:7.03136135;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round"
d="M 927.29026,-30.517229 A 96.39108,96.39108 0 0 0 742.8897,-7.745832"
inkscape:connector-curvature="0" />
<path
id="path7457"
style="fill:none;stroke:#ffffff;stroke-width:7.03136135;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round"
d="M 741.16286,88.950228 A 41.867624,41.867624 0 0 0 660.62417,89.87864"
inkscape:connector-curvature="0" />
<path
id="path7459"
style="fill:none;stroke:#ffffff;stroke-width:7.03136135;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round"
d="m 740.61905,154.67245 a 41.867624,41.867624 0 0 0 -79.45215,0.79683"
inkscape:connector-curvature="0" />
<path
id="path7461"
style="fill:none;stroke:#ffffff;stroke-width:7.03136135;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round"
d="m 742.8897,-7.745832 a 41.867624,41.867624 0 1 0 -83.69806,2.215519"
inkscape:connector-curvature="0" />
<path
id="path7463"
style="fill:none;stroke:#ffffff;stroke-width:7.03136135;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round"
d="M 741.61776,33.973249 A 41.867624,41.867624 0 0 0 660.1707,35.074784"
inkscape:connector-curvature="0" />
<path
id="path7465"
style="fill:none;stroke:#ffffff;stroke-width:7.03136135;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round"
d="m 660.80856,201.10761 0.35834,-45.63833"
inkscape:connector-curvature="0" />
<path
id="path7467"
style="fill:none;stroke:#ffffff;stroke-width:7.03136135;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round"
d="m 740.97478,202.17383 -0.35573,-47.50138"
inkscape:connector-curvature="0" />
<path
id="path7471"
style="fill:none;stroke:#ffffff;stroke-width:7.03136135;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round"
d="m 631.81717,201.10761 a 113.38583,113.38583 0 1 0 -226.77166,0 113.38583,113.38583 0 1 0 226.77166,0 z"
inkscape:connector-curvature="0" />
<path
id="path7473"
style="fill:none;stroke:#ffffff;stroke-width:7.03136135;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;stroke-linejoin:round"
d="m 997.9874,201.10761 a 113.38583,113.38583 0 1 0 -226.77166,0 113.38583,113.38583 0 1 0 226.77166,0 z"
inkscape:connector-curvature="0" />
</g>
<path
id="path7469"
style="fill:#ffffff;stroke:#ffffff;stroke-width:0.5;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-opacity:1"
d="m 70.34536,79.242709 a 2.6876219,2.6876219 0 1 0 -5.375243,0 2.6876219,2.6876219 0 1 0 5.375243,0 z"
inkscape:connector-curvature="0" />
</svg>

Before

Width:  |  Height:  |  Size: 21 KiB

View File

@ -1,521 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="256"
height="512"
viewBox="0 0 67.73333 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="rare_controls.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/rare_controls.png"
inkscape:export-xdpi="24.000002"
inkscape:export-ydpi="24.000002">
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB"
inkscape:label="Colorize"
id="filter4628">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4614"
k3="0"
k4="0" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4616" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1"
id="feFlood4618" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4620" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4622" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4624" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
result="composite2"
id="feComposite4626" />
</filter>
<filter
style="color-interpolation-filters:sRGB"
inkscape:label="Sharpen More"
id="filter5109"
inkscape:menu="Image Effects"
inkscape:menu-tooltip="Sharpen edges and boundaries within the object, force=0.3">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5095"
k3="0"
k4="0" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5097" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,67,0)"
result="flood1"
id="feFlood5099" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5101" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5103" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5105" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
result="fbSourceGraphic"
id="feComposite5107" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5111" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5113"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic"
k3="0"
k4="0" />
<feColorMatrix
id="feColorMatrix5115"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5117"
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5119"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5121"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5123"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5125"
in="colormatrix2"
operator="in"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7007" />
<feConvolveMatrix
id="feConvolveMatrix7009"
order="3 3"
kernelMatrix="0 -0.15 0 -0.15 1.6 -0.15 0 -0.15 0"
divisor="1"
in="fbSourceGraphic"
targetX="1"
targetY="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7011" />
<feConvolveMatrix
id="feConvolveMatrix7013"
targetY="1"
targetX="1"
in="fbSourceGraphic"
divisor="1"
kernelMatrix="0 -0.3 0 -0.3 2.2 -0.3 0 -0.3 0"
order="3 3"
result="result1" />
<feBlend
in2="fbSourceGraphic"
id="feBlend7015"
mode="normal"
result="result2" />
</filter>
<marker
style="overflow:visible"
refY="0"
refX="0"
orient="auto"
id="DistanceX">
<path
id="path7410"
style="stroke:#000000;stroke-width:0.5"
d="M 3,-3 -3,3 M 0,-5 V 5"
inkscape:connector-curvature="0" />
</marker>
<pattern
y="0"
x="0"
width="8"
patternUnits="userSpaceOnUse"
id="Hatch"
height="8">
<path
id="path7413"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M8 4 l-4,4" />
<path
id="path7415"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M6 2 l-4,4" />
<path
id="path7417"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M4 0 l-4,4" />
</pattern>
<symbol
id="*Model_Space" />
<symbol
id="*Paper_Space" />
<symbol
id="*Paper_Space0" />
<filter
style="color-interpolation-filters:sRGB"
inkscape:label="Colorize"
id="filter4883">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4869"
k3="0"
k4="0" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4871" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,21,0)"
result="flood1"
id="feFlood4873" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4875" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4877" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4879" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
result="composite2"
id="feComposite4881" />
</filter>
<filter
style="color-interpolation-filters:sRGB"
inkscape:label="Colorize"
id="filter5059">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5045"
k3="0"
k4="0" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5047" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,14,0)"
result="flood1"
id="feFlood5049" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5051" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5053" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5055" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
result="composite2"
id="feComposite5057" />
</filter>
<filter
style="color-interpolation-filters:sRGB"
inkscape:label="Colorize"
id="filter5227">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5213"
k3="0"
k4="0" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5215" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1"
id="feFlood5217" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5219" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5221" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5223" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
result="composite2"
id="feComposite5225" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="-59.862018"
inkscape:cy="260.34663"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:snap-grids="true"
inkscape:snap-page="true"
showguides="false">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="4"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Layer 3"
style="display:inline" />
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline">
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7055"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7035"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7005"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path5127"
inkscape:connector-curvature="0" />
<flowRoot
xml:space="preserve"
id="flowRoot4718"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"
transform="scale(0.26458333)"><flowRegion
id="flowRegion4720"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"><rect
id="rect4722"
width="157.5838"
height="136.37059"
x="264.65997"
y="124.10143"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" /></flowRegion><flowPara
id="flowPara4724" /></flowRoot> <rect
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5231-9"
width="25.4"
height="25.400003"
x="21.166666"
y="101.6" />
<rect
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5231-9-7"
width="25.4"
height="25.400003"
x="21.166666"
y="55.033333" />
<rect
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5231-9-5"
width="25.4"
height="25.400003"
x="21.166664"
y="8.4666681" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,599 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="zoom.svg"
inkscape:export-filename="/home/stu/Desktop/icons/png/zoom.png"
inkscape:export-xdpi="24.000002"
inkscape:export-ydpi="24.000002">
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4628">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4614" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4616" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1"
id="feFlood4618" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4620" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4622" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4624" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4626" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Sharpen More"
id="filter5109"
inkscape:menu="Image Effects"
inkscape:menu-tooltip="Sharpen edges and boundaries within the object, force=0.3">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5095" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5097" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,67,0)"
result="flood1"
id="feFlood5099" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5101" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5103" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5105" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="fbSourceGraphic"
id="feComposite5107" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix5111" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5113"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
in="fbSourceGraphic" />
<feColorMatrix
id="feColorMatrix5115"
in="composite1"
values="1"
type="saturate"
result="colormatrix1" />
<feFlood
id="feFlood5117"
flood-opacity="1"
flood-color="rgb(158,0,0)"
result="flood1" />
<feBlend
in2="colormatrix1"
id="feBlend5119"
in="flood1"
mode="multiply"
result="blend1" />
<feBlend
in2="blend1"
id="feBlend5121"
mode="screen"
result="blend2" />
<feColorMatrix
id="feColorMatrix5123"
in="blend2"
values="1"
type="saturate"
result="colormatrix2" />
<feComposite
in2="fbSourceGraphic"
id="feComposite5125"
in="colormatrix2"
operator="in"
k2="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7007" />
<feConvolveMatrix
id="feConvolveMatrix7009"
order="3 3"
kernelMatrix="0 -0.15 0 -0.15 1.6 -0.15 0 -0.15 0"
divisor="1"
in="fbSourceGraphic"
targetX="1"
targetY="1"
result="fbSourceGraphic" />
<feColorMatrix
result="fbSourceGraphicAlpha"
in="fbSourceGraphic"
values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"
id="feColorMatrix7011" />
<feConvolveMatrix
id="feConvolveMatrix7013"
targetY="1"
targetX="1"
in="fbSourceGraphic"
divisor="1"
kernelMatrix="0 -0.3 0 -0.3 2.2 -0.3 0 -0.3 0"
order="3 3"
result="result1" />
<feBlend
in2="fbSourceGraphic"
id="feBlend7015"
mode="normal"
result="result2" />
</filter>
<marker
style="overflow:visible"
refY="0.0"
refX="0.0"
orient="auto"
id="DistanceX">
<path
id="path7410"
style="stroke:#000000; stroke-width:0.5"
d="M 3,-3 L -3,3 M 0,-5 L 0,5" />
</marker>
<pattern
y="0"
x="0"
width="8"
patternUnits="userSpaceOnUse"
id="Hatch"
height="8">
<path
id="path7413"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M8 4 l-4,4" />
<path
id="path7415"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M6 2 l-4,4" />
<path
id="path7417"
stroke-width="0.25"
stroke="#000000"
linecap="square"
d="M4 0 l-4,4" />
</pattern>
<symbol
id="*Model_Space" />
<symbol
id="*Paper_Space" />
<symbol
id="*Paper_Space0" />
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4883">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4869" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4871" />
<feFlood
flood-opacity="1"
flood-color="rgb(158,21,0)"
result="flood1"
id="feFlood4873" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4875" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4877" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4879" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4881" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5059">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5045" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5047" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,14,0)"
result="flood1"
id="feFlood5049" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5051" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5053" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5055" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5057" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5227">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5213" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5215" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1"
id="feFlood5217" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5219" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5221" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5223" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5225" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter5418">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite5404" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix5406" />
<feFlood
flood-opacity="1"
flood-color="rgb(159,21,0)"
result="flood1"
id="feFlood5408" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend5410" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend5412" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix5414" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite5416" />
</filter>
<filter
style="color-interpolation-filters:sRGB;"
inkscape:label="Colorize"
id="filter4664">
<feComposite
in2="SourceGraphic"
operator="arithmetic"
k1="0"
k2="1"
result="composite1"
id="feComposite4650" />
<feColorMatrix
in="composite1"
values="1"
type="saturate"
result="colormatrix1"
id="feColorMatrix4652" />
<feFlood
flood-opacity="1"
flood-color="rgb(255,0,0)"
result="flood1"
id="feFlood4654" />
<feBlend
in="flood1"
in2="colormatrix1"
mode="multiply"
result="blend1"
id="feBlend4656" />
<feBlend
in2="blend1"
mode="screen"
result="blend2"
id="feBlend4658" />
<feColorMatrix
in="blend2"
values="1"
type="saturate"
result="colormatrix2"
id="feColorMatrix4660" />
<feComposite
in="colormatrix2"
in2="SourceGraphic"
operator="in"
k2="1"
result="composite2"
id="feComposite4662" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#404040"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.7"
inkscape:cx="142.16849"
inkscape:cy="213.87961"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1023"
inkscape:window-x="0"
inkscape:window-y="34"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:snap-grids="true"
inkscape:snap-page="true"
showguides="true">
<inkscape:grid
type="xygrid"
id="grid16"
spacingx="0.26458333"
spacingy="0.26458333"
empspacing="4"
color="#40ff40"
opacity="0.1254902"
empcolor="#40ff40"
empopacity="0.25098039" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Layer 3"
style="display:inline" />
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline">
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7055"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7035"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path7005"
inkscape:connector-curvature="0" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d=""
id="path5127"
inkscape:connector-curvature="0" />
<flowRoot
xml:space="preserve"
id="flowRoot4718"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"
transform="scale(0.26458333)"><flowRegion
id="flowRegion4720"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"><rect
id="rect4722"
width="157.5838"
height="136.37059"
x="264.65997"
y="124.10143"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" /></flowRegion><flowPara
id="flowPara4724" /></flowRoot> <ellipse
style="display:inline;fill:none;fill-opacity:0.31372549;stroke:#ffffff;stroke-width:8;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4672"
cx="56.858261"
cy="57.228764"
rx="27.848776"
ry="27.594934" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:6;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 71.702072,80.367223 80.697906,71.427111 110.06667,101.6 l -8.73126,8.9401 z"
id="path4689"
inkscape:connector-curvature="0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@ -65,7 +65,6 @@ endif
LOCAL_CFLAGS := -D_IRR_ANDROID_PLATFORM_ \
-DHAVE_TOUCHSCREENGUI \
-DENABLE_GLES=1 \
-DUSE_CURL=1 \
-DUSE_SOUND=1 \
-DUSE_FREETYPE=1 \
@ -76,7 +75,7 @@ LOCAL_CFLAGS := -D_IRR_ANDROID_PLATFORM_ \
ifndef NDEBUG
LOCAL_CFLAGS += -g -D_DEBUG -O0 -fno-omit-frame-pointer
else
LOCAL_CFLAGS += $(TARGET_CFLAGS_ADDON)
LOCAL_CFLAGS += -O3
endif
ifdef GPROF
@ -87,7 +86,7 @@ endif
# LOCAL_CFLAGS += -fsanitize=address
# LOCAL_LDFLAGS += -fsanitize=address
ifeq ($(TARGET_ABI),x86)
ifeq ($(TARGET_ARCH_ABI),x86)
LOCAL_CFLAGS += -fno-stack-protector
endif
@ -109,134 +108,88 @@ LOCAL_C_INCLUDES := \
LOCAL_SRC_FILES := \
jni/src/ban.cpp \
jni/src/camera.cpp \
jni/src/cavegen.cpp \
jni/src/chat.cpp \
jni/src/client/activeobjectmgr.cpp \
jni/src/client/camera.cpp \
jni/src/client/client.cpp \
jni/src/client/clientenvironment.cpp \
jni/src/client/clientlauncher.cpp \
jni/src/client/clientmap.cpp \
jni/src/client/clientmedia.cpp \
jni/src/client/clientobject.cpp \
jni/src/client/clouds.cpp \
jni/src/client/content_cao.cpp \
jni/src/client/content_cso.cpp \
jni/src/client/content_mapblock.cpp \
jni/src/client/filecache.cpp \
jni/src/client/fontengine.cpp \
jni/src/client/game.cpp \
jni/src/client/gameui.cpp \
jni/src/client/guiscalingfilter.cpp \
jni/src/client/hud.cpp \
jni/src/client.cpp \
jni/src/clientenvironment.cpp \
jni/src/clientiface.cpp \
jni/src/client/imagefilters.cpp \
jni/src/client/inputhandler.cpp \
jni/src/client/joystick_controller.cpp \
jni/src/client/keycode.cpp \
jni/src/client/localplayer.cpp \
jni/src/client/mapblock_mesh.cpp \
jni/src/client/mesh.cpp \
jni/src/client/meshgen/collector.cpp \
jni/src/client/mesh_generator_thread.cpp \
jni/src/client/minimap.cpp \
jni/src/client/particles.cpp \
jni/src/client/render/anaglyph.cpp \
jni/src/client/render/core.cpp \
jni/src/client/render/factory.cpp \
jni/src/client/renderingengine.cpp \
jni/src/client/render/interlaced.cpp \
jni/src/client/render/pageflip.cpp \
jni/src/client/render/plain.cpp \
jni/src/client/render/sidebyside.cpp \
jni/src/client/render/stereo.cpp \
jni/src/client/shader.cpp \
jni/src/client/sky.cpp \
jni/src/client/sound.cpp \
jni/src/client/sound_openal.cpp \
jni/src/client/tile.cpp \
jni/src/client/wieldmesh.cpp \
jni/src/clientmap.cpp \
jni/src/clientmedia.cpp \
jni/src/clientobject.cpp \
jni/src/clouds.cpp \
jni/src/collision.cpp \
jni/src/content/content.cpp \
jni/src/content_abm.cpp \
jni/src/content_cao.cpp \
jni/src/content_cso.cpp \
jni/src/content_mapblock.cpp \
jni/src/content_mapnode.cpp \
jni/src/content/mods.cpp \
jni/src/content_nodemeta.cpp \
jni/src/content/packages.cpp \
jni/src/content_sao.cpp \
jni/src/content/subgames.cpp \
jni/src/convert_json.cpp \
jni/src/craftdef.cpp \
jni/src/database/database.cpp \
jni/src/database/database-dummy.cpp \
jni/src/database/database-files.cpp \
jni/src/database/database-leveldb.cpp \
jni/src/database/database-sqlite3.cpp \
jni/src/database-dummy.cpp \
jni/src/database-files.cpp \
jni/src/database-sqlite3.cpp \
jni/src/database.cpp \
jni/src/debug.cpp \
jni/src/defaultsettings.cpp \
jni/src/drawscene.cpp \
jni/src/dungeongen.cpp \
jni/src/emerge.cpp \
jni/src/environment.cpp \
jni/src/face_position_cache.cpp \
jni/src/filecache.cpp \
jni/src/filesys.cpp \
jni/src/fontengine.cpp \
jni/src/game.cpp \
jni/src/genericobject.cpp \
jni/src/gettext.cpp \
jni/src/gui/guiAnimatedImage.cpp \
jni/src/gui/guiBackgroundImage.cpp \
jni/src/gui/guiBox.cpp \
jni/src/gui/guiButton.cpp \
jni/src/gui/guiButtonImage.cpp \
jni/src/gui/guiButtonItemImage.cpp \
jni/src/gui/guiChatConsole.cpp \
jni/src/gui/guiConfirmRegistration.cpp \
jni/src/gui/guiEditBoxWithScrollbar.cpp \
jni/src/gui/guiEngine.cpp \
jni/src/gui/guiFormSpecMenu.cpp \
jni/src/gui/guiHyperText.cpp \
jni/src/gui/guiInventoryList.cpp \
jni/src/gui/guiItemImage.cpp \
jni/src/gui/guiKeyChangeMenu.cpp \
jni/src/gui/guiPasswordChange.cpp \
jni/src/gui/guiPathSelectMenu.cpp \
jni/src/gui/guiScrollBar.cpp \
jni/src/gui/guiSkin.cpp \
jni/src/gui/guiTable.cpp \
jni/src/gui/guiVolumeChange.cpp \
jni/src/gui/intlGUIEditBox.cpp \
jni/src/gui/modalMenu.cpp \
jni/src/gui/profilergraph.cpp \
jni/src/gui/touchscreengui.cpp \
jni/src/guiChatConsole.cpp \
jni/src/guiEngine.cpp \
jni/src/guiFileSelectMenu.cpp \
jni/src/guiFormSpecMenu.cpp \
jni/src/guiKeyChangeMenu.cpp \
jni/src/guiPasswordChange.cpp \
jni/src/guiTable.cpp \
jni/src/guiscalingfilter.cpp \
jni/src/guiVolumeChange.cpp \
jni/src/httpfetch.cpp \
jni/src/hud.cpp \
jni/src/imagefilters.cpp \
jni/src/intlGUIEditBox.cpp \
jni/src/inventory.cpp \
jni/src/inventorymanager.cpp \
jni/src/irrlicht_changes/CGUITTFont.cpp \
jni/src/irrlicht_changes/static_text.cpp \
jni/src/itemdef.cpp \
jni/src/itemstackmetadata.cpp \
jni/src/keycode.cpp \
jni/src/light.cpp \
jni/src/localplayer.cpp \
jni/src/log.cpp \
jni/src/main.cpp \
jni/src/mapblock.cpp \
jni/src/map.cpp \
jni/src/mapgen/cavegen.cpp \
jni/src/mapgen/dungeongen.cpp \
jni/src/mapgen/mapgen_carpathian.cpp \
jni/src/mapgen/mapgen.cpp \
jni/src/mapgen/mapgen_flat.cpp \
jni/src/mapgen/mapgen_fractal.cpp \
jni/src/mapgen/mapgen_singlenode.cpp \
jni/src/mapgen/mapgen_v5.cpp \
jni/src/mapgen/mapgen_v6.cpp \
jni/src/mapgen/mapgen_v7.cpp \
jni/src/mapgen/mapgen_valleys.cpp \
jni/src/mapgen/mg_biome.cpp \
jni/src/mapgen/mg_decoration.cpp \
jni/src/mapgen/mg_ore.cpp \
jni/src/mapgen/mg_schematic.cpp \
jni/src/mapgen/treegen.cpp \
jni/src/map_settings_manager.cpp \
jni/src/mapblock.cpp \
jni/src/mapblock_mesh.cpp \
jni/src/mapgen.cpp \
jni/src/mapgen_flat.cpp \
jni/src/mapgen_fractal.cpp \
jni/src/mapgen_singlenode.cpp \
jni/src/mapgen_v5.cpp \
jni/src/mapgen_v6.cpp \
jni/src/mapgen_v7.cpp \
jni/src/mapgen_valleys.cpp \
jni/src/mapnode.cpp \
jni/src/mapsector.cpp \
jni/src/map_settings_manager.cpp \
jni/src/mesh.cpp \
jni/src/mesh_generator_thread.cpp \
jni/src/metadata.cpp \
jni/src/modchannels.cpp \
jni/src/mg_biome.cpp \
jni/src/mg_decoration.cpp \
jni/src/mg_ore.cpp \
jni/src/mg_schematic.cpp \
jni/src/minimap.cpp \
jni/src/mods.cpp \
jni/src/nameidmapping.cpp \
jni/src/nodedef.cpp \
jni/src/nodemetadata.cpp \
@ -244,38 +197,56 @@ LOCAL_SRC_FILES := \
jni/src/noise.cpp \
jni/src/objdef.cpp \
jni/src/object_properties.cpp \
jni/src/particles.cpp \
jni/src/pathfinder.cpp \
jni/src/player.cpp \
jni/src/porting_android.cpp \
jni/src/porting.cpp \
jni/src/profiler.cpp \
jni/src/quicktune.cpp \
jni/src/raycast.cpp \
jni/src/reflowscan.cpp \
jni/src/remoteplayer.cpp \
jni/src/rollback.cpp \
jni/src/rollback_interface.cpp \
jni/src/serialization.cpp \
jni/src/server/activeobjectmgr.cpp \
jni/src/server.cpp \
jni/src/serverenvironment.cpp \
jni/src/serverlist.cpp \
jni/src/server/mods.cpp \
jni/src/serverobject.cpp \
jni/src/settings.cpp \
jni/src/shader.cpp \
jni/src/sky.cpp \
jni/src/socket.cpp \
jni/src/sound.cpp \
jni/src/sound_openal.cpp \
jni/src/staticobject.cpp \
jni/src/subgame.cpp \
jni/src/tileanimation.cpp \
jni/src/tool.cpp \
jni/src/translation.cpp \
jni/src/unittest/test_authdatabase.cpp \
jni/src/treegen.cpp \
jni/src/version.cpp \
jni/src/voxel.cpp \
jni/src/voxelalgorithms.cpp \
jni/src/util/areastore.cpp \
jni/src/util/auth.cpp \
jni/src/util/base64.cpp \
jni/src/util/directiontables.cpp \
jni/src/util/enriched_string.cpp \
jni/src/util/numeric.cpp \
jni/src/util/pointedthing.cpp \
jni/src/util/serialize.cpp \
jni/src/util/sha1.cpp \
jni/src/util/string.cpp \
jni/src/util/srp.cpp \
jni/src/util/timetaker.cpp \
jni/src/unittest/test.cpp \
jni/src/unittest/test_collision.cpp \
jni/src/unittest/test_compression.cpp \
jni/src/unittest/test_connection.cpp \
jni/src/unittest/test.cpp \
jni/src/unittest/test_filepath.cpp \
jni/src/unittest/test_gameui.cpp \
jni/src/unittest/test_inventory.cpp \
jni/src/unittest/test_mapnode.cpp \
jni/src/unittest/test_map_settings_manager.cpp \
jni/src/unittest/test_mapnode.cpp \
jni/src/unittest/test_nodedef.cpp \
jni/src/unittest/test_noderesolver.cpp \
jni/src/unittest/test_noise.cpp \
@ -289,38 +260,26 @@ LOCAL_SRC_FILES := \
jni/src/unittest/test_utilities.cpp \
jni/src/unittest/test_voxelalgorithms.cpp \
jni/src/unittest/test_voxelmanipulator.cpp \
jni/src/util/areastore.cpp \
jni/src/util/auth.cpp \
jni/src/util/base64.cpp \
jni/src/util/directiontables.cpp \
jni/src/util/enriched_string.cpp \
jni/src/util/ieee_float.cpp \
jni/src/util/numeric.cpp \
jni/src/util/pointedthing.cpp \
jni/src/util/quicktune.cpp \
jni/src/util/serialize.cpp \
jni/src/util/sha1.cpp \
jni/src/util/srp.cpp \
jni/src/util/string.cpp \
jni/src/util/timetaker.cpp \
jni/src/version.cpp \
jni/src/voxelalgorithms.cpp \
jni/src/voxel.cpp
jni/src/touchscreengui.cpp \
jni/src/database-leveldb.cpp \
jni/src/settings.cpp \
jni/src/wieldmesh.cpp \
jni/src/client/clientlauncher.cpp \
jni/src/client/inputhandler.cpp \
jni/src/client/tile.cpp \
jni/src/client/joystick_controller.cpp \
jni/src/irrlicht_changes/static_text.cpp
# intentionally kept out (we already build openssl itself): jni/src/util/sha256.c
# Network
LOCAL_SRC_FILES += \
jni/src/network/address.cpp \
jni/src/network/connection.cpp \
jni/src/network/networkpacket.cpp \
jni/src/network/clientopcodes.cpp \
jni/src/network/clientpackethandler.cpp \
jni/src/network/connectionthreads.cpp \
jni/src/network/serveropcodes.cpp \
jni/src/network/serverpackethandler.cpp \
jni/src/network/socket.cpp \
# lua api
LOCAL_SRC_FILES += \
@ -328,7 +287,6 @@ LOCAL_SRC_FILES += \
jni/src/script/common/c_converter.cpp \
jni/src/script/common/c_internal.cpp \
jni/src/script/common/c_types.cpp \
jni/src/script/common/helper.cpp \
jni/src/script/cpp_api/s_async.cpp \
jni/src/script/cpp_api/s_base.cpp \
jni/src/script/cpp_api/s_client.cpp \
@ -337,14 +295,12 @@ LOCAL_SRC_FILES += \
jni/src/script/cpp_api/s_inventory.cpp \
jni/src/script/cpp_api/s_item.cpp \
jni/src/script/cpp_api/s_mainmenu.cpp \
jni/src/script/cpp_api/s_modchannels.cpp \
jni/src/script/cpp_api/s_node.cpp \
jni/src/script/cpp_api/s_nodemeta.cpp \
jni/src/script/cpp_api/s_player.cpp \
jni/src/script/cpp_api/s_security.cpp \
jni/src/script/cpp_api/s_server.cpp \
jni/src/script/lua_api/l_areastore.cpp \
jni/src/script/lua_api/l_auth.cpp \
jni/src/script/lua_api/l_base.cpp \
jni/src/script/lua_api/l_camera.cpp \
jni/src/script/lua_api/l_client.cpp \
@ -358,14 +314,11 @@ LOCAL_SRC_FILES += \
jni/src/script/lua_api/l_mapgen.cpp \
jni/src/script/lua_api/l_metadata.cpp \
jni/src/script/lua_api/l_minimap.cpp \
jni/src/script/lua_api/l_modchannels.cpp \
jni/src/script/lua_api/l_nodemeta.cpp \
jni/src/script/lua_api/l_nodetimer.cpp \
jni/src/script/lua_api/l_noise.cpp \
jni/src/script/lua_api/l_object.cpp \
jni/src/script/lua_api/l_playermeta.cpp \
jni/src/script/lua_api/l_particles.cpp \
jni/src/script/lua_api/l_particles_local.cpp\
jni/src/script/lua_api/l_rollback.cpp \
jni/src/script/lua_api/l_server.cpp \
jni/src/script/lua_api/l_settings.cpp \
@ -379,7 +332,7 @@ LOCAL_SRC_FILES += \
jni/src/script/scripting_mainmenu.cpp
#freetype2 support
#LOCAL_SRC_FILES += jni/src/cguittfont/xCGUITTFont.cpp
LOCAL_SRC_FILES += jni/src/cguittfont/xCGUITTFont.cpp
# GMP
LOCAL_SRC_FILES += jni/lib/gmp/mini-gmp.c
@ -423,6 +376,7 @@ LOCAL_SRC_FILES += deps/sqlite/sqlite3.c
# Threading
LOCAL_SRC_FILES += \
jni/src/threading/event.cpp \
jni/src/threading/mutex.cpp \
jni/src/threading/semaphore.cpp \
jni/src/threading/thread.cpp

View File

@ -2,8 +2,5 @@ APP_PLATFORM := ${APP_PLATFORM}
APP_ABI := ${TARGET_ABI}
APP_STL := c++_shared
APP_MODULES := minetest
ifndef NDEBUG
APP_OPTIM := debug
endif
APP_CPPFLAGS += -fexceptions -std=c++11 -frtti
APP_CPPFLAGS += -fexceptions -frtti

View File

@ -3,5 +3,5 @@ APP_ABI := ${TARGET_ABI}
APP_STL := c++_shared
APP_DEPRECATED_HEADERS := true
APP_CFLAGS += ${TARGET_CFLAGS_ADDON}
APP_CPPFLAGS += ${TARGET_CXXFLAGS_ADDON} -fexceptions -std=c++11
APP_CFLAGS += -mfloat-abi=softfp -mfpu=vfpv3 -O3
APP_CPPFLAGS += -fexceptions

View File

@ -1,8 +1,8 @@
APP_PLATFORM := ${APP_PLATFORM}
APP_ABI := ${TARGET_ABI}
APP_STL := c++_shared
APP_STL := c++_static
APP_DEPRECATED_HEADERS := true
APP_MODULES := Irrlicht
APP_CLAFGS += ${TARGET_CFLAGS_ADDON}
APP_CPPFLAGS += ${TARGET_CXXFLAGS_ADDON} -fexceptions
APP_CFLAGS += -mfloat-abi=softfp -mfpu=vfpv3 -O3
APP_CPPFLAGS += -fexceptions

Binary file not shown.

View File

@ -1,5 +1,5 @@
--- irrlicht/source/Irrlicht/CEGLManager.cpp.orig 2018-09-11 18:19:51.453403631 +0300
+++ irrlicht/source/Irrlicht/CEGLManager.cpp 2018-09-11 18:36:24.603471869 +0300
--- irrlicht/source/Irrlicht/CEGLManager.cpp.orig 2018-06-10 16:58:11.357709173 +0200
+++ irrlicht/source/Irrlicht/CEGLManager.cpp 2018-06-10 16:58:25.100709843 +0200
@@ -9,6 +9,10 @@
#include "irrString.h"
#include "os.h"

View File

@ -0,0 +1,39 @@
--- a/libcharset/lib/localcharset.c 2015-06-10 11:55:25.933870724 +0200
+++ b/libcharset/lib/localcharset.c 2015-06-10 11:55:39.578063493 +0200
@@ -47,7 +47,7 @@
#if !defined WIN32_NATIVE
# include <unistd.h>
-# if HAVE_LANGINFO_CODESET
+# if HAVE_LANGINFO_CODESET && !(defined __ANDROID__)
# include <langinfo.h>
# else
# if 0 /* see comment below */
@@ -124,7 +124,7 @@ get_charset_aliases (void)
cp = charset_aliases;
if (cp == NULL)
{
-#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
+#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__ || defined __ANDROID__)
const char *dir;
const char *base = "charset.alias";
char *file_name;
@@ -338,6 +338,9 @@ get_charset_aliases (void)
"CP54936" "\0" "GB18030" "\0"
"CP65001" "\0" "UTF-8" "\0";
# endif
+# if defined __ANDROID__
+ cp = "*" "\0" "UTF-8" "\0";
+# endif
#endif
charset_aliases = cp;
@@ -361,7 +364,7 @@ locale_charset (void)
const char *codeset;
const char *aliases;
-#if !(defined WIN32_NATIVE || defined OS2)
+#if !(defined WIN32_NATIVE || defined OS2 || defined __ANDROID__)
# if HAVE_LANGINFO_CODESET

View File

@ -0,0 +1,13 @@
--- a/srclib/stdio.in.h 2011-08-07 15:42:06.000000000 +0200
+++ b/srclib/stdio.in.h 2015-06-10 09:27:58.129056262 +0200
@@ -695,8 +696,9 @@ _GL_CXXALIASWARN (gets);
/* It is very rare that the developer ever has full control of stdin,
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+/*_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");*/
+#define gets(a) fgets( a, sizeof(*(a)), stdin)
#endif
#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.SET_DEBUG_APP" />
</manifest>

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="net.minetest.minetest"
android:installLocation="auto">
@ -12,14 +11,14 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="${project}"
android:resizeableActivity="false"
tools:targetApi="n">
android:resizeableActivity="false">
<meta-data
android:name="android.max_aspect"
android:value="2.4" />
android:value="2.1" />
<activity
android:name=".MainActivity"
@ -51,10 +50,10 @@
android:name=".MinetestTextEntry"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/Theme.Dialog"
android:windowSoftInputMode="stateAlwaysHidden" />
android:windowSoftInputMode="stateAlwaysHidden"/>
<activity
android:name=".MinetestAssetCopy"
android:screenOrientation="sensorLandscape"
android:theme="@style/AppTheme" />
android:theme="@style/AppTheme"/>
</application>
</manifest>

View File

@ -6,17 +6,17 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class MainActivity extends Activity {
private final static int PERMISSIONS = 1;
private static final String[] REQUIRED_SDK_PERMISSIONS = new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE};
@ -30,8 +30,8 @@ public class MainActivity extends Activity {
}
}
private void checkPermission() {
final List<String> missingPermissions = new ArrayList<>();
protected void checkPermission() {
final List<String> missingPermissions = new ArrayList<String>();
// check required permission
for (final String permission : REQUIRED_SDK_PERMISSIONS) {
final int result = ContextCompat.checkSelfPermission(this, permission);
@ -42,7 +42,7 @@ public class MainActivity extends Activity {
if (!missingPermissions.isEmpty()) {
// request permission
final String[] permissions = missingPermissions
.toArray(new String[0]);
.toArray(new String[missingPermissions.size()]);
ActivityCompat.requestPermissions(this, permissions, PERMISSIONS);
} else {
final int[] grantResults = new int[REQUIRED_SDK_PERMISSIONS.length];
@ -53,23 +53,25 @@ public class MainActivity extends Activity {
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
public void onRequestPermissionsResult(int requestCode, @NonNull String permissions[],
@NonNull int[] grantResults) {
if (requestCode == PERMISSIONS) {
for (int index = 0; index < permissions.length; index++) {
if (grantResults[index] != PackageManager.PERMISSION_GRANTED) {
// permission not granted - toast and exit
Toast.makeText(this, R.string.not_granted, Toast.LENGTH_LONG).show();
finish();
return;
switch (requestCode) {
case PERMISSIONS:
for (int index = 0; index < permissions.length; index++) {
if (grantResults[index] != PackageManager.PERMISSION_GRANTED) {
// permission not granted - toast and exit
Toast.makeText(this, R.string.not_granted, Toast.LENGTH_LONG).show();
finish();
return;
}
}
}
// permission were granted - run
next();
// permission were granted - run
next();
break;
}
}
private void next() {
public void next() {
Intent intent = new Intent(this, MtNativeActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivity(intent);

View File

@ -1,6 +1,5 @@
package net.minetest.minetest;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.res.AssetFileDescriptor;
import android.os.AsyncTask;
@ -20,12 +19,13 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.util.Iterator;
import java.util.Vector;
public class MinetestAssetCopy extends Activity {
private ProgressBar m_ProgressBar;
private TextView m_Filename;
private copyAssetTask m_AssetCopy;
ProgressBar m_ProgressBar;
TextView m_Filename;
copyAssetTask m_AssetCopy;
@Override
public void onCreate(Bundle savedInstanceState) {
@ -54,25 +54,20 @@ public class MinetestAssetCopy extends Activity {
makeFullScreen();
}
@Override
protected void onDestroy() {
super.onDestroy();
if (m_AssetCopy != null) {
m_AssetCopy.cancel(true);
}
}
private void makeFullScreen() {
if (Build.VERSION.SDK_INT >= 19)
public void makeFullScreen() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
this.getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
);
}
}
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if (hasFocus)
if (hasFocus) {
makeFullScreen();
}
}
/* preserve asset copy background task to prevent restart of copying */
@ -82,7 +77,6 @@ public class MinetestAssetCopy extends Activity {
return this;
}
@SuppressLint("StaticFieldLeak")
private class copyAssetTask extends AsyncTask<String, Integer, String> {
boolean m_copy_started = false;
String m_Foldername = "media";
@ -97,7 +91,7 @@ public class MinetestAssetCopy extends Activity {
InputStream src = getAssets().open(filename);
byte[] buf = new byte[4096];
int len;
int len = 0;
while ((len = src.read(buf)) > 0) {
size += len;
}
@ -109,10 +103,10 @@ public class MinetestAssetCopy extends Activity {
@Override
protected String doInBackground(String... files) {
m_foldernames = new Vector<>();
m_filenames = new Vector<>();
m_tocopy = new Vector<>();
m_asset_size_unknown = new Vector<>();
m_foldernames = new Vector<String>();
m_filenames = new Vector<String>();
m_tocopy = new Vector<String>();
m_asset_size_unknown = new Vector<String>();
String baseDir =
Environment.getExternalStorageDirectory().getAbsolutePath()
+ "/";
@ -126,9 +120,9 @@ public class MinetestAssetCopy extends Activity {
} else {
File[] todel = TempFolder.listFiles();
for (File file : todel) {
Log.v("MinetestAssetCopy", "deleting: " + file.getAbsolutePath());
file.delete();
for (int i = 0; i < todel.length; i++) {
Log.v("MinetestAssetCopy", "deleting: " + todel[i].getAbsolutePath());
todel[i].delete();
}
}
@ -164,9 +158,9 @@ public class MinetestAssetCopy extends Activity {
if (m_asset_size_unknown.contains(filename)) {
File testme = new File(baseDir + "/" + filename);
if (testme.exists())
if (testme.exists()) {
filesize = testme.length();
}
asset_size_unknown = true;
}
@ -247,10 +241,12 @@ public class MinetestAssetCopy extends Activity {
protected void onProgressUpdate(Integer... progress) {
if (m_copy_started) {
boolean shortened = false;
String todisplay = m_tocopy.get(progress[0]);
m_ProgressBar.setProgress(progress[0]);
m_Filename.setText(todisplay);
} else {
boolean shortened = false;
String todisplay = m_Foldername;
String full_text = "scanning " + todisplay + " ...";
m_Filename.setText(full_text);
@ -260,11 +256,14 @@ public class MinetestAssetCopy extends Activity {
/**
* check all files and folders in filelist
*/
void ProcessFileList() {
protected void ProcessFileList() {
String FlashBaseDir =
Environment.getExternalStorageDirectory().getAbsolutePath();
for (String current_path : m_filenames) {
Iterator itr = m_filenames.iterator();
while (itr.hasNext()) {
String current_path = (String) itr.next();
String FlashPath = FlashBaseDir + "/" + current_path;
if (isAssetFolder(current_path)) {
@ -293,7 +292,7 @@ public class MinetestAssetCopy extends Activity {
File testme = new File(FlashPath);
long asset_filesize = -1;
long stored_filesize;
long stored_filesize = -1;
if (testme.exists()) {
try {
@ -301,6 +300,7 @@ public class MinetestAssetCopy extends Activity {
asset_filesize = fd.getLength();
fd.close();
} catch (IOException e) {
refresh = true;
m_asset_size_unknown.add(current_path);
Log.e("MinetestAssetCopy", "Failed to open asset file \"" +
FlashPath + "\" for size check");
@ -308,20 +308,22 @@ public class MinetestAssetCopy extends Activity {
stored_filesize = testme.length();
if (asset_filesize == stored_filesize)
if (asset_filesize == stored_filesize) {
refresh = false;
}
}
if (refresh)
if (refresh) {
m_tocopy.add(current_path);
}
}
}
/**
* read list of folders prepared on package build
*/
void BuildFolderList() {
protected void BuildFolderList() {
try {
InputStream is = getAssets().open("index.txt");
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
@ -341,7 +343,7 @@ public class MinetestAssetCopy extends Activity {
/**
* read list of asset files prepared on package build
*/
void BuildFileList() {
protected void BuildFileList() {
long entrycount = 0;
try {
InputStream is = getAssets().open("filelist.txt");
@ -364,7 +366,7 @@ public class MinetestAssetCopy extends Activity {
finish();
}
boolean isAssetFolder(String path) {
protected boolean isAssetFolder(String path) {
return m_foldernames.contains(path);
}
}

View File

@ -15,8 +15,8 @@ public class MinetestTextEntry extends Activity {
private final int MultiLineTextInput = 1;
private final int SingleLineTextInput = 2;
private final int SingleLinePasswordInput = 3;
private AlertDialog mTextInputDialog;
private EditText mTextInputWidget;
public AlertDialog mTextInputDialog;
public EditText mTextInputWidget;
@Override
public void onCreate(Bundle savedInstanceState) {
@ -71,7 +71,7 @@ public class MinetestTextEntry extends Activity {
mTextInputDialog.show();
}
private void pushResult(String text) {
public void pushResult(String text) {
Intent resultData = new Intent();
resultData.putExtra("text", text);
setResult(Activity.RESULT_OK, resultData);
@ -79,7 +79,7 @@ public class MinetestTextEntry extends Activity {
finish();
}
private void cancelDialog() {
public void cancelDialog() {
setResult(Activity.RESULT_CANCELED);
mTextInputDialog.dismiss();
finish();

View File

@ -26,7 +26,6 @@ public class MtNativeActivity extends NativeActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
m_MessagReturnCode = -1;
m_MessageReturnValue = "";
}
@ -37,17 +36,20 @@ public class MtNativeActivity extends NativeActivity {
makeFullScreen();
}
private void makeFullScreen() {
if (Build.VERSION.SDK_INT >= 19)
public void makeFullScreen() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
this.getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
);
}
}
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if (hasFocus)
if (hasFocus) {
makeFullScreen();
}
}
public void copyAssets() {

View File

@ -1,17 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<resources>
<style name="AppTheme" parent="android:Theme.Material.Light.NoActionBar.Fullscreen">
<style name="AppTheme" parent="@android:style/android:Theme.Material.Light.NoActionBar.Fullscreen">
<item name="android:windowNoTitle">true</item>
<item name="android:windowAnimationStyle">@null</item>
<item name="android:windowBackground">@drawable/bg</item>
<item name="android:windowLayoutInDisplayCutoutMode" tools:ignore="NewApi" tools:targetApi="o_mr1">
shortEdges
</item>
</style>
<style name="Theme.Dialog" parent="@android:style/Theme.Material.Light.Dialog.NoActionBar">
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>
<style name="Theme.Dialog" parent="@android:style/Theme.Material.Light.Dialog.NoActionBar"/>
</resources>

View File

@ -1,14 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="android:Theme.Holo.Light.NoActionBar.Fullscreen">
<style name="AppTheme" parent="@android:style/android:Theme.Holo.Light.NoActionBar.Fullscreen">
<item name="android:windowNoTitle">true</item>
<item name="android:windowAnimationStyle">@null</item>
<item name="android:windowBackground">@drawable/bg</item>
</style>
<style name="Theme.Dialog" parent="android:Theme.Holo.Light.Dialog.NoActionBar">
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>
<style name="Theme.Dialog" parent="@android:style/android:Theme.Holo.Light.Dialog.NoActionBar"/>
</resources>

View File

@ -1,7 +1,7 @@
-- Minetest: builtin/client/chatcommands.lua
core.register_on_sending_chat_message(function(message)
core.register_on_sending_chat_messages(function(message)
if message:sub(1,2) == ".." then
return false
end
@ -16,7 +16,7 @@ core.register_on_sending_chat_message(function(message)
end
local cmd, param = string.match(message, "^%.([^ ]+) *(.*)")
param = param or ""
param = param or ""
if not cmd then
core.display_chat_message(core.gettext("-!- Empty command"))
@ -26,9 +26,9 @@ core.register_on_sending_chat_message(function(message)
local cmd_def = core.registered_chatcommands[cmd]
if cmd_def then
core.set_last_run_mod(cmd_def.mod_origin)
local _, result = cmd_def.func(param)
if result then
core.display_chat_message(result)
local _, message = cmd_def.func(param)
if message then
core.display_chat_message(message)
end
else
core.display_chat_message(core.gettext("-!- Invalid command: ") .. cmd)
@ -40,13 +40,8 @@ end)
core.register_chatcommand("list_players", {
description = core.gettext("List online players"),
func = function(param)
local player_names = core.get_player_names()
if not player_names then
return false, core.gettext("This command is disabled by server.")
end
local players = table.concat(player_names, ", ")
return true, core.gettext("Online players: ") .. players
local players = table.concat(core.get_player_names(), ", ")
core.display_chat_message(core.gettext("Online players: ") .. players)
end
})

View File

@ -1,16 +0,0 @@
-- CSM death formspec. Only used when clientside modding is enabled, otherwise
-- handled by the engine.
core.register_on_death(function()
core.display_chat_message("You died.")
local formspec = "size[11,5.5]bgcolor[#320000b4;true]" ..
"label[4.85,1.35;" .. fgettext("You died") ..
"]button_exit[4,3;3,0.5;btn_respawn;".. fgettext("Respawn") .."]"
core.show_formspec("bultin:death", formspec)
end)
core.register_on_formspec_input(function(formname, fields)
if formname == "bultin:death" then
core.send_respawn()
end
end)

View File

@ -1,5 +1,5 @@
-- Minetest: builtin/client/init.lua
local scriptpath = core.get_builtin_path()
local scriptpath = core.get_builtin_path()..DIR_DELIM
local clientpath = scriptpath.."client"..DIR_DELIM
local commonpath = scriptpath.."common"..DIR_DELIM
@ -8,4 +8,16 @@ dofile(commonpath .. "after.lua")
dofile(commonpath .. "chatcommands.lua")
dofile(clientpath .. "chatcommands.lua")
dofile(commonpath .. "vector.lua")
dofile(clientpath .. "death_formspec.lua")
core.register_on_death(function()
core.display_chat_message("You died.")
local formspec = "size[11,5.5]bgcolor[#320000b4;true]" ..
"label[4.85,1.35;" .. fgettext("You died.") .. "]button_exit[4,3;3,0.5;btn_respawn;".. fgettext("Respawn") .."]"
core.show_formspec("bultin:death", formspec)
end)
core.register_on_formspec_input(function(formname, fields)
if formname == "bultin:death" then
core.send_respawn()
end
end)

View File

@ -59,10 +59,10 @@ local function make_registration()
end
core.registered_globalsteps, core.register_globalstep = make_registration()
core.registered_on_mods_loaded, core.register_on_mods_loaded = make_registration()
core.registered_on_shutdown, core.register_on_shutdown = make_registration()
core.registered_on_receiving_chat_message, core.register_on_receiving_chat_message = make_registration()
core.registered_on_sending_chat_message, core.register_on_sending_chat_message = make_registration()
core.registered_on_connect, core.register_on_connect = make_registration()
core.registered_on_receiving_chat_messages, core.register_on_receiving_chat_messages = make_registration()
core.registered_on_sending_chat_messages, core.register_on_sending_chat_messages = make_registration()
core.registered_on_death, core.register_on_death = make_registration()
core.registered_on_hp_modification, core.register_on_hp_modification = make_registration()
core.registered_on_damage_taken, core.register_on_damage_taken = make_registration()
@ -71,6 +71,3 @@ core.registered_on_dignode, core.register_on_dignode = make_registration()
core.registered_on_punchnode, core.register_on_punchnode = make_registration()
core.registered_on_placenode, core.register_on_placenode = make_registration()
core.registered_on_item_use, core.register_on_item_use = make_registration()
core.registered_on_modchannel_message, core.register_on_modchannel_message = make_registration()
core.registered_on_modchannel_signal, core.register_on_modchannel_signal = make_registration()
core.registered_on_inventory_open, core.register_on_inventory_open = make_registration()

View File

@ -1,41 +1,33 @@
local jobs = {}
local time = 0.0
local time_next = math.huge
core.register_globalstep(function(dtime)
time = time + dtime
if time < time_next then
if #jobs < 1 then
return
end
time_next = math.huge
-- Iterate backwards so that we miss any new timers added by
-- a timer callback.
-- a timer callback, and so that we don't skip the next timer
-- in the list if we remove one.
for i = #jobs, 1, -1 do
local job = jobs[i]
if time >= job.expire then
core.set_last_run_mod(job.mod_origin)
job.func(unpack(job.arg))
local jobs_l = #jobs
jobs[i] = jobs[jobs_l]
jobs[jobs_l] = nil
elseif job.expire < time_next then
time_next = job.expire
table.remove(jobs, i)
end
end
end)
function core.after(after, func, ...)
assert(tonumber(after) and type(func) == "function",
"Invalid minetest.after invocation")
local expire = time + after
"Invalid core.after invocation")
jobs[#jobs + 1] = {
func = func,
expire = expire,
expire = time + after,
arg = {...},
mod_origin = core.get_last_run_mod()
}
time_next = math.min(time_next, expire)
end

View File

@ -97,7 +97,7 @@ end
if INIT == "client" then
core.register_chatcommand("help", {
params = gettext("[all | <cmd>]"),
params = gettext("[all/<cmd>]"),
description = gettext("Get help for commands"),
func = function(param)
return do_help_cmd(nil, param)
@ -105,7 +105,7 @@ if INIT == "client" then
})
else
core.register_chatcommand("help", {
params = "[all | privs | <cmd>]",
params = "[all/privs/<cmd>]",
description = "Get help for commands or list privileges",
func = do_help_cmd,
})

View File

@ -250,6 +250,7 @@ end
--------------------------------------------------------------------------------
function compare_worlds(world1,world2)
if world1.path ~= world2.path then
return false
end
@ -287,11 +288,11 @@ function sort_mod_list(self)
table.sort(self.m_processed_list, function(a, b)
-- Show game mods at bottom
if a.type ~= b.type or a.loc ~= b.loc then
if b.type == "game" then
return a.loc ~= "game"
if a.typ ~= b.typ then
if b.typ == "game" then
return a.typ ~= "game_mod"
end
return b.loc == "game"
return b.typ == "game_mod"
end
-- If in same or no modpack, sort by name
if a.modpack == b.modpack then

View File

@ -1,152 +0,0 @@
local COLOR_BLUE = "#7AF"
local COLOR_GREEN = "#7F7"
local COLOR_GRAY = "#BBB"
local LIST_FORMSPEC = [[
size[13,6.5]
label[0,-0.1;%s]
tablecolumns[color;tree;text;text]
table[0,0.5;12.8,5.5;list;%s;0]
button_exit[5,6;3,1;quit;%s]
]]
local LIST_FORMSPEC_DESCRIPTION = [[
size[13,7.5]
label[0,-0.1;%s]
tablecolumns[color;tree;text;text]
table[0,0.5;12.8,4.8;list;%s;%i]
box[0,5.5;12.8,1.5;#000]
textarea[0.3,5.5;13.05,1.9;;;%s]
button_exit[5,7;3,1;quit;%s]
]]
local formspec_escape = core.formspec_escape
local check_player_privs = core.check_player_privs
-- CHAT COMMANDS FORMSPEC
local mod_cmds = {}
local function load_mod_command_tree()
mod_cmds = {}
for name, def in pairs(core.registered_chatcommands) do
mod_cmds[def.mod_origin] = mod_cmds[def.mod_origin] or {}
local cmds = mod_cmds[def.mod_origin]
-- Could be simplified, but avoid the priv checks whenever possible
cmds[#cmds + 1] = { name, def }
end
local sorted_mod_cmds = {}
for modname, cmds in pairs(mod_cmds) do
table.sort(cmds, function(a, b) return a[1] < b[1] end)
sorted_mod_cmds[#sorted_mod_cmds + 1] = { modname, cmds }
end
table.sort(sorted_mod_cmds, function(a, b) return a[1] < b[1] end)
mod_cmds = sorted_mod_cmds
end
core.after(0, load_mod_command_tree)
local function build_chatcommands_formspec(name, sel, copy)
local rows = {}
rows[1] = "#FFF,0,Command,Parameters"
local description = "For more information, click on any entry in the list.\n" ..
"Double-click to copy the entry to the chat history."
for i, data in ipairs(mod_cmds) do
rows[#rows + 1] = COLOR_BLUE .. ",0," .. formspec_escape(data[1]) .. ","
for j, cmds in ipairs(data[2]) do
local has_priv = check_player_privs(name, cmds[2].privs)
rows[#rows + 1] = ("%s,1,%s,%s"):format(
has_priv and COLOR_GREEN or COLOR_GRAY,
cmds[1], formspec_escape(cmds[2].params))
if sel == #rows then
description = cmds[2].description
if copy then
core.chat_send_player(name, ("Command: %s %s"):format(
core.colorize("#0FF", "/" .. cmds[1]), cmds[2].params))
end
end
end
end
return LIST_FORMSPEC_DESCRIPTION:format(
"Available commands: (see also: /help <cmd>)",
table.concat(rows, ","), sel or 0,
description, "Close"
)
end
-- PRIVILEGES FORMSPEC
local function build_privs_formspec(name)
local privs = {}
for priv_name, def in pairs(core.registered_privileges) do
privs[#privs + 1] = { priv_name, def }
end
table.sort(privs, function(a, b) return a[1] < b[1] end)
local rows = {}
rows[1] = "#FFF,0,Privilege,Description"
local player_privs = core.get_player_privs(name)
for i, data in ipairs(privs) do
rows[#rows + 1] = ("%s,0,%s,%s"):format(
player_privs[data[1]] and COLOR_GREEN or COLOR_GRAY,
data[1], formspec_escape(data[2].description))
end
return LIST_FORMSPEC:format(
"Available privileges:",
table.concat(rows, ","),
"Close"
)
end
-- DETAILED CHAT COMMAND INFORMATION
core.register_on_player_receive_fields(function(player, formname, fields)
if formname ~= "__builtin:help_cmds" or fields.quit then
return
end
local event = minetest.explode_table_event(fields.list)
if event.type ~= "INV" then
local name = player:get_player_name()
core.show_formspec(name, "__builtin:help_cmds",
build_chatcommands_formspec(name, event.row, event.type == "DCL"))
end
end)
local help_command = core.registered_chatcommands["help"]
local old_help_func = help_command.func
help_command.func = function(name, param)
local admin = core.settings:get("name")
-- If the admin ran help, put the output in the chat buffer as well to
-- work with the server terminal
if param == "privs" then
core.show_formspec(name, "__builtin:help_privs",
build_privs_formspec(name))
if name ~= admin then
return true
end
end
if param == "" or param == "all" then
core.show_formspec(name, "__builtin:help_cmds",
build_chatcommands_formspec(name))
if name ~= admin then
return true
end
end
return old_help_func(name, param)
end

View File

@ -5,7 +5,7 @@
local string_sub, string_find = string.sub, string.find
--------------------------------------------------------------------------------
local function basic_dump(o)
function basic_dump(o)
local tp = type(o)
if tp == "number" then
return tostring(o)
@ -128,7 +128,6 @@ function dump(o, indent, nested, level)
if t ~= "table" then
return basic_dump(o)
end
-- Contains table -> true/nil of currently nested tables
nested = nested or {}
if nested[o] then
@ -137,11 +136,10 @@ function dump(o, indent, nested, level)
nested[o] = true
indent = indent or "\t"
level = level or 1
local ret = {}
local t = {}
local dumped_indexes = {}
for i, v in ipairs(o) do
ret[#ret + 1] = dump(v, indent, nested, level + 1)
t[#t + 1] = dump(v, indent, nested, level + 1)
dumped_indexes[i] = true
end
for k, v in pairs(o) do
@ -150,7 +148,7 @@ function dump(o, indent, nested, level)
k = "["..dump(k, indent, nested, level + 1).."]"
end
v = dump(v, indent, nested, level + 1)
ret[#ret + 1] = k.." = "..v
t[#t + 1] = k.." = "..v
end
end
nested[o] = nil
@ -159,18 +157,18 @@ function dump(o, indent, nested, level)
local end_indent_str = "\n"..string.rep(indent, level - 1)
return string.format("{%s%s%s}",
indent_str,
table.concat(ret, ","..indent_str),
table.concat(t, ","..indent_str),
end_indent_str)
end
return "{"..table.concat(ret, ", ").."}"
return "{"..table.concat(t, ", ").."}"
end
--------------------------------------------------------------------------------
function string.split(str, delim, include_empty, max_splits, sep_is_pattern)
delim = delim or ","
max_splits = max_splits or -2
max_splits = max_splits or -1
local items = {}
local pos, len = 1, #str
local pos, len, seplen = 1, #str, #delim
local plain = not sep_is_pattern
max_splits = max_splits + 1
repeat
@ -200,11 +198,28 @@ function table.indexof(list, val)
return -1
end
assert(table.indexof({"foo", "bar"}, "foo") == 1)
assert(table.indexof({"foo", "bar"}, "baz") == -1)
--------------------------------------------------------------------------------
if INIT ~= "client" then
function file_exists(filename)
local f = io.open(filename, "r")
if f == nil then
return false
else
f:close()
return true
end
end
end
--------------------------------------------------------------------------------
function string:trim()
return (self:gsub("^%s*(.-)%s*$", "%1"))
end
assert(string.trim("\n \t\tfoo bar\t ") == "foo bar")
--------------------------------------------------------------------------------
function math.hypot(x, y)
local t
@ -229,17 +244,61 @@ function math.sign(x, tolerance)
end
--------------------------------------------------------------------------------
function math.factorial(x)
assert(x % 1 == 0 and x >= 0, "factorial expects a non-negative integer")
if x >= 171 then
-- 171! is greater than the biggest double, no need to calculate
return math.huge
function get_last_folder(text,count)
local parts = text:split(DIR_DELIM)
if count == nil then
return parts[#parts]
end
local v = 1
for k = 2, x do
v = v * k
local retval = ""
for i=1,count,1 do
retval = retval .. parts[#parts - (count-i)] .. DIR_DELIM
end
return v
return retval
end
--------------------------------------------------------------------------------
function cleanup_path(temppath)
local parts = temppath:split("-")
temppath = ""
for i=1,#parts,1 do
if temppath ~= "" then
temppath = temppath .. "_"
end
temppath = temppath .. parts[i]
end
parts = temppath:split(".")
temppath = ""
for i=1,#parts,1 do
if temppath ~= "" then
temppath = temppath .. "_"
end
temppath = temppath .. parts[i]
end
parts = temppath:split("'")
temppath = ""
for i=1,#parts,1 do
if temppath ~= "" then
temppath = temppath .. ""
end
temppath = temppath .. parts[i]
end
parts = temppath:split(" ")
temppath = ""
for i=1,#parts,1 do
if temppath ~= "" then
temppath = temppath
end
temppath = temppath .. parts[i]
end
return temppath
end
function core.formspec_escape(text)
@ -323,7 +382,7 @@ if INIT == "game" then
param2 = dirs1[fdir + 1]
elseif isceiling then
if orient_flags.force_facedir then
param2 = 20
cparam2 = 20
else
param2 = dirs2[fdir + 1]
end
@ -334,8 +393,9 @@ if INIT == "game" then
end
local old_itemstack = ItemStack(itemstack)
local new_itemstack = core.item_place_node(itemstack, placer,
pointed_thing, param2, prevent_after_place)
local new_itemstack, removed = core.item_place_node(
itemstack, placer, pointed_thing, param2, prevent_after_place
)
return infinitestacks and old_itemstack or new_itemstack
end
@ -353,9 +413,10 @@ if INIT == "game" then
core.rotate_node = function(itemstack, placer, pointed_thing)
local name = placer and placer:get_player_name() or ""
local invert_wall = placer and placer:get_player_control().sneak or false
return core.rotate_and_place(itemstack, placer, pointed_thing,
core.rotate_and_place(itemstack, placer, pointed_thing,
is_creative(name),
{invert_wall = invert_wall}, true)
return itemstack
end
end
@ -401,12 +462,6 @@ function core.explode_scrollbar_event(evt)
return retval
end
--------------------------------------------------------------------------------
function core.rgba(r, g, b, a)
return a and string.format("#%02X%02X%02X%02X", r, g, b, a) or
string.format("#%02X%02X%02X", r, g, b)
end
--------------------------------------------------------------------------------
function core.pos_to_string(pos, decimal_places)
local x = pos.x
@ -434,7 +489,7 @@ function core.string_to_pos(value)
p.z = tonumber(p.z)
return p
end
p = {}
local p = {}
p.x, p.y, p.z = string.match(value, "^%( *([%d.-]+)[, ] *([%d.-]+)[, ] *([%d.-]+) *%)$")
if p.x and p.y and p.z then
p.x = tonumber(p.x)
@ -445,6 +500,9 @@ function core.string_to_pos(value)
return nil
end
assert(core.string_to_pos("10.0, 5, -2").x == 10)
assert(core.string_to_pos("( 10.0, 5, -2)").z == -2)
assert(core.string_to_pos("asd, 5, -2)") == nil)
--------------------------------------------------------------------------------
function core.string_to_area(value)
@ -487,45 +545,12 @@ function table.copy(t, seen)
end
return n
end
function table.insert_all(t, other)
for i=1, #other do
t[#t + 1] = other[i]
end
return t
end
function table.key_value_swap(t)
local ti = {}
for k,v in pairs(t) do
ti[v] = k
end
return ti
end
function table.shuffle(t, from, to, random)
from = from or 1
to = to or #t
random = random or math.random
local n = to - from + 1
while n > 1 do
local r = from + n-1
local l = from + random(0, n-1)
t[l], t[r] = t[r], t[l]
n = n-1
end
end
--------------------------------------------------------------------------------
-- mainmenu only functions
--------------------------------------------------------------------------------
if INIT == "mainmenu" then
function core.get_game(index)
local games = core.get_games()
local games = game.get_games()
if index > 0 and index <= #games then
return games[index]
@ -600,57 +625,10 @@ function core.strip_colors(str)
return (str:gsub(ESCAPE_CHAR .. "%([bc]@[^)]+%)", ""))
end
function core.translate(textdomain, str, ...)
local start_seq
if textdomain == "" then
start_seq = ESCAPE_CHAR .. "T"
else
start_seq = ESCAPE_CHAR .. "(T@" .. textdomain .. ")"
end
local arg = {n=select('#', ...), ...}
local end_seq = ESCAPE_CHAR .. "E"
local arg_index = 1
local translated = str:gsub("@(.)", function(matched)
local c = string.byte(matched)
if string.byte("1") <= c and c <= string.byte("9") then
local a = c - string.byte("0")
if a ~= arg_index then
error("Escape sequences in string given to core.translate " ..
"are not in the correct order: got @" .. matched ..
"but expected @" .. tostring(arg_index))
end
if a > arg.n then
error("Not enough arguments provided to core.translate")
end
arg_index = arg_index + 1
return ESCAPE_CHAR .. "F" .. arg[a] .. ESCAPE_CHAR .. "E"
elseif matched == "n" then
return "\n"
else
return matched
end
end)
if arg_index < arg.n + 1 then
error("Too many arguments provided to core.translate")
end
return start_seq .. translated .. end_seq
end
function core.get_translator(textdomain)
return function(str, ...) return core.translate(textdomain or "", str, ...) end
end
--------------------------------------------------------------------------------
-- Returns the exact coordinate of a pointed surface
--------------------------------------------------------------------------------
function core.pointed_thing_to_face_pos(placer, pointed_thing)
-- Avoid crash in some situations when player is inside a node, causing
-- 'above' to equal 'under'.
if vector.equals(pointed_thing.above, pointed_thing.under) then
return pointed_thing.under
end
local eye_height = placer:get_properties().eye_height
local eye_offset_first = placer:get_eye_offset()
local node_pos = pointed_thing.under
local camera_pos = placer:get_pos()
@ -670,7 +648,7 @@ function core.pointed_thing_to_face_pos(placer, pointed_thing)
end
local fine_pos = {[nc] = node_pos[nc] + offset}
camera_pos.y = camera_pos.y + eye_height + eye_offset_first.y / 10
camera_pos.y = camera_pos.y + 1.625 + eye_offset_first.y / 10
local f = (node_pos[nc] + offset - camera_pos[nc]) / look_dir[nc]
for i = 1, #oc do
@ -678,25 +656,3 @@ function core.pointed_thing_to_face_pos(placer, pointed_thing)
end
return fine_pos
end
function core.string_to_privs(str, delim)
assert(type(str) == "string")
delim = delim or ','
local privs = {}
for _, priv in pairs(string.split(str, delim)) do
privs[priv:trim()] = true
end
return privs
end
function core.privs_to_string(privs, delim)
assert(type(privs) == "table")
delim = delim or ','
local list = {}
for priv, bool in pairs(privs) do
if bool then
list[#list + 1] = priv
end
end
return table.concat(list, delim)
end

View File

@ -177,16 +177,13 @@ end
-- Deserialization
local function safe_loadstring(...)
local func, err = loadstring(...)
if func then
setfenv(func, {})
return func
end
return nil, err
end
local env = {
loadstring = loadstring,
}
local function dummy_func() end
local safe_env = {
loadstring = function() end,
}
function core.deserialize(str, safe)
if type(str) ~= "string" then
@ -198,10 +195,7 @@ function core.deserialize(str, safe)
end
local f, err = loadstring(str)
if not f then return nil, err end
-- The environment is recreated every time so deseralized code cannot
-- pollute it with permanent references.
setfenv(f, {loadstring = safe and dummy_func or safe_loadstring})
setfenv(f, safe and safe_env or env)
local good, data = pcall(f)
if good then
@ -210,3 +204,18 @@ function core.deserialize(str, safe)
return nil, data
end
end
-- Unit tests
local test_in = {cat={sound="nyan", speed=400}, dog={sound="woof"}}
local test_out = core.deserialize(core.serialize(test_in))
assert(test_in.cat.sound == test_out.cat.sound)
assert(test_in.cat.speed == test_out.cat.speed)
assert(test_in.dog.sound == test_out.dog.sound)
test_in = {escape_chars="\n\r\t\v\\\"\'", non_european="θשׁ٩∂"}
test_out = core.deserialize(core.serialize(test_in))
assert(test_in.escape_chars == test_out.escape_chars)
assert(test_in.non_european == test_out.non_european)

View File

@ -1,73 +0,0 @@
_G.core = {}
dofile("builtin/common/misc_helpers.lua")
describe("string", function()
it("trim()", function()
assert.equal("foo bar", string.trim("\n \t\tfoo bar\t "))
end)
describe("split()", function()
it("removes empty", function()
assert.same({ "hello" }, string.split("hello"))
assert.same({ "hello", "world" }, string.split("hello,world"))
assert.same({ "hello", "world" }, string.split("hello,world,,,"))
assert.same({ "hello", "world" }, string.split(",,,hello,world"))
assert.same({ "hello", "world", "2" }, string.split("hello,,,world,2"))
assert.same({ "hello ", " world" }, string.split("hello :| world", ":|"))
end)
it("keeps empty", function()
assert.same({ "hello" }, string.split("hello", ",", true))
assert.same({ "hello", "world" }, string.split("hello,world", ",", true))
assert.same({ "hello", "world", "" }, string.split("hello,world,", ",", true))
assert.same({ "hello", "", "", "world", "2" }, string.split("hello,,,world,2", ",", true))
assert.same({ "", "", "hello", "world", "2" }, string.split(",,hello,world,2", ",", true))
assert.same({ "hello ", " world | :" }, string.split("hello :| world | :", ":|"))
end)
it("max_splits", function()
assert.same({ "one" }, string.split("one", ",", true, 2))
assert.same({ "one,two,three,four" }, string.split("one,two,three,four", ",", true, 0))
assert.same({ "one", "two", "three,four" }, string.split("one,two,three,four", ",", true, 2))
assert.same({ "one", "", "two,three,four" }, string.split("one,,two,three,four", ",", true, 2))
assert.same({ "one", "two", "three,four" }, string.split("one,,,,,,two,three,four", ",", false, 2))
end)
it("pattern", function()
assert.same({ "one", "two" }, string.split("one,two", ",", false, -1, true))
assert.same({ "one", "two", "three" }, string.split("one2two3three", "%d", false, -1, true))
end)
end)
end)
describe("privs", function()
it("from string", function()
assert.same({ a = true, b = true }, core.string_to_privs("a,b"))
end)
it("to string", function()
assert.equal("one", core.privs_to_string({ one=true }))
local ret = core.privs_to_string({ a=true, b=true })
assert(ret == "a,b" or ret == "b,a")
end)
end)
describe("pos", function()
it("from string", function()
assert.same({ x = 10, y = 5.1, z = -2}, core.string_to_pos("10.0, 5.1, -2"))
assert.same({ x = 10, y = 5.1, z = -2}, core.string_to_pos("( 10.0, 5.1, -2)"))
assert.is_nil(core.string_to_pos("asd, 5, -2)"))
end)
it("to string", function()
assert.equal("(10.1,5.2,-2.3)", core.pos_to_string({ x = 10.1, y = 5.2, z = -2.3}))
end)
end)
describe("table", function()
it("indexof()", function()
assert.equal(1, table.indexof({"foo", "bar"}, "foo"))
assert.equal(-1, table.indexof({"foo", "bar"}, "baz"))
end)
end)

View File

@ -1,44 +0,0 @@
_G.core = {}
_G.setfenv = require 'busted.compatibility'.setfenv
dofile("builtin/common/serialize.lua")
describe("serialize", function()
it("works", function()
local test_in = {cat={sound="nyan", speed=400}, dog={sound="woof"}}
local test_out = core.deserialize(core.serialize(test_in))
assert.same(test_in, test_out)
end)
it("handles characters", function()
local test_in = {escape_chars="\n\r\t\v\\\"\'", non_european="θשׁ٩∂"}
local test_out = core.deserialize(core.serialize(test_in))
assert.same(test_in, test_out)
end)
it("handles recursive structures", function()
local test_in = { hello = "world" }
test_in.foo = test_in
local test_out = core.deserialize(core.serialize(test_in))
assert.same(test_in, test_out)
end)
it("strips functions in safe mode", function()
local test_in = {
func = function(a, b)
error("test")
end,
foo = "bar"
}
local str = core.serialize(test_in)
assert.not_nil(str:find("loadstring"))
local test_out = core.deserialize(str, true)
assert.is_nil(test_out.func)
assert.equals(test_out.foo, "bar")
end)
end)

View File

@ -1,46 +0,0 @@
_G.vector = {}
dofile("builtin/common/vector.lua")
describe("vector", function()
describe("new()", function()
it("constructs", function()
assert.same({ x = 0, y = 0, z = 0 }, vector.new())
assert.same({ x = 1, y = 2, z = 3 }, vector.new(1, 2, 3))
assert.same({ x = 3, y = 2, z = 1 }, vector.new({ x = 3, y = 2, z = 1 }))
local input = vector.new({ x = 3, y = 2, z = 1 })
local output = vector.new(input)
assert.same(input, output)
assert.are_not.equal(input, output)
end)
it("throws on invalid input", function()
assert.has.errors(function()
vector.new({ x = 3 })
end)
assert.has.errors(function()
vector.new({ d = 3 })
end)
end)
end)
it("equal()", function()
local function assertE(a, b)
assert.is_true(vector.equals(a, b))
end
local function assertNE(a, b)
assert.is_false(vector.equals(a, b))
end
assertE({x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0})
assertE({x = -1, y = 0, z = 1}, {x = -1, y = 0, z = 1})
local a = { x = 2, y = 4, z = -10 }
assertE(a, a)
assertNE({x = -1, y = 0, z = 1}, a)
end)
it("add()", function()
assert.same({ x = 2, y = 4, z = 6 }, vector.add(vector.new(1, 2, 3), { x = 1, y = 2, z = 3 }))
end)
end)

View File

@ -63,31 +63,33 @@ function vector.distance(a, b)
end
function vector.direction(pos1, pos2)
return vector.normalize({
x = pos2.x - pos1.x,
y = pos2.y - pos1.y,
z = pos2.z - pos1.z
})
local x_raw = pos2.x - pos1.x
local y_raw = pos2.y - pos1.y
local z_raw = pos2.z - pos1.z
local x_abs = math.abs(x_raw)
local y_abs = math.abs(y_raw)
local z_abs = math.abs(z_raw)
if x_abs >= y_abs and
x_abs >= z_abs then
y_raw = y_raw * (1 / x_abs)
z_raw = z_raw * (1 / x_abs)
x_raw = x_raw / x_abs
end
if y_abs >= x_abs and
y_abs >= z_abs then
x_raw = x_raw * (1 / y_abs)
z_raw = z_raw * (1 / y_abs)
y_raw = y_raw / y_abs
end
if z_abs >= y_abs and
z_abs >= x_abs then
x_raw = x_raw * (1 / z_abs)
y_raw = y_raw * (1 / z_abs)
z_raw = z_raw / z_abs
end
return {x=x_raw, y=y_raw, z=z_raw}
end
function vector.angle(a, b)
local dotp = vector.dot(a, b)
local cp = vector.cross(a, b)
local crossplen = vector.length(cp)
return math.atan2(crossplen, dotp)
end
function vector.dot(a, b)
return a.x * b.x + a.y * b.y + a.z * b.z
end
function vector.cross(a, b)
return {
x = a.y * b.z - a.z * b.y,
y = a.z * b.x - a.x * b.z,
z = a.x * b.y - a.y * b.x
}
end
function vector.add(a, b)
if type(b) == "table" then

View File

@ -54,39 +54,52 @@ end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
local function wordwrap_quickhack(str)
local res = ""
local ar = str:split("\n")
for i = 1, #ar do
local text = ar[i]
-- Hack to add word wrapping.
-- TODO: Add engine support for wrapping in formspecs
while #text > 80 do
if res ~= "" then
res = res .. ","
end
res = res .. core.formspec_escape(string.sub(text, 1, 79))
text = string.sub(text, 80, #text)
end
if res ~= "" then
res = res .. ","
end
res = res .. core.formspec_escape(text)
end
return res
end
--------------------------------------------------------------------------------
function ui.update()
local formspec = {}
local formspec = ""
-- handle errors
if gamedata ~= nil and gamedata.reconnect_requested then
local error_message = core.formspec_escape(
gamedata.errormessage or "<none available>")
formspec = {
"size[14,8]",
"real_coordinates[true]",
"box[0.5,1.2;13,5;#000]",
("textarea[0.5,1.2;13,5;;%s;%s]"):format(
fgettext("The server has requested a reconnect:"), error_message),
"button[2,6.6;4,1;btn_reconnect_yes;" .. fgettext("Reconnect") .. "]",
"button[8,6.6;4,1;btn_reconnect_no;" .. fgettext("Main menu") .. "]"
}
formspec = wordwrap_quickhack(gamedata.errormessage or "")
formspec = "size[12,5]" ..
"label[0.5,0;" .. fgettext("The server has requested a reconnect:") ..
"]textlist[0.2,0.8;11.5,3.5;;" .. formspec ..
"]button[6,4.6;3,0.5;btn_reconnect_no;" .. fgettext("Main menu") .. "]" ..
"button[3,4.6;3,0.5;btn_reconnect_yes;" .. fgettext("Reconnect") .. "]"
elseif gamedata ~= nil and gamedata.errormessage ~= nil then
local error_message = core.formspec_escape(gamedata.errormessage)
formspec = wordwrap_quickhack(gamedata.errormessage)
local error_title
if string.find(gamedata.errormessage, "ModError") then
error_title = fgettext("An error occurred in a Lua script:")
error_title = fgettext("An error occured in a Lua script, such as a mod:")
else
error_title = fgettext("An error occurred:")
error_title = fgettext("An error occured:")
end
formspec = {
"size[14,8]",
"real_coordinates[true]",
"box[0.5,1.2;13,5;#000]",
("textarea[0.5,1.2;13,5;;%s;%s]"):format(
error_title, error_message),
"button[5,6.6;4,1;btn_error_confirm;" .. fgettext("Ok") .. "]"
}
formspec = "size[12,5]" ..
"label[0.5,0;" .. error_title ..
"]textlist[0.2,0.8;11.5,3.5;;" .. formspec ..
"]button[4.5,4.6;3,0.5;btn_error_confirm;" .. fgettext("Ok") .. "]"
else
local active_toplevel_ui_elements = 0
for key,value in pairs(ui.childlist) do
@ -94,8 +107,8 @@ function ui.update()
local retval = value:get_formspec()
if retval ~= nil and retval ~= "" then
active_toplevel_ui_elements = active_toplevel_ui_elements + 1
table.insert(formspec, retval)
active_toplevel_ui_elements = active_toplevel_ui_elements +1
formspec = formspec .. retval
end
end
end
@ -107,7 +120,7 @@ function ui.update()
local retval = value:get_formspec()
if retval ~= nil and retval ~= "" then
table.insert(formspec, retval)
formspec = formspec .. retval
end
end
end
@ -122,10 +135,10 @@ function ui.update()
core.log("warning", "no toplevel ui element "..
"active; switching to default")
ui.childlist[ui.default]:show()
formspec = {ui.childlist[ui.default]:get_formspec()}
formspec = ui.childlist[ui.default]:get_formspec()
end
end
core.update_formspec(table.concat(formspec))
core.update_formspec(formspec)
end
--------------------------------------------------------------------------------

View File

@ -1,25 +1,100 @@
-- Minetest: builtin/auth.lua
--
-- Builtin authentication handler
-- Authentication handler
--
-- Make the auth object private, deny access to mods
local core_auth = core.auth
core.auth = nil
function core.string_to_privs(str, delim)
assert(type(str) == "string")
delim = delim or ','
local privs = {}
for _, priv in pairs(string.split(str, delim)) do
privs[priv:trim()] = true
end
return privs
end
function core.privs_to_string(privs, delim)
assert(type(privs) == "table")
delim = delim or ','
local list = {}
for priv, bool in pairs(privs) do
if bool then
list[#list + 1] = priv
end
end
return table.concat(list, delim)
end
assert(core.string_to_privs("a,b").b == true)
assert(core.privs_to_string({a=true,b=true}) == "a,b")
core.auth_file_path = core.get_worldpath().."/auth.txt"
core.auth_table = {}
local function read_auth_file()
local newtable = {}
local file, errmsg = io.open(core.auth_file_path, 'rb')
if not file then
core.log("info", core.auth_file_path.." could not be opened for reading ("..errmsg.."); assuming new world")
return
end
for line in file:lines() do
if line ~= "" then
local fields = line:split(":", true)
local name, password, privilege_string, last_login = unpack(fields)
last_login = tonumber(last_login)
if not (name and password and privilege_string) then
error("Invalid line in auth.txt: "..dump(line))
end
local privileges = core.string_to_privs(privilege_string)
newtable[name] = {password=password, privileges=privileges, last_login=last_login}
end
end
io.close(file)
core.auth_table = newtable
core.notify_authentication_modified()
end
local function save_auth_file()
local newtable = {}
-- Check table for validness before attempting to save
for name, stuff in pairs(core.auth_table) do
assert(type(name) == "string")
assert(name ~= "")
assert(type(stuff) == "table")
assert(type(stuff.password) == "string")
assert(type(stuff.privileges) == "table")
assert(stuff.last_login == nil or type(stuff.last_login) == "number")
end
local content = {}
for name, stuff in pairs(core.auth_table) do
local priv_string = core.privs_to_string(stuff.privileges)
local parts = {name, stuff.password, priv_string, stuff.last_login or ""}
content[#content + 1] = table.concat(parts, ":")
end
if not core.safe_file_write(core.auth_file_path, table.concat(content, "\n")) then
error(core.auth_file_path.." could not be written to")
end
end
read_auth_file()
core.builtin_auth_handler = {
get_auth = function(name)
assert(type(name) == "string")
local auth_entry = core_auth.read(name)
-- If no such auth found, return nil
if not auth_entry then
-- Figure out what password to use for a new player (singleplayer
-- always has an empty password, otherwise use default, which is
-- usually empty too)
local new_password_hash = ""
-- If not in authentication table, return nil
if not core.auth_table[name] then
return nil
end
-- Figure out what privileges the player should have.
-- Take a copy of the privilege table
local privileges = {}
for priv, _ in pairs(auth_entry.privileges) do
for priv, _ in pairs(core.auth_table[name].privileges) do
privileges[priv] = true
end
-- If singleplayer, give all privileges except those marked as give_to_singleplayer = false
@ -32,125 +107,63 @@ core.builtin_auth_handler = {
-- For the admin, give everything
elseif name == core.settings:get("name") then
for priv, def in pairs(core.registered_privileges) do
if def.give_to_admin then
privileges[priv] = true
end
privileges[priv] = true
end
end
-- All done
return {
password = auth_entry.password,
password = core.auth_table[name].password,
privileges = privileges,
-- Is set to nil if unknown
last_login = auth_entry.last_login,
last_login = core.auth_table[name].last_login,
}
end,
create_auth = function(name, password)
assert(type(name) == "string")
assert(type(password) == "string")
core.log('info', "Built-in authentication handler adding player '"..name.."'")
return core_auth.create({
name = name,
core.auth_table[name] = {
password = password,
privileges = core.string_to_privs(core.settings:get("default_privs")),
last_login = os.time(),
})
end,
delete_auth = function(name)
assert(type(name) == "string")
local auth_entry = core_auth.read(name)
if not auth_entry then
return false
end
core.log('info', "Built-in authentication handler deleting player '"..name.."'")
return core_auth.delete(name)
}
save_auth_file()
end,
set_password = function(name, password)
assert(type(name) == "string")
assert(type(password) == "string")
local auth_entry = core_auth.read(name)
if not auth_entry then
if not core.auth_table[name] then
core.builtin_auth_handler.create_auth(name, password)
else
core.log('info', "Built-in authentication handler setting password of player '"..name.."'")
auth_entry.password = password
core_auth.save(auth_entry)
core.auth_table[name].password = password
save_auth_file()
end
return true
end,
set_privileges = function(name, privileges)
assert(type(name) == "string")
assert(type(privileges) == "table")
local auth_entry = core_auth.read(name)
if not auth_entry then
auth_entry = core.builtin_auth_handler.create_auth(name,
if not core.auth_table[name] then
core.builtin_auth_handler.create_auth(name,
core.get_password_hash(name,
core.settings:get("default_password")))
end
-- Run grant callbacks
for priv, _ in pairs(privileges) do
if not auth_entry.privileges[priv] then
core.run_priv_callbacks(name, priv, nil, "grant")
end
end
-- Run revoke callbacks
for priv, _ in pairs(auth_entry.privileges) do
if not privileges[priv] then
core.run_priv_callbacks(name, priv, nil, "revoke")
end
end
auth_entry.privileges = privileges
core_auth.save(auth_entry)
core.auth_table[name].privileges = privileges
core.notify_authentication_modified(name)
save_auth_file()
end,
reload = function()
core_auth.reload()
read_auth_file()
return true
end,
record_login = function(name)
assert(type(name) == "string")
local auth_entry = core_auth.read(name)
assert(auth_entry)
auth_entry.last_login = os.time()
core_auth.save(auth_entry)
end,
iterate = function()
local names = {}
local nameslist = core_auth.list_names()
for k,v in pairs(nameslist) do
names[v] = true
end
return pairs(names)
assert(core.auth_table[name]).last_login = os.time()
save_auth_file()
end,
}
core.register_on_prejoinplayer(function(name, ip)
if core.registered_auth_handler ~= nil then
return -- Don't do anything if custom auth handler registered
end
local auth_entry = core_auth.read(name)
if auth_entry ~= nil then
return
end
local name_lower = name:lower()
for k in core.builtin_auth_handler.iterate() do
if k:lower() == name_lower then
return string.format("\nCannot create new player called '%s'. "..
"Another account called '%s' is already registered. "..
"Please check the spelling if it's your account "..
"or use a different nickname.", name, k)
end
end
end)
--
-- Authentication API
--
function core.register_authentication_handler(handler)
if core.registered_auth_handler then
error("Add-on authentication handler already registered by "..core.registered_auth_handler_modname)
@ -176,10 +189,28 @@ end
core.set_player_password = auth_pass("set_password")
core.set_player_privs = auth_pass("set_privileges")
core.remove_player_auth = auth_pass("delete_auth")
core.auth_reload = auth_pass("reload")
local record_login = auth_pass("record_login")
core.register_on_joinplayer(function(player)
record_login(player:get_player_name())
end)
core.register_on_prejoinplayer(function(name, ip)
local auth = core.auth_table
if auth[name] ~= nil then
return
end
local name_lower = name:lower()
for k in pairs(auth) do
if k:lower() == name_lower then
return string.format("\nCannot create new player called '%s'. "..
"Another account called '%s' is already registered. "..
"Please check the spelling if it's your account "..
"or use a different nickname.", name, k)
end
end
end)

View File

@ -1,43 +1,4 @@
-- Minetest: builtin/game/chat.lua
-- Helper function that implements search and replace without pattern matching
-- Returns the string and a boolean indicating whether or not the string was modified
local function safe_gsub(s, replace, with)
local i1, i2 = s:find(replace, 1, true)
if not i1 then
return s, false
end
return s:sub(1, i1 - 1) .. with .. s:sub(i2 + 1), true
end
--
-- Chat message formatter
--
-- Implemented in Lua to allow redefinition
function core.format_chat_message(name, message)
local error_str = "Invalid chat message format - missing %s"
local str = core.settings:get("chat_message_format")
local replaced
-- Name
str, replaced = safe_gsub(str, "@name", name)
if not replaced then
error(error_str:format("@name"), 2)
end
-- Timestamp
str = safe_gsub(str, "@timestamp", os.date("%H:%M:%S", os.time()))
-- Insert the message into the string only after finishing all other processing
str, replaced = safe_gsub(str, "@message", message)
if not replaced then
error(error_str:format("@message"), 2)
end
return str
end
-- Minetest: builtin/game/chatcommands.lua
--
-- Chat command handler
@ -66,9 +27,9 @@ core.register_on_chat_message(function(name, message)
local has_privs, missing_privs = core.check_player_privs(name, cmd_def.privs)
if has_privs then
core.set_last_run_mod(cmd_def.mod_origin)
local _, result = cmd_def.func(name, param)
if result then
core.chat_send_player(name, result)
local success, message = cmd_def.func(name, param)
if message then
core.chat_send_player(name, message)
end
else
core.chat_send_player(name, "You don't have permission"
@ -80,7 +41,7 @@ end)
if core.settings:get_bool("profiler.load") then
-- Run after register_chatcommand and its register_on_chat_message
-- Before any chatcommands that should be profiled
-- Before any chattcommands that should be profiled
profiler.init_chatcommand()
end
@ -110,21 +71,20 @@ end
--
core.register_chatcommand("me", {
params = "<action>",
description = "Show chat action (e.g., '/me orders a pizza' displays"
description = "Display chat action (e.g., '/me orders a pizza' displays"
.. " '<player name> orders a pizza')",
privs = {shout=true},
func = function(name, param)
core.chat_send_all("* " .. name .. " " .. param)
return true
end,
})
core.register_chatcommand("admin", {
description = "Show the name of the server owner",
func = function(name)
local admin = core.settings:get("name")
local admin = minetest.settings:get("name")
if admin then
return true, "The administrator of this server is " .. admin .. "."
return true, "The administrator of this server is "..admin.."."
else
return false, "There's no administrator named in the config file."
end
@ -132,47 +92,19 @@ core.register_chatcommand("admin", {
})
core.register_chatcommand("privs", {
params = "[<name>]",
description = "Show privileges of yourself or another player",
params = "<name>",
description = "Print privileges of player",
func = function(caller, param)
param = param:trim()
local name = (param ~= "" and param or caller)
if not core.player_exists(name) then
return false, "Player " .. name .. " does not exist."
end
return true, "Privileges of " .. name .. ": "
.. core.privs_to_string(
core.get_player_privs(name), ", ")
core.get_player_privs(name), ' ')
end,
})
core.register_chatcommand("haspriv", {
params = "<privilege>",
description = "Return list of all online players with privilege.",
privs = {basic_privs = true},
func = function(caller, param)
param = param:trim()
if param == "" then
return false, "Invalid parameters (see /help haspriv)"
end
if not core.registered_privileges[param] then
return false, "Unknown privilege!"
end
local privs = core.string_to_privs(param)
local players_with_priv = {}
for _, player in pairs(core.get_connected_players()) do
local player_name = player:get_player_name()
if core.check_player_privs(player_name, privs) then
table.insert(players_with_priv, player_name)
end
end
return true, "Players online with the \"" .. param .. "\" privilege: " ..
table.concat(players_with_priv, ", ")
end
})
local function handle_grant_command(caller, grantname, grantprivstr)
local caller_privs = core.get_player_privs(caller)
local caller_privs = minetest.get_player_privs(caller)
if not (caller_privs.privs or caller_privs.basic_privs) then
return false, "Your privileges are insufficient."
end
@ -200,10 +132,6 @@ local function handle_grant_command(caller, grantname, grantprivstr)
if privs_unknown ~= "" then
return false, privs_unknown
end
for priv, _ in pairs(grantprivs) do
-- call the on_grant callbacks
core.run_priv_callbacks(grantname, priv, caller, "grant")
end
core.set_player_privs(grantname, privs)
core.log("action", caller..' granted ('..core.privs_to_string(grantprivs, ', ')..') privileges to '..grantname)
if grantname ~= caller then
@ -217,8 +145,8 @@ local function handle_grant_command(caller, grantname, grantprivstr)
end
core.register_chatcommand("grant", {
params = "<name> (<privilege> | all)",
description = "Give privileges to player",
params = "<name> <privilege>|all",
description = "Give privilege to player",
func = function(name, param)
local grantname, grantprivstr = string.match(param, "([^ ]+) (.+)")
if not grantname or not grantprivstr then
@ -229,7 +157,7 @@ core.register_chatcommand("grant", {
})
core.register_chatcommand("grantme", {
params = "<privilege> | all",
params = "<privilege>|all",
description = "Grant privileges to yourself",
func = function(name, param)
if param == "" then
@ -240,8 +168,8 @@ core.register_chatcommand("grantme", {
})
core.register_chatcommand("revoke", {
params = "<name> (<privilege> | all)",
description = "Remove privileges from player",
params = "<name> <privilege>|all",
description = "Remove privilege from player",
privs = {},
func = function(name, param)
if not core.check_player_privs(name, {privs=true}) and
@ -265,19 +193,12 @@ core.register_chatcommand("revoke", {
end
end
if revoke_priv_str == "all" then
revoke_privs = privs
privs = {}
else
for priv, _ in pairs(revoke_privs) do
privs[priv] = nil
end
end
for priv, _ in pairs(revoke_privs) do
-- call the on_revoke callbacks
core.run_priv_callbacks(revoke_name, priv, name, "revoke")
end
core.set_player_privs(revoke_name, privs)
core.log("action", name..' revoked ('
..core.privs_to_string(revoke_privs, ', ')
@ -303,12 +224,11 @@ core.register_chatcommand("setpassword", {
toname = param:match("^([^ ]+) *$")
raw_password = nil
end
if not toname then
return false, "Name field required"
end
local act_str_past, act_str_pres
local act_str_past = "?"
local act_str_pres = "?"
if not raw_password then
core.set_player_password(toname, "")
act_str_past = "cleared"
@ -320,14 +240,13 @@ core.register_chatcommand("setpassword", {
act_str_past = "set"
act_str_pres = "sets"
end
if toname ~= name then
core.chat_send_player(toname, "Your password was "
.. act_str_past .. " by " .. name)
end
core.log("action", name .. " " .. act_str_pres ..
" password of " .. toname .. ".")
core.log("action", name .. " " .. act_str_pres
.. " password of " .. toname .. ".")
return true, "Password of player \"" .. toname .. "\" " .. act_str_past
end,
@ -335,7 +254,7 @@ core.register_chatcommand("setpassword", {
core.register_chatcommand("clearpassword", {
params = "<name>",
description = "Set empty password for a player",
description = "Set empty password",
privs = {password=true},
func = function(name, param)
local toname = param
@ -362,7 +281,7 @@ core.register_chatcommand("auth_reload", {
core.register_chatcommand("remove_player", {
params = "<name>",
description = "Remove a player's data",
description = "Remove player data",
privs = {server=true},
func = function(name, param)
local toname = param
@ -386,8 +305,8 @@ core.register_chatcommand("remove_player", {
})
core.register_chatcommand("teleport", {
params = "<X>,<Y>,<Z> | <to_name> | (<name> <X>,<Y>,<Z>) | (<name> <to_name>)",
description = "Teleport to position or player",
params = "<X>,<Y>,<Z> | <to_name> | <name> <X>,<Y>,<Z> | <name> <to_name>",
description = "Teleport to player or position",
privs = {teleport=true},
func = function(name, param)
-- Returns (pos, true) if found, otherwise (pos, false)
@ -411,38 +330,38 @@ core.register_chatcommand("teleport", {
return pos, false
end
local teleportee = nil
local p = {}
p.x, p.y, p.z = string.match(param, "^([%d.-]+)[, ] *([%d.-]+)[, ] *([%d.-]+)$")
p.x = tonumber(p.x)
p.y = tonumber(p.y)
p.z = tonumber(p.z)
if p.x and p.y and p.z then
local lm = 31000
if p.x < -lm or p.x > lm or p.y < -lm or p.y > lm or p.z < -lm or p.z > lm then
return false, "Cannot teleport out of map bounds!"
end
local teleportee = core.get_player_by_name(name)
teleportee = core.get_player_by_name(name)
if teleportee then
teleportee:set_pos(p)
teleportee:setpos(p)
return true, "Teleporting to "..core.pos_to_string(p)
end
end
local target_name = param:match("^([^ ]+)$")
local teleportee = core.get_player_by_name(name)
p = nil
local teleportee = nil
local p = nil
local target_name = nil
target_name = param:match("^([^ ]+)$")
teleportee = core.get_player_by_name(name)
if target_name then
local target = core.get_player_by_name(target_name)
if target then
p = target:get_pos()
p = target:getpos()
end
end
if teleportee and p then
p = find_free_position_near(p)
teleportee:set_pos(p)
teleportee:setpos(p)
return true, "Teleporting to " .. target_name
.. " at "..core.pos_to_string(p)
end
@ -451,9 +370,9 @@ core.register_chatcommand("teleport", {
return false, "You don't have permission to teleport other players (missing bring privilege)"
end
teleportee = nil
p = {}
local teleportee_name
local teleportee = nil
local p = {}
local teleportee_name = nil
teleportee_name, p.x, p.y, p.z = param:match(
"^([^ ]+) +([%d.-]+)[, ] *([%d.-]+)[, ] *([%d.-]+)$")
p.x, p.y, p.z = tonumber(p.x), tonumber(p.y), tonumber(p.z)
@ -461,13 +380,15 @@ core.register_chatcommand("teleport", {
teleportee = core.get_player_by_name(teleportee_name)
end
if teleportee and p.x and p.y and p.z then
teleportee:set_pos(p)
teleportee:setpos(p)
return true, "Teleporting " .. teleportee_name
.. " to " .. core.pos_to_string(p)
end
teleportee = nil
p = nil
local teleportee = nil
local p = nil
local teleportee_name = nil
local target_name = nil
teleportee_name, target_name = string.match(param, "^([^ ]+) +([^ ]+)$")
if teleportee_name then
teleportee = core.get_player_by_name(teleportee_name)
@ -475,12 +396,12 @@ core.register_chatcommand("teleport", {
if target_name then
local target = core.get_player_by_name(target_name)
if target then
p = target:get_pos()
p = target:getpos()
end
end
if teleportee and p then
p = find_free_position_near(p)
teleportee:set_pos(p)
teleportee:setpos(p)
return true, "Teleporting " .. teleportee_name
.. " to " .. target_name
.. " at " .. core.pos_to_string(p)
@ -492,7 +413,7 @@ core.register_chatcommand("teleport", {
})
core.register_chatcommand("set", {
params = "([-n] <name> <value>) | <name>",
params = "[-n] <name> <value> | <name>",
description = "Set or read server configuration setting",
privs = {server=true},
func = function(name, param)
@ -501,8 +422,7 @@ core.register_chatcommand("set", {
core.settings:set(setname, setvalue)
return true, setname .. " = " .. setvalue
end
setname, setvalue = string.match(param, "([^ ]+) (.+)")
local setname, setvalue = string.match(param, "([^ ]+) (.+)")
if setname and setvalue then
if not core.settings:get(setname) then
return false, "Failed. Use '/set -n <name> <value>' to create a new setting."
@ -510,16 +430,14 @@ core.register_chatcommand("set", {
core.settings:set(setname, setvalue)
return true, setname .. " = " .. setvalue
end
setname = string.match(param, "([^ ]+)")
local setname = string.match(param, "([^ ]+)")
if setname then
setvalue = core.settings:get(setname)
local setvalue = core.settings:get(setname)
if not setvalue then
setvalue = "<not set>"
end
return true, setname .. " = " .. setvalue
end
return false, "Invalid parameters (see /help set)."
end,
})
@ -550,9 +468,9 @@ local function emergeblocks_progress_update(ctx)
end
core.register_chatcommand("emergeblocks", {
params = "(here [<radius>]) | (<pos1> <pos2>)",
params = "(here [radius]) | (<pos1> <pos2>)",
description = "Load (or, if nonexistent, generate) map blocks "
.. "contained in area pos1 to pos2 (<pos1> and <pos2> must be in parentheses)",
.. "contained in area pos1 to pos2",
privs = {server=true},
func = function(name, param)
local p1, p2 = parse_range_str(name, param)
@ -576,9 +494,8 @@ core.register_chatcommand("emergeblocks", {
})
core.register_chatcommand("deleteblocks", {
params = "(here [<radius>]) | (<pos1> <pos2>)",
description = "Delete map blocks contained in area pos1 to pos2 "
.. "(<pos1> and <pos2> must be in parentheses)",
params = "(here [radius]) | (<pos1> <pos2>)",
description = "Delete map blocks contained in area pos1 to pos2",
privs = {server=true},
func = function(name, param)
local p1, p2 = parse_range_str(name, param)
@ -596,9 +513,8 @@ core.register_chatcommand("deleteblocks", {
})
core.register_chatcommand("fixlight", {
params = "(here [<radius>]) | (<pos1> <pos2>)",
description = "Resets lighting in the area between pos1 and pos2 "
.. "(<pos1> and <pos2> must be in parentheses)",
params = "(here [radius]) | (<pos1> <pos2>)",
description = "Resets lighting in the area between pos1 and pos2",
privs = {server = true},
func = function(name, param)
local p1, p2 = parse_range_str(name, param)
@ -630,11 +546,8 @@ local function handle_give_command(cmd, giver, receiver, stackstring)
local itemstack = ItemStack(stackstring)
if itemstack:is_empty() then
return false, "Cannot give an empty item"
elseif (not itemstack:is_known()) or (itemstack:get_name() == "unknown") then
elseif not itemstack:is_known() then
return false, "Cannot give an unknown item"
-- Forbid giving 'ignore' due to unwanted side effects
elseif itemstack:get_name() == "ignore" then
return false, "Giving 'ignore' is not allowed"
end
local receiverref = core.get_player_by_name(receiver)
if receiverref == nil then
@ -653,18 +566,18 @@ local function handle_give_command(cmd, giver, receiver, stackstring)
-- entered (e.g. big numbers are always interpreted as 2^16-1).
stackstring = itemstack:to_string()
if giver == receiver then
local msg = "%q %sadded to inventory."
return true, msg:format(stackstring, partiality)
return true, ("%q %sadded to inventory.")
:format(stackstring, partiality)
else
core.chat_send_player(receiver, ("%q %sadded to inventory.")
:format(stackstring, partiality))
local msg = "%q %sadded to %s's inventory."
return true, msg:format(stackstring, partiality, receiver)
return true, ("%q %sadded to %s's inventory.")
:format(stackstring, partiality, receiver)
end
end
core.register_chatcommand("give", {
params = "<name> <ItemString> [<count> [<wear>]]",
params = "<name> <ItemString>",
description = "Give item to player",
privs = {give=true},
func = function(name, param)
@ -677,7 +590,7 @@ core.register_chatcommand("give", {
})
core.register_chatcommand("giveme", {
params = "<ItemString> [<count> [<wear>]]",
params = "<ItemString>",
description = "Give item to yourself",
privs = {give=true},
func = function(name, param)
@ -705,11 +618,8 @@ core.register_chatcommand("spawnentity", {
core.log("error", "Unable to spawn entity, player is nil")
return false, "Unable to spawn entity, player is nil"
end
if not core.registered_entities[entityname] then
return false, "Cannot spawn an unknown entity"
end
if p == "" then
p = player:get_pos()
p = player:getpos()
else
p = core.string_to_pos(p)
if p == nil then
@ -731,12 +641,9 @@ core.register_chatcommand("pulverize", {
core.log("error", "Unable to pulverize, no player.")
return false, "Unable to pulverize, no player."
end
local wielded_item = player:get_wielded_item()
if wielded_item:is_empty() then
if player:get_wielded_item():is_empty() then
return false, "Unable to pulverize, no item in hand."
end
core.log("action", name .. " pulverized \"" ..
wielded_item:get_name() .. " " .. wielded_item:get_count() .. "\"")
player:set_wielded_item(nil)
return true, "An item was pulverized."
end,
@ -754,7 +661,7 @@ core.register_on_punchnode(function(pos, node, puncher)
end)
core.register_chatcommand("rollback_check", {
params = "[<range>] [<seconds>] [<limit>]",
params = "[<range>] [<seconds>] [limit]",
description = "Check who last touched a node or a node near it"
.. " within the time specified by <seconds>. Default: range = 0,"
.. " seconds = 86400 = 24h, limit = 5",
@ -807,7 +714,7 @@ core.register_chatcommand("rollback_check", {
})
core.register_chatcommand("rollback", {
params = "(<name> [<seconds>]) | (:<actor> [<seconds>])",
params = "<player name> [<seconds>] | :<actor> [<seconds>]",
description = "Revert actions of a player. Default for <seconds> is 60",
privs = {rollback=true},
func = function(name, param)
@ -816,7 +723,7 @@ core.register_chatcommand("rollback", {
end
local target_name, seconds = string.match(param, ":([^ ]+) *(%d*)")
if not target_name then
local player_name
local player_name = nil
player_name, seconds = string.match(param, "([^ ]+) *(%d*)")
if not player_name then
return false, "Invalid parameters. See /help rollback"
@ -845,19 +752,15 @@ core.register_chatcommand("rollback", {
})
core.register_chatcommand("status", {
description = "Show server status",
description = "Print server status",
func = function(name, param)
local status = core.get_server_status(name, false)
if status and status ~= "" then
return true, status
end
return false, "This command was disabled by a mod or game"
return true, core.get_server_status()
end,
})
core.register_chatcommand("time", {
params = "[<0..23>:<0..59> | <0..24000>]",
description = "Show or set time of day",
params = "<0..23>:<0..59> | <0..24000>",
description = "Set time of day",
privs = {},
func = function(name, param)
if param == "" then
@ -896,52 +799,41 @@ core.register_chatcommand("time", {
})
core.register_chatcommand("days", {
description = "Show day count since world creation",
description = "Display day count",
func = function(name, param)
return true, "Current day is " .. core.get_day_count()
end
})
core.register_chatcommand("shutdown", {
params = "[<delay_in_seconds> | -1] [reconnect] [<message>]",
description = "Shutdown server (-1 cancels a delayed shutdown)",
description = "Shutdown server",
params = "[delay_in_seconds (non-negative number, or -1 to cancel)] [reconnect] [message]",
privs = {server=true},
func = function(name, param)
local delay, reconnect, message
delay, param = param:match("^%s*(%S+)(.*)")
if param then
reconnect, param = param:match("^%s*(%S+)(.*)")
end
message = param and param:match("^%s*(.+)") or ""
delay = tonumber(delay) or 0
local delay, reconnect, message = param:match("([^ ][-]?[0-9]+)([^ ]+)(.*)")
message = message or ""
if delay == 0 then
if delay ~= "" then
delay = tonumber(delay) or 0
else
delay = 0
core.log("action", name .. " shuts down server")
core.chat_send_all("*** Server shutting down (operator request).")
end
core.request_shutdown(message:trim(), core.is_yes(reconnect), delay)
return true
end,
})
core.register_chatcommand("ban", {
params = "[<name>]",
description = "Ban the IP of a player or show the ban list",
params = "<name>",
description = "Ban IP of player",
privs = {ban=true},
func = function(name, param)
if param == "" then
local ban_list = core.get_ban_list()
if ban_list == "" then
return true, "The ban list is empty."
else
return true, "Ban list: " .. ban_list
end
return true, "Ban list: " .. core.get_ban_list()
end
if not core.get_player_by_name(param) then
return false, "Player is not online."
end
if core.is_singleplayer() then
return false, "You cannot ban players in singleplayer!"
return false, "No such player."
end
if not core.ban_player(param) then
return false, "Failed to ban player."
@ -953,8 +845,8 @@ core.register_chatcommand("ban", {
})
core.register_chatcommand("unban", {
params = "<name> | <IP_address>",
description = "Remove IP ban belonging to a player/IP",
params = "<name/ip>",
description = "Remove IP ban",
privs = {ban=true},
func = function(name, param)
if not core.unban_player_or_ip(param) then
@ -966,7 +858,7 @@ core.register_chatcommand("unban", {
})
core.register_chatcommand("kick", {
params = "<name> [<reason>]",
params = "<name> [reason]",
description = "Kick a player",
privs = {kick=true},
func = function(name, param)
@ -985,34 +877,33 @@ core.register_chatcommand("kick", {
})
core.register_chatcommand("clearobjects", {
params = "[full | quick]",
params = "[full|quick]",
description = "Clear all objects in world",
privs = {server=true},
func = function(name, param)
local options = {}
if param == "" or param == "quick" then
options.mode = "quick"
elseif param == "full" then
if param == "" or param == "full" then
options.mode = "full"
elseif param == "quick" then
options.mode = "quick"
else
return false, "Invalid usage, see /help clearobjects."
end
core.log("action", name .. " clears all objects ("
.. options.mode .. " mode).")
core.chat_send_all("Clearing all objects. This may take a long time."
.. " You may experience a timeout. (by "
core.chat_send_all("Clearing all objects. This may take long."
.. " You may experience a timeout. (by "
.. name .. ")")
core.clear_objects(options)
core.log("action", "Object clearing done.")
core.chat_send_all("*** Cleared all objects.")
return true
end,
})
core.register_chatcommand("msg", {
params = "<name> <message>",
description = "Send a direct message to a player",
description = "Send a private message",
privs = {shout=true},
func = function(name, param)
local sendto, message = param:match("^(%S+)%s(.+)$")
@ -1023,17 +914,17 @@ core.register_chatcommand("msg", {
return false, "The player " .. sendto
.. " is not online."
end
core.log("action", "DM from " .. name .. " to " .. sendto
core.log("action", "PM from " .. name .. " to " .. sendto
.. ": " .. message)
core.chat_send_player(sendto, "DM from " .. name .. ": "
core.chat_send_player(sendto, "PM from " .. name .. ": "
.. message)
return true, "Message sent."
end,
})
core.register_chatcommand("last-login", {
params = "[<name>]",
description = "Get the last login time of a player or yourself",
params = "[name]",
description = "Get the last login time of a player",
func = function(name, param)
if param == "" then
param = name
@ -1049,14 +940,14 @@ core.register_chatcommand("last-login", {
})
core.register_chatcommand("clearinv", {
params = "[<name>]",
params = "[name]",
description = "Clear the inventory of yourself or another player",
func = function(name, param)
local player
if param and param ~= "" and param ~= name then
if not core.check_player_privs(name, {server=true}) then
return false, "You don't have permission"
.. " to clear another player's inventory (missing privilege: server)"
.. " to run this command (missing privilege: server)"
end
player = core.get_player_by_name(param)
core.chat_send_player(param, name.." cleared your inventory.")
@ -1075,34 +966,3 @@ core.register_chatcommand("clearinv", {
end
end,
})
local function handle_kill_command(killer, victim)
if core.settings:get_bool("enable_damage") == false then
return false, "Players can't be killed, damage has been disabled."
end
local victimref = core.get_player_by_name(victim)
if victimref == nil then
return false, string.format("Player %s is not online.", victim)
elseif victimref:get_hp() <= 0 then
if killer == victim then
return false, "You are already dead."
else
return false, string.format("%s is already dead.", victim)
end
end
if not killer == victim then
core.log("action", string.format("%s killed %s", killer, victim))
end
-- Kill victim
victimref:set_hp(0)
return true, string.format("%s has been killed.", victim)
end
core.register_chatcommand("kill", {
params = "[<name>]",
description = "Kill player or yourself",
privs = {server=true},
func = function(name, param)
return handle_kill_command(name, param == "" and name or param)
end,
})

View File

@ -21,10 +21,6 @@ core.EMERGE_GENERATED = 4
-- constants.h
-- Size of mapblocks in nodes
core.MAP_BLOCKSIZE = 16
-- Default maximal HP of a player
core.PLAYER_MAX_HP_DEFAULT = 20
-- Default maximal breath of a player
core.PLAYER_MAX_BREATH_DEFAULT = 11
-- light.h
-- Maximum value for node 'light_source' parameter

View File

@ -20,7 +20,7 @@ function core.node_metadata_inventory_move_allow_all()
end
function core.add_to_creative_inventory(itemstring)
core.log("deprecated", "core.add_to_creative_inventory is obsolete and does nothing.")
core.log("deprecated", "core.add_to_creative_inventory: This function is deprecated and does nothing.")
end
--

View File

@ -18,7 +18,3 @@ function core.create_detached_inventory(name, callbacks, player_name)
return core.create_detached_inventory_raw(name, player_name)
end
function core.remove_detached_inventory(name)
core.detached_inventories[name] = nil
return core.remove_detached_inventory_raw(name)
end

View File

@ -1,34 +1,6 @@
-- Minetest: builtin/item.lua
local builtin_shared = ...
local SCALE = 0.667
local facedir_to_euler = {
{y = 0, x = 0, z = 0},
{y = -math.pi/2, x = 0, z = 0},
{y = math.pi, x = 0, z = 0},
{y = math.pi/2, x = 0, z = 0},
{y = math.pi/2, x = -math.pi/2, z = math.pi/2},
{y = math.pi/2, x = math.pi, z = math.pi/2},
{y = math.pi/2, x = math.pi/2, z = math.pi/2},
{y = math.pi/2, x = 0, z = math.pi/2},
{y = -math.pi/2, x = math.pi/2, z = math.pi/2},
{y = -math.pi/2, x = 0, z = math.pi/2},
{y = -math.pi/2, x = -math.pi/2, z = math.pi/2},
{y = -math.pi/2, x = math.pi, z = math.pi/2},
{y = 0, x = 0, z = math.pi/2},
{y = 0, x = -math.pi/2, z = math.pi/2},
{y = 0, x = math.pi, z = math.pi/2},
{y = 0, x = math.pi/2, z = math.pi/2},
{y = math.pi, x = math.pi, z = math.pi/2},
{y = math.pi, x = math.pi/2, z = math.pi/2},
{y = math.pi, x = 0, z = math.pi/2},
{y = math.pi, x = -math.pi/2, z = math.pi/2},
{y = math.pi, x = math.pi, z = 0},
{y = -math.pi/2, x = math.pi, z = 0},
{y = 0, x = math.pi, z = 0},
{y = math.pi/2, x = math.pi, z = 0}
}
--
-- Falling stuff
@ -36,8 +8,8 @@ local facedir_to_euler = {
core.register_entity(":__builtin:falling_node", {
initial_properties = {
visual = "item",
visual_size = {x = SCALE, y = SCALE, z = SCALE},
visual = "wielditem",
visual_size = {x = 0.667, y = 0.667},
textures = {},
physical = true,
is_visible = false,
@ -50,116 +22,11 @@ core.register_entity(":__builtin:falling_node", {
set_node = function(self, node, meta)
self.node = node
meta = meta or {}
if type(meta.to_table) == "function" then
meta = meta:to_table()
end
for _, list in pairs(meta.inventory or {}) do
for i, stack in pairs(list) do
if type(stack) == "userdata" then
list[i] = stack:to_string()
end
end
end
local def = core.registered_nodes[node.name]
if not def then
-- Don't allow unknown nodes to fall
core.log("info",
"Unknown falling node removed at "..
core.pos_to_string(self.object:get_pos()))
self.object:remove()
return
end
self.meta = meta
if def.drawtype == "torchlike" or def.drawtype == "signlike" then
local textures
if def.tiles and def.tiles[1] then
local tile = def.tiles[1]
if type(tile) == "table" then
tile = tile.name
end
if def.drawtype == "torchlike" then
textures = { "("..tile..")^[transformFX", tile }
else
textures = { tile, "("..tile..")^[transformFX" }
end
end
local vsize
if def.visual_scale then
local s = def.visual_scale
vsize = {x = s, y = s, z = s}
end
self.object:set_properties({
is_visible = true,
visual = "upright_sprite",
visual_size = vsize,
textures = textures,
glow = def.light_source,
})
elseif def.drawtype ~= "airlike" then
local itemstring = node.name
if core.is_colored_paramtype(def.paramtype2) then
itemstring = core.itemstring_with_palette(itemstring, node.param2)
end
local vsize
if def.visual_scale then
local s = def.visual_scale * SCALE
vsize = {x = s, y = s, z = s}
end
self.object:set_properties({
is_visible = true,
wield_item = itemstring,
visual_size = vsize,
glow = def.light_source,
})
end
-- Rotate entity
if def.drawtype == "torchlike" then
self.object:set_yaw(math.pi*0.25)
elseif (node.param2 ~= 0 and (def.wield_image == ""
or def.wield_image == nil))
or def.drawtype == "signlike"
or def.drawtype == "mesh"
or def.drawtype == "normal"
or def.drawtype == "nodebox" then
if (def.paramtype2 == "facedir" or def.paramtype2 == "colorfacedir") then
local fdir = node.param2 % 32
-- Get rotation from a precalculated lookup table
local euler = facedir_to_euler[fdir + 1]
if euler then
self.object:set_rotation(euler)
end
elseif (def.paramtype2 == "wallmounted" or def.paramtype2 == "colorwallmounted") then
local rot = node.param2 % 8
local pitch, yaw, roll = 0, 0, 0
if rot == 1 then
pitch, yaw = math.pi, math.pi
elseif rot == 2 then
pitch, yaw = math.pi/2, math.pi/2
elseif rot == 3 then
pitch, yaw = math.pi/2, -math.pi/2
elseif rot == 4 then
pitch, yaw = math.pi/2, math.pi
elseif rot == 5 then
pitch, yaw = math.pi/2, 0
end
if def.drawtype == "signlike" then
pitch = pitch - math.pi/2
if rot == 0 then
yaw = yaw + math.pi/2
elseif rot == 1 then
yaw = yaw - math.pi/2
end
elseif def.drawtype == "mesh" or def.drawtype == "normal" then
if rot >= 0 and rot <= 1 then
roll = roll + math.pi
else
yaw = yaw + math.pi
end
end
self.object:set_rotation({x=pitch, y=yaw, z=roll})
end
end
self.meta = meta or {}
self.object:set_properties({
is_visible = true,
textures = {node.name},
})
end,
get_staticdata = function(self)
@ -185,12 +52,12 @@ core.register_entity(":__builtin:falling_node", {
on_step = function(self, dtime)
-- Set gravity
local acceleration = self.object:get_acceleration()
local acceleration = self.object:getacceleration()
if not vector.equals(acceleration, {x = 0, y = -10, z = 0}) then
self.object:set_acceleration({x = 0, y = -10, z = 0})
self.object:setacceleration({x = 0, y = -10, z = 0})
end
-- Turn to actual node when colliding with ground, or continue to move
local pos = self.object:get_pos()
local pos = self.object:getpos()
-- Position of bottom center point
local bcp = {x = pos.x, y = pos.y - 0.7, z = pos.z}
-- 'bcn' is nil for unloaded nodes
@ -242,46 +109,30 @@ core.register_entity(":__builtin:falling_node", {
end
end
-- Create node and remove entity
local def = core.registered_nodes[self.node.name]
if def then
if core.registered_nodes[self.node.name] then
core.add_node(np, self.node)
if self.meta then
local meta = core.get_meta(np)
meta:from_table(self.meta)
end
if def.sounds and def.sounds.place then
core.sound_play(def.sounds.place, {pos = np}, true)
end
end
self.object:remove()
core.check_for_falling(np)
return
end
local vel = self.object:get_velocity()
local vel = self.object:getvelocity()
if vector.equals(vel, {x = 0, y = 0, z = 0}) then
local npos = self.object:get_pos()
self.object:set_pos(vector.round(npos))
local npos = self.object:getpos()
self.object:setpos(vector.round(npos))
end
end
})
local function convert_to_falling_node(pos, node)
local obj = core.add_entity(pos, "__builtin:falling_node")
if not obj then
return false
local function spawn_falling_node(p, node, meta)
local obj = core.add_entity(p, "__builtin:falling_node")
if obj then
obj:get_luaentity():set_node(node, meta)
end
node.level = core.get_node_level(pos)
local meta = core.get_meta(pos)
local metatable = meta and meta:to_table() or {}
local def = core.registered_nodes[node.name]
if def and def.sounds and def.sounds.fall then
core.sound_play(def.sounds.fall, {pos = pos}, true)
end
obj:get_luaentity():set_node(node, metatable)
core.remove_node(pos)
return true
end
function core.spawn_falling_node(pos)
@ -289,30 +140,19 @@ function core.spawn_falling_node(pos)
if node.name == "air" or node.name == "ignore" then
return false
end
return convert_to_falling_node(pos, node)
local obj = core.add_entity(pos, "__builtin:falling_node")
if obj then
obj:get_luaentity():set_node(node)
core.remove_node(pos)
return true
end
return false
end
local function drop_attached_node(p)
local n = core.get_node(p)
local drops = core.get_node_drops(n, "")
local def = core.registered_items[n.name]
if def and def.preserve_metadata then
local oldmeta = core.get_meta(p):to_table().fields
-- Copy pos and node because the callback can modify them.
local pos_copy = {x=p.x, y=p.y, z=p.z}
local node_copy = {name=n.name, param1=n.param1, param2=n.param2}
local drop_stacks = {}
for k, v in pairs(drops) do
drop_stacks[k] = ItemStack(v)
end
drops = drop_stacks
def.preserve_metadata(pos_copy, node_copy, oldmeta, drops)
end
if def and def.sounds and def.sounds.fall then
core.sound_play(def.sounds.fall, {pos = p}, true)
end
core.remove_node(p)
for _, item in pairs(drops) do
for _, item in pairs(core.get_node_drops(n, "")) do
local pos = {
x = p.x + math.random()/2 - 0.25,
y = p.y + math.random()/2 - 0.25,
@ -365,7 +205,14 @@ function core.check_single_for_falling(p)
core.get_node_max_level(p_bottom))) and
(not d_bottom.walkable or d_bottom.buildable_to) then
convert_to_falling_node(p, n)
n.level = core.get_node_level(p)
local meta = core.get_meta(p)
local metatable = {}
if meta ~= nil then
metatable = meta:to_table()
end
core.remove_node(p)
spawn_falling_node(p, n, metatable)
return true
end
end
@ -466,3 +313,19 @@ local function on_punchnode(p, node)
core.check_for_falling(p)
end
core.register_on_punchnode(on_punchnode)
--
-- Globally exported functions
--
-- TODO remove this function after the 0.4.15 release
function nodeupdate(p)
core.log("deprecated", "nodeupdate: deprecated, please use core.check_for_falling instead")
core.check_for_falling(p)
end
-- TODO remove this function after the 0.4.15 release
function nodeupdate_single(p)
core.log("deprecated", "nodeupdate_single: deprecated, please use core.check_single_for_falling instead")
core.check_single_for_falling(p)
end

View File

@ -3,6 +3,7 @@
core.features = {
glasslike_framed = true,
nodebox_as_selectionbox = true,
chat_send_player_param3 = true,
get_all_craft_recipes_works = true,
use_texture_alpha = true,
no_legacy_abms = true,
@ -10,12 +11,6 @@ core.features = {
area_store_custom_ids = true,
add_entity_with_staticdata = true,
no_chat_message_prediction = true,
object_use_texture_alpha = true,
object_independent_selectionbox = true,
httpfetch_binary_data = true,
formspec_version_element = true,
area_store_persistent_ids = true,
pathfinder_works = true,
}
function core.has_feature(arg)

View File

@ -8,9 +8,6 @@ local blocks_forceloaded
local blocks_temploaded = {}
local total_forceloaded = 0
-- true, if the forceloaded blocks got changed (flag for persistence on-disk)
local forceload_blocks_changed = false
local BLOCKSIZE = core.MAP_BLOCKSIZE
local function get_blockpos(pos)
return {
@ -34,9 +31,6 @@ local function get_relevant_tables(transient)
end
function core.forceload_block(pos, transient)
-- set changed flag
forceload_blocks_changed = true
local blockpos = get_blockpos(pos)
local hash = core.hash_node_position(blockpos)
local relevant_table, other_table = get_relevant_tables(transient)
@ -57,9 +51,6 @@ function core.forceload_block(pos, transient)
end
function core.forceload_free_block(pos, transient)
-- set changed flag
forceload_blocks_changed = true
local blockpos = get_blockpos(pos)
local hash = core.hash_node_position(blockpos)
local relevant_table, other_table = get_relevant_tables(transient)
@ -104,28 +95,6 @@ core.after(5, function()
end
end)
-- persists the currently forceloaded blocks to disk
local function persist_forceloaded_blocks()
core.register_on_shutdown(function()
write_file(wpath.."/force_loaded.txt", blocks_forceloaded)
end
-- periodical forceload persistence
local function periodically_persist_forceloaded_blocks()
-- only persist if the blocks actually changed
if forceload_blocks_changed then
persist_forceloaded_blocks()
-- reset changed flag
forceload_blocks_changed = false
end
-- recheck after some time
core.after(10, periodically_persist_forceloaded_blocks)
end
-- persist periodically
core.after(5, periodically_persist_forceloaded_blocks)
-- persist on shutdown
core.register_on_shutdown(persist_forceloaded_blocks)
end)

View File

@ -1,38 +1,36 @@
local scriptpath = core.get_builtin_path()
local commonpath = scriptpath .. "common" .. DIR_DELIM
local gamepath = scriptpath .. "game".. DIR_DELIM
local scriptpath = core.get_builtin_path()..DIR_DELIM
local commonpath = scriptpath.."common"..DIR_DELIM
local gamepath = scriptpath.."game"..DIR_DELIM
-- Shared between builtin files, but
-- not exposed to outer context
local builtin_shared = {}
dofile(commonpath .. "vector.lua")
dofile(commonpath.."vector.lua")
dofile(gamepath .. "constants.lua")
assert(loadfile(gamepath .. "item.lua"))(builtin_shared)
dofile(gamepath .. "register.lua")
dofile(gamepath.."constants.lua")
assert(loadfile(gamepath.."item.lua"))(builtin_shared)
dofile(gamepath.."register.lua")
if core.settings:get_bool("profiler.load") then
profiler = dofile(scriptpath .. "profiler" .. DIR_DELIM .. "init.lua")
profiler = dofile(scriptpath.."profiler"..DIR_DELIM.."init.lua")
end
dofile(commonpath .. "after.lua")
dofile(gamepath .. "item_entity.lua")
dofile(gamepath .. "deprecated.lua")
dofile(gamepath .. "misc.lua")
dofile(gamepath .. "privileges.lua")
dofile(gamepath .. "auth.lua")
dofile(gamepath.."item_entity.lua")
dofile(gamepath.."deprecated.lua")
dofile(gamepath.."misc.lua")
dofile(gamepath.."privileges.lua")
dofile(gamepath.."auth.lua")
dofile(commonpath .. "chatcommands.lua")
dofile(gamepath .. "chat.lua")
dofile(commonpath .. "information_formspecs.lua")
dofile(gamepath .. "static_spawn.lua")
dofile(gamepath .. "detached_inventory.lua")
assert(loadfile(gamepath .. "falling.lua"))(builtin_shared)
dofile(gamepath .. "features.lua")
dofile(gamepath .. "voxelarea.lua")
dofile(gamepath .. "forceloading.lua")
dofile(gamepath .. "statbars.lua")
dofile(gamepath .. "knockback.lua")
dofile(gamepath.."chatcommands.lua")
dofile(gamepath.."static_spawn.lua")
dofile(gamepath.."detached_inventory.lua")
assert(loadfile(gamepath.."falling.lua"))(builtin_shared)
dofile(gamepath.."features.lua")
dofile(gamepath.."voxelarea.lua")
dofile(gamepath.."forceloading.lua")
dofile(gamepath.."statbars.lua")
profiler = nil

View File

@ -33,7 +33,7 @@ function core.get_pointed_thing_position(pointed_thing, above)
-- The position where a node would be dug
return pointed_thing.under
elseif pointed_thing.type == "object" then
return pointed_thing.ref and pointed_thing.ref:get_pos()
return pointed_thing.ref and pointed_thing.ref:getpos()
end
end
@ -197,7 +197,7 @@ function core.get_node_drops(node, toolname)
return {nodename}
elseif type(drop) == "string" then
-- itemstring drop
return drop ~= "" and {drop} or {}
return {drop}
elseif drop.items == nil then
-- drop = {} to disable default drop
return {}
@ -206,6 +206,7 @@ function core.get_node_drops(node, toolname)
-- Extended drop table
local got_items = {}
local got_count = 0
local _, item, tool
for _, item in ipairs(drop.items) do
local good_rarity = true
local good_tool = true
@ -250,6 +251,11 @@ local function user_name(user)
return user and user:get_player_name() or ""
end
local function is_protected(pos, name)
return core.is_protected(pos, name) and
not minetest.check_player_privs(name, "protection_bypass")
end
-- Returns a logging function. For empty names, does not log.
local function make_log(name)
return name ~= "" and core.log or function() end
@ -259,7 +265,7 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2,
prevent_after_place)
local def = itemstack:get_definition()
if def.type ~= "node" or pointed_thing.type ~= "node" then
return itemstack, nil
return itemstack, false
end
local under = pointed_thing.under
@ -272,7 +278,7 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2,
if not oldnode_under or not oldnode_above then
log("info", playername .. " tried to place"
.. " node in unloaded position " .. core.pos_to_string(above))
return itemstack, nil
return itemstack, false
end
local olddef_under = core.registered_nodes[oldnode_under.name]
@ -284,7 +290,7 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2,
log("info", playername .. " tried to place"
.. " node in invalid position " .. core.pos_to_string(above)
.. ", replacing " .. oldnode_above.name)
return itemstack, nil
return itemstack, false
end
-- Place above pointed node
@ -296,15 +302,18 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2,
place_to = {x = under.x, y = under.y, z = under.z}
end
if core.is_protected(place_to, playername) then
if is_protected(place_to, playername) then
log("action", playername
.. " tried to place " .. def.name
.. " at protected position "
.. core.pos_to_string(place_to))
core.record_protection_violation(place_to, playername)
return itemstack, nil
return itemstack
end
log("action", playername .. " places node "
.. def.name .. " at " .. core.pos_to_string(place_to))
local oldnode = core.get_node(place_to)
local newnode = {name = def.name, param1 = 0, param2 = param2 or 0}
@ -322,7 +331,7 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2,
-- Calculate the direction for furnaces and chests and stuff
elseif (def.paramtype2 == "facedir" or
def.paramtype2 == "colorfacedir") and not param2 then
local placer_pos = placer and placer:get_pos()
local placer_pos = placer and placer:getpos()
if placer_pos then
local dir = {
x = above.x - placer_pos.x,
@ -330,7 +339,7 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2,
z = above.z - placer_pos.z
}
newnode.param2 = core.dir_to_facedir(dir)
log("info", "facedir: " .. newnode.param2)
log("action", "facedir: " .. newnode.param2)
end
end
@ -358,23 +367,12 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2,
not builtin_shared.check_attached_node(place_to, newnode) then
log("action", "attached node " .. def.name ..
" can not be placed at " .. core.pos_to_string(place_to))
return itemstack, nil
return itemstack, false
end
log("action", playername .. " places node "
.. def.name .. " at " .. core.pos_to_string(place_to))
-- Add node and update
core.add_node(place_to, newnode)
-- Play sound if it was done by a player
if playername ~= "" and def.sounds and def.sounds.place then
core.sound_play(def.sounds.place, {
pos = place_to,
exclude_player = playername,
}, true)
end
local take_item = true
-- Run callback
@ -403,10 +401,9 @@ function core.item_place_node(itemstack, placer, pointed_thing, param2,
if take_item then
itemstack:take_item()
end
return itemstack, place_to
return itemstack, true
end
-- deprecated, item_place does not call this
function core.item_place_object(itemstack, placer, pointed_thing)
local pos = core.get_pointed_thing_position(pointed_thing, true)
if pos ~= nil then
@ -424,15 +421,14 @@ function core.item_place(itemstack, placer, pointed_thing, param2)
local nn = n.name
if core.registered_nodes[nn] and core.registered_nodes[nn].on_rightclick then
return core.registered_nodes[nn].on_rightclick(pointed_thing.under, n,
placer, itemstack, pointed_thing) or itemstack, nil
placer, itemstack, pointed_thing) or itemstack, false
end
end
-- Place if node, otherwise do nothing
if itemstack:get_definition().type == "node" then
return core.item_place_node(itemstack, placer, pointed_thing, param2)
end
return itemstack, nil
return itemstack
end
function core.item_secondary_use(itemstack, placer)
@ -445,6 +441,9 @@ function core.item_drop(itemstack, dropper, pos)
local cnt = itemstack:get_count()
if dropper_is_player then
p.y = p.y + 1.2
if dropper:get_player_control().sneak then
cnt = 1
end
end
local item = itemstack:take_item(cnt)
local obj = core.add_item(p, item)
@ -470,17 +469,9 @@ function core.do_item_eat(hp_change, replace_with_item, itemstack, user, pointed
return result
end
end
local def = itemstack:get_definition()
if itemstack:take_item() ~= nil then
user:set_hp(user:get_hp() + hp_change)
if def and def.sound and def.sound.eat then
core.sound_play(def.sound.eat, {
pos = user:get_pos(),
max_hear_distance = 16
}, true)
end
if replace_with_item then
if itemstack:is_empty() then
itemstack:add_item(replace_with_item)
@ -490,7 +481,7 @@ function core.do_item_eat(hp_change, replace_with_item, itemstack, user, pointed
if inv and inv:room_for_item("main", {name=replace_with_item}) then
inv:add_item("main", replace_with_item)
else
local pos = user:get_pos()
local pos = user:getpos()
pos.y = math.floor(pos.y + 0.5)
core.add_item(pos, replace_with_item)
end
@ -559,7 +550,7 @@ function core.node_dig(pos, node, digger)
return
end
if core.is_protected(pos, diggername) then
if is_protected(pos, diggername) then
log("action", diggername
.. " tried to dig " .. node.name
.. " at protected position "
@ -585,30 +576,13 @@ function core.node_dig(pos, node, digger)
if not core.settings:get_bool("creative_mode") then
wielded:add_wear(dp.wear)
if wielded:get_count() == 0 and wdef.sound and wdef.sound.breaks then
core.sound_play(wdef.sound.breaks, {
pos = pos,
gain = 0.5
}, true)
core.sound_play(wdef.sound.breaks, {pos = pos, gain = 0.5})
end
end
end
digger:set_wielded_item(wielded)
end
-- Check to see if metadata should be preserved.
if def and def.preserve_metadata then
local oldmeta = core.get_meta(pos):to_table().fields
-- Copy pos and node because the callback can modify them.
local pos_copy = {x=pos.x, y=pos.y, z=pos.z}
local node_copy = {name=node.name, param1=node.param1, param2=node.param2}
local drop_stacks = {}
for k, v in pairs(drops) do
drop_stacks[k] = ItemStack(v)
end
drops = drop_stacks
def.preserve_metadata(pos_copy, node_copy, oldmeta, drops)
end
-- Handle drops
core.handle_node_drops(pos, drops, digger)
@ -620,14 +594,6 @@ function core.node_dig(pos, node, digger)
-- Remove node and update
core.remove_node(pos)
-- Play sound if it was done by a player
if diggername ~= "" and def and def.sounds and def.sounds.dug then
core.sound_play(def.sounds.dug, {
pos = pos,
exclude_player = diggername,
}, true)
end
-- Run callback
if def and def.after_dig_node then
-- Copy pos and node because callback can modify them
@ -637,10 +603,15 @@ function core.node_dig(pos, node, digger)
end
-- Run script hook
local _, callback
for _, callback in ipairs(core.registered_on_dignodes) do
local origin = core.callback_origins[callback]
if origin then
core.set_last_run_mod(origin.mod)
--print("Running " .. tostring(callback) ..
-- " (a " .. origin.name .. " callback in " .. origin.mod .. ")")
else
--print("No data associated with callback")
end
-- Copy pos and node because callback can modify them
@ -650,18 +621,6 @@ function core.node_dig(pos, node, digger)
end
end
function core.itemstring_with_palette(item, palette_index)
local stack = ItemStack(item) -- convert to ItemStack
stack:get_meta():set_int("palette_index", palette_index)
return stack:to_string()
end
function core.itemstring_with_color(item, colorstring)
local stack = ItemStack(item) -- convert to ItemStack
stack:get_meta():set_string("color", colorstring)
return stack:to_string()
end
-- This is used to allow mods to redefine core.item_place and so on
-- NOTE: This is not the preferred way. Preferred way is to provide enough
-- callbacks to not require redefining global functions. -celeron55

View File

@ -14,9 +14,10 @@ end
-- If item_entity_ttl is not set, enity will have default life time
-- Setting it to -1 disables the feature
local time_to_live = tonumber(core.settings:get("item_entity_ttl")) or 900
local gravity = tonumber(core.settings:get("movement_gravity")) or 9.81
local time_to_live = tonumber(core.settings:get("item_entity_ttl"))
if not time_to_live then
time_to_live = 900
end
core.register_entity(":__builtin:item", {
initial_properties = {
@ -32,53 +33,50 @@ core.register_entity(":__builtin:item", {
is_visible = false,
},
itemstring = "",
moving_state = true,
slippery_state = false,
itemstring = '',
physical_state = true,
-- Item expiry
age = 0,
-- Pushing item out of solid nodes
force_out = nil,
force_out_start = nil,
set_item = function(self, item)
local stack = ItemStack(item or self.itemstring)
self.itemstring = stack:to_string()
if self.itemstring == "" then
-- item not yet known
return
set_item = function(self, itemstring)
self.itemstring = itemstring
local stack = ItemStack(itemstring)
local count = stack:get_count()
local max_count = stack:get_stack_max()
if count > max_count then
count = max_count
self.itemstring = stack:get_name().." "..max_count
end
local s = 0.2 + 0.1 * (count / max_count)
local c = s
local itemtable = stack:to_table()
local itemname = nil
if itemtable then
itemname = stack:to_table().name
end
-- Backwards compatibility: old clients use the texture
-- to get the type of the item
local itemname = stack:is_known() and stack:get_name() or "unknown"
local max_count = stack:get_stack_max()
local count = math.min(stack:get_count(), max_count)
local size = 0.2 + 0.1 * (count / max_count) ^ (1 / 3)
local coll_height = size * 0.75
local def = core.registered_nodes[itemname]
local glow = def and math.floor(def.light_source / 2 + 0.5)
self.object:set_properties({
local item_texture = nil
local item_type = ""
if core.registered_items[itemname] then
item_texture = core.registered_items[itemname].inventory_image
item_type = core.registered_items[itemname].type
end
local prop = {
is_visible = true,
visual = "wielditem",
textures = {itemname},
visual_size = {x = size, y = size},
collisionbox = {-size, -coll_height, -size,
size, coll_height, size},
selectionbox = {-size, -size, -size, size, size, size},
automatic_rotate = math.pi * 0.5 * 0.2 / size,
wield_item = self.itemstring,
glow = glow,
})
visual_size = {x = s, y = s},
collisionbox = {-c, -c, -c, c, c, c},
automatic_rotate = math.pi * 0.5,
wield_item = itemstring,
}
self.object:set_properties(prop)
end,
get_staticdata = function(self)
return core.serialize({
itemstring = self.itemstring,
always_collect = self.always_collect,
age = self.age,
dropped_by = self.dropped_by
})
@ -89,88 +87,93 @@ core.register_entity(":__builtin:item", {
local data = core.deserialize(staticdata)
if data and type(data) == "table" then
self.itemstring = data.itemstring
self.age = (data.age or 0) + dtime_s
self.always_collect = data.always_collect
if data.age then
self.age = data.age + dtime_s
else
self.age = dtime_s
end
self.dropped_by = data.dropped_by
end
else
self.itemstring = staticdata
end
self.object:set_armor_groups({immortal = 1})
self.object:set_velocity({x = 0, y = 2, z = 0})
self.object:set_acceleration({x = 0, y = -gravity, z = 0})
self:set_item()
self.object:setvelocity({x = 0, y = 2, z = 0})
self.object:setacceleration({x = 0, y = -10, z = 0})
self:set_item(self.itemstring)
end,
try_merge_with = function(self, own_stack, object, entity)
if self.age == entity.age then
-- Can not merge with itself
return false
end
local stack = ItemStack(entity.itemstring)
local name = stack:get_name()
if own_stack:get_name() ~= name or
own_stack:get_meta() ~= stack:get_meta() or
own_stack:get_wear() ~= stack:get_wear() or
own_stack:get_free_space() == 0 then
-- Can not merge different or full stack
return false
end
local count = own_stack:get_count()
local total_count = stack:get_count() + count
local max_count = stack:get_stack_max()
if total_count > max_count then
return false
end
-- Merge the remote stack into this one
local pos = object:get_pos()
pos.y = pos.y + ((total_count - count) / max_count) * 0.15
self.object:move_to(pos)
self.age = 0 -- Handle as new entity
own_stack:set_count(total_count)
self:set_item(own_stack)
entity.itemstring = ""
object:remove()
return true
end,
enable_physics = function(self)
if not self.physical_state then
self.physical_state = true
self.object:set_properties({physical = true})
self.object:set_velocity({x=0, y=0, z=0})
self.object:set_acceleration({x=0, y=-gravity, z=0})
end
end,
disable_physics = function(self)
if self.physical_state then
self.physical_state = false
self.object:set_properties({physical = false})
self.object:set_velocity({x=0, y=0, z=0})
self.object:set_acceleration({x=0, y=0, z=0})
-- moves items from this stack to an other stack
try_merge_with = function(self, own_stack, object, obj)
-- other item's stack
local stack = ItemStack(obj.itemstring)
-- only merge if items are the same
if own_stack:get_name() == stack:get_name() and
own_stack:get_meta() == stack:get_meta() and
own_stack:get_wear() == stack:get_wear() and
stack:get_free_space() > 0 then
local overflow = false
local count = stack:get_count() + own_stack:get_count()
local max_count = stack:get_stack_max()
if count > max_count then
overflow = true
stack:set_count(max_count)
count = count - max_count
own_stack:set_count(count)
else
self.itemstring = ''
stack:set_count(count)
end
local pos = object:getpos()
pos.y = pos.y + (count - stack:get_count()) / max_count * 0.15
object:moveto(pos, false)
local s, c
if not overflow then
obj.itemstring = stack:to_string()
s = 0.2 + 0.1 * (count / max_count)
c = s
object:set_properties({
visual_size = {x = s, y = s},
collisionbox = {-c, -c, -c, c, c, c},
wield_item = obj.itemstring
})
self.object:remove()
-- merging succeeded
return true
else
s = 0.4
c = 0.3
obj.itemstring = stack:to_string()
object:set_properties({
visual_size = {x = s, y = s},
collisionbox = {-c, -c, -c, c, c, c},
wield_item = obj.itemstring
})
s = 0.2 + 0.1 * (count / max_count)
c = s
self.itemstring = own_stack:to_string()
self.object:set_properties({
visual_size = {x = s, y = s},
collisionbox = {-c, -c, -c, c, c, c},
wield_item = self.itemstring
})
end
end
-- merging didn't succeed
return false
end,
on_step = function(self, dtime)
self.age = self.age + dtime
if time_to_live > 0 and self.age > time_to_live then
self.itemstring = ""
self.itemstring = ''
self.object:remove()
return
end
local pos = self.object:get_pos()
local node = core.get_node_or_nil({
x = pos.x,
y = pos.y + self.object:get_properties().collisionbox[2] - 0.05,
z = pos.z
})
local p = self.object:getpos()
p.y = p.y - 0.5
local node = core.get_node_or_nil(p)
-- Delete in 'ignore' nodes
if node and node.name == "ignore" then
self.itemstring = ""
@ -178,145 +181,48 @@ core.register_entity(":__builtin:item", {
return
end
local is_stuck = false
local snode = core.get_node_or_nil(pos)
if snode then
local sdef = core.registered_nodes[snode.name] or {}
is_stuck = (sdef.walkable == nil or sdef.walkable == true)
and (sdef.collision_box == nil or sdef.collision_box.type == "regular")
and (sdef.node_box == nil or sdef.node_box.type == "regular")
end
-- Push item out when stuck inside solid node
if is_stuck then
local shootdir
local order = {
{x=1, y=0, z=0}, {x=-1, y=0, z= 0},
{x=0, y=0, z=1}, {x= 0, y=0, z=-1},
}
-- Check which one of the 4 sides is free
for o = 1, #order do
local cnode = core.get_node(vector.add(pos, order[o])).name
local cdef = core.registered_nodes[cnode] or {}
if cnode ~= "ignore" and cdef.walkable == false then
shootdir = order[o]
break
end
end
-- If none of the 4 sides is free, check upwards
if not shootdir then
shootdir = {x=0, y=1, z=0}
local cnode = core.get_node(vector.add(pos, shootdir)).name
if cnode == "ignore" then
shootdir = nil -- Do not push into ignore
end
end
if shootdir then
-- Set new item moving speed accordingly
local newv = vector.multiply(shootdir, 3)
self:disable_physics()
self.object:set_velocity(newv)
self.force_out = newv
self.force_out_start = vector.round(pos)
return
end
elseif self.force_out then
-- This code runs after the entity got a push from the above code.
-- It makes sure the entity is entirely outside the solid node
local c = self.object:get_properties().collisionbox
local s = self.force_out_start
local f = self.force_out
local ok = (f.x > 0 and pos.x + c[1] > s.x + 0.5) or
(f.y > 0 and pos.y + c[2] > s.y + 0.5) or
(f.z > 0 and pos.z + c[3] > s.z + 0.5) or
(f.x < 0 and pos.x + c[4] < s.x - 0.5) or
(f.z < 0 and pos.z + c[6] < s.z - 0.5)
if ok then
-- Item was successfully forced out
self.force_out = nil
self:enable_physics()
end
end
if not self.physical_state then
return -- Don't do anything
end
-- Slide on slippery nodes
local vel = self.object:get_velocity()
local def = node and core.registered_nodes[node.name]
local is_moving = (def and not def.walkable) or
vel.x ~= 0 or vel.y ~= 0 or vel.z ~= 0
local is_slippery = false
if def and def.walkable then
local slippery = core.get_item_group(node.name, "slippery")
is_slippery = slippery ~= 0
if is_slippery and (math.abs(vel.x) > 0.2 or math.abs(vel.z) > 0.2) then
-- Horizontal deceleration
local slip_factor = 4.0 / (slippery + 4)
self.object:set_acceleration({
x = -vel.x * slip_factor,
y = 0,
z = -vel.z * slip_factor
})
elseif vel.y == 0 then
is_moving = false
end
end
if self.moving_state == is_moving and
self.slippery_state == is_slippery then
-- Do not update anything until the moving state changes
return
end
self.moving_state = is_moving
self.slippery_state = is_slippery
if is_moving then
self.object:set_acceleration({x = 0, y = -gravity, z = 0})
else
self.object:set_acceleration({x = 0, y = 0, z = 0})
self.object:set_velocity({x = 0, y = 0, z = 0})
end
--Only collect items if not moving
if is_moving then
return
end
-- Collect the items around to merge with
local own_stack = ItemStack(self.itemstring)
if own_stack:get_free_space() == 0 then
return
end
local objects = core.get_objects_inside_radius(pos, 1.0)
for k, obj in pairs(objects) do
local entity = obj:get_luaentity()
if entity and entity.name == "__builtin:item" then
if self:try_merge_with(own_stack, obj, entity) then
own_stack = ItemStack(self.itemstring)
if own_stack:get_free_space() == 0 then
return
-- If node is nil (unloaded area), or node is not registered, or node is
-- walkably solid and item is resting on nodebox
local v = self.object:getvelocity()
if not node or not core.registered_nodes[node.name] or
core.registered_nodes[node.name].walkable and v.y == 0 then
if self.physical_state then
local own_stack = ItemStack(self.object:get_luaentity().itemstring)
-- Merge with close entities of the same item
for _, object in ipairs(core.get_objects_inside_radius(p, 0.8)) do
local obj = object:get_luaentity()
if obj and obj.name == "__builtin:item"
and obj.physical_state == false then
if self:try_merge_with(own_stack, object, obj) then
return
end
end
end
self.object:setvelocity({x = 0, y = 0, z = 0})
self.object:setacceleration({x = 0, y = 0, z = 0})
self.physical_state = false
self.object:set_properties({physical = false})
end
else
if not self.physical_state then
self.object:setvelocity({x = 0, y = 0, z = 0})
self.object:setacceleration({x = 0, y = -10, z = 0})
self.physical_state = true
self.object:set_properties({physical = true})
end
end
end,
on_punch = function(self, hitter)
local inv = hitter:get_inventory()
if inv and self.itemstring ~= "" then
if inv and self.itemstring ~= '' then
local left = inv:add_item("main", self.itemstring)
if left and not left:is_empty() then
self:set_item(left)
self.itemstring = left:to_string()
return
end
end
self.itemstring = ""
self.itemstring = ''
self.object:remove()
end,
})

View File

@ -1,46 +0,0 @@
-- can be overriden by mods
function core.calculate_knockback(player, hitter, time_from_last_punch, tool_capabilities, dir, distance, damage)
if damage == 0 or player:get_armor_groups().immortal then
return 0.0
end
local m = 8
-- solve m - m*e^(k*4) = 4 for k
local k = -0.17328
local res = m - m * math.exp(k * damage)
if distance < 2.0 then
res = res * 1.1 -- more knockback when closer
elseif distance > 4.0 then
res = res * 0.9 -- less when far away
end
return res
end
local function vector_absmax(v)
local max, abs = math.max, math.abs
return max(max(abs(v.x), abs(v.y)), abs(v.z))
end
core.register_on_punchplayer(function(player, hitter, time_from_last_punch, tool_capabilities, unused_dir, damage)
if player:get_hp() == 0 then
return -- RIP
end
-- Server::handleCommand_Interact() adds eye offset to one but not the other
-- so the direction is slightly off, calculate it ourselves
local dir = vector.subtract(player:get_pos(), hitter:get_pos())
local d = vector.length(dir)
if d ~= 0.0 then
dir = vector.divide(dir, d)
end
local k = core.calculate_knockback(player, hitter, time_from_last_punch, tool_capabilities, dir, d, damage)
local kdir = vector.multiply(dir, k)
if vector_absmax(kdir) < 1.0 then
return -- barely noticeable, so don't even send
end
player:add_player_velocity(kdir)
end)

View File

@ -39,39 +39,35 @@ function core.check_player_privs(name, ...)
return true, ""
end
local player_list = {}
function core.send_join_message(player_name)
if not core.is_singleplayer() then
core.register_on_joinplayer(function(player)
local player_name = player:get_player_name()
player_list[player_name] = player
if not minetest.is_singleplayer() then
core.chat_send_all("*** " .. player_name .. " joined the game.")
end
end
end)
function core.send_leave_message(player_name, timed_out)
core.register_on_leaveplayer(function(player, timed_out)
local player_name = player:get_player_name()
player_list[player_name] = nil
local announcement = "*** " .. player_name .. " left the game."
if timed_out then
announcement = announcement .. " (timed out)"
end
core.chat_send_all(announcement)
end
end)
core.register_on_joinplayer(function(player)
local player_name = player:get_player_name()
if not core.is_singleplayer() then
local status = core.get_server_status(player_name, true)
if status and status ~= "" then
core.chat_send_player(player_name, status)
function core.get_connected_players()
local temp_table = {}
for index, value in pairs(player_list) do
if value:is_player_connected() then
temp_table[#temp_table + 1] = value
end
end
core.send_join_message(player_name)
end)
core.register_on_leaveplayer(function(player, timed_out)
local player_name = player:get_player_name()
core.send_leave_message(player_name, timed_out)
end)
return temp_table
end
function core.is_player(player)
@ -83,21 +79,19 @@ function core.is_player(player)
end
function core.player_exists(name)
return core.get_auth_handler().get_auth(name) ~= nil
function minetest.player_exists(name)
return minetest.get_auth_handler().get_auth(name) ~= nil
end
-- Returns two position vectors representing a box of `radius` in each
-- direction centered around the player corresponding to `player_name`
function core.get_player_radius_area(player_name, radius)
local player = core.get_player_by_name(player_name)
if player == nil then
return nil
end
local p1 = player:get_pos()
local p1 = player:getpos()
local p2 = p1
if radius then
@ -108,25 +102,20 @@ function core.get_player_radius_area(player_name, radius)
return p1, p2
end
function core.hash_node_position(pos)
return (pos.z + 32768) * 65536 * 65536
+ (pos.y + 32768) * 65536
+ pos.x + 32768
return (pos.z+32768)*65536*65536 + (pos.y+32768)*65536 + pos.x+32768
end
function core.get_position_from_hash(hash)
local pos = {}
pos.x = (hash % 65536) - 32768
hash = math.floor(hash / 65536)
pos.y = (hash % 65536) - 32768
hash = math.floor(hash / 65536)
pos.z = (hash % 65536) - 32768
pos.x = (hash%65536) - 32768
hash = math.floor(hash/65536)
pos.y = (hash%65536) - 32768
hash = math.floor(hash/65536)
pos.z = (hash%65536) - 32768
return pos
end
function core.get_item_group(name, group)
if not core.registered_items[name] or not
core.registered_items[name].groups[group] then
@ -135,13 +124,11 @@ function core.get_item_group(name, group)
return core.registered_items[name].groups[group]
end
function core.get_node_group(name, group)
core.log("deprecated", "Deprecated usage of get_node_group, use get_item_group instead")
return core.get_item_group(name, group)
end
function core.setting_get_pos(name)
local value = core.settings:get(name)
if not value then
@ -150,68 +137,17 @@ function core.setting_get_pos(name)
return core.string_to_pos(value)
end
-- To be overriden by protection mods
function core.is_protected(pos, name)
return false
end
function core.record_protection_violation(pos, name)
for _, func in pairs(core.registered_on_protection_violation) do
func(pos, name)
end
end
-- Checks if specified volume intersects a protected volume
function core.is_area_protected(minp, maxp, player_name, interval)
-- 'interval' is the largest allowed interval for the 3D lattice of checks.
-- Compute the optimal float step 'd' for each axis so that all corners and
-- borders are checked. 'd' will be smaller or equal to 'interval'.
-- Subtracting 1e-4 ensures that the max co-ordinate will be reached by the
-- for loop (which might otherwise not be the case due to rounding errors).
-- Default to 4
interval = interval or 4
local d = {}
for _, c in pairs({"x", "y", "z"}) do
if minp[c] > maxp[c] then
-- Repair positions: 'minp' > 'maxp'
local tmp = maxp[c]
maxp[c] = minp[c]
minp[c] = tmp
end
if maxp[c] > minp[c] then
d[c] = (maxp[c] - minp[c]) /
math.ceil((maxp[c] - minp[c]) / interval) - 1e-4
else
d[c] = 1 -- Any value larger than 0 to avoid division by zero
end
end
for zf = minp.z, maxp.z, d.z do
local z = math.floor(zf + 0.5)
for yf = minp.y, maxp.y, d.y do
local y = math.floor(yf + 0.5)
for xf = minp.x, maxp.x, d.x do
local x = math.floor(xf + 0.5)
local pos = {x = x, y = y, z = z}
if core.is_protected(pos, player_name) then
return pos
end
end
end
end
return false
end
local raillike_ids = {}
local raillike_cur_id = 0
function core.raillike_group(name)
@ -224,9 +160,7 @@ function core.raillike_group(name)
return id
end
-- HTTP callback interface
function core.http_add_fetch(httpenv)
httpenv.fetch = function(req, callback)
local handle = httpenv.fetch_async(req)
@ -245,12 +179,11 @@ function core.http_add_fetch(httpenv)
return httpenv
end
function core.close_formspec(player_name, formname)
return core.show_formspec(player_name, formname, "")
return minetest.show_formspec(player_name, formname, "")
end
function core.cancel_shutdown_requests()
core.request_shutdown("", false, -1)
end

View File

@ -11,14 +11,11 @@ function core.register_privilege(name, param)
if def.give_to_singleplayer == nil then
def.give_to_singleplayer = true
end
if def.give_to_admin == nil then
def.give_to_admin = def.give_to_singleplayer
end
if def.description == nil then
def.description = "(no description)"
end
end
local def
local def = {}
if type(param) == "table" then
def = param
else
@ -34,7 +31,7 @@ core.register_privilege("basic_privs", "Can modify 'shout' and 'interact' privil
core.register_privilege("privs", "Can modify privileges")
core.register_privilege("teleport", {
description = "Can teleport self",
description = "Can use /teleport command",
give_to_singleplayer = false,
})
core.register_privilege("bring", {
@ -42,13 +39,12 @@ core.register_privilege("bring", {
give_to_singleplayer = false,
})
core.register_privilege("settime", {
description = "Can set the time of day using /time",
description = "Can use /time",
give_to_singleplayer = false,
})
core.register_privilege("server", {
description = "Can do server maintenance stuff",
give_to_singleplayer = false,
give_to_admin = true,
})
core.register_privilege("protection_bypass", {
description = "Can bypass node protection in the world",
@ -57,12 +53,10 @@ core.register_privilege("protection_bypass", {
core.register_privilege("ban", {
description = "Can ban and unban players",
give_to_singleplayer = false,
give_to_admin = true,
})
core.register_privilege("kick", {
description = "Can kick players",
give_to_singleplayer = false,
give_to_admin = true,
})
core.register_privilege("give", {
description = "Can use /give and /giveme",
@ -71,31 +65,28 @@ core.register_privilege("give", {
core.register_privilege("password", {
description = "Can use /setpassword and /clearpassword",
give_to_singleplayer = false,
give_to_admin = true,
})
core.register_privilege("fly", {
description = "Can use fly mode",
description = "Can fly using the free_move mode",
give_to_singleplayer = false,
})
core.register_privilege("fast", {
description = "Can use fast mode",
description = "Can walk fast using the fast_move mode",
give_to_singleplayer = false,
})
core.register_privilege("noclip", {
description = "Can fly through solid nodes using noclip mode",
description = "Can fly through walls",
give_to_singleplayer = false,
})
core.register_privilege("rollback", {
description = "Can use the rollback functionality",
give_to_singleplayer = false,
})
core.register_privilege("zoom", {
description = "Can zoom the camera",
give_to_singleplayer = false,
})
core.register_privilege("debug", {
description = "Allows enabling various debug options that may affect gameplay",
give_to_singleplayer = false,
give_to_admin = true,
})
core.register_can_bypass_userlimit(function(name, ip)
local privs = core.get_player_privs(name)
return privs["server"] or privs["ban"] or privs["privs"] or privs["password"]
end)

View File

@ -79,7 +79,6 @@ end
function core.register_abm(spec)
-- Add to core.registered_abms
assert(type(spec.action) == "function", "Required field 'action' of type function")
core.registered_abms[#core.registered_abms + 1] = spec
spec.mod_origin = core.get_current_modname() or "??"
end
@ -87,7 +86,6 @@ end
function core.register_lbm(spec)
-- Add to core.registered_lbms
check_modname_prefix(spec.name)
assert(type(spec.action) == "function", "Required field 'action' of type function")
core.registered_lbms[#core.registered_lbms + 1] = spec
spec.mod_origin = core.get_current_modname() or "??"
end
@ -118,6 +116,8 @@ function core.register_item(name, itemdef)
end
itemdef.name = name
local is_overriding = core.registered_items[name]
-- Apply defaults and add to registered_* table
if itemdef.type == "node" then
-- Use the nodebox as selection box if it's not set manually
@ -179,7 +179,13 @@ function core.register_item(name, itemdef)
--core.log("Registering item: " .. itemdef.name)
core.registered_items[itemdef.name] = itemdef
core.registered_aliases[itemdef.name] = nil
register_item_raw(itemdef)
-- Used to allow builtin to register ignore to registered_items
if name ~= "ignore" then
register_item_raw(itemdef)
elseif is_overriding then
core.log("warning", "Attempted redefinition of \"ignore\"")
end
end
function core.unregister_item(name)
@ -256,18 +262,6 @@ function core.register_tool(name, tooldef)
end
-- END Legacy stuff
-- This isn't just legacy, but more of a convenience feature
local toolcaps = tooldef.tool_capabilities
if toolcaps and toolcaps.punch_attack_uses == nil then
for _, cap in pairs(toolcaps.groupcaps or {}) do
local level = (cap.maxlevel or 0) - 1
if (cap.uses or 0) ~= 0 and level >= 0 then
toolcaps.punch_attack_uses = cap.uses * (3 ^ level)
break
end
end
end
core.register_item(name, tooldef)
end
@ -315,17 +309,18 @@ end
-- Alias the forbidden item names to "" so they can't be
-- created via itemstrings (e.g. /give)
local name
for name in pairs(forbidden_item_names) do
core.registered_aliases[name] = ""
register_alias_raw(name, "")
end
-- Obsolete:
-- Deprecated:
-- Aliases for core.register_alias (how ironic...)
-- core.alias_node = core.register_alias
-- core.alias_tool = core.register_alias
-- core.alias_craftitem = core.register_alias
--core.alias_node = core.register_alias
--core.alias_tool = core.register_alias
--core.alias_craftitem = core.register_alias
--
-- Built-in node definitions. Also defined in C.
@ -343,7 +338,7 @@ core.register_item(":unknown", {
})
core.register_node(":air", {
description = "Air",
description = "Air (you hacker you!)",
inventory_image = "air.png",
wield_image = "air.png",
drawtype = "airlike",
@ -360,7 +355,7 @@ core.register_node(":air", {
})
core.register_node(":ignore", {
description = "Ignore",
description = "Ignore (you hacker you!)",
inventory_image = "ignore.png",
wield_image = "ignore.png",
drawtype = "airlike",
@ -373,19 +368,11 @@ core.register_node(":ignore", {
air_equivalent = true,
drop = "",
groups = {not_in_creative_inventory=1},
on_place = function(itemstack, placer, pointed_thing)
core.chat_send_player(
placer:get_player_name(),
core.colorize("#FF0000",
"You can't place 'ignore' nodes!"))
return ""
end,
})
-- The hand (bare definition)
core.register_item(":", {
type = "none",
wield_image = "wieldhand.png",
groups = {not_in_creative_inventory=1},
})
@ -425,6 +412,10 @@ function core.run_callbacks(callbacks, mode, ...)
local origin = core.callback_origins[callbacks[i]]
if origin then
core.set_last_run_mod(origin.mod)
--print("Running " .. tostring(callbacks[i]) ..
-- " (a " .. origin.name .. " callback in " .. origin.mod .. ")")
else
--print("No data associated with callback")
end
local cb_ret = callbacks[i](...)
@ -452,18 +443,6 @@ function core.run_callbacks(callbacks, mode, ...)
return ret
end
function core.run_priv_callbacks(name, priv, caller, method)
local def = core.registered_privileges[priv]
if not def or not def["on_" .. method] or
not def["on_" .. method](name, caller) then
for _, func in ipairs(core["registered_on_priv_" .. method]) do
if not func(name, caller, priv) then
break
end
end
end
end
--
-- Callback registration
--
@ -523,32 +502,13 @@ local function make_registration_wrap(reg_fn_name, clear_fn_name)
return list
end
local function make_wrap_deregistration(reg_fn, clear_fn, list)
local unregister = function (key)
if type(key) ~= "string" then
error("key is not a string", 2)
end
if not list[key] then
error("Attempt to unregister non-existent element - '" .. key .. "'", 2)
end
local temporary_list = table.copy(list)
clear_fn()
for k,v in pairs(temporary_list) do
if key ~= k then
reg_fn(v)
end
end
end
return unregister
end
core.registered_on_player_hpchanges = { modifiers = { }, loggers = { } }
function core.registered_on_player_hpchange(player, hp_change, reason)
local last
function core.registered_on_player_hpchange(player, hp_change)
local last = false
for i = #core.registered_on_player_hpchanges.modifiers, 1, -1 do
local func = core.registered_on_player_hpchanges.modifiers[i]
hp_change, last = func(player, hp_change, reason)
hp_change, last = func(player, hp_change)
if type(hp_change) ~= "number" then
local debuginfo = debug.getinfo(func)
error("The register_on_hp_changes function has to return a number at " ..
@ -559,7 +519,7 @@ function core.registered_on_player_hpchange(player, hp_change, reason)
end
end
for i, func in ipairs(core.registered_on_player_hpchanges.loggers) do
func(player, hp_change, reason)
func(player, hp_change)
end
return hp_change
end
@ -580,13 +540,9 @@ core.registered_biomes = make_registration_wrap("register_biome", "cle
core.registered_ores = make_registration_wrap("register_ore", "clear_registered_ores")
core.registered_decorations = make_registration_wrap("register_decoration", "clear_registered_decorations")
core.unregister_biome = make_wrap_deregistration(core.register_biome,
core.clear_registered_biomes, core.registered_biomes)
core.registered_on_chat_messages, core.register_on_chat_message = make_registration()
core.registered_globalsteps, core.register_globalstep = make_registration()
core.registered_playerevents, core.register_playerevent = make_registration()
core.registered_on_mods_loaded, core.register_on_mods_loaded = make_registration()
core.registered_on_shutdown, core.register_on_shutdown = make_registration()
core.registered_on_punchnodes, core.register_on_punchnode = make_registration()
core.registered_on_placenodes, core.register_on_placenode = make_registration()
@ -605,16 +561,10 @@ core.registered_craft_predicts, core.register_craft_predict = make_registration(
core.registered_on_protection_violation, core.register_on_protection_violation = make_registration()
core.registered_on_item_eats, core.register_on_item_eat = make_registration()
core.registered_on_punchplayers, core.register_on_punchplayer = make_registration()
core.registered_on_priv_grant, core.register_on_priv_grant = make_registration()
core.registered_on_priv_revoke, core.register_on_priv_revoke = make_registration()
core.registered_can_bypass_userlimit, core.register_can_bypass_userlimit = make_registration()
core.registered_on_modchannel_message, core.register_on_modchannel_message = make_registration()
core.registered_on_auth_fail, core.register_on_auth_fail = make_registration()
core.registered_on_player_inventory_actions, core.register_on_player_inventory_action = make_registration()
core.registered_allow_player_inventory_actions, core.register_allow_player_inventory_action = make_registration()
--
-- Compatibility for on_mapgen_init()
--
core.register_on_mapgen_init = function(func) func(core.get_mapgen_params()) end

View File

@ -1,21 +1,23 @@
-- cache setting
local enable_damage = core.settings:get_bool("enable_damage")
local health_bar_definition = {
local health_bar_definition =
{
hud_elem_type = "statbar",
position = { x=0.5, y=1 },
text = "heart.png",
number = core.PLAYER_MAX_HP_DEFAULT,
number = 20,
direction = 0,
size = { x=24, y=24 },
offset = { x=(-10*24)-25, y=-(48+24+16)},
}
local breath_bar_definition = {
local breath_bar_definition =
{
hud_elem_type = "statbar",
position = { x=0.5, y=1 },
text = "bubble.png",
number = core.PLAYER_MAX_BREATH_DEFAULT,
number = 20,
direction = 0,
size = { x=24, y=24 },
offset = {x=25,y=-(48+24+16)},
@ -23,64 +25,60 @@ local breath_bar_definition = {
local hud_ids = {}
local function scaleToDefault(player, field)
-- Scale "hp" or "breath" to the default dimensions
local current = player["get_" .. field](player)
local nominal = core["PLAYER_MAX_".. field:upper() .. "_DEFAULT"]
local max_display = math.max(nominal,
math.max(player:get_properties()[field .. "_max"], current))
return current / max_display * nominal
end
local function initialize_builtin_statbars(player)
if not player:is_player() then
return
end
local function update_builtin_statbars(player)
local name = player:get_player_name()
if name == "" then
return
end
local flags = player:hud_get_flags()
if not hud_ids[name] then
if (hud_ids[name] == nil) then
hud_ids[name] = {}
-- flags are not transmitted to client on connect, we need to make sure
-- our current flags are transmitted by sending them actively
player:hud_set_flags(flags)
end
local hud = hud_ids[name]
local immortal = player:get_armor_groups().immortal == 1
if flags.healthbar and enable_damage and not immortal then
local number = scaleToDefault(player, "hp")
if hud.id_healthbar == nil then
local hud_def = table.copy(health_bar_definition)
hud_def.number = number
hud.id_healthbar = player:hud_add(hud_def)
else
player:hud_change(hud.id_healthbar, "number", number)
end
elseif hud.id_healthbar then
player:hud_remove(hud.id_healthbar)
hud.id_healthbar = nil
player:hud_set_flags(player:hud_get_flags())
end
local breath_max = player:get_properties().breath_max
if flags.breathbar and enable_damage and not immortal and
player:get_breath() < breath_max then
local number = 2 * scaleToDefault(player, "breath")
if hud.id_breathbar == nil then
local hud_def = table.copy(breath_bar_definition)
hud_def.number = number
hud.id_breathbar = player:hud_add(hud_def)
else
player:hud_change(hud.id_breathbar, "number", number)
if player:hud_get_flags().healthbar and enable_damage then
if hud_ids[name].id_healthbar == nil then
health_bar_definition.number = player:get_hp()
hud_ids[name].id_healthbar = player:hud_add(health_bar_definition)
end
elseif hud.id_breathbar then
player:hud_remove(hud.id_breathbar)
hud.id_breathbar = nil
else
if hud_ids[name].id_healthbar ~= nil then
player:hud_remove(hud_ids[name].id_healthbar)
hud_ids[name].id_healthbar = nil
end
end
if (player:get_breath() < 11) then
if player:hud_get_flags().breathbar and enable_damage then
if hud_ids[name].id_breathbar == nil then
hud_ids[name].id_breathbar = player:hud_add(breath_bar_definition)
end
else
if hud_ids[name].id_breathbar ~= nil then
player:hud_remove(hud_ids[name].id_breathbar)
hud_ids[name].id_breathbar = nil
end
end
elseif hud_ids[name].id_breathbar ~= nil then
player:hud_remove(hud_ids[name].id_breathbar)
hud_ids[name].id_breathbar = nil
end
end
local function cleanup_builtin_statbars(player)
if not player:is_player() then
return
end
local name = player:get_player_name()
if name == "" then
@ -95,64 +93,65 @@ local function player_event_handler(player,eventname)
local name = player:get_player_name()
if name == "" or not hud_ids[name] then
if name == "" then
return
end
if eventname == "health_changed" then
update_builtin_statbars(player)
initialize_builtin_statbars(player)
if hud_ids[name].id_healthbar then
if hud_ids[name].id_healthbar ~= nil then
player:hud_change(hud_ids[name].id_healthbar,"number",player:get_hp())
return true
end
end
if eventname == "breath_changed" then
update_builtin_statbars(player)
initialize_builtin_statbars(player)
if hud_ids[name].id_breathbar then
if hud_ids[name].id_breathbar ~= nil then
player:hud_change(hud_ids[name].id_breathbar,"number",player:get_breath()*2)
return true
end
end
if eventname == "hud_changed" or eventname == "properties_changed" then
update_builtin_statbars(player)
if eventname == "hud_changed" then
initialize_builtin_statbars(player)
return true
end
return false
end
function core.hud_replace_builtin(hud_name, definition)
function core.hud_replace_builtin(name, definition)
if type(definition) ~= "table" or
definition.hud_elem_type ~= "statbar" then
if definition == nil or
type(definition) ~= "table" or
definition.hud_elem_type ~= "statbar" then
return false
end
if hud_name == "health" then
if name == "health" then
health_bar_definition = definition
for name, ids in pairs(hud_ids) do
for name,ids in pairs(hud_ids) do
local player = core.get_player_by_name(name)
if player and ids.id_healthbar then
player:hud_remove(ids.id_healthbar)
ids.id_healthbar = nil
update_builtin_statbars(player)
if player and hud_ids[name].id_healthbar then
player:hud_remove(hud_ids[name].id_healthbar)
initialize_builtin_statbars(player)
end
end
return true
end
if hud_name == "breath" then
if name == "breath" then
breath_bar_definition = definition
for name, ids in pairs(hud_ids) do
for name,ids in pairs(hud_ids) do
local player = core.get_player_by_name(name)
if player and ids.id_breathbar then
player:hud_remove(ids.id_breathbar)
ids.id_breathbar = nil
update_builtin_statbars(player)
if player and hud_ids[name].id_breathbar then
player:hud_remove(hud_ids[name].id_breathbar)
initialize_builtin_statbars(player)
end
end
return true
@ -161,10 +160,6 @@ function core.hud_replace_builtin(hud_name, definition)
return false
end
-- Append "update_builtin_statbars" as late as possible
-- This ensures that the HUD is hidden when the flags are updated in this callback
core.register_on_mods_loaded(function()
core.register_on_joinplayer(update_builtin_statbars)
end)
core.register_on_joinplayer(initialize_builtin_statbars)
core.register_on_leaveplayer(cleanup_builtin_statbars)
core.register_playerevent(player_event_handler)

View File

@ -1,13 +1,15 @@
-- Minetest: builtin/static_spawn.lua
local static_spawnpoint_string = core.settings:get("static_spawnpoint")
if static_spawnpoint_string and
static_spawnpoint_string ~= "" and
not core.setting_get_pos("static_spawnpoint") then
error('The static_spawnpoint setting is invalid: "' ..
static_spawnpoint_string .. '"')
local function warn_invalid_static_spawnpoint()
if core.settings:get("static_spawnpoint") and
not core.setting_get_pos("static_spawnpoint") then
core.log("error", "The static_spawnpoint setting is invalid: \""..
core.settings:get("static_spawnpoint").."\"")
end
end
warn_invalid_static_spawnpoint()
local function put_player_in_spawn(player_obj)
local static_spawnpoint = core.setting_get_pos("static_spawnpoint")
if not static_spawnpoint then
@ -15,7 +17,7 @@ local function put_player_in_spawn(player_obj)
end
core.log("action", "Moving " .. player_obj:get_player_name() ..
" to static spawnpoint at " .. core.pos_to_string(static_spawnpoint))
player_obj:set_pos(static_spawnpoint)
player_obj:setpos(static_spawnpoint)
return true
end

View File

@ -24,7 +24,7 @@ math.randomseed(os.time())
minetest = core
-- Load other files
local scriptdir = core.get_builtin_path()
local scriptdir = core.get_builtin_path() .. DIR_DELIM
local gamepath = scriptdir .. "game" .. DIR_DELIM
local clientpath = scriptdir .. "client" .. DIR_DELIM
local commonpath = scriptdir .. "common" .. DIR_DELIM

View File

@ -41,7 +41,7 @@ local function render_client_count(n)
end
local function configure_selected_world_params(idx)
local worldconfig = pkgmgr.get_worldconfig(menudata.worldlist:get_list()[idx].path)
local worldconfig = modmgr.get_worldconfig(menudata.worldlist:get_list()[idx].path)
if worldconfig.creative_mode then
core.settings:set("creative_mode", worldconfig.creative_mode)
end
@ -93,9 +93,9 @@ function render_serverlist_row(spec, is_favorite)
end
end
local details = ""
local grey_out = not is_server_protocol_compat(spec.proto_min, spec.proto_max)
local details
if is_favorite then
details = "1,"
else
@ -118,11 +118,11 @@ function render_serverlist_row(spec, is_favorite)
end
if spec.clients and spec.clients_max then
local clients_color = ''
local clients_percent = 100 * spec.clients / spec.clients_max
-- Choose a color depending on how many clients are connected
-- (relatively to clients_max)
local clients_color
if grey_out then clients_color = '#aaaaaa'
elseif spec.clients == 0 then clients_color = '' -- 0 players: default/white
elseif clients_percent <= 60 then clients_color = '#a1e587' -- 0-60%: green
@ -171,28 +171,15 @@ os.tempfolder = function()
local filetocheck = os.tmpname()
os.remove(filetocheck)
-- luacheck: ignore
-- https://blogs.msdn.microsoft.com/vcblog/2014/06/18/c-runtime-crt-features-fixes-and-breaking-changes-in-visual-studio-14-ctp1/
-- The C runtime (CRT) function called by os.tmpname is tmpnam.
-- Microsofts tmpnam implementation in older CRT / MSVC releases is defective.
-- tmpnam return values starting with a backslash characterize this behavior.
-- https://sourceforge.net/p/mingw-w64/bugs/555/
-- MinGW tmpnam implementation is forwarded to the CRT directly.
-- https://sourceforge.net/p/mingw-w64/discussion/723797/thread/55520785/
-- MinGW links to an older CRT release (msvcrt.dll).
-- Due to legal concerns MinGW will never use a newer CRT.
--
-- Make use of TEMP to compose the temporary filename if an old
-- style tmpnam return value is detected.
if filetocheck:sub(1, 1) == "\\" then
local randname = "MTTempModFolder_" .. math.random(0,10000)
if DIR_DELIM == "\\" then
local tempfolder = os.getenv("TEMP")
return tempfolder .. filetocheck
else
local backstring = filetocheck:reverse()
return filetocheck:sub(0,filetocheck:len()-backstring:find(DIR_DELIM)+1) ..randname
end
local randname = "MTTempModFolder_" .. math.random(0,10000)
local backstring = filetocheck:reverse()
return filetocheck:sub(0, filetocheck:len() - backstring:find(DIR_DELIM) + 1) ..
randname
end
--------------------------------------------------------------------------------

View File

@ -24,163 +24,159 @@ local function modname_valid(name)
end
local function get_formspec(data)
local mod = data.list:get_list()[data.selected_mod] or {name = ""}
local mod = data.list:get_list()[data.selected_mod]
local retval =
"size[11.5,7.5,true]" ..
"label[0.5,0;" .. fgettext("World:") .. "]" ..
"label[1.75,0;" .. data.worldspec.name .. "]"
if mod.is_modpack or mod.type == "game" then
local info = minetest.formspec_escape(
core.get_content_info(mod.path).description)
if info == "" then
if mod.is_modpack then
info = fgettext("No modpack description provided.")
else
info = fgettext("No game description provided.")
end
end
retval = retval ..
"textarea[0.25,0.7;5.75,7.2;;" .. info .. ";]"
else
local hard_deps, soft_deps = pkgmgr.get_dependencies(mod.path)
local hard_deps_str = table.concat(hard_deps, ",")
local soft_deps_str = table.concat(soft_deps, ",")
retval = retval ..
"label[0,0.7;" .. fgettext("Mod:") .. "]" ..
"label[0.75,0.7;" .. mod.name .. "]"
if hard_deps_str == "" then
if soft_deps_str == "" then
retval = retval ..
"label[0,1.25;" ..
fgettext("No (optional) dependencies") .. "]"
else
retval = retval ..
"label[0,1.25;" .. fgettext("No hard dependencies") ..
"]" ..
"label[0,1.75;" .. fgettext("Optional dependencies:") ..
"]" ..
"textlist[0,2.25;5,4;world_config_optdepends;" ..
soft_deps_str .. ";0]"
end
else
if soft_deps_str == "" then
retval = retval ..
"label[0,1.25;" .. fgettext("Dependencies:") .. "]" ..
"textlist[0,1.75;5,4;world_config_depends;" ..
hard_deps_str .. ";0]" ..
"label[0,6;" .. fgettext("No optional dependencies") .. "]"
else
retval = retval ..
"label[0,1.25;" .. fgettext("Dependencies:") .. "]" ..
"textlist[0,1.75;5,2.125;world_config_depends;" ..
hard_deps_str .. ";0]" ..
"label[0,3.9;" .. fgettext("Optional dependencies:") ..
"]" ..
"textlist[0,4.375;5,1.8;world_config_optdepends;" ..
soft_deps_str .. ";0]"
end
end
if mod == nil then
mod = {name=""}
end
local hard_deps, soft_deps = modmgr.get_dependencies(mod.path)
retval = retval ..
"button[3.25,7;2.5,0.5;btn_config_world_save;" ..
fgettext("Save") .. "]" ..
"button[5.75,7;2.5,0.5;btn_config_world_cancel;" ..
fgettext("Cancel") .. "]"
"label[0,0.7;" .. fgettext("Mod:") .. "]" ..
"label[0.75,0.7;" .. mod.name .. "]" ..
"label[0,1.25;" .. fgettext("Dependencies:") .. "]" ..
"textlist[0,1.75;5,2.125;world_config_depends;" ..
hard_deps .. ";0]" ..
"label[0,3.875;" .. fgettext("Optional dependencies:") .. "]" ..
"textlist[0,4.375;5,1.8;world_config_optdepends;" ..
soft_deps .. ";0]" ..
"button[3.25,7;2.5,0.5;btn_config_world_save;" .. fgettext("Save") .. "]" ..
"button[5.75,7;2.5,0.5;btn_config_world_cancel;" .. fgettext("Cancel") .. "]"
if mod.name ~= "" and not mod.is_game_content then
if mod and mod.name ~= "" and not mod.is_game_content then
if mod.is_modpack then
local rawlist = data.list:get_raw_list()
if pkgmgr.is_modpack_entirely_enabled(data, mod.name) then
retval = retval ..
"button[5.5,0.125;3,0.5;btn_mp_disable;" ..
fgettext("Disable modpack") .. "]"
local all_enabled = true
for j = 1, #rawlist, 1 do
if rawlist[j].modpack == mod.name and not rawlist[j].enabled then
all_enabled = false
break
end
end
if all_enabled then
retval = retval .. "button[5.5,0.125;2.5,0.5;btn_mp_disable;" ..
fgettext("Disable MP") .. "]"
else
retval = retval ..
"button[5.5,0.125;3,0.5;btn_mp_enable;" ..
fgettext("Enable modpack") .. "]"
retval = retval .. "button[5.5,0.125;2.5,0.5;btn_mp_enable;" ..
fgettext("Enable MP") .. "]"
end
else
retval = retval ..
"checkbox[5.5,-0.125;cb_mod_enable;" .. fgettext("enabled") ..
";" .. tostring(mod.enabled) .. "]"
if mod.enabled then
retval = retval .. "checkbox[5.5,-0.125;cb_mod_enable;" ..
fgettext("enabled") .. ";true]"
else
retval = retval .. "checkbox[5.5,-0.125;cb_mod_enable;" ..
fgettext("enabled") .. ";false]"
end
end
end
if enabled_all then
retval = retval ..
"button[8.95,0.125;2.5,0.5;btn_disable_all_mods;" ..
fgettext("Disable all") .. "]"
"button[8.75,0.125;2.5,0.5;btn_disable_all_mods;" .. fgettext("Disable all") .. "]"
else
retval = retval ..
"button[8.95,0.125;2.5,0.5;btn_enable_all_mods;" ..
fgettext("Enable all") .. "]"
"button[8.75,0.125;2.5,0.5;btn_enable_all_mods;" .. fgettext("Enable all") .. "]"
end
return retval ..
retval = retval ..
"tablecolumns[color;tree;text]" ..
"table[5.5,0.75;5.75,6;world_config_modlist;" ..
pkgmgr.render_packagelist(data.list) .. ";" .. data.selected_mod .."]"
"table[5.5,0.75;5.75,6;world_config_modlist;"
retval = retval .. modmgr.render_modlist(data.list)
retval = retval .. ";" .. data.selected_mod .."]"
return retval
end
local function enable_mod(this, toset)
local mod = this.data.list:get_list()[this.data.selected_mod]
if mod.is_game_content then
-- game mods can't be enabled or disabled
elseif not mod.is_modpack then
if toset == nil then
mod.enabled = not mod.enabled
else
mod.enabled = toset
end
else
local list = this.data.list:get_raw_list()
for i=1,#list,1 do
if list[i].modpack == mod.name then
if toset == nil then
toset = not list[i].enabled
end
list[i].enabled = toset
end
end
end
end
local function handle_buttons(this, fields)
if fields.world_config_modlist then
local event = core.explode_table_event(fields.world_config_modlist)
if fields["world_config_modlist"] ~= nil then
local event = core.explode_table_event(fields["world_config_modlist"])
this.data.selected_mod = event.row
core.settings:set("world_config_selected_mod", event.row)
if event.type == "DCL" then
pkgmgr.enable_mod(this)
enable_mod(this)
end
return true
end
if fields.key_enter then
pkgmgr.enable_mod(this)
if fields["key_enter"] ~= nil then
enable_mod(this)
return true
end
if fields.cb_mod_enable ~= nil then
pkgmgr.enable_mod(this, core.is_yes(fields.cb_mod_enable))
if fields["cb_mod_enable"] ~= nil then
local toset = core.is_yes(fields["cb_mod_enable"])
enable_mod(this,toset)
return true
end
if fields.btn_mp_enable ~= nil or
fields.btn_mp_disable then
pkgmgr.enable_mod(this, fields.btn_mp_enable ~= nil)
if fields["btn_mp_enable"] ~= nil or
fields["btn_mp_disable"] then
local toset = (fields["btn_mp_enable"] ~= nil)
enable_mod(this,toset)
return true
end
if fields.btn_config_world_save then
local filename = this.data.worldspec.path .. DIR_DELIM .. "world.mt"
if fields["btn_config_world_save"] then
local filename = this.data.worldspec.path ..
DIR_DELIM .. "world.mt"
local worldfile = Settings(filename)
local mods = worldfile:to_table()
local rawlist = this.data.list:get_raw_list()
for i = 1, #rawlist do
local mod = rawlist[i]
local i,mod
for i,mod in ipairs(rawlist) do
if not mod.is_modpack and
not mod.is_game_content then
if modname_valid(mod.name) then
worldfile:set("load_mod_" .. mod.name,
mod.enabled and "true" or "false")
elseif mod.enabled then
gamedata.errormessage = fgettext_ne("Failed to enable mo" ..
"d \"$1\" as it contains disallowed characters. " ..
"Only characters [a-z0-9_] are allowed.",
mod.name)
worldfile:set("load_mod_"..mod.name, tostring(mod.enabled))
else
if mod.enabled then
gamedata.errormessage = fgettext_ne("Failed to enable mod \"$1\" as it contains disallowed characters. Only chararacters [a-z0-9_] are allowed.", mod.name)
end
end
mods["load_mod_" .. mod.name] = nil
mods["load_mod_"..mod.name] = nil
end
end
-- Remove mods that are not present anymore
for key in pairs(mods) do
if key:sub(1, 9) == "load_mod_" then
for key,value in pairs(mods) do
if key:sub(1,9) == "load_mod_" then
worldfile:remove(key)
end
end
@ -193,7 +189,7 @@ local function handle_buttons(this, fields)
return true
end
if fields.btn_config_world_cancel then
if fields["btn_config_world_cancel"] then
this:delete()
return true
end
@ -228,60 +224,62 @@ local function handle_buttons(this, fields)
end
function create_configure_world_dlg(worldidx)
local dlg = dialog_create("sp_config_world", get_formspec, handle_buttons)
local dlg = dialog_create("sp_config_world",
get_formspec,
handle_buttons,
nil)
dlg.data.selected_mod = tonumber(
core.settings:get("world_config_selected_mod")) or 0
dlg.data.worldspec = core.get_worlds()[worldidx]
if not dlg.data.worldspec then
dlg:delete()
return
dlg.data.selected_mod = tonumber(core.settings:get("world_config_selected_mod"))
if dlg.data.selected_mod == nil then
dlg.data.selected_mod = 0
end
dlg.data.worldconfig = pkgmgr.get_worldconfig(dlg.data.worldspec.path)
dlg.data.worldspec = core.get_worlds()[worldidx]
if dlg.data.worldspec == nil then dlg:delete() return nil end
if not dlg.data.worldconfig or not dlg.data.worldconfig.id or
dlg.data.worldconfig = modmgr.get_worldconfig(dlg.data.worldspec.path)
if dlg.data.worldconfig == nil or dlg.data.worldconfig.id == nil or
dlg.data.worldconfig.id == "" then
dlg:delete()
return
return nil
end
dlg.data.list = filterlist.create(
pkgmgr.preparemodlist,
pkgmgr.comparemod,
function(element, uid)
if element.name == uid then
return true
end
end,
function(element, criteria)
if criteria.hide_game and
element.is_game_content then
return false
end
modmgr.preparemodlist, --refresh
modmgr.comparemod, --compare
function(element,uid) --uid match
if element.name == uid then
return true
end
end,
function(element, criteria)
if criteria.hide_game and
element.is_game_content then
return false
end
if criteria.hide_modpackcontents and
element.modpack ~= nil then
return false
end
return true
end,
{
worldpath = dlg.data.worldspec.path,
gameid = dlg.data.worldspec.gameid
}
)
if criteria.hide_modpackcontents and
element.modpack ~= nil then
return false
end
return true
end, --filter
{ worldpath= dlg.data.worldspec.path,
gameid = dlg.data.worldspec.gameid }
)
if dlg.data.selected_mod > dlg.data.list:size() then
dlg.data.selected_mod = 0
end
dlg.data.list:set_filtercriteria({
hide_game = dlg.data.hide_gamemods,
hide_modpackcontents = dlg.data.hide_modpackcontents
})
dlg.data.list:set_filtercriteria(
{
hide_game=dlg.data.hide_gamemods,
hide_modpackcontents= dlg.data.hide_modpackcontents
})
dlg.data.list:add_sort_mechanism("alphabetic", sort_mod_list)
dlg.data.list:set_sortmode("alphabetic")

View File

@ -1,603 +0,0 @@
--Minetest
--Copyright (C) 2018 rubenwardy
--
--This program is free software; you can redistribute it and/or modify
--it under the terms of the GNU Lesser General Public License as published by
--the Free Software Foundation; either version 2.1 of the License, or
--(at your option) any later version.
--
--This program is distributed in the hope that it will be useful,
--but WITHOUT ANY WARRANTY; without even the implied warranty of
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--GNU Lesser General Public License for more details.
--
--You should have received a copy of the GNU Lesser General Public License along
--with this program; if not, write to the Free Software Foundation, Inc.,
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
local store = { packages = {}, packages_full = {} }
local package_dialog = {}
-- Screenshot
local screenshot_dir = core.get_cache_path() .. DIR_DELIM .. "cdb"
assert(core.create_dir(screenshot_dir))
local screenshot_downloading = {}
local screenshot_downloaded = {}
-- Filter
local search_string = ""
local cur_page = 1
local num_per_page = 5
local filter_type = 1
local filter_types_titles = {
fgettext("All packages"),
fgettext("Games"),
fgettext("Mods"),
fgettext("Texture packs"),
}
local filter_types_type = {
nil,
"game",
"mod",
"txp",
}
local function download_package(param)
if core.download_file(param.package.url, param.filename) then
return {
package = param.package,
filename = param.filename,
successful = true,
}
else
core.log("error", "downloading " .. dump(param.package.url) .. " failed")
return {
package = param.package,
successful = false,
}
end
end
local function start_install(calling_dialog, package)
local params = {
package = package,
filename = os.tempfolder() .. "_MODNAME_" .. package.name .. ".zip",
}
local function callback(result)
if result.successful then
local path, msg = pkgmgr.install(result.package.type,
result.filename, result.package.name,
result.package.path)
if not path then
gamedata.errormessage = msg
else
core.log("action", "Installed package to " .. path)
local conf_path
local name_is_title = false
if result.package.type == "mod" then
local actual_type = pkgmgr.get_folder_type(path)
if actual_type.type == "modpack" then
conf_path = path .. DIR_DELIM .. "modpack.conf"
else
conf_path = path .. DIR_DELIM .. "mod.conf"
end
elseif result.package.type == "game" then
conf_path = path .. DIR_DELIM .. "game.conf"
name_is_title = true
elseif result.package.type == "txp" then
conf_path = path .. DIR_DELIM .. "texture_pack.conf"
end
if conf_path then
local conf = Settings(conf_path)
if name_is_title then
conf:set("name", result.package.title)
else
conf:set("title", result.package.title)
conf:set("name", result.package.name)
end
if not conf:get("description") then
conf:set("description", result.package.short_description)
end
conf:set("author", result.package.author)
conf:set("release", result.package.release)
conf:write()
end
end
os.remove(result.filename)
else
gamedata.errormessage = fgettext("Failed to download $1", package.name)
end
if gamedata.errormessage == nil then
core.button_handler({btn_hidden_close_download=result})
else
core.button_handler({btn_hidden_close_download={successful=false}})
end
end
if not core.handle_async(download_package, params, callback) then
core.log("error", "ERROR: async event failed")
gamedata.errormessage = fgettext("Failed to download $1", package.name)
end
local new_dlg = dialog_create("store_downloading",
function(data)
return "size[7,2]label[0.25,0.75;" ..
fgettext("Downloading and installing $1, please wait...", data.title) .. "]"
end,
function(this,fields)
if fields["btn_hidden_close_download"] ~= nil then
this:delete()
return true
end
return false
end,
nil)
new_dlg:set_parent(calling_dialog)
new_dlg.data.title = package.title
calling_dialog:hide()
new_dlg:show()
end
local function get_screenshot(package)
if not package.thumbnail then
return defaulttexturedir .. "no_screenshot.png"
elseif screenshot_downloading[package.thumbnail] then
return defaulttexturedir .. "loading_screenshot.png"
end
-- Get tmp screenshot path
local filepath = screenshot_dir .. DIR_DELIM ..
package.type .. "-" .. package.author .. "-" .. package.name .. ".png"
-- Return if already downloaded
local file = io.open(filepath, "r")
if file then
file:close()
return filepath
end
-- Show error if we've failed to download before
if screenshot_downloaded[package.thumbnail] then
return defaulttexturedir .. "error_screenshot.png"
end
-- Download
local function download_screenshot(params)
return core.download_file(params.url, params.dest)
end
local function callback(success)
screenshot_downloading[package.thumbnail] = nil
screenshot_downloaded[package.thumbnail] = true
if not success then
core.log("warning", "Screenshot download failed for some reason")
end
ui.update()
end
if core.handle_async(download_screenshot,
{ dest = filepath, url = package.thumbnail }, callback) then
screenshot_downloading[package.thumbnail] = true
else
core.log("error", "ERROR: async event failed")
return defaulttexturedir .. "error_screenshot.png"
end
return defaulttexturedir .. "loading_screenshot.png"
end
function package_dialog.get_formspec()
local package = package_dialog.package
store.update_paths()
local formspec = {
"size[9,4;true]",
"image[0,1;4.5,3;", core.formspec_escape(get_screenshot(package)), ']',
"label[3.8,1;",
minetest.colorize(mt_color_green, core.formspec_escape(package.title)), "\n",
minetest.colorize('#BFBFBF', "by " .. core.formspec_escape(package.author)), "]",
"textarea[4,2;5.3,2;;;", core.formspec_escape(package.short_description), "]",
"button[0,0;2,1;back;", fgettext("Back"), "]",
}
if not package.path then
formspec[#formspec + 1] = "button[7,0;2,1;install;"
formspec[#formspec + 1] = fgettext("Install")
formspec[#formspec + 1] = "]"
elseif package.installed_release < package.release then
-- The install_ action also handles updating
formspec[#formspec + 1] = "button[7,0;2,1;install;"
formspec[#formspec + 1] = fgettext("Update")
formspec[#formspec + 1] = "]"
formspec[#formspec + 1] = "button[5,0;2,1;uninstall;"
formspec[#formspec + 1] = fgettext("Uninstall")
formspec[#formspec + 1] = "]"
else
formspec[#formspec + 1] = "button[7,0;2,1;uninstall;"
formspec[#formspec + 1] = fgettext("Uninstall")
formspec[#formspec + 1] = "]"
end
return table.concat(formspec, "")
end
function package_dialog.handle_submit(this, fields)
if fields.back then
this:delete()
return true
end
if fields.install then
start_install(this, package_dialog.package)
return true
end
if fields.uninstall then
local dlg_delmod = create_delete_content_dlg(package_dialog.package)
dlg_delmod:set_parent(this)
this:hide()
dlg_delmod:show()
return true
end
return false
end
function package_dialog.create(package)
package_dialog.package = package
return dialog_create("package_view",
package_dialog.get_formspec,
package_dialog.handle_submit,
nil)
end
function store.load()
local tmpdir = os.tempfolder()
local target = tmpdir .. DIR_DELIM .. "packages.json"
assert(core.create_dir(tmpdir))
local base_url = core.settings:get("contentdb_url")
local url = base_url ..
"/api/packages/?type=mod&type=game&type=txp&protocol_version=" ..
core.get_max_supp_proto()
for _, item in pairs(core.settings:get("contentdb_flag_blacklist"):split(",")) do
item = item:trim()
if item ~= "" then
url = url .. "&hide=" .. item
end
end
core.download_file(url, target)
local file = io.open(target, "r")
if file then
store.packages_full = core.parse_json(file:read("*all")) or {}
file:close()
for _, package in pairs(store.packages_full) do
package.url = base_url .. "/packages/" ..
package.author .. "/" .. package.name ..
"/releases/" .. package.release .. "/download/"
local name_len = #package.name
if package.type == "game" and name_len > 5 and package.name:sub(name_len - 4) == "_game" then
package.id = package.author:lower() .. "/" .. package.name:sub(1, name_len - 5)
else
package.id = package.author:lower() .. "/" .. package.name
end
end
store.packages = store.packages_full
store.loaded = true
end
core.delete_dir(tmpdir)
end
function store.update_paths()
local mod_hash = {}
pkgmgr.refresh_globals()
for _, mod in pairs(pkgmgr.global_mods:get_list()) do
if mod.author then
mod_hash[mod.author:lower() .. "/" .. mod.name] = mod
end
end
local game_hash = {}
pkgmgr.update_gamelist()
for _, game in pairs(pkgmgr.games) do
if game.author ~= "" then
game_hash[game.author:lower() .. "/" .. game.id] = game
end
end
local txp_hash = {}
for _, txp in pairs(pkgmgr.get_texture_packs()) do
if txp.author then
txp_hash[txp.author:lower() .. "/" .. txp.name] = txp
end
end
for _, package in pairs(store.packages_full) do
local content
if package.type == "mod" then
content = mod_hash[package.id]
elseif package.type == "game" then
content = game_hash[package.id]
elseif package.type == "txp" then
content = txp_hash[package.id]
end
if content then
package.path = content.path
package.installed_release = content.release or 0
else
package.path = nil
end
end
end
function store.filter_packages(query)
if query == "" and filter_type == 1 then
store.packages = store.packages_full
return
end
local keywords = {}
for word in query:lower():gmatch("%S+") do
table.insert(keywords, word)
end
local function matches_keywords(package, keywords)
for k = 1, #keywords do
local keyword = keywords[k]
if string.find(package.name:lower(), keyword, 1, true) or
string.find(package.title:lower(), keyword, 1, true) or
string.find(package.author:lower(), keyword, 1, true) or
string.find(package.short_description:lower(), keyword, 1, true) then
return true
end
end
return false
end
store.packages = {}
for _, package in pairs(store.packages_full) do
if (query == "" or matches_keywords(package, keywords)) and
(filter_type == 1 or package.type == filter_types_type[filter_type]) then
store.packages[#store.packages + 1] = package
end
end
end
function store.get_formspec(dlgdata)
store.update_paths()
dlgdata.pagemax = math.max(math.ceil(#store.packages / num_per_page), 1)
if cur_page > dlgdata.pagemax then
cur_page = 1
end
local formspec
if #store.packages_full > 0 then
formspec = {
"size[12,7;true]",
"position[0.5,0.55]",
"field[0.2,0.1;7.8,1;search_string;;",
core.formspec_escape(search_string), "]",
"field_close_on_enter[search_string;false]",
"button[7.7,-0.2;2,1;search;",
fgettext("Search"), "]",
"dropdown[9.7,-0.1;2.4;type;",
table.concat(filter_types_titles, ","),
";", filter_type, "]",
-- "textlist[0,1;2.4,5.6;a;",
-- table.concat(taglist, ","), "]",
-- Page nav buttons
"container[0,",
num_per_page + 1.5, "]",
"button[-0.1,0;3,1;back;",
fgettext("Back to Main Menu"), "]",
"button[7.1,0;1,1;pstart;<<]",
"button[8.1,0;1,1;pback;<]",
"label[9.2,0.2;",
tonumber(cur_page), " / ",
tonumber(dlgdata.pagemax), "]",
"button[10.1,0;1,1;pnext;>]",
"button[11.1,0;1,1;pend;>>]",
"container_end[]",
}
if #store.packages == 0 then
formspec[#formspec + 1] = "label[4,3;"
formspec[#formspec + 1] = fgettext("No results")
formspec[#formspec + 1] = "]"
end
else
formspec = {
"size[12,7;true]",
"position[0.5,0.55]",
"label[4,3;", fgettext("No packages could be retrieved"), "]",
"button[-0.1,",
num_per_page + 1.5,
";3,1;back;",
fgettext("Back to Main Menu"), "]",
}
end
local start_idx = (cur_page - 1) * num_per_page + 1
for i=start_idx, math.min(#store.packages, start_idx+num_per_page-1) do
local package = store.packages[i]
formspec[#formspec + 1] = "container[0.5,"
formspec[#formspec + 1] = (i - start_idx) * 1.1 + 1
formspec[#formspec + 1] = "]"
-- image
formspec[#formspec + 1] = "image[-0.4,0;1.5,1;"
formspec[#formspec + 1] = core.formspec_escape(get_screenshot(package))
formspec[#formspec + 1] = "]"
-- title
formspec[#formspec + 1] = "label[1,-0.1;"
formspec[#formspec + 1] = core.formspec_escape(
minetest.colorize(mt_color_green, package.title) ..
minetest.colorize("#BFBFBF", " by " .. package.author))
formspec[#formspec + 1] = "]"
-- description
if package.path and package.installed_release < package.release then
formspec[#formspec + 1] = "textarea[1.25,0.3;7.5,1;;;"
else
formspec[#formspec + 1] = "textarea[1.25,0.3;9,1;;;"
end
formspec[#formspec + 1] = core.formspec_escape(package.short_description)
formspec[#formspec + 1] = "]"
-- buttons
if not package.path then
formspec[#formspec + 1] = "button[9.9,0;1.5,1;install_"
formspec[#formspec + 1] = tostring(i)
formspec[#formspec + 1] = ";"
formspec[#formspec + 1] = fgettext("Install")
formspec[#formspec + 1] = "]"
else
if package.installed_release < package.release then
-- The install_ action also handles updating
formspec[#formspec + 1] = "button[8.4,0;1.5,1;install_"
formspec[#formspec + 1] = tostring(i)
formspec[#formspec + 1] = ";"
formspec[#formspec + 1] = fgettext("Update")
formspec[#formspec + 1] = "]"
end
formspec[#formspec + 1] = "button[9.9,0;1.5,1;uninstall_"
formspec[#formspec + 1] = tostring(i)
formspec[#formspec + 1] = ";"
formspec[#formspec + 1] = fgettext("Uninstall")
formspec[#formspec + 1] = "]"
end
--formspec[#formspec + 1] = "button[9.9,0;1.5,1;view_"
--formspec[#formspec + 1] = tostring(i)
--formspec[#formspec + 1] = ";"
--formspec[#formspec + 1] = fgettext("View")
--formspec[#formspec + 1] = "]"
formspec[#formspec + 1] = "container_end[]"
end
return table.concat(formspec, "")
end
function store.handle_submit(this, fields)
if fields.search or fields.key_enter_field == "search_string" then
search_string = fields.search_string:trim()
cur_page = 1
store.filter_packages(search_string)
return true
end
if fields.back then
this:delete()
return true
end
if fields.pstart then
cur_page = 1
return true
end
if fields.pend then
cur_page = this.data.pagemax
return true
end
if fields.pnext then
cur_page = cur_page + 1
if cur_page > this.data.pagemax then
cur_page = 1
end
return true
end
if fields.pback then
if cur_page == 1 then
cur_page = this.data.pagemax
else
cur_page = cur_page - 1
end
return true
end
if fields.type then
local new_type = table.indexof(filter_types_titles, fields.type)
if new_type ~= filter_type then
filter_type = new_type
store.filter_packages(search_string)
return true
end
end
local start_idx = (cur_page - 1) * num_per_page + 1
assert(start_idx ~= nil)
for i=start_idx, math.min(#store.packages, start_idx+num_per_page-1) do
local package = store.packages[i]
assert(package)
if fields["install_" .. i] then
start_install(this, package)
return true
end
if fields["uninstall_" .. i] then
local dlg_delmod = create_delete_content_dlg(package)
dlg_delmod:set_parent(this)
this:hide()
dlg_delmod:show()
return true
end
if fields["view_" .. i] then
local dlg = package_dialog.create(package)
dlg:set_parent(this)
this:hide()
dlg:show()
return true
end
end
return false
end
function create_store_dlg(type)
if not store.loaded or #store.packages_full == 0 then
store.load()
end
search_string = ""
cur_page = 1
store.filter_packages(search_string)
return dialog_create("store",
store.get_formspec,
store.handle_submit,
nil)
end

View File

@ -15,56 +15,11 @@
--with this program; if not, write to the Free Software Foundation, Inc.,
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
local worldname = ""
local function create_world_formspec(dialogdata)
local mapgens = core.get_mapgen_names()
local current_seed = core.settings:get("fixed_map_seed") or ""
local current_mg = core.settings:get("mg_name")
local gameid = core.settings:get("menu_last_game")
local gameidx = 0
if gameid ~= nil then
local _
_, gameidx = pkgmgr.find_by_gameid(gameid)
if gameidx == nil then
gameidx = 0
end
end
local game_by_gameidx = core.get_game(gameidx)
if game_by_gameidx ~= nil then
local gamepath = game_by_gameidx.path
local gameconfig = Settings(gamepath.."/game.conf")
local allowed_mapgens = (gameconfig:get("allowed_mapgens") or ""):split()
for key, value in pairs(allowed_mapgens) do
allowed_mapgens[key] = value:trim()
end
local disallowed_mapgens = (gameconfig:get("disallowed_mapgens") or ""):split()
for key, value in pairs(disallowed_mapgens) do
disallowed_mapgens[key] = value:trim()
end
if #allowed_mapgens > 0 then
for i = #mapgens, 1, -1 do
if table.indexof(allowed_mapgens, mapgens[i]) == -1 then
table.remove(mapgens, i)
end
end
end
if disallowed_mapgens then
for i = #mapgens, 1, -1 do
if table.indexof(disallowed_mapgens, mapgens[i]) > 0 then
table.remove(mapgens, i)
end
end
end
end
local mglist = ""
local selindex = 1
@ -78,11 +33,22 @@ local function create_world_formspec(dialogdata)
end
mglist = mglist:sub(1, -2)
local gameid = core.settings:get("menu_last_game")
local game, gameidx = nil , 0
if gameid ~= nil then
game, gameidx = gamemgr.find_by_gameid(gameid)
if gameidx == nil then
gameidx = 0
end
end
current_seed = core.formspec_escape(current_seed)
local retval =
"size[11.5,6.5,true]" ..
"label[2,0;" .. fgettext("World name") .. "]"..
"field[4.5,0.4;6,0.5;te_world_name;;" .. minetest.formspec_escape(worldname) .. "]" ..
"field[4.5,0.4;6,0.5;te_world_name;;]" ..
"label[2,1;" .. fgettext("Seed") .. "]"..
"field[4.5,1.4;6,0.5;te_seed;;".. current_seed .. "]" ..
@ -91,20 +57,20 @@ local function create_world_formspec(dialogdata)
"dropdown[4.2,2;6.3;dd_mapgen;" .. mglist .. ";" .. selindex .. "]" ..
"label[2,3;" .. fgettext("Game") .. "]"..
"textlist[4.2,3;5.8,2.3;games;" .. pkgmgr.gamelist() ..
"textlist[4.2,3;5.8,2.3;games;" .. gamemgr.gamelist() ..
";" .. gameidx .. ";true]" ..
"button[3.25,6;2.5,0.5;world_create_confirm;" .. fgettext("Create") .. "]" ..
"button[5.75,6;2.5,0.5;world_create_cancel;" .. fgettext("Cancel") .. "]"
if #pkgmgr.games == 0 then
if #gamemgr.games == 0 then
retval = retval .. "box[2,4;8,1;#ff8800]label[2.25,4;" ..
fgettext("You have no games installed.") .. "]label[2.25,4.4;" ..
fgettext("Download one from minetest.org") .. "]"
elseif #pkgmgr.games == 1 and pkgmgr.games[1].id == "minimal" then
fgettext("You have no subgames installed.") .. "]label[2.25,4.4;" ..
fgettext("Download one from minetest.net") .. "]"
elseif #gamemgr.games == 1 and gamemgr.games[1].id == "minimal" then
retval = retval .. "box[1.75,4;8.7,1;#ff8800]label[2,4;" ..
fgettext("Warning: The minimal development test is meant for developers.") .. "]label[2,4.4;" ..
fgettext("Download a game, such as Minetest Game, from minetest.org") .. "]"
fgettext("Download a subgame, such as minetest_game, from minetest.net") .. "]"
end
return retval
@ -119,16 +85,13 @@ local function create_world_buttonhandler(this, fields)
local worldname = fields["te_world_name"]
local gameindex = core.get_textlist_index("games")
if gameindex ~= nil then
if worldname == "" then
local random_number = math.random(10000, 99999)
local random_world_name = "Unnamed" .. random_number
worldname = random_world_name
end
if gameindex ~= nil and
worldname ~= "" then
local message = nil
core.settings:set("fixed_map_seed", fields["te_seed"])
local message
if not menudata.worldlist:uid_exists_raw(worldname) then
core.settings:set("mg_name",fields["dd_mapgen"])
message = core.create_world(worldname,gameindex)
@ -139,27 +102,24 @@ local function create_world_buttonhandler(this, fields)
if message ~= nil then
gamedata.errormessage = message
else
core.settings:set("menu_last_game",pkgmgr.games[gameindex].id)
core.settings:set("menu_last_game",gamemgr.games[gameindex].id)
if this.data.update_worldlist_filter then
menudata.worldlist:set_filtercriteria(pkgmgr.games[gameindex].id)
mm_texture.update("singleplayer", pkgmgr.games[gameindex].id)
menudata.worldlist:set_filtercriteria(gamemgr.games[gameindex].id)
mm_texture.update("singleplayer", gamemgr.games[gameindex].id)
end
menudata.worldlist:refresh()
core.settings:set("mainmenu_last_selected_world",
menudata.worldlist:raw_index_by_uid(worldname))
end
else
gamedata.errormessage = fgettext("No game selected")
gamedata.errormessage =
fgettext("No worldname given or no game selected")
end
this:delete()
return true
end
worldname = fields.te_world_name
if fields["games"] then
local gameindex = core.get_textlist_index("games")
core.settings:set("menu_last_game", pkgmgr.games[gameindex].id)
return true
end
@ -173,7 +133,6 @@ end
function create_create_world_dlg(update_worldlistfilter)
worldname = ""
local retval = dialog_create("sp_create_world",
create_world_formspec,
create_world_buttonhandler,

View File

@ -17,44 +17,39 @@
--------------------------------------------------------------------------------
local function delete_content_formspec(dialogdata)
local function delete_mod_formspec(dialogdata)
dialogdata.mod = modmgr.global_mods:get_list()[dialogdata.selected]
local retval =
"size[11.5,4.5,true]" ..
"label[2,2;" ..
fgettext("Are you sure you want to delete \"$1\"?", dialogdata.content.name) .. "]"..
"style[dlg_delete_content_confirm;bgcolor=red]" ..
"button[3.25,3.5;2.5,0.5;dlg_delete_content_confirm;" .. fgettext("Delete") .. "]" ..
"button[5.75,3.5;2.5,0.5;dlg_delete_content_cancel;" .. fgettext("Cancel") .. "]"
fgettext("Are you sure you want to delete \"$1\"?", dialogdata.mod.name) .. "]"..
"button[3.25,3.5;2.5,0.5;dlg_delete_mod_confirm;" .. fgettext("Delete") .. "]" ..
"button[5.75,3.5;2.5,0.5;dlg_delete_mod_cancel;" .. fgettext("Cancel") .. "]"
return retval
end
--------------------------------------------------------------------------------
local function delete_content_buttonhandler(this, fields)
if fields["dlg_delete_content_confirm"] ~= nil then
local function delete_mod_buttonhandler(this, fields)
if fields["dlg_delete_mod_confirm"] ~= nil then
if this.data.content.path ~= nil and
this.data.content.path ~= "" and
this.data.content.path ~= core.get_modpath() and
this.data.content.path ~= core.get_gamepath() and
this.data.content.path ~= core.get_texturepath() then
if not core.delete_dir(this.data.content.path) then
gamedata.errormessage = fgettext("pkgmgr: failed to delete \"$1\"", this.data.content.path)
end
if this.data.content.type == "game" then
pkgmgr.update_gamelist()
else
pkgmgr.refresh_globals()
if this.data.mod.path ~= nil and
this.data.mod.path ~= "" and
this.data.mod.path ~= core.get_modpath() then
if not core.delete_dir(this.data.mod.path) then
gamedata.errormessage = fgettext("Modmgr: failed to delete \"$1\"", this.data.mod.path)
end
modmgr.refresh_globals()
else
gamedata.errormessage = fgettext("pkgmgr: invalid path \"$1\"", this.data.content.path)
gamedata.errormessage = fgettext("Modmgr: invalid modpath \"$1\"", this.data.mod.path)
end
this:delete()
return true
end
if fields["dlg_delete_content_cancel"] then
if fields["dlg_delete_mod_cancel"] then
this:delete()
return true
end
@ -63,13 +58,12 @@ local function delete_content_buttonhandler(this, fields)
end
--------------------------------------------------------------------------------
function create_delete_content_dlg(content)
assert(content.name)
function create_delete_mod_dlg(selected_index)
local retval = dialog_create("dlg_delete_content",
delete_content_formspec,
delete_content_buttonhandler,
local retval = dialog_create("dlg_delete_mod",
delete_mod_formspec,
delete_mod_buttonhandler,
nil)
retval.data.content = content
retval.data.selected = selected_index
return retval
end

View File

@ -21,7 +21,6 @@ local function delete_world_formspec(dialogdata)
"size[10,2.5,true]" ..
"label[0.5,0.5;" ..
fgettext("Delete World \"$1\"?", dialogdata.delete_name) .. "]" ..
"style[world_delete_confirm;bgcolor=red]" ..
"button[0.5,1.5;2.5,0.5;world_delete_confirm;" .. fgettext("Delete") .. "]" ..
"button[7.0,1.5;2.5,0.5;world_delete_cancel;" .. fgettext("Cancel") .. "]"
return retval

View File

@ -18,36 +18,30 @@
--------------------------------------------------------------------------------
local function rename_modpack_formspec(dialogdata)
dialogdata.mod = modmgr.global_mods:get_list()[dialogdata.selected]
local retval =
"size[11.5,4.5,true]" ..
"field[2.5,2;7,0.5;te_modpack_name;".. fgettext("Rename Modpack:") .. ";" ..
dialogdata.mod.name .. "]" ..
"button[3.25,3.5;2.5,0.5;dlg_rename_modpack_confirm;"..
fgettext("Accept") .. "]" ..
"button[5.75,3.5;2.5,0.5;dlg_rename_modpack_cancel;"..
fgettext("Cancel") .. "]"
local input_y = 2
if dialogdata.mod.is_name_explicit then
retval = retval .. "textarea[1,0.2;10,2;;;" ..
fgettext("This modpack has an explicit name given in its modpack.conf " ..
"which will override any renaming here.") .. "]"
input_y = 2.5
end
retval = retval ..
"field[2.5," .. input_y .. ";7,0.5;te_modpack_name;" ..
fgettext("Rename Modpack:") .. ";" .. dialogdata.mod.dir_name .. "]"
return retval
end
--------------------------------------------------------------------------------
local function rename_modpack_buttonhandler(this, fields)
if fields["dlg_rename_modpack_confirm"] ~= nil then
local oldpath = this.data.mod.path
local targetpath = this.data.mod.parent_dir .. DIR_DELIM .. fields["te_modpack_name"]
os.rename(oldpath, targetpath)
pkgmgr.refresh_globals()
pkgmgr.selected_mod = pkgmgr.global_mods:get_current_index(
pkgmgr.global_mods:raw_index_by_uid(fields["te_modpack_name"]))
local oldpath = core.get_modpath() .. DIR_DELIM .. this.data.mod.name
local targetpath = core.get_modpath() .. DIR_DELIM .. fields["te_modpack_name"]
core.copy_dir(oldpath,targetpath,false)
modmgr.refresh_globals()
modmgr.selected_mod = modmgr.global_mods:get_current_index(
modmgr.global_mods:raw_index_by_uid(fields["te_modpack_name"]))
this:delete()
return true
@ -62,12 +56,12 @@ local function rename_modpack_buttonhandler(this, fields)
end
--------------------------------------------------------------------------------
function create_rename_modpack_dlg(modpack)
function create_rename_modpack_dlg(selected_index)
local retval = dialog_create("dlg_delete_mod",
rename_modpack_formspec,
rename_modpack_buttonhandler,
nil)
retval.data.mod = modpack
retval.data.selected = selected_index
return retval
end

View File

@ -25,10 +25,6 @@ local CHAR_CLASSES = {
FLAGS = "[%w_%-%.,]",
}
local function flags_to_table(flags)
return flags:gsub("%s+", ""):split(",", true) -- Remove all spaces and split
end
-- returns error message, or nil
local function parse_setting_line(settings, line, read_all, base_level, allow_secure)
-- comment
@ -115,7 +111,7 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
return
end
if setting_type == "string"
if setting_type == "string" or setting_type == "noise_params"
or setting_type == "key" or setting_type == "v3f" then
local default = remaining_line:match("^(.*)$")
@ -137,60 +133,6 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
return
end
if setting_type == "noise_params_2d"
or setting_type == "noise_params_3d" then
local default = remaining_line:match("^(.*)$")
if not default then
return "Invalid string setting"
end
local values = {}
local ti = 1
local index = 1
for match in default:gmatch("[+-]?[%d.-e]+") do -- All numeric characters
index = default:find("[+-]?[%d.-e]+", index) + match:len()
table.insert(values, match)
ti = ti + 1
if ti > 9 then
break
end
end
index = default:find("[^, ]", index)
local flags = ""
if index then
flags = default:sub(index)
default = default:sub(1, index - 3) -- Make sure no flags in single-line format
end
table.insert(values, flags)
table.insert(settings, {
name = name,
readable_name = readable_name,
type = setting_type,
default = default,
default_table = {
offset = values[1],
scale = values[2],
spread = {
x = values[3],
y = values[4],
z = values[5]
},
seed = values[6],
octaves = values[7],
persistence = values[8],
lacunarity = values[9],
flags = values[10]
},
values = values,
comment = current_comment,
noise_params = true,
flags = flags_to_table("defaults,eased,absvalue")
})
return
end
if setting_type == "bool" then
if remaining_line ~= "false" and remaining_line ~= "true" then
return "Invalid boolean setting"
@ -254,7 +196,7 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
return
end
if setting_type == "path" or setting_type == "filepath" then
if setting_type == "path" then
local default = remaining_line:match("^(.*)$")
if not default then
@ -264,7 +206,7 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
table.insert(settings, {
name = name,
readable_name = readable_name,
type = setting_type,
type = "path",
default = default,
comment = current_comment,
})
@ -294,7 +236,7 @@ local function parse_setting_line(settings, line, read_all, base_level, allow_se
readable_name = readable_name,
type = "flags",
default = default,
possible = flags_to_table(possible),
possible = possible,
comment = current_comment,
})
return
@ -322,32 +264,29 @@ end
-- read_all: whether to ignore certain setting types for GUI or not
-- parse_mods: whether to parse settingtypes.txt in mods and games
local function parse_config_file(read_all, parse_mods)
local builtin_path = core.get_builtin_path() .. DIR_DELIM .. FILENAME
local file = io.open(builtin_path, "r")
local settings = {}
do
local builtin_path = core.get_builtin_path() .. FILENAME
local file = io.open(builtin_path, "r")
if not file then
core.log("error", "Can't load " .. FILENAME)
return settings
end
parse_single_file(file, builtin_path, read_all, settings, 0, true)
file:close()
if not file then
core.log("error", "Can't load " .. FILENAME)
return settings
end
parse_single_file(file, builtin_path, read_all, settings, 0, true)
file:close()
if parse_mods then
-- Parse games
local games_category_initialized = false
local index = 1
local game = pkgmgr.get_game(index)
local game = gamemgr.get_game(index)
while game do
local path = game.path .. DIR_DELIM .. FILENAME
local file = io.open(path, "r")
if file then
if not games_category_initialized then
fgettext_ne("Games") -- not used, but needed for xgettext
local translation = fgettext_ne("Games"), -- not used, but needed for xgettext
table.insert(settings, {
name = "Games",
level = 0,
@ -368,7 +307,7 @@ local function parse_config_file(read_all, parse_mods)
end
index = index + 1
game = pkgmgr.get_game(index)
game = gamemgr.get_game(index)
end
-- Parse mods
@ -380,7 +319,7 @@ local function parse_config_file(read_all, parse_mods)
local file = io.open(path, "r")
if file then
if not mods_category_initialized then
fgettext_ne("Mods") -- not used, but needed for xgettext
local translation = fgettext_ne("Mods"), -- not used, but needed for xgettext
table.insert(settings, {
name = "Mods",
level = 0,
@ -491,73 +430,67 @@ local function get_current_value(setting)
return value
end
local function get_current_np_group(setting)
local value = core.settings:get_np_group(setting.name)
local t = {}
if value == nil then
t = setting.values
else
table.insert(t, value.offset)
table.insert(t, value.scale)
table.insert(t, value.spread.x)
table.insert(t, value.spread.y)
table.insert(t, value.spread.z)
table.insert(t, value.seed)
table.insert(t, value.octaves)
table.insert(t, value.persistence)
table.insert(t, value.lacunarity)
table.insert(t, value.flags)
end
return t
end
local function get_current_np_group_as_string(setting)
local value = core.settings:get_np_group(setting.name)
local t
if value == nil then
t = setting.default
else
t = value.offset .. ", " ..
value.scale .. ", (" ..
value.spread.x .. ", " ..
value.spread.y .. ", " ..
value.spread.z .. "), " ..
value.seed .. ", " ..
value.octaves .. ", " ..
value.persistence .. ", " ..
value.lacunarity
if value.flags ~= "" then
t = t .. ", " .. value.flags
end
end
return t
end
local checkboxes = {} -- handle checkboxes events
local function create_change_setting_formspec(dialogdata)
local setting = settings[selected_setting]
-- Final formspec will be created at the end of this function
-- Default values below, may be changed depending on setting type
local width = 10
local height = 3.5
local description_height = 3
local formspec = ""
local formspec = "size[10,5.2,true]" ..
"button[5,4.5;2,1;btn_done;" .. fgettext("Save") .. "]" ..
"button[3,4.5;2,1;btn_cancel;" .. fgettext("Cancel") .. "]" ..
"tablecolumns[color;text]" ..
"tableoptions[background=#00000000;highlight=#00000000;border=false]" ..
"table[0,0;10,3;info;"
if setting.readable_name then
formspec = formspec .. "#FFFF00," .. fgettext(setting.readable_name)
.. " (" .. core.formspec_escape(setting.name) .. "),"
else
formspec = formspec .. "#FFFF00," .. core.formspec_escape(setting.name) .. ","
end
formspec = formspec .. ",,"
local comment_text = ""
if setting.comment == "" then
comment_text = fgettext_ne("(No description of setting given)")
else
comment_text = fgettext_ne(setting.comment)
end
for _, comment_line in ipairs(comment_text:split("\n", true)) do
formspec = formspec .. "," .. core.formspec_escape(comment_line) .. ","
end
if setting.type == "flags" then
formspec = formspec .. ",,"
.. "," .. fgettext("Please enter a comma seperated list of flags.") .. ","
.. "," .. fgettext("Possible values are: ")
.. core.formspec_escape(setting.possible:gsub(",", ", ")) .. ","
elseif setting.type == "noise_params" then
formspec = formspec .. ",,"
.. "," .. fgettext("Format: <offset>, <scale>, (<spreadX>, <spreadY>, <spreadZ>), <seed>, <octaves>, <persistence>") .. ","
.. "," .. fgettext("Optionally the lacunarity can be appended with a leading comma.") .. ","
elseif setting.type == "v3f" then
formspec = formspec .. ",,"
.. "," .. fgettext_ne("Format is 3 numbers separated by commas and inside brackets.") .. ","
end
formspec = formspec:sub(1, -2) -- remove trailing comma
formspec = formspec .. ";1]"
-- Setting-specific formspec elements
if setting.type == "bool" then
local selected_index = 1
local selected_index
if core.is_yes(get_current_value(setting)) then
selected_index = 2
else
selected_index = 1
end
formspec = "dropdown[3," .. height .. ";4,1;dd_setting_value;"
formspec = formspec .. "dropdown[0.5,3.5;3,1;dd_setting_value;"
.. fgettext("Disabled") .. "," .. fgettext("Enabled") .. ";"
.. selected_index .. "]"
height = height + 1.25
elseif setting.type == "enum" then
local selected_index = 0
formspec = "dropdown[3," .. height .. ";4,1;dd_setting_value;"
formspec = formspec .. "dropdown[0.5,3.5;3,1;dd_setting_value;"
for index, value in ipairs(setting.values) do
-- translating value is not possible, since it's the value
-- that we set the setting to
@ -570,232 +503,39 @@ local function create_change_setting_formspec(dialogdata)
formspec = formspec:sub(1, -2) -- remove trailing comma
end
formspec = formspec .. ";" .. selected_index .. "]"
height = height + 1.25
elseif setting.type == "path" or setting.type == "filepath" then
elseif setting.type == "path" then
local current_value = dialogdata.selected_path
if not current_value then
current_value = get_current_value(setting)
end
formspec = "field[0.28," .. height + 0.15 .. ";8,1;te_setting_value;;"
formspec = formspec .. "field[0.5,4;7.5,1;te_setting_value;;"
.. core.formspec_escape(current_value) .. "]"
.. "button[8," .. height - 0.15 .. ";2,1;btn_browser_"
.. setting.type .. ";" .. fgettext("Browse") .. "]"
height = height + 1.15
elseif setting.type == "noise_params_2d" or setting.type == "noise_params_3d" then
local t = get_current_np_group(setting)
local dimension = 3
if setting.type == "noise_params_2d" then
dimension = 2
end
-- More space for 3x3 fields
description_height = description_height - 1.5
height = height - 1.5
local fields = {}
local function add_field(x, name, label, value)
fields[#fields + 1] = ("field[%f,%f;3.3,1;%s;%s;%s]"):format(
x, height, name, label, core.formspec_escape(value or "")
)
end
-- First row
height = height + 0.3
add_field(0.3, "te_offset", fgettext("Offset"), t[1])
add_field(3.6, "te_scale", fgettext("Scale"), t[2])
add_field(6.9, "te_seed", fgettext("Seed"), t[6])
height = height + 1.1
-- Second row
add_field(0.3, "te_spreadx", fgettext("X spread"), t[3])
if dimension == 3 then
add_field(3.6, "te_spready", fgettext("Y spread"), t[4])
else
fields[#fields + 1] = "label[4," .. height - 0.2 .. ";" ..
fgettext("2D Noise") .. "]"
end
add_field(6.9, "te_spreadz", fgettext("Z spread"), t[5])
height = height + 1.1
-- Third row
add_field(0.3, "te_octaves", fgettext("Octaves"), t[7])
add_field(3.6, "te_persist", fgettext("Persistance"), t[8])
add_field(6.9, "te_lacun", fgettext("Lacunarity"), t[9])
height = height + 1.1
local enabled_flags = flags_to_table(t[10])
local flags = {}
for _, name in ipairs(enabled_flags) do
-- Index by name, to avoid iterating over all enabled_flags for every possible flag.
flags[name] = true
end
for _, name in ipairs(setting.flags) do
local checkbox_name = "cb_" .. name
local is_enabled = flags[name] == true -- to get false if nil
checkboxes[checkbox_name] = is_enabled
end
-- Flags
formspec = table.concat(fields)
.. "checkbox[0.5," .. height - 0.6 .. ";cb_defaults;"
--[[~ "defaults" is a noise parameter flag.
It describes the default processing options
for noise settings in main menu -> "All Settings". ]]
.. fgettext("defaults") .. ";" -- defaults
.. tostring(flags["defaults"] == true) .. "]" -- to get false if nil
.. "checkbox[5," .. height - 0.6 .. ";cb_eased;"
--[[~ "eased" is a noise parameter flag.
It is used to make the map smoother and
can be enabled in noise settings in
main menu -> "All Settings". ]]
.. fgettext("eased") .. ";" -- eased
.. tostring(flags["eased"] == true) .. "]"
.. "checkbox[5," .. height - 0.15 .. ";cb_absvalue;"
--[[~ "absvalue" is a noise parameter flag.
It is short for "absolute value".
It can be enabled in noise settings in
main menu -> "All Settings". ]]
.. fgettext("absvalue") .. ";" -- absvalue
.. tostring(flags["absvalue"] == true) .. "]"
height = height + 1
elseif setting.type == "v3f" then
local val = get_current_value(setting)
local v3f = {}
for line in val:gmatch("[+-]?[%d.-e]+") do -- All numeric characters
table.insert(v3f, line)
end
height = height + 0.3
formspec = formspec
.. "field[0.3," .. height .. ";3.3,1;te_x;"
.. fgettext("X") .. ";" -- X
.. core.formspec_escape(v3f[1] or "") .. "]"
.. "field[3.6," .. height .. ";3.3,1;te_y;"
.. fgettext("Y") .. ";" -- Y
.. core.formspec_escape(v3f[2] or "") .. "]"
.. "field[6.9," .. height .. ";3.3,1;te_z;"
.. fgettext("Z") .. ";" -- Z
.. core.formspec_escape(v3f[3] or "") .. "]"
height = height + 1.1
elseif setting.type == "flags" then
local current_flags = flags_to_table(get_current_value(setting))
local flags = {}
for _, name in ipairs(current_flags) do
-- Index by name, to avoid iterating over all enabled_flags for every possible flag.
if name:sub(1, 2) == "no" then
flags[name:sub(3)] = false
else
flags[name] = true
end
end
local flags_count = #setting.possible / 2
local max_height = math.ceil(flags_count / 2) / 2
-- More space for flags
description_height = description_height - 1
height = height - 1
local fields = {} -- To build formspec
local j = 1
for _, name in ipairs(setting.possible) do
if name:sub(1, 2) ~= "no" then
local x = 0.5
local y = height + j / 2 - 0.75
if j - 1 >= flags_count / 2 then -- 2nd column
x = 5
y = y - max_height
end
j = j + 1;
local checkbox_name = "cb_" .. name
local is_enabled = flags[name] == true -- to get false if nil
checkboxes[checkbox_name] = is_enabled
fields[#fields + 1] = ("checkbox[%f,%f;%s;%s;%s]"):format(
x, y, checkbox_name, name, tostring(is_enabled)
)
end
end
formspec = table.concat(fields)
height = height + max_height + 0.25
.. "button[8,3.75;2,1;btn_browser_path;" .. fgettext("Browse") .. "]"
else
-- TODO: fancy input for float, int
-- TODO: fancy input for float, int, flags, noise_params, v3f
local width = 10
local text = get_current_value(setting)
if dialogdata.error_message and dialogdata.entered_text then
text = dialogdata.entered_text
if dialogdata.error_message then
formspec = formspec .. "tablecolumns[color;text]" ..
"tableoptions[background=#00000000;highlight=#00000000;border=false]" ..
"table[5,3.9;5,0.6;error_message;#FF0000,"
.. core.formspec_escape(dialogdata.error_message) .. ";0]"
width = 5
if dialogdata.entered_text then
text = dialogdata.entered_text
end
end
formspec = "field[0.28," .. height + 0.15 .. ";" .. width .. ",1;te_setting_value;;"
formspec = formspec .. "field[0.5,4;" .. width .. ",1;te_setting_value;;"
.. core.formspec_escape(text) .. "]"
height = height + 1.15
end
-- Box good, textarea bad. Calculate textarea size from box.
local function create_textfield(size, label, text, bg_color)
local textarea = {
x = size.x + 0.3,
y = size.y,
w = size.w + 0.25,
h = size.h * 1.16 + 0.12
}
return ("box[%f,%f;%f,%f;%s]textarea[%f,%f;%f,%f;;%s;%s]"):format(
size.x, size.y, size.w, size.h, bg_color or "#000",
textarea.x, textarea.y, textarea.w, textarea.h,
core.formspec_escape(label), core.formspec_escape(text)
)
end
-- When there's an error: Shrink description textarea and add error below
if dialogdata.error_message then
local error_box = {
x = 0,
y = description_height - 0.4,
w = width - 0.25,
h = 0.5
}
formspec = formspec ..
create_textfield(error_box, "", dialogdata.error_message, "#600")
description_height = description_height - 0.75
end
-- Get description field
local description_box = {
x = 0,
y = 0.2,
w = width - 0.25,
h = description_height
}
local setting_name = setting.name
if setting.readable_name then
setting_name = fgettext_ne(setting.readable_name) ..
" (" .. setting.name .. ")"
end
local comment_text
if setting.comment == "" then
comment_text = fgettext_ne("(No description of setting given)")
else
comment_text = fgettext_ne(setting.comment)
end
return (
"size[" .. width .. "," .. height + 0.25 .. ",true]" ..
create_textfield(description_box, setting_name, comment_text) ..
formspec ..
"button[" .. width / 2 - 2.5 .. "," .. height - 0.4 .. ";2.5,1;btn_done;" ..
fgettext("Save") .. "]" ..
"button[" .. width / 2 .. "," .. height - 0.4 .. ";2.5,1;btn_cancel;" ..
fgettext("Cancel") .. "]"
)
return formspec
end
local function handle_change_setting_buttons(this, fields)
local setting = settings[selected_setting]
if fields["btn_done"] or fields["key_enter"] then
local setting = settings[selected_setting]
if setting.type == "bool" then
local new_value = fields["dd_setting_value"]
-- Note: new_value is the actual (translated) value shown in the dropdown
@ -835,71 +575,20 @@ local function handle_change_setting_buttons(this, fields)
core.update_formspec(this:get_formspec())
return true
end
if setting.min and new_value < setting.min then
this.data.error_message = fgettext_ne("The value must be at least $1.", setting.min)
this.data.entered_text = fields["te_setting_value"]
core.update_formspec(this:get_formspec())
return true
end
if setting.max and new_value > setting.max then
this.data.error_message = fgettext_ne("The value must not be larger than $1.", setting.max)
this.data.entered_text = fields["te_setting_value"]
core.update_formspec(this:get_formspec())
return true
end
core.settings:set(setting.name, new_value)
elseif setting.type == "flags" then
local values = {}
for _, name in ipairs(setting.possible) do
if name:sub(1, 2) ~= "no" then
if checkboxes["cb_" .. name] then
table.insert(values, name)
else
table.insert(values, "no" .. name)
end
local new_value = fields["te_setting_value"]
for _,value in ipairs(new_value:split(",", true)) do
value = value:trim()
local possible = "," .. setting.possible .. ","
if not possible:find("," .. value .. ",", 0, true) then
this.data.error_message = fgettext_ne("\"$1\" is not a valid flag.", value)
this.data.entered_text = fields["te_setting_value"]
core.update_formspec(this:get_formspec())
return true
end
end
checkboxes = {}
local new_value = table.concat(values, ", ")
core.settings:set(setting.name, new_value)
elseif setting.type == "noise_params_2d" or setting.type == "noise_params_3d" then
local np_flags = {}
for _, name in ipairs(setting.flags) do
if checkboxes["cb_" .. name] then
table.insert(np_flags, name)
end
end
checkboxes = {}
if setting.type == "noise_params_2d" then
fields["te_spready"] = fields["te_spreadz"]
end
local new_value = {
offset = fields["te_offset"],
scale = fields["te_scale"],
spread = {
x = fields["te_spreadx"],
y = fields["te_spready"],
z = fields["te_spreadz"]
},
seed = fields["te_seed"],
octaves = fields["te_octaves"],
persistence = fields["te_persist"],
lacunarity = fields["te_lacun"],
flags = table.concat(np_flags, ", ")
}
core.settings:set_np_group(setting.name, new_value)
elseif setting.type == "v3f" then
local new_value = "("
.. fields["te_x"] .. ", "
.. fields["te_y"] .. ", "
.. fields["te_z"] .. ")"
core.settings:set(setting.name, new_value)
else
@ -917,13 +606,7 @@ local function handle_change_setting_buttons(this, fields)
end
if fields["btn_browser_path"] then
core.show_path_select_dialog("dlg_browse_path",
fgettext_ne("Select directory"), false)
end
if fields["btn_browser_filepath"] then
core.show_path_select_dialog("dlg_browse_path",
fgettext_ne("Select file"), true)
core.show_file_open_dialog("dlg_browse_path", fgettext_ne("Select path"))
end
if fields["dlg_browse_path_accepted"] then
@ -931,27 +614,17 @@ local function handle_change_setting_buttons(this, fields)
core.update_formspec(this:get_formspec())
end
if setting.type == "flags"
or setting.type == "noise_params_2d"
or setting.type == "noise_params_3d" then
for name, value in pairs(fields) do
if name:sub(1, 3) == "cb_" then
checkboxes[name] = value == "true"
end
end
end
return false
end
local function create_settings_formspec(tabview, _, tabdata)
local formspec = "size[12,5.4;true]" ..
"tablecolumns[color;tree;text,width=28;text]" ..
local function create_settings_formspec(tabview, name, tabdata)
local formspec = "size[12,6.5;true]" ..
"tablecolumns[color;tree;text,width=32;text]" ..
"tableoptions[background=#00000000;border=false]" ..
"field[0.3,0.1;10.2,1;search_string;;" .. core.formspec_escape(search_string) .. "]" ..
"field_close_on_enter[search_string;false]" ..
"button[10.2,-0.2;2,1;search;" .. fgettext("Search") .. "]" ..
"table[0,0.8;12,3.5;list_settings;"
"table[0,0.8;12,4.5;list_settings;"
local current_level = 0
for _, entry in ipairs(settings) do
@ -976,13 +649,9 @@ local function create_settings_formspec(tabview, _, tabdata)
formspec = formspec .. "," .. (current_level + 1) .. "," .. core.formspec_escape(name) .. ","
.. value .. ","
elseif entry.type == "key" then --luacheck: ignore
elseif entry.type == "key" then
-- ignore key settings, since we have a special dialog for them
elseif entry.type == "noise_params_2d" or entry.type == "noise_params_3d" then
formspec = formspec .. "," .. (current_level + 1) .. "," .. core.formspec_escape(name) .. ","
.. core.formspec_escape(get_current_np_group_as_string(entry)) .. ","
else
formspec = formspec .. "," .. (current_level + 1) .. "," .. core.formspec_escape(name) .. ","
.. core.formspec_escape(get_current_value(entry)) .. ","
@ -993,10 +662,10 @@ local function create_settings_formspec(tabview, _, tabdata)
formspec = formspec:sub(1, -2) -- remove trailing comma
end
formspec = formspec .. ";" .. selected_setting .. "]" ..
"button[0,4.9;4,1;btn_back;".. fgettext("< Back to Settings page") .. "]" ..
"button[10,4.9;2,1;btn_edit;" .. fgettext("Edit") .. "]" ..
"button[7,4.9;3,1;btn_restore;" .. fgettext("Restore Default") .. "]" ..
"checkbox[0,4.3;cb_tech_settings;" .. fgettext("Show technical names") .. ";"
"button[0,6;4,1;btn_back;".. fgettext("< Back to Settings page") .. "]" ..
"button[10,6;2,1;btn_edit;" .. fgettext("Edit") .. "]" ..
"button[7,6;3,1;btn_restore;" .. fgettext("Restore Default") .. "]" ..
"checkbox[0,5.3;cb_tech_settings;" .. fgettext("Show technical names") .. ";"
.. dump(core.settings:get_bool("main_menu_technical_settings")) .. "]"
return formspec
@ -1055,8 +724,8 @@ local function handle_settings_buttons(this, fields, tabname, tabdata)
if fields["btn_edit"] or list_enter then
local setting = settings[selected_setting]
if setting and setting.type ~= "category" then
local edit_dialog = dialog_create("change_setting",
create_change_setting_formspec, handle_change_setting_buttons)
local edit_dialog = dialog_create("change_setting", create_change_setting_formspec,
handle_change_setting_buttons)
edit_dialog:set_parent(this)
this:hide()
edit_dialog:show()
@ -1067,7 +736,7 @@ local function handle_settings_buttons(this, fields, tabname, tabdata)
if fields["btn_restore"] then
local setting = settings[selected_setting]
if setting and setting.type ~= "category" then
core.settings:remove(setting.name)
core.settings:set(setting.name, setting.default)
core.settings:write()
core.update_formspec(this:get_formspec())
end
@ -1098,9 +767,6 @@ function create_adv_settings_dlg()
return dlg
end
-- Uncomment to generate 'minetest.conf.example' and 'settings_translation_file.cpp'.
-- For RUN_IN_PLACE the generated files may appear in the 'bin' folder.
-- See comment and alternative line at the end of 'generate_from_settingtypes.lua'.
-- Generate minetest.conf.example and settings_translation_file.cpp
--assert(loadfile(core.get_builtin_path().."mainmenu"..DIR_DELIM..
-- "generate_from_settingtypes.lua"))(parse_config_file(true, false))
--assert(loadfile(core.get_builtin_path()..DIR_DELIM.."mainmenu"..DIR_DELIM.."generate_from_settingtypes.lua"))(parse_config_file(true, false))

Some files were not shown because too many files have changed in this diff Show More