Compare commits

..

195 Commits

Author SHA1 Message Date
4be6c4d274 Merge sync 'master' of https://github.com/minetest/minetest_game
* update to last engine changes, so guess only work in 5.4 and 5.5 to 5.6
2023-06-06 15:16:35 -04:00
Lars Mueller
cd6ea53a52 Update bookshelf infotext on put and take inv actions 2023-06-06 18:07:37 +02:00
Lars Mueller
16b6bdde0a default.set_inventory_action_loggers: Hook (instead of replace) callbacks 2023-06-06 18:07:37 +02:00
Lars Mueller
996fea7cd0 Fix texture modifiers relying on undocumented behavior 2023-05-27 22:11:45 +02:00
fluxionary
9a9df3a42e
Fix logic error in bed rotation 2023-05-20 12:17:43 +02:00
xin
1e237b8d18
Minor improvements to the French translation (#3027) 2023-04-20 17:28:50 +02:00
Lars Müller
833ed77620
Validate & sanitize formspec fields (#3022) 2023-04-08 18:13:45 +02:00
Lars Müller
4c6e19968a Fix typo in german translation 2023-04-08 18:11:37 +02:00
Wuzzy
446e56a879 Update German translation 2023-04-08 18:11:37 +02:00
Wuzzy
34c1d3242d Update locale files 2023-04-08 18:11:37 +02:00
Lars Müller
f49707c973
Minor creative UI fixes (#3023) 2023-04-04 11:43:59 +02:00
Wuzzy
8dee348d97 Fix syntax errors in bones.sv.tr 2023-03-14 10:25:37 +01:00
Richard Try
aeb27c4db6
Fix 'boats' russian translation (#2974) 2023-03-10 20:27:15 +01:00
Richard Try
6921c9bbd1
Tweak MTG craftguide Russian translation (#2975) 2023-03-10 20:26:30 +01:00
Lars Mueller
8d60e85dfc Fix player_api.set_model not updating the animation 2023-01-31 15:31:52 +01:00
CrackedMatter
2c1d9e1330
Flip item textures of glass doors (#3009) 2023-01-26 17:32:03 +01:00
fluxionary
ec2f57db0e
Ensure chests close properly (#2965)
Co-authored-by: sfan5 <sfan5@live.de>
2023-01-25 19:10:32 +01:00
Jordan Irwin
fdcf458b56
creative: Override hand after mods loaded... (#2984)
Prevents other mods from overwriting changes
& removes dependence on default.
2023-01-21 09:44:47 +01:00
97130f4c1c
Update Chinese translation (#3008)
+ template update
2023-01-21 09:44:35 +01:00
Riu Sakura
26b2da2c08
Update Japanese translation (#3007)
Add missing translations
 Corrected mistranslations
 Revised translation to match Mineclone2
2023-01-21 09:43:53 +01:00
Zemtzov7
8eb4437ac8 Fix crash if /home is executed with an invalid name (#3000) 2022-12-20 18:42:48 +01:00
Alexander Chibrikin
792bc6f6e5
Fix wall craft registrations (#3004) 2022-12-02 19:54:46 +01:00
Muhammad Rifqi Priyo Susanto
c4cf1a6004
Update Indonesian translation (#3003)
- Add missing translations
- Fix wrong terms/spellings
2022-11-27 21:24:35 +01:00
Wuzzy
99a7193095
Teach screwdriver to rotate 4dir nodes (#2992) 2022-10-01 21:19:42 +02:00
ssdaniel24
2e8ac46120
Beds: Replace hardcoded values of day interval with constants (#2990) 2022-09-28 11:07:50 +02:00
Lars Mueller
508a9070a0 Add color_* groups to wool 2022-09-21 18:23:55 +02:00
VitaliyShar
aff9c28eed
Improve stair placement rotation for bridging (#2979)
Co-authored-by: sfan5 <sfan5@live.de>
2022-08-18 11:02:24 +02:00
ROllerozxa
e903b1f6d0 Make default an optional dependency for the creative mod 2022-08-18 10:16:22 +02:00
Richard Try
2bdc7c8c7d Update Russian translation 2022-07-29 22:03:06 +02:00
Richard Try
c744829ce5
Update Russian translation for mtg_craftguide (#2873) 2022-07-29 15:10:24 +02:00
Romain
06daee4c6d
Correct some Esperanto translations (#2910) 2022-07-25 13:26:49 +02:00
Wuzzy
697b028e43 Update Lojban translation 2022-07-22 21:28:31 +02:00
Wuzzy
e229236bc2 Update German translation 2022-07-22 16:19:31 +02:00
Wuzzy
350c52319e Update translation templates 2022-07-22 16:19:31 +02:00
Wuzzy
b64868ef92 Move Japanese key translations to keys mod 2022-07-22 16:19:31 +02:00
fluxionary
79d38078a5
Remove paramtype2="glasslikeliquidlevel" from glass nodes (#2963) 2022-07-02 11:58:01 +02:00
sfan5
986b65775f Update engine feature checks 2022-06-13 20:02:08 +02:00
Wuzzy
d7dd15782c
Use add_wear_by_uses to fix incorrect uses counts (#2959) 2022-06-04 18:43:21 +02:00
Lars Müller
b4392aeb1f
Fix book duplication: Remember wield index (#2957) 2022-06-01 20:54:16 +02:00
Wuzzy
54dc58ef1f
Fix furnace fire sound stopping too late (#2955)
Cleans fire sound IDs after a few seconds
2022-05-29 21:16:23 +02:00
mrkubax10
b57700a75b
Add polish translation (#2926) 2022-05-29 16:20:42 +02:00
Wuzzy
b0cf061360 Fix TNT blowing up ignore nodes 2022-05-24 17:57:37 +02:00
Lars Müller
33650c8c2e
game.conf: Use title instead of deprecated name 2022-05-24 14:55:10 +02:00
SmallJoker
38307da22a
Carts: Improve movement behaviour (#2951)
Backported various changes from boost_cart
Improved direction handling and code cleanup
Smoothed-out 'end of rail' animation
2022-05-09 20:44:06 +02:00
nixnoxus
0c2ee1e41d
Deduplicate player action logging, silence fake player actions (#2941) 2022-05-06 20:04:55 +02:00
Lars Mueller
edd033b708 TNT node drop particles: Only pick string tiles as fallback 2022-04-24 13:29:29 +02:00
lhofhansl
9528c0f8b9
Adjust shadow intensity based on cloud density (#2938) 2022-04-02 09:35:36 +02:00
Lars Mueller
638099c999 Fix incorrectly negated comparisons 2022-03-26 19:58:07 +01:00
LoneWolfHT
659895c3ed Update game_api.txt 2022-03-23 11:36:46 +01:00
LoneWolfHT
ce82241ab2 Undo globalization 2022-03-23 11:36:46 +01:00
LoneWolfHT
0110e01826 Fix bug and globalize players table 2022-03-23 11:36:46 +01:00
LoneWolfHT
268a8844b6 Use a local for the globalstep function 2022-03-23 11:36:46 +01:00
LoneWolfHT
f665382017 Allow mods to override animation globalstep 2022-03-23 11:36:46 +01:00
Lars Mueller
a6f3b89596 player_api: Fix crash for players without model 2022-03-13 00:02:40 +01:00
93724316d3 Merge branch 'master' of https://github.com/minetest/minetest_game 2022-02-21 11:19:32 -04:00
baytuch
240f9a6a85
Fix translation of "cotton" for UK and RU locales 2022-02-15 20:29:34 +01:00
Lars Müller
a840ac0a4d
player_api - fix compatibility code 2022-02-03 09:15:14 +01:00
bell07
584a6a2102
player_api - fix compatibility code
get_animation does not return the data if called from outside without this change
2022-02-03 09:10:53 +01:00
baytuch
e02e55fafd
Minor translation refinement for UK and RU langs (Drinking Glass) (#2925) 2022-02-01 11:09:21 +01:00
baytuch
cc3e7be429
Update Ukranian (uk) translation 2022-01-30 15:20:14 +01:00
An0n3m0us
172b62f802
Add trapdoor/door model specification (#2371) 2022-01-30 13:54:37 +01:00
baytuch
a5547a3a76
Add ukrainian (uk) translation (#2921)
Co-authored-by: sfan5 <sfan5@live.de>
2022-01-30 00:35:28 +01:00
ROllerozxa
c8a1454e2b
Fix and update Swedish translation (#2920) 2022-01-29 18:35:45 +01:00
Olivier Dragon
bcd1ee048e
Update french translations (#2922)
* Update french translations for beds, farming and fire

* Update french translations for mtg_craftguide

* Update french translations for default

* Correct typos

* Restore new line at end of file

* Shorten translation for better display

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2022-01-29 16:27:19 +01:00
Louis Royer
fff3b98ab0 Make keys stackable if they contain the same secret (Fix #2714) 2022-01-23 18:12:09 +01:00
Louis Royer
40861c9e4f Move keys to a separate mod (Fix #1490) 2022-01-23 18:12:09 +01:00
paramat
0c1252bcf5 Balance sounds, remove silent water footstep 2022-01-23 18:07:59 +01:00
Yad
760581b330
Copyedit README.md & game.conf (#2919) 2022-01-23 18:07:10 +01:00
sfan5
acc918436a Override local_animation settings for certain animations
This makes the lay/sit animation work on the local client (in third-person).
2022-01-20 22:48:59 +01:00
Lars Müller
6623dec567
Redo player_api (#2745) 2022-01-17 21:49:28 +01:00
Emojigit
75f9575557
Allow to set use_texture_alpha when registering a door
Co-Authored-By: Gregor Parzefall <gregor.parzefall@posteo.de>
2022-01-14 19:41:26 +01:00
sfan5
78de12d6b4 Fix torch models so they render correctly in model[]
reported by @OgelGames
2022-01-09 22:57:57 +01:00
Yaman Qalieh
d775a9bdae
Pull some parent node vars for stairs and slabs (#2911)
Fixes the sunlight propagation of glass stairs and slabs.

Co-authored-by: tenplus1 <tenplus1@users.noreply.github.com>
2021-12-12 16:38:54 +01:00
Daretmavi
60389a1539
Slovak translation update (#2905) 2021-12-12 16:38:02 +01:00
An0n3m0us
3aaabce7a4
Convert door model to B3D (#2906)
Using a B3D model I worked out that it would be possible to have only two models (instead of the current four) for the doors and still keep all the mirroring correct when the door is open/closed.
2021-12-12 16:37:50 +01:00
Wuzzy
ad183c48ee Update German translation 2021-12-10 12:24:48 +01:00
Wuzzy
2361987421 Update locale files 2021-12-10 12:24:48 +01:00
Montandalar
575ecc3125 Do not crash when a skeleton key is used on an unknown node (#2806) 2021-11-23 23:56:28 -04:00
sfan5
ac8ac98fe2 Use node particles for TNT explosions (#2695) 2021-11-23 23:56:00 -04:00
sfan5
fe915a3c7f Fix crash on TNT explosions if tnt is disabled 2021-11-23 23:55:32 -04:00
feec4659cb minetest 4 game with some backports from 5.2
* taking care .. thi is 5.1 with removed binocular
* updated README for our fork minenux
* minetest 4 game with some backports from 5.3
2021-11-23 23:53:56 -04:00
LoneWolfHT
5875820542
Use itemstack name when placing doors (#2888) 2021-10-31 19:17:31 +01:00
nogajun
31f7d57889
Add and fix Japanese translation (#2904) 2021-10-31 19:17:21 +01:00
sfence
02ec133392
Prevent blocking of fuel inventory by fuel replacement (#2895) 2021-10-23 14:37:51 +02:00
Montandalar
1309953da6 Fix the creative trash slot for player 'trash'
By using the inventory named just 'trash' instead of 'creative_trash'
which overlaps when you name your player 'trash'.
2021-10-23 14:37:30 +02:00
Lars Müller
5273fcb3ad
Readd character.b3d normals (#2902) 2021-10-16 16:41:10 +02:00
ptah-alexs
f2bc5e2c67
Improve Russian translation (#2532) 2021-10-16 16:40:56 +02:00
sfan5
4b8b33587c Fix misuse of nodedef custom fields in fence gates
Custom fields must start with an underscore, this is very relevant for `sound` which is already defined by the engine.
2021-09-24 21:03:49 +02:00
雷哲翰
953fcfe09e
Improve zh_CN translation (#2885) 2021-09-04 23:37:39 +02:00
orbea
21e5f68292
default: Improves reading and writing to books. (#2656)
* Allow anyone to write to a book without any text and title.
* Allows saving books without any text or title.
* Adds a "Read" and "Write" tab to written owned books.

Fixes #1743
2021-09-04 23:37:27 +02:00
David Leal
92701885d0
Replace Travis CI with GitHub actions (#2661)
Co-authored-by: sfan5 <sfan5@live.de>
2021-07-08 11:47:37 +01:00
Jordan Irwin
c96cc55c40
Fix incorrect documentation of "default_coal_lump.png" 2021-06-06 19:25:30 +02:00
sfence
70500943f3
Fix problem with sharing table in door nodes Lua definitions
closes #2882
2021-06-06 19:24:10 +02:00
Paramat
ddebdeccb1
Add open/close sound gains to the Doors API, balance sound levels (#2768) 2021-05-31 20:43:33 +01:00
SmallJoker
71ea0c65ea
Attachments: Proper data cleanup in callbacks (#2865) 2021-05-11 21:15:47 +02:00
tenplus1
642fde44f1
Use group for mushroom spread ABM (#2863)
Have mushroom spread abm use group:mushroom to spread not only default red and brown but all defined shrooms.
2021-05-08 14:42:34 +02:00
An0n3m0us
1c78666c56 Reclassify some items 2021-05-08 14:42:16 +02:00
ElCeejo
8158926862
Check for attachments before attaching player to bed (#2862) 2021-05-08 11:30:57 +02:00
SmallJoker
4945f4bf9a Carts: Fix 0/0 condition on faulty tool capabilities 2021-05-02 14:59:22 +02:00
sfan5
79e63a8496
Check for required engine features on startup 2021-04-27 11:50:32 +02:00
SmallJoker
c6171a8f29
Add Esperanto translation (#2739)
Co-authored-by: Jason Cartwright <cartwrightjason49@gmail.com>
2021-04-17 15:08:37 +02:00
An0n3m0us
42baede13f
Add specific groups to different types of grass (#2852) 2021-04-02 19:13:44 +02:00
An0n3m0us
0a90bd8a0e
Fix wield image for coral and kelp nodes (#2850) 2021-03-17 12:16:39 +01:00
Paul Ouellette
34bb232052 mtg_craftguide: Fix incorrect item tooltips
This happened when the same item was visible twice and one of them was a
group item. Fix it by ensuring that buttons that should have different
tooltips don't have the same element name.
2021-03-17 12:16:13 +01:00
Wuzzy
2c9733ac45
Add Lojban translation (#2835) 2021-02-23 20:00:46 +01:00
Ronoaldo Pereira
b6377a7c0e
Added Brazilian Portuguese translation (#2834)
Added the Brazilian Portuguese translation to all mods in the Minetest Game.
2021-02-23 20:00:02 +01:00
Nathaniel Freeman
73ea8e2e91
Update Spanish translation (#2824) 2021-02-15 21:54:48 +01:00
Wuzzy
46136bbf19
Update German translation (#2821) 2021-02-12 20:55:27 +01:00
ExeVirus
6bd059915c
Safe texture compression (#2808)
Only a single program was used to safely compress all textures in MTG.

 * `optipng -o7 -zm1-9 -nc -strip all -clobber %%f`

The key command used is -nc, which stops color mode changes. I.e. any RGBA textures will remain RGBA textures, with none being changes to 8-bit indexed mode.

utils/optimize_textures.sh performs this compression automatically, assuming optipng is installed.
2021-02-12 20:55:18 +01:00
Lars Müller
624dafc12b
Fix crash on exit of bed formspec if not sleeping (#2826) 2021-02-11 12:30:37 +01:00
An0n3m0us
3d95fceee8
Smoothen lava sounds at loop points (#2820)
Closes: #2818
2021-02-09 17:34:40 +01:00
sfan5
aa9cc39317 Update game APIs for use_texture_alpha deprecation 2021-02-07 11:48:05 +01:00
sfan5
08b13c9efb Fix deprecated alpha / use_texture_alpha use 2021-02-07 11:48:05 +01:00
SmallJoker
c1b236b4e3 weather: Fix error caused by missing biomes 2021-02-07 11:48:05 +01:00
Wuzzy
9d419bfac6
Update translation templates 2021-02-06 15:07:07 +01:00
Lars Müller
6a9cbcad82
Beds: Preserve player physics (#2789) 2021-02-01 23:00:05 +01:00
sfan5
ecfebe3c17 Revert "Correct door model dimensions (#2804)"
This introduces z-fighting so we'll just undo it. closes #2812
This reverts commit 3fdd5cdb5fb772d84618e57b346f6ccbf9380d57.
2021-02-01 22:38:48 +01:00
An0n3m0us
3fdd5cdb5f
Correct door model dimensions (#2804) 2021-01-30 15:22:22 +01:00
An0n3m0us
e1e793d4da
Correct name of acacia mese postlight (#2800) 2021-01-30 15:20:40 +01:00
An0n3m0us
b648af479f
default: Add missing nodes to list (#2799) 2021-01-30 15:20:11 +01:00
Montandalar
87f6b941c4
Do not crash when a skeleton key is used on an unknown node (#2806) 2021-01-15 17:43:19 +01:00
The most random of all meshes
1ade8941b4
Fix boat floating in the air when water being drained away (#2788) 2020-12-28 15:56:04 +01:00
Maksim
e6aec880de
Use Minetest 5.3 'minetest.is_creative_enabled' API (#2795) 2020-12-13 18:59:19 +01:00
Richard Try
9c29019301
Improve Russian translation (carts) (#2794) 2020-12-13 18:59:07 +01:00
IFRFSX
a1a50673c8
Update zh_CN translation for mtg_craftguide and dye (#2796)
Co-authored-by: IFRFSX <1079092922@qq.com>
2020-12-13 18:58:54 +01:00
Rafsanjani Atallah
0232288d5e
Fix some mistakes in the Indonesian translations (#2758) 2020-12-13 18:58:37 +01:00
auouymous
7ae983b669
Don't replace protected liquids with bones (#2790) 2020-12-08 22:20:16 +01:00
The most random of all meshes
29866dbcb3
Fix minor bug in german translation 2020-11-29 17:43:15 +01:00
An0n3m0us
2e7b509a94
Move player model sitting and laying positions to above the ground (#2746) 2020-11-13 18:14:25 +00:00
DS
226e2d4c12
Add missing not_in_creative_inventory group where appropriate (#2764) 2020-11-11 15:29:43 +00:00
CyberDonk3y
0a950c9932
Improve Russian translation (#2761) 2020-11-05 19:48:15 +01:00
Daretmavi
2953bf2bd6
Slovak translations (#2772) 2020-11-05 19:47:48 +01:00
SmallJoker
331bbae058
Fix deprecated get_player_velocity and set_physics_override calls (#2770) 2020-11-04 21:42:35 +01:00
Paramat
720d4c8e3f
Do not apply waving shader to bush leaves (#2753) 2020-10-20 22:30:57 +01:00
Wuzzy
6605724fe1
Add icons for invisible nodes (#2718) 2020-09-30 16:41:04 +01:00
orbea
dd91a1bfe5
Furnace: Start the timer on on_metadata_inventory_take (#2639)
This fixes a cosmetic issue where if a player removes
items from the furnace it will not revert to showing that its
"Empty". The furnace would only show its empty when the the
items were used up by the smelting process.
2020-09-23 21:58:09 +01:00
sofar
5348d6e5bc
Fix builtin item metatable (#2328)
Co-authored-by: Alexander Weber <web.alexander@web.de>
2020-09-22 18:39:11 +02:00
Louis Royer
4c145bf9aa
Improve inner/outer stairs translation for external mods (#2584) 2020-09-21 23:38:49 +01:00
Paramat
63cffc4bd1
Improve player model credits, add contributors to license (#2741) 2020-09-21 23:36:59 +01:00
Paramat
1d3feba732
Update game description to manage expectations (#2740) 2020-09-20 00:40:49 +01:00
Paramat
8d0fb34fb0
Player_api: Various maintenance (#2737)
Clear 'player_sneak' and 'player_api.player_attached' table values
when player leaves.
Remove unnecessary commas and whitespace.
Fix table name in 'game_api.txt'.
Clean up documentation in 'game_api.txt'.
2020-09-09 19:11:25 +02:00
An0n3m0us
268f869e67
beds: Various bug fixes (#2566)
· Fixes players sleeping in an occupied bed (Wuzzys code)
· Fixes 'sleepwalking' by checking players velocity (Wuzzys code)
· Fixes sleeping player flying off the bed when damaged and flying far away from the bed after death
· Fixes sleeping player being immobilized and bed undiggable after death
2020-09-02 18:32:06 +02:00
IFRFSX
25bf3fdc9c
Update Chinese translation (#2730) 2020-09-02 18:30:38 +02:00
An0n3m0us
befed5525a
Replace some sounds with new sounds (#2605) 2020-08-29 01:16:36 +01:00
SmallJoker
1da168b3c3
Craftguide: Fix error caused by removing invalid recipes (#2732) 2020-08-23 14:35:12 +02:00
Paul Ouellette
5d0e4aef45
Add simplified version of 'craftguide' mod, named 'mtg_craftguide' (#2396) 2020-08-22 00:20:58 +01:00
An0n3m0us
686fdb5c06
Add different woods to mese posts (#2599) 2020-08-16 13:21:22 +02:00
An0n3m0us
0a96bac46d
Add furnace sounds (#2569)
Two sounds are played; one while the furnace is active (sound used is "fire_fire") and one after an item is cooked (sound used is "default_cool_lava").
2020-08-07 19:40:02 +02:00
tuedel
4858c2b3fb
sethome: Replace deprecated function calls (#2724) 2020-07-26 11:07:15 +02:00
An0n3m0us
12f75ab803
Add correct front texture to cart texture (#2720) 2020-07-24 17:59:42 +02:00
sfan5
e193f9fda3
Add lava environment sound (#2683) 2020-07-16 23:26:13 +02:00
Muhammad Rifqi Priyo Susanto
8c01a5b288
Add Indonesian translations (#2693) 2020-06-29 18:41:50 +02:00
tenplus1
7cac67f097
TNT centre node adheres to protection
Make sure tnt.boom() doesnt replace centre node when explode_centre is true and ignore_protection is false.

Fixes: https://github.com/minetest/minetest_game/issues/2663
2020-06-28 15:50:46 +02:00
Wuzzy
0648252056
Update German translation 2020-06-28 15:50:00 +02:00
updatepo.sh
8855490b7f Update translation templates 2020-06-26 14:41:30 +02:00
JDiaz
3257780b32
farming: Update Spanish translation (#2701) 2020-06-25 12:35:36 +02:00
Paramat
b2d0f0ac8d
Update nodes papyrus can grow on, include default:dry_dirt (#2705)
Fixes papyrus not growing on savanna dirt.
Also updates the nodes papyrus can grow on, which were incorrect for a long time.
2020-06-21 23:24:56 +01:00
Paramat
e8a7e75319
Make dry grass spread on default:dirt again (#2687) 2020-06-16 20:42:45 +01:00
Hooded Ice
d03d7e9bdc
Change brake rail to red (#2692) 2020-06-12 23:37:23 +02:00
sfan5
af045dcd8b sethome: Do not write empty homes file 2020-06-10 20:29:50 +02:00
sfan5
6d2a897e1b
creative: Update for compatibility with minetest.creative_is_enabled (#2691) 2020-06-07 00:15:35 +02:00
sfan5
b1ab8d5123
Implement searching for translated names in creative inventory (#2675) 2020-06-05 14:29:34 +02:00
sfan5
6e345cf136
Use node particles for TNT explosions (#2695) 2020-06-02 12:48:56 +02:00
sfan5
e849d54572
carts: Fix item collection (#2689) 2020-05-29 22:54:47 +02:00
An0n3m0us
0662f96284
Reduce hud icons size to 12x12 pixels (#2669) 2020-05-28 11:12:15 +02:00
sfan5
84da00acd4
Add node particles when leafdecay removes a node (#2686) 2020-05-25 15:56:23 +02:00
SmallJoker
3452938c76 Carts: Re-add erroneously removed driver reset
carts:manage_attachment does not handle the driver value of the cart,
hence carts could not be used by another player until it's replaced.
2020-05-16 19:26:28 +02:00
SmallJoker
b787fcf7e4 Carts: Reset player view and attachment table on death
Fixes #2681
2020-05-15 19:04:38 +02:00
Paramat
e5a7af1c4a
Add wild cotton plant in savanna as a source of cotton seeds (#2617)
Junglegrass is unchanged as a source of cotton seeds for now, but
probably should be removed as a source in future, as players get
used to the new source.
2020-05-14 23:49:17 +01:00
sfan5
b3d91a487d
Add new dry shrub texture by Extex101 (#2680) 2020-05-14 22:33:53 +01:00
Hamlet
16c950f688
doors: Update Italian translation (#2670) 2020-05-11 23:13:00 +02:00
sfan5
e5b54c6ead
Switch TNT explosions to use add_player_velocity (#2674) 2020-05-10 14:10:29 +02:00
Yaman Qalieh
3f42c6c243
Add oddly_breakable_by_hand to glass stairs and slabs 2020-05-10 13:37:37 +02:00
sfan5
ef45a8e148
doors: Remove unnecessary nodebox and empty texture (#2662) 2020-05-04 19:20:01 +02:00
Zughy
d88e551071
Fix cart inventory image rendering (#2666)
Before it was rendering the side on both the side and the front of the minetest.inventorycube
2020-04-30 19:51:39 +02:00
HybridDog
190f7fdac9
Add a missing article to the sign action message (#2651) 2020-04-29 21:11:21 +02:00
sfan5
33eb7cee2a
Fix flammable item entities crashing (#2659) 2020-04-24 21:12:40 +02:00
An0n3m0us
189d2d9fb1
Fix door model UV for open and close (#2372)
Introduce _c and _d door types to correctly render the texture faces for the open and closed state.
2020-04-24 21:04:00 +02:00
David Leal
81c5b6b399
beds: Use player_api functions instead of default (#2654) 2020-04-23 22:19:58 +02:00
Paramat
52c6921cb2
Make default:snow collisionbox half of nodebox height (#2647) 2020-04-14 19:09:24 +02:00
sfan5
bd64188ee5 Override builtin item entity the portable way 2020-04-14 13:31:25 +02:00
bell07
fb18a5b20d
Make default.chest.register_chest() usable for other mods (#2127) 2020-04-13 20:26:44 +02:00
Paul Ouellette
ea4ce80f7c
Make straw stairs usable as fuel (#2627) 2020-04-13 11:34:10 +02:00
IFRFSX
36b2bcb5f3
Add Basic Fire Description (#2568) 2020-04-11 20:50:49 +02:00
orbea
695f98f213
player_api: Remove local variable (#2640) 2020-04-08 20:40:19 +02:00
sfan5
545ec0741c Fix creative category sorting in certain cases 2020-04-08 17:25:09 +02:00
sfan5
c1f41720fc Fix crash on TNT explosions if tnt is disabled 2020-04-08 17:24:10 +02:00
orbea
14a385d68c
trees: Reduce local variables (#2637) 2020-04-07 19:36:03 +02:00
Maksim
03c9aed221
Fire mod: Code cleanup, compress textures 2020-04-06 21:09:39 +01:00
Paramat
720b24ed2d
Weather mod: Tune cloud density variation
Previously, cloud density was too low at medium humidity.
Tune cloud density variation to match the default/classic value at
humidity midvalue 50.
Tune the lower limit of cloud density that occurs at extreme low
humidity.
Increase minimum cloud thickness to 2 nodes.
Add comments.
2020-04-06 21:05:07 +01:00
Paramat
4243d28846
Clarify descriptions of dry grass, dry dirt 2020-04-06 21:03:57 +01:00
Maksim
7d230fdbf8
Enable player animation when Right Click (#2622) 2020-04-06 15:22:08 +02:00
An0n3m0us
7fc7fa4843
Transform brick top texture to align bricks correctly (#2607) 2020-04-06 15:19:52 +02:00
An0n3m0us
05fad37b3c
Sort items into correct categories (#2612) 2020-04-06 15:15:50 +02:00
luk3yx
0e0ea932ef Fix for 0.4.18.5-dev.
• Remove the "binoculars" mod, as it is broken on 0.4.
2019-03-12 16:02:41 +13:00
1598 changed files with 13878 additions and 29110 deletions

16
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,16 @@
name: build
on: [push, pull_request]
jobs:
luacheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Luarocks
run: |
sudo apt-get update -qyy
sudo apt-get install luarocks -qyy
- name: Install Luacheck
run: luarocks install --local luacheck
- name: Run Luacheck
run: $HOME/.luarocks/bin/luacheck mods

View File

@ -1,11 +0,0 @@
language: generic
addons:
apt:
packages:
- luarocks
before_install:
- luarocks install --local luacheck
script:
- $HOME/.luarocks/bin/luacheck ./mods
notifications:
email: false

View File

@ -12,7 +12,6 @@ Copyright (C) 2015 paramat CC BY-SA 3.0
License of source code
----------------------
Copyright (C) 2010-2012 Blockmen
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
See README.txt in each mod directory for information about other authors.

View File

@ -1,63 +1,33 @@
Minetest5 Game
==============
# Minetest Game
The default game for the Minetest5 engine.
The default game bundled in the Minetest engine.
This is a fork from minetest default game, this
are made from minenux project https://codeberg.org/minenux
for minetest v5 and minetest v4 or 0.4.
For further information, check [this forum topic](https://forum.minetest.net/viewtopic.php?f=15&t=9724).
Introduction
------------
This is the branch `stable-5.2` of minetest game for minetest5 a version
that is focused in v5 of minetest but mainly in 5.2 release. There's
also a minetest4 game version too in `stable-4.0` branch.
This are focused to provide minimal default game featured for minetest5
to be playable, with an [api](game_api.md) for more aditions (in the form of mods)
For further information, check the [Minetest Wiki](https://wiki.minetest.org/index.php?title=Games/Minetest_Game)
## Download
Can be obtained from https://codeberg.org/minenux/minetest-game-minetest/tags
those like 5.2.X by example https://codeberg.org/minenux/minetest-game-minetest/releases/tag/5.2.1
It will download a tar.gz file, uncompress the content and a directory will be created,
the name of the directory does not matter, the contents will be used later to install.
When stable releases are made, Minetest Game and the Minetest engine is packaged
and made available at https://codeberg.org/minenux/minetest-engine/archive/stable-5.2.tar.gz
or generally at https://codeberg.org/minenux/minetest-engine/releases/tag/5.2.1 by example.
This have a mirror at https://git.minetest.org/minenux/minetest-game-minetest/releases
Also see the [Minetest Wiki](https://wiki.minetest.net/Subgames/Minetest_Game) for more information.
## Installation
This game can be used in any version from 5.0 to 5.2, it may work with recents versions
- Unzip the archive, rename the folder to `minetest_game` and
place it in .. `minetest/games/`
After download, rename the directory decompressed to `minetest_game` and put to the "games" directory:
- GNU/Linux: If you use a system-wide installation place it in `~/.minetest/games/`.
- GNU/Linux: If you use a system-wide installation place
it in ~/.minetest5/games/.
- Others: `minetest/games/` or `games` directory from the path were the binary are.
The Minetest engine can be found at [GitHub](https://github.com/minetest/minetest).
For further information or help, see: https://wiki.minetest.net/Installing_Mods
## Content
This sub game or game will contain a set of mods, that provide a behaviour of the game,
For more information check [mods/README.md](mods/README.md)
For further information or help, see: [Installing Mods](https://wiki.minetest.net/Installing_Mods).
## Compatibility
This source code and files are focused in most newer minetest5 engine
from https://codeberg.org/minenux/minetest-engine/src/branch/stable-5.2
The Minetest Game GitHub `master` `HEAD` is generally compatible with the GitHub
`master` `HEAD` of the Minetest engine.
For minetest4 check https://codeberg.org/minenux/minetest-engine/src/branch/stable-4.0
Additionally, when the Minetest engine is tagged to be a certain version (e.g.
`0.4.10`), Minetest Game is tagged with the version, too.
When stable releases are made, Minetest Game and the Minetest engine is packaged
and made available at [www.minetest.net](https://www.minetest.net/downloads/).
## Licensing
See `LICENSE.txt` original autor fo first set of mods game was Blockmen
See `LICENSE.txt`

View File

@ -1,5 +1,3 @@
title = Minetest5
name = Minetest5
author = Minetest
description = GAME set for MinenuX Bundled by default with Minetest5
min_minetest_version = 5.0
title = Minetest Game
author = Minetest
description = A basic exploration, mining, crafting, and building, sandbox game with no NPCs, monsters, or animals. Minetest Game is usually used with mods added, and many mods are available for this game. Reliably maintained by Minetest Engine core developers.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 935 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -1,5 +1,5 @@
# This file contains settings of Minetest Game that can be changed in
# minetest.conf.
# This file contains settings of minetest4 Game that can be changed in
# minetest4.conf.
# By default, all the settings are commented and not functional.
# Uncomment settings by removing the preceding #.
@ -38,11 +38,9 @@
#enable_lavacooling = true
# Whether the stuff in initial_stuff should be given to new players.
# its depends of the configured at the initital_stuff_mod
#give_initial_stuff = true
# What initial stuff will be given to player if initial stuff are set to true
#initial_stuff = default:wood,farming:bread,default:furnace,default:torch
#give_initial_stuff = false
#initial_stuff = default:pick_steel,default:axe_steel,default:shovel_steel,
default:torch 99,default:cobble 99
# Whether the TNT mod should be enabled.
#enable_tnt = <true in singleplayer, false in multiplayer>
@ -74,6 +72,9 @@
# Helps rivers create more sound, especially on level sections.
#river_source_sounds = false
# Enable cloud variation by the 'weather' mod.
# Enable cloud and shadow intensity variation by the 'weather' mod.
# Non-functional in V6 or Singlenode mapgens.
#enable_weather = true
# If enabled, non-player actions are logged
#log_non_player_actions = false

View File

@ -1,61 +0,0 @@
Default mods
------------
For information check [../README.md](../README.md)
## Content
| mod name | origin or work | version | info |
| ------------------ | --------------------------------------------------- | -------- | --- |
| api | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | [api](../game_api.md) |
| beds | https://codeberg.org/minenux/minetest-mod-beds | https://codeberg.org/minenux/minetest-mod-beds/commit/a1aac5940c88106b901c00409d7dac942720dd5b | [beds/README.md](beds/README.md) |
| boats | https://codeberg.org/minenux/minetest-mod-boats | https://codeberg.org/minenux/minetest-mod-boats/commit/e412ae84db3c443618b117fb35ae69e3c9bbae10 | [boats/README.md](boats/README.md) |
| bucket | https://codeberg.org/minenux/minetest-mod-bucket.git | https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5 | [bucket/README.md](bucket/README.md) |
| butterflies | https://codeberg.org/minenux/minetest-mod-bucket.git | https://codeberg.org/minenux/minetest-mod-bucket/commit/1d9f32295aba3ef2a86be302050f34c1766e93d5 | [bucket/README.md](bucket/README.md) |
| bones | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | |
| binoculars | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | |
| carts | https://codeberg.org/minenux/minetest-mod-carts | https://codeberg.org/minenux/minetest-mod-carts/commit/dcbca916cffdcec281f0129ef350db2686bda933 | [carts/README.md](carts/README.md) |
| creative | https://codeberg.org/minenux/minetest-mod-creative | https://codeberg.org/minenux/minetest-mod-creative/commit/ca09e773701f834fec7de18bf13598b3323778db | [creative/README.md](creative/README.md) |
| default | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | |
| player_api | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | |
| env_sounds | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | |
| game_commands | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | |
| spawn | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | |
| doors | https://codeberg.org/minenux/minetest-mod-doors | https://codeberg.org/minenux/minetest-mod-doors/commit/a89ab0454deb4933b6e4971c57055c40b7938e5b | [doors/README.md](doors/README.md) |
| dungeon_loot | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | |
| dye | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | |
| farming | https://codeberg.org/minenux/minetest-mod-farming | https://codeberg.org/minenux/minetest-mod-farming/commit/08c3a9b37bab5d8a0f5971b168aef412db5fc424 | [farming/README.md](farming/README.md) |
| fire | https://codeberg.org/minenux/minetest-mod-fire | https://codeberg.org/minenux/minetest-mod-fire/commit/4e5f7ad55314bd9b126fb133cfc5a32fa58b20d2 | [fire/README.md](fire/README.md) |
| fireflies | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/fc4ab2538d432a20978ee3bbd1b69a42446e9132 | [fireflies/README.md](fireflies/README.md) |
| flowers | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | |
| hudbars | https://codeberg.org/minenux/minetest-mod-hudbars | https://codeberg.org/minenux/minetest-mod-hudbars/commit/e3db263828cb96f06d848e6dc80d90f21c7f92a0 | [hudbars/README.md](hudbars/README.md) |
| give_initial_stuff | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/ee86fb1c41e7d8d2a1d94764dd64808bc8ff5999 | [give_initial_stuff/README.md](give_initial_stuff/README.md) |
| killme | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | |
| sfinv | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | |
| stairs | https://codeberg.org/minenux/minetest-mod-stairs | https://codeberg.org/minenux/minetest-mod-stairs/commit/c3a5af6c452daca599d226df694df1b75f15c110 | [stairs/README.md](stairs/README.md) |
| screwdriver | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | |
| sethome | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/8e59006dc81ebe6785380158e57ba126cb3a4163 | |
| tnt | https://codeberg.org/minenux/minetest-mod-tnt | https://codeberg.org/minenux/minetest-mod-tnt/commit/8195861f905a90b53cd52348deb34df41a053027 | [tnt/README.md](tnt/README.md) |
| toolranks | https://codeberg.org/minenux/minetest-mod-toolranks | https://codeberg.org/minenux/minetest-mod-toolranks/commit/5c9553e5ac6cc7ae375033b76ef7771a6935c771 | [toolranks/README.md](toolranks/README.md) |
| vessels | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | |
| walls | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | |
| weather | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | |
| wool | https://codeberg.org/minenux/minetest-mod-wool | https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a | [wool/README.md](wool/README.md) |
| xpanes | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/eb64ff94f82d726e4a55b20fa7ce30e4a7470cc5 | |
| xdecor | https://codeberg.org/minenux/minetest-game-xdecor | https://codeberg.org/minenux/minetest-game-xdecor/commit/cd0c35b8c58153f7c353b5dbfac35e524fa0ea18 | [xdecor/README.md](xdecor/README.md) |
The default mod was splitted now sethome and player_api are mods, binoculars from v5 are
just separate privilegies for zoom, butterflies and fireflies from v5 can be set
by dmobs or mobs_doomed mod, the spawn mod is just minimal spawn management
pooly provided and better managed by mods like rspawn and spawnrandom.
## Compatibility
This source code and files are focused in most newer minetest5 engine
from https://codeberg.org/minenux/minetest-engine/src/branch/stable-5.2
For minetest4 check https://codeberg.org/minenux/minetest-engine/src/branch/stable-4.0
## Licensing
See `LICENSE.txt`

View File

@ -1,33 +0,0 @@
NEXT
----
- add more beds as fuel, add mini-game respawn flag.
- add new white simple bed, change red bed recipes to use red wool, add my own screenshot
- older engine detection and intlib
1.0.1 beta
----------
- Add backwards compatibility with PilzAdam's beds mod
- Fix placement
- Fix small bugs
- Prevent possible crash
1.1
---
- Add fancy bed model (based on jp's model)
- Add API to register beds
- Allow players always to detach from bed (by donat-b)
- If more than 50% of players want sleep they can skip the night
- Don't show sleep dialog in singleplayer
1.1.1
-----
- Prevent possbile crash by trying to reposition leaving players
1.2
---
- Updated to use default bed functions
- Texture check to fix beds using old api
- 'bed_sleep_divide' setting added [1 for all, 2 for half, 3 for third]
- Add POVA support
- Add pink fancy bed and blue simple bed

View File

@ -1,104 +0,0 @@
minetest mod Beds
=========================
This mod improves beds which allows sleep, featured to (auto) skip the night.
Information
-----------
This mod is named `beds` to sleep, by rightclick the bed. It featured
in singleplayer mode that the night gets skipped immediately. If playing
in multiplayer you get shown how many other players are in bed too,
if all players are sleeping the night gets skipped.
![screenshot.jpg](screenshot.jpg)
Tech information
----------------
This mod sustitute default one, you must disable the default of minetest
game if present or override it.
#### Features
* Night Skypping:
This mod auto featured night skip in singleplayer, in multiplayer it skipped
if more than a set percentage (default 50%) of the players are lying
in bed and use this option. Check configuration section for more info.
* Controlled respawning:
If you have slept in bed (not just lying in it) your respawn point
is set to the beds location and you will respawn there after
death. Check configuration section for more info.
* More beds:
It features more beds, so along with the Red simple bed we now have White and
Blue, and the fance beds has the original Red and now Pink.
#### Dependencies
* default
* player_api (for newer engines)
Optional dependences:
* intllib (only for older engines)
* pova (optional)
The pova mod are not xplicit set as optional depends, due the circular depends bug,
its detected and used.
#### Configuration
| Configuration | type | default | place file | Notes about |
| --------------------- | ----- | ------- | ------------ | ----------------------------------------- |
| enable_bed_respawn | bool | true | minetest.conf | Enable respawn point set to last sleep bed |
| enable_bed_night_skip | bool | false | minetest.conf | You can disable the night skip feature |
| bed_sleep_divide | int | 2 | minetest.conf | Division of players needed to skip night |
#### Nodes
Crafting are same as original default mod, but colored uses a white plus the other color.
| Node name | Description name |
| ----------------------- | --------------------- |
| beds:bed | Simple bed |
| beds:bed_blue | Simple bed blue |
| beds:fancy_bed | Fancy shaped bed |
| beds:fancy_bed_pink | Fancy shaped bed pink |
#### Nodes and Aliasing
| mod name : node name | new mod name : new node |
| --------------------------- | ----------------------- |
| beds:bed_top_red | beds:bed_top |
| beds:bed_bottom_red | beds:bed_bottom |
#### Mini-Game Support
If enable_bed_respawn is set to true and a player dies when playing a mini-game then this
can interrupt the game, so a special beds.respawn[player_name] flag has been added which
is set to 'true' by default to always respawn player at their bed, but can be set to
'false' during a mini-game to stop this behaviour.
License
------
### Authors of source code
Originally by BlockMen (MIT)
Various Minetest developers and contributors (MIT)
### Authors of media (textures)
BlockMen (CC BY-SA 3.0)
All textures unless otherwise noted
JP (WTFPL)
All models unless otherwise noted
Check [license.txt](license.txt)

30
mods/beds/README.txt Normal file
View File

@ -0,0 +1,30 @@
Minetest Game mod: beds
=======================
See license.txt for license information.
Authors of source code
----------------------
Originally by BlockMen (MIT)
Various Minetest developers and contributors (MIT)
Authors of media (textures)
---------------------------
BlockMen (CC BY-SA 3.0)
All textures unless otherwise noted
TumeniNodes (CC BY-SA 3.0)
beds_bed_under.png
This mod adds a bed to Minetest which allows players to skip the night.
To sleep, right click on the bed. If playing in singleplayer mode the night gets skipped
immediately. If playing multiplayer you get shown how many other players are in bed too,
if all players are sleeping the night gets skipped. The night skip can be forced if more
than half of the players are lying in bed and use this option.
Another feature is a controlled respawning. If you have slept in bed (not just lying in
it) your respawn point is set to the beds location and you will respawn there after
death.
You can disable the respawn at beds by setting "enable_bed_respawn = false" in
minetest.conf.
You can disable the night skip feature by setting "enable_bed_night_skip = false" in
minetest.conf or by using the /set command in-game.

View File

@ -1,62 +1,64 @@
function beds.register_bed(name, def)
local reverse = true
local new_tiles
local new_mesh = "beds_simple_bed.obj"
local function destruct_bed(pos, n)
local node = minetest.get_node(pos)
local other
-- old api texture check
if def.tiles and def.tiles.bottom then
new_tiles = "beds_simple_bed.png" -- default
-- check for fancy bed
if def.nodebox and def.nodebox.bottom and #def.nodebox.bottom > 3 then
new_tiles = "beds_fancy_bed.png"
new_mesh = "beds_fancy_bed.obj"
end
if n == 2 then
local dir = minetest.facedir_to_dir(node.param2)
other = vector.subtract(pos, dir)
elseif n == 1 then
local dir = minetest.facedir_to_dir(node.param2)
other = vector.add(pos, dir)
end
-- register bed node
minetest.register_node(name, {
if reverse then
reverse = not reverse
minetest.remove_node(other)
minetest.check_for_falling(other)
beds.remove_spawns_at(pos)
beds.remove_spawns_at(other)
else
reverse = not reverse
end
end
function beds.register_bed(name, def)
minetest.register_node(name .. "_bottom", {
description = def.description,
inventory_image = def.inventory_image,
wield_image = def.wield_image,
drawtype = "mesh",
mesh = def.mesh or new_mesh,
tiles = new_tiles or def.tiles,
drawtype = "nodebox",
tiles = def.tiles.bottom,
use_texture_alpha = "clip",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
stack_max = 1,
groups = {
choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 1,
fall_damage_add_percent = -40, bouncy = 85
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 1},
sounds = def.sounds or default.node_sound_wood_defaults(),
node_box = {
type = "fixed",
fixed = def.nodebox.bottom,
},
sounds = default.node_sound_wood_defaults(),
selection_box = {
type = "fixed",
fixed = def.selectionbox
},
collision_box = {
type = "fixed",
fixed = def.collisionbox
fixed = def.selectionbox,
},
on_place = function(itemstack, placer, pointed_thing)
local under = pointed_thing.under
local node = minetest.get_node(under)
local udef = minetest.registered_nodes[node.name]
if udef and udef.on_rightclick
and not (placer and placer:is_player()
and placer:get_player_control().sneak) then
if udef and udef.on_rightclick and
not (placer and placer:is_player() and
placer:get_player_control().sneak) then
return udef.on_rightclick(under, node, placer, itemstack,
pointed_thing) or itemstack
end
local pos
if udef and udef.buildable_to then
pos = under
else
@ -65,16 +67,13 @@ function beds.register_bed(name, def)
local player_name = placer and placer:get_player_name() or ""
if minetest.is_protected(pos, player_name)
and not minetest.check_player_privs(player_name, "protection_bypass") then
if minetest.is_protected(pos, player_name) and
not minetest.check_player_privs(player_name, "protection_bypass") then
minetest.record_protection_violation(pos, player_name)
return itemstack
end
local node_def = minetest.registered_nodes[minetest.get_node(pos).name]
if not node_def or not node_def.buildable_to then
return itemstack
end
@ -83,46 +82,101 @@ function beds.register_bed(name, def)
minetest.dir_to_facedir(placer:get_look_dir()) or 0
local botpos = vector.add(pos, minetest.facedir_to_dir(dir))
if minetest.is_protected(botpos, player_name)
and not minetest.check_player_privs(player_name, "protection_bypass") then
if minetest.is_protected(botpos, player_name) and
not minetest.check_player_privs(player_name, "protection_bypass") then
minetest.record_protection_violation(botpos, player_name)
return itemstack
end
local botdef = minetest.registered_nodes[minetest.get_node(botpos).name]
if not botdef or not botdef.buildable_to then
return itemstack
end
minetest.set_node(pos, {name = name, param2 = dir})
minetest.set_node(pos, {name = name .. "_bottom", param2 = dir})
minetest.set_node(botpos, {name = name .. "_top", param2 = dir})
if not beds.is_creative(player_name) then
if not minetest.is_creative_enabled(player_name) then
itemstack:take_item()
end
return itemstack
end,
on_rightclick = function(pos, node, clicker)
beds.on_rightclick(pos, clicker)
end,
on_destruct = function(pos)
beds.remove_spawns_at(pos)
destruct_bed(pos, 1)
end,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
beds.on_rightclick(pos, clicker)
return itemstack
end,
on_rotate = function(pos, node, user, _, new_param2)
local dir = minetest.facedir_to_dir(node.param2)
local p = vector.add(pos, dir)
local node2 = minetest.get_node_or_nil(p)
if not node2 or minetest.get_item_group(node2.name, "bed") ~= 2 or
node.param2 ~= node2.param2 then
return false
end
if minetest.is_protected(p, user:get_player_name()) then
minetest.record_protection_violation(p, user:get_player_name())
return false
end
if new_param2 % 32 > 3 then
return false
end
local newp = vector.add(pos, minetest.facedir_to_dir(new_param2))
local node3 = minetest.get_node_or_nil(newp)
local node_def = node3 and minetest.registered_nodes[node3.name]
if not node_def or not node_def.buildable_to then
return false
end
if minetest.is_protected(newp, user:get_player_name()) then
minetest.record_protection_violation(newp, user:get_player_name())
return false
end
node.param2 = new_param2
-- do not remove_node here - it will trigger destroy_bed()
minetest.set_node(p, {name = "air"})
minetest.set_node(pos, node)
minetest.set_node(newp, {name = name .. "_top", param2 = new_param2})
return true
end,
can_dig = function(pos, player)
return beds.can_dig(pos)
end
end,
})
minetest.register_alias(name .. "_bottom", name)
minetest.register_alias(name .. "_top", "air")
minetest.register_node(name .. "_top", {
drawtype = "nodebox",
tiles = def.tiles.top,
use_texture_alpha = "clip",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
pointable = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 2,
not_in_creative_inventory = 1},
sounds = def.sounds or default.node_sound_wood_defaults(),
drop = name .. "_bottom",
node_box = {
type = "fixed",
fixed = def.nodebox.top,
},
on_destruct = function(pos)
destruct_bed(pos, 2)
end,
can_dig = function(pos, player)
local node = minetest.get_node(pos)
local dir = minetest.facedir_to_dir(node.param2)
local p = vector.add(pos, dir)
return beds.can_dig(p)
end,
})
minetest.register_alias(name, name .. "_bottom")
-- register recipe
minetest.register_craft({
output = name,
recipe = def.recipe

View File

@ -1,79 +1,92 @@
-- beds/beds.lua
-- support for MT game translation.
local S = beds.get_translator
-- Fancy shaped bed
beds.register_bed("beds:fancy_bed", {
description = S("Red Fancy Bed"),
description = S("Fancy Bed"),
inventory_image = "beds_bed_fancy.png",
wield_image = "beds_bed_fancy.png",
tiles = {"beds_fancy_bed.png", "default_wood.png"},
mesh = "beds_fancy_bed.obj",
selectionbox = {-0.5, -0.5, -0.5, 0.5, -0.06, 1.5},
collisionbox = {-0.5, -0.5, -0.5, 0.5, -0.06, 1.5},
tiles = {
bottom = {
"beds_bed_top1.png",
"beds_bed_under.png",
"beds_bed_side1.png",
"beds_bed_side1.png^[transformFX",
"beds_bed_foot.png",
"beds_bed_foot.png",
},
top = {
"beds_bed_top2.png",
"beds_bed_under.png",
"beds_bed_side2.png",
"beds_bed_side2.png^[transformFX",
"beds_bed_head.png",
"beds_bed_head.png",
}
},
nodebox = {
bottom = {
{-0.5, -0.5, -0.5, -0.375, -0.065, -0.4375},
{0.375, -0.5, -0.5, 0.5, -0.065, -0.4375},
{-0.5, -0.375, -0.5, 0.5, -0.125, -0.4375},
{-0.5, -0.375, -0.5, -0.4375, -0.125, 0.5},
{0.4375, -0.375, -0.5, 0.5, -0.125, 0.5},
{-0.4375, -0.3125, -0.4375, 0.4375, -0.0625, 0.5},
},
top = {
{-0.5, -0.5, 0.4375, -0.375, 0.1875, 0.5},
{0.375, -0.5, 0.4375, 0.5, 0.1875, 0.5},
{-0.5, 0, 0.4375, 0.5, 0.125, 0.5},
{-0.5, -0.375, 0.4375, 0.5, -0.125, 0.5},
{-0.5, -0.375, -0.5, -0.4375, -0.125, 0.5},
{0.4375, -0.375, -0.5, 0.5, -0.125, 0.5},
{-0.4375, -0.3125, -0.5, 0.4375, -0.0625, 0.4375},
}
},
selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5},
recipe = {
{"", "", "group:stick"},
{"wool:red", "wool:red", "wool:white"},
{"group:wood", "group:wood", "group:wood"}
}
})
beds.register_bed("beds:fancy_bed_pink", {
description = S("Pink Fancy Bed"),
inventory_image = "beds_bed_fancy_pink.png",
wield_image = "beds_bed_fancy_pink.png",
tiles = {"beds_fancy_bed_pink.png", "default_wood.png"},
mesh = "beds_fancy_bed.obj",
selectionbox = {-0.5, -0.5, -0.5, 0.5, -0.06, 1.5},
collisionbox = {-0.5, -0.5, -0.5, 0.5, -0.06, 1.5},
recipe = {
{"", "", "group:stick"},
{"wool:pink", "wool:pink", "wool:white"},
{"group:wood", "group:wood", "group:wood"}
}
{"wool:white", "wool:white", "wool:white"},
{"group:wood", "group:wood", "group:wood"},
},
})
-- Simple shaped bed
beds.register_bed("beds:bed_white", {
description = S("White Simple Bed"),
inventory_image = "beds_bed_white.png",
wield_image = "beds_bed_white.png",
tiles = {"beds_simple_bed_white.png"},
mesh = "beds_simple_bed.obj",
selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5},
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5},
beds.register_bed("beds:bed", {
description = S("Simple Bed"),
inventory_image = "beds_bed.png",
wield_image = "beds_bed.png",
tiles = {
bottom = {
"beds_bed_top_bottom.png^[transformR90",
"beds_bed_under.png",
"beds_bed_side_bottom_r.png",
"beds_bed_side_bottom_r.png^[transformFX",
"beds_transparent.png",
"beds_bed_side_bottom.png"
},
top = {
"beds_bed_top_top.png^[transformR90",
"beds_bed_under.png",
"beds_bed_side_top_r.png",
"beds_bed_side_top_r.png^[transformFX",
"beds_bed_side_top.png",
"beds_transparent.png",
}
},
nodebox = {
bottom = {-0.5, -0.5, -0.5, 0.5, 0.0625, 0.5},
top = {-0.5, -0.5, -0.5, 0.5, 0.0625, 0.5},
},
selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.0625, 1.5},
recipe = {
{"wool:white", "wool:white", "wool:white"},
{"group:wood", "group:wood", "group:wood"}
}
})
beds.register_bed("beds:bed", {
description = S("Red Simple Bed"),
inventory_image = "beds_bed.png",
wield_image = "beds_bed.png",
tiles = {"beds_simple_bed.png"},
mesh = "beds_simple_bed.obj",
selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5},
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5},
recipe = {
{"wool:red", "wool:red", "wool:white"},
{"group:wood", "group:wood", "group:wood"}
}
})
beds.register_bed("beds:bed_blue", {
description = S("Blue Simple Bed"),
inventory_image = "beds_bed_blue.png",
wield_image = "beds_bed_blue.png",
tiles = {"beds_simple_bed_blue.png"},
mesh = "beds_simple_bed.obj",
selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5},
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5},
recipe = {
{"wool:blue", "wool:blue", "wool:white"},
{"group:wood", "group:wood", "group:wood"}
}
},
})
-- Aliases for PilzAdam's beds mod
@ -85,30 +98,12 @@ minetest.register_alias("beds:bed_top_red", "beds:bed_top")
minetest.register_craft({
type = "fuel",
recipe = "beds:fancy_bed",
burntime = 13
recipe = "beds:fancy_bed_bottom",
burntime = 13,
})
minetest.register_craft({
type = "fuel",
recipe = "beds:fancy_bed_pink",
burntime = 13
})
minetest.register_craft({
type = "fuel",
recipe = "beds:bed",
burntime = 12
})
minetest.register_craft({
type = "fuel",
recipe = "beds:bed_blue",
burntime = 12
})
minetest.register_craft({
type = "fuel",
recipe = "beds:bed_white",
burntime = 12
recipe = "beds:bed_bottom",
burntime = 12,
})

View File

@ -1,4 +0,0 @@
default
wool
pova?
intllib?

View File

@ -1 +0,0 @@
beds which allows sleep, featured to (auto) skip the night.

View File

@ -1,25 +1,20 @@
local S = beds.get_translator
local is_50 = beds.is_50
local is_54 = beds.is_54
local is_pova = minetest.get_modpath("pova")
local pi = math.pi
local is_sp = minetest.is_singleplayer()
local enable_respawn = minetest.settings:get_bool("enable_bed_respawn")
if enable_respawn == nil then
enable_respawn = true
end
-- support for MT game translation.
local S = beds.get_translator
-- Helper functions
local function get_look_yaw(pos)
local rotation = minetest.get_node(pos).param2
if rotation > 3 then
rotation = rotation % 4 -- Mask colorfacedir values
end
if rotation == 1 then
return pi / 2, rotation
elseif rotation == 3 then
@ -31,31 +26,22 @@ local function get_look_yaw(pos)
end
end
local function is_night_skip_enabled()
local enable_night_skip = minetest.settings:get_bool("enable_bed_night_skip")
if enable_night_skip == nil then
enable_night_skip = true
end
return enable_night_skip
end
local function check_in_beds(players)
local in_bed = beds.player
if not players then
players = minetest.get_connected_players()
end
for n, player in ipairs(players) do
local name = player:get_player_name()
if not in_bed[name] then
return false
end
@ -64,9 +50,7 @@ local function check_in_beds(players)
return #players > 0
end
local function lay_down(player, pos, bed_pos, state, skip)
local name = player:get_player_name()
local hud_flags = player:hud_get_flags()
@ -76,69 +60,46 @@ local function lay_down(player, pos, bed_pos, state, skip)
-- stand up
if state ~= nil and not state then
if not beds.player[name] then
return false -- player not in bed, do nothing
-- player not in bed, do nothing
return false
end
beds.bed_position[name] = nil
-- skip here to prevent sending player specific changes (used for leaving players)
if skip then
return
end
player:set_pos(beds.pos[name])
-- physics, eye_offset, etc
local physics_override = beds.player[name].physics_override
beds.player[name] = nil
if is_pova then
pova.del_override(name, "force")
pova.do_override(player)
else
player:set_physics_override({
speed = physics_override.speed,
jump = physics_override.jump,
gravity = physics_override.gravity
})
end
player:set_physics_override({
speed = physics_override.speed,
jump = physics_override.jump,
gravity = physics_override.gravity
})
player:set_eye_offset({x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0})
player:set_look_horizontal(math.random(1, 180) / 100)
if beds.is_50 then
player_api.player_attached[name] = false
player_api.set_animation(player, "stand" , 30)
else
default.player_attached[name] = false
default.player_set_animation(player, "stand" , 30)
end
player_api.player_attached[name] = false
hud_flags.wielditem = true
player_api.set_animation(player, "stand" , 30)
else -- lay down
-- lay down
else
-- Check if bed is occupied
for _, other_pos in pairs(beds.bed_position) do
if vector.distance(bed_pos, other_pos) < 0.1 then
minetest.chat_send_player(name, S("This bed is already occupied!"))
return false
end
end
if beds.is_54 then
-- Check if player is moving
if vector.length(player:get_velocity()) > 0.001 then
minetest.chat_send_player(name,
S("You have to stop moving before going to bed!"))
return false
end
-- Check if player is moving
if vector.length(player:get_velocity()) > 0.001 then
minetest.chat_send_player(name, S("You have to stop moving before going to bed!"))
return false
end
-- Check if player is attached to an object
@ -155,15 +116,9 @@ local function lay_down(player, pos, bed_pos, state, skip)
beds.bed_position[name] = bed_pos
beds.player[name] = {physics_override = player:get_physics_override()}
-- physics, eye_offset, etc
player:set_eye_offset({x = 0, y = -13, z = 0}, {x = 0, y = 0, z = 0})
local yaw, param2 = get_look_yaw(bed_pos)
player:set_look_horizontal(yaw)
local dir = minetest.facedir_to_dir(param2)
-- p.y is just above the nodebox height of the 'Simple Bed' (the highest bed),
-- to avoid sinking down through the bed.
local p = {
@ -171,58 +126,36 @@ local function lay_down(player, pos, bed_pos, state, skip)
y = bed_pos.y + 0.07,
z = bed_pos.z + dir.z / 2
}
if is_pova then
pova.add_override(name, "force", {speed = 0, jump = 0, gravity = 0})
pova.do_override(player)
else
player:set_physics_override({speed = 0, jump = 0, gravity = 0})
end
player:set_physics_override({speed = 0, jump = 0, gravity = 0})
player:set_pos(p)
if beds.is_50 then
player_api.player_attached[name] = true
player_api.set_animation(player, "lay" , 0)
else
default.player_attached[name] = true
default.player_set_animation(player, "lay" , 0)
end
player_api.player_attached[name] = true
hud_flags.wielditem = false
player_api.set_animation(player, "lay" , 0)
end
player:hud_set_flags(hud_flags)
end
local function get_player_in_bed_count()
local c = 0
for _, _ in pairs(beds.player) do
c = c + 1
end
return c
end
local function update_formspecs(finished)
local ges = #minetest.get_connected_players()
local player_in_bed = get_player_in_bed_count()
local is_majority = (ges / 2) < player_in_bed
local form_n
local esc = minetest.formspec_escape
if finished then
form_n = beds.formspec .. "label[2.7,9;" .. esc(S("Good morning.")) .. "]"
else
form_n = beds.formspec .. "label[2.2,9;" ..
esc(S("@1 of @2 players are in bed", player_in_bed, ges)) .. "]"
if is_majority and is_night_skip_enabled() then
form_n = form_n .. "button_exit[2,6;4,0.75;force;" ..
esc(S("Force night skip")) .. "]"
@ -234,46 +167,36 @@ local function update_formspecs(finished)
end
end
-- Public functions
function beds.kick_players()
for name, _ in pairs(beds.player) do
local player = minetest.get_player_by_name(name)
lay_down(player, nil, nil, false)
end
end
function beds.skip_night()
minetest.set_timeofday(0.23)
end
function beds.on_rightclick(pos, player)
local name = player:get_player_name()
local ppos = player:get_pos()
local tod = minetest.get_timeofday()
if tod > beds.day_interval.start and tod < beds.day_interval.finish then
if beds.player[name] then
lay_down(player, nil, nil, false)
end
minetest.chat_send_player(name, S("You can only sleep at night."))
return
end
-- move to bed
if not beds.player[name] then
lay_down(player, ppos, pos)
beds.set_spawns() -- save respawn positions when entering bed
else
lay_down(player, nil, nil, false)
@ -285,13 +208,10 @@ function beds.on_rightclick(pos, player)
-- skip the night and let all players stand up
if check_in_beds() then
minetest.after(2, function()
if not is_sp then
update_formspecs(is_night_skip_enabled())
end
if is_night_skip_enabled() then
beds.skip_night()
beds.kick_players()
@ -300,67 +220,37 @@ function beds.on_rightclick(pos, player)
end
end
function beds.can_dig(bed_pos)
-- Check all players in bed which one is at the expected position
for _, player_bed_pos in pairs(beds.bed_position) do
if vector.equals(bed_pos, player_bed_pos) then
return false
end
end
return true
end
-- Callbacks
-- Only register respawn callback if respawn enabled
if enable_respawn then
-- set respawn flag to true by default
minetest.register_on_joinplayer(function(player)
if not player then return end
local name = player:get_player_name()
beds.respawn[name] = true
end)
-- respawn player at bed if enabled and valid position is found
minetest.register_on_respawnplayer(function(player)
if not player then return end
local name = player:get_player_name()
local pos = beds.spawn[name]
-- check if respawn flag is true (for mini-game support, can be set to false)
if pos and beds.respawn[name] then
if pos then
player:set_pos(pos)
return true
end
end)
end
minetest.register_on_leaveplayer(function(player)
if not player then return end
local name = player:get_player_name()
lay_down(player, nil, nil, false, true)
beds.player[name] = nil
if check_in_beds() then
minetest.after(2, function()
update_formspecs(is_night_skip_enabled())
if is_night_skip_enabled() then
beds.skip_night()
beds.kick_players()
@ -369,11 +259,7 @@ minetest.register_on_leaveplayer(function(player)
end
end)
minetest.register_on_dieplayer(function(player)
if not player then return end
local name = player:get_player_name()
local in_bed = beds.player
local pos = player:get_pos()
@ -386,11 +272,7 @@ minetest.register_on_dieplayer(function(player)
end
end)
local div = tonumber(minetest.settings:get("bed_sleep_divide")) or 2
minetest.register_on_player_receive_fields(function(player, formname, fields)
if formname ~= "beds_form" then
return
end
@ -406,11 +288,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
end
if fields.force then
-- check if enough players are sleeping to skip night (was half)
local is_majority = (
#minetest.get_connected_players() / div) < last_player_in_bed
local is_majority = (#minetest.get_connected_players() / 2) < last_player_in_bed
if is_majority and is_night_skip_enabled() then
update_formspecs(true)
beds.skip_night()

View File

@ -1,47 +1,20 @@
local is_50 = nil
local is_53 = minetest.has_feature("object_step_has_moveresult")
local is_54 = minetest.has_feature("direct_velocity_on_players")
-- beds/init.lua
-- Load support for MT game translation.
local S
if minetest.get_translator ~= nil then
S = minetest.get_translator("beds") -- 5.x translation function
is_50 = true
else
if minetest.get_modpath("intllib") then
dofile(minetest.get_modpath("intllib") .. "/init.lua")
if intllib.make_gettext_pair then
gettext, ngettext = intllib.make_gettext_pair() -- new gettext method
else
gettext = intllib.Getter() -- old text file method
end
S = gettext
else -- boilerplate function for 0.4
S = function(str, ...)
local args = {...}
return str:gsub("@%d+", function(match)
return args[tonumber(match:sub(2))]
end)
end
end
end
-- Load support for MT game translation.
local S = minetest.get_translator("beds")
local esc = minetest.formspec_escape
beds = {
mod = "redo",
player = {},
bed_position = {},
pos = {},
spawn = {},
respawn = {},
get_translator = S,
formspec = "size[8,11;true]"
.. "no_prepend[]"
.. "bgcolor[#080808BB;true]"
.. "button_exit[2,10;4,0.75;leave;" .. minetest.formspec_escape(S("Leave Bed")) .. "]"
}
beds.is_50 = is_50
beds.is_53 = is_53
beds.is_54 = is_54
beds = {}
beds.player = {}
beds.bed_position = {}
beds.pos = {}
beds.spawn = {}
beds.get_translator = S
beds.formspec = "size[8,11;true]" ..
"no_prepend[]" ..
"bgcolor[#080808BB;true]" ..
"button_exit[2,10;4,0.75;leave;" .. esc(S("Leave Bed")) .. "]"
beds.day_interval = {
start = 0.2,
@ -50,20 +23,9 @@ beds.day_interval = {
local modpath = minetest.get_modpath("beds")
-- check for minetest 5.x/0.4 compatibility
function beds.is_creative(name)
if is_53 then
return minetest.is_creative_enabled(name)
else
return creative.is_enabled_for(name) or minetest.settings:get_bool("creative_mode")
end
end
-- Load files
dofile(modpath .. "/functions.lua")
dofile(modpath .. "/api.lua")
dofile(modpath .. "/beds.lua")
dofile(modpath .. "/spawns.lua")
print("[MOD] Beds loaded")

View File

@ -59,7 +59,3 @@ rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/3.0/
WTFPL license applies to bed .obj files by jp from mesh beds mod:
https://forum.minetest.net/viewtopic.php?t=11817

View File

@ -0,0 +1,10 @@
# textdomain: beds
Fancy Bed=Luksa Lito
Simple Bed=Simpla Lito
This bed is already occupied!=Tiu lito jam estas okupata!
You have to stop moving before going to bed!=Vi ĉesu moviĝi por enlitiĝi!
Good morning.=Bonan matenon.
@1 of @2 players are in bed=@1 el @2 ludantoj estas en lito
Force night skip=Devigi noktan salton
You can only sleep at night.=Vi povas dormi nur nokte.
Leave Bed=Ellitiĝi

View File

@ -1,8 +1,8 @@
# textdomain: beds
Fancy Bed=Lit chic
Simple Bed=Lit simple
This bed is already occupied!=
You have to stop moving before going to bed!=
This bed is already occupied!=Ce lit est déjà occupé !
You have to stop moving before going to bed!=Vous devez arrêter de bouger avant de vous coucher !
Good morning.=Bonjour.
@1 of @2 players are in bed=@1 joueur(s) sur @2 sont au lit
Force night skip=Forcer le passage de la nuit

View File

@ -1,10 +1,10 @@
# textdomain: beds
Fancy Bed=Ranjang Mewah
Simple Bed=Ranjang Sederhana
This bed is already occupied!=
You have to stop moving before going to bed!=
This bed is already occupied!=Ranjang telah terisi!
You have to stop moving before going to bed!=Anda harus diam untuk tidur!
Good morning.=Selamat pagi.
@1 of @2 players are in bed=@1 dari @2 pemain sedang tidur
Force night skip=Paksa lewati malam
You can only sleep at night.=Anda hanya dapat tidur pada waktu malam.
You can only sleep at night.=Anda hanya bisa tidur pada waktu malam.
Leave Bed=Tinggalkan Ranjang

View File

@ -0,0 +1,10 @@
# textdomain: beds
Fancy Bed=ファンシーなベッド
Simple Bed=シンプルなベッド
This bed is already occupied!=ベッドはすでに使われています!
You have to stop moving before going to bed!=寝るときは動かないでください!
Good morning.=おはようございます。
@1 of @2 players are in bed=ベッドに@1 / @2人います
Force night skip=強制的に夜をスキップします
You can only sleep at night.=夜しか寝れません。
Leave Bed=ベッドから出ます

View File

@ -0,0 +1,10 @@
# textdomain: beds
Fancy Bed=Fantazyjne łóżko
Simple Bed=Proste łóżko
This bed is already occupied!=To łóżko jest już zajęte!
You have to stop moving before going to bed!=Musisz się zatrzymać aby wejść do łóżka
Good morning.=Dzień dobry.
@1 of @2 players are in bed=@1 z @2 graczy śpią
Force night skip=Wymuś pominięcie nocy
You can only sleep at night.=Możesz spać tylko w nocy.
Leave Bed=Opuść łóżko

View File

@ -1,8 +1,8 @@
# textdomain: beds
Fancy Bed=Детализированная Кровать
Simple Bed=Обычная Кровать
This bed is already occupied!=
You have to stop moving before going to bed!=
This bed is already occupied!=Эта кровать уже занята!
You have to stop moving before going to bed!=Нельзя воспользоваться кроватью на ходу!
Good morning.=Доброе утро.
@1 of @2 players are in bed=@1 из @2 игроков в кровати
Force night skip=Пропустить ночь

View File

@ -1,10 +0,0 @@
# textdomain: beds
Fancy Bed=Fin säng
Simple Bed=Enkel Säng
This bed is already occupied!=
You have to stop moving before going to bed!=
Good morning.= God morgon.
@1 of @2 players are in bed=@1 av @2 spelar försöker sover.
Force night skip=Tvinga över natten
You can only sleep at night.=Du kan bara sova på natten.
Leave Bed=Lämna Säng

View File

@ -1,8 +1,8 @@
# textdomain: beds
Fancy Bed=Pekná posteľ
Simple Bed=Jednoduchá posteľ
This bed is already occupied!=
You have to stop moving before going to bed!=
This bed is already occupied!=Táto posteľ je už obsadená
You have to stop moving before going to bed!=Predtým ako si ľahneš do postele, sa musíš prestať pohybovať!
Good morning.=Dobré ráno.
@1 of @2 players are in bed=@1 z @2 hráčov sú v posteli
Force night skip=Nútene preskočiť noc

View File

@ -0,0 +1,10 @@
# textdomain: beds
Fancy Bed=Fin säng
Simple Bed=Enkel säng
This bed is already occupied!=Den här sängen används redan!
You have to stop moving before going to bed!=Du måste stanna innan du kan lägga dig!
Good morning.=God morgon.
@1 of @2 players are in bed=@1 av @2 spelare försöker sova.
Force night skip=Tvinga att hoppa över natt
You can only sleep at night.=Du kan bara sova på natten.
Leave Bed=Lämna säng

View File

@ -0,0 +1,10 @@
# textdomain: beds
Fancy Bed=Деталізована Постіль
Simple Bed=Звичайна Постіль
This bed is already occupied!=Ця постіль вже зайнята!
You have to stop moving before going to bed!=Не можна скористатись постіллю на ходу!
Good morning.=Доброго ранку.
@1 of @2 players are in bed=@1 з @2 гравців в ліжку
Force night skip=Пропустити ніч
You can only sleep at night.=Ви можете спати тільки вночі.
Leave Bed=Встати з ліжка

View File

@ -1,8 +1,8 @@
# textdomain: beds
Fancy Bed=花式床
Simple Bed=简易床
This bed is already occupied!=
You have to stop moving before going to bed!=
This bed is already occupied!=床上已有人!
You have to stop moving before going to bed!=上床前要停止移动!
Good morning.=早安!
@1 of @2 players are in bed=@2位玩家中的@1位在床上
Force night skip=强制跳过夜晚

View File

@ -1,8 +1,8 @@
# textdomain: beds
Fancy Bed=花式床
Simple Bed=簡易床
This bed is already occupied!=
You have to stop moving before going to bed!=
This bed is already occupied!=這個床已經被占據了!
You have to stop moving before going to bed!=你必須在上床前停止移動!
Good morning.=早安!
@1 of @2 players are in bed=@2位玩家中的@1位在床上
Force night skip=強制跳過夜晚

View File

@ -1,4 +1,3 @@
name = beds
description = beds which allows sleep, featured to (auto) skip the night.
description = Minetest Game mod: beds
depends = default, wool
optional_depends = player_api, pova, intllib

View File

@ -1,160 +0,0 @@
# Blender v2.69 (sub 0) OBJ File: ''
# www.blender.org
mtllib fancy_bed.mtl
o mattress_Mattress_nodebox-6_none.001_fancy_bed.png.001
v 0.437500 -0.312500 -0.437501
v 0.437500 -0.062500 -0.437501
v 0.437500 -0.062500 1.437499
v 0.437500 -0.312500 1.437499
v -0.437500 -0.312500 -0.437501
v -0.437500 -0.312500 1.437499
v -0.437500 -0.062500 1.437499
v -0.437500 -0.062500 -0.437501
v 0.437500 -0.176793 -0.437501
v -0.437500 -0.176793 -0.437501
vt 0.000171 0.499972
vt 0.000161 0.000182
vt 0.999791 0.000253
vt 0.999873 0.500022
vt 0.749576 0.000208
vt 0.749876 0.499854
vt 0.999848 0.999750
vt 0.000152 0.999750
vt 0.749276 0.130648
vt 0.000112 0.130648
g mattress_Mattress_nodebox-6_none.001_fancy_bed.png.001_none.001_fancy_bed.png.001
usemtl none.001_fancy_bed.png.001
s off
f 1/1 2/2 3/3 4/4
f 5/2 6/3 7/4 8/1
f 4/5 3/2 7/1 6/6
f 1/1 4/4 6/7 5/8
f 2/1 8/2 7/3 3/4
f 8/2 2/5 9/9 10/10
o wood_structure_Wood_structure_nodebox-4.001_none.002
v 0.374999 -0.375000 1.437499
v 0.374999 -0.125000 1.437499
v 0.374999 -0.125000 1.499999
v 0.374999 -0.375000 1.499999
v -0.374999 -0.375000 1.437499
v -0.374999 -0.375000 1.499999
v -0.374999 -0.125000 1.499999
v -0.374999 -0.125000 1.437499
v -0.375000 -0.500000 1.437499
v -0.375000 0.187500 1.437499
v -0.375000 0.187500 1.499999
v -0.375000 -0.500000 1.499999
v -0.500000 -0.500000 1.437499
v -0.500000 -0.500000 1.499999
v -0.500000 0.187500 1.499999
v -0.500000 0.187500 1.437499
v -0.437500 -0.375000 -0.437501
v -0.437500 -0.125000 -0.437501
v -0.437500 -0.125000 1.437498
v -0.437500 -0.375000 1.437498
v -0.500000 -0.375000 -0.437501
v -0.500000 -0.375000 1.437498
v -0.500000 -0.125000 1.437498
v -0.500000 -0.125000 -0.437501
v 0.375001 -0.000000 1.437499
v 0.375001 0.125000 1.437499
v 0.375001 0.125000 1.499999
v 0.375001 -0.000000 1.499999
v -0.375001 -0.000000 1.437499
v -0.375001 -0.000000 1.499999
v -0.375001 0.125000 1.499999
v -0.375001 0.125000 1.437499
v 0.500000 -0.500000 1.437499
v 0.500000 0.187500 1.437499
v 0.500000 0.187500 1.499999
v 0.500000 -0.500000 1.499999
v 0.375000 -0.500000 1.437499
v 0.375000 -0.500000 1.499999
v 0.375000 0.187500 1.499999
v 0.375000 0.187500 1.437499
v 0.500000 -0.375000 -0.437501
v 0.500000 -0.125000 -0.437501
v 0.500000 -0.125000 1.437499
v 0.500000 -0.375000 1.437499
v 0.437500 -0.375000 -0.437501
v 0.437500 -0.375000 1.437499
v 0.437500 -0.125000 1.437499
v 0.437500 -0.125000 -0.437501
v -0.375000 -0.500000 -0.500000
v -0.375000 -0.065000 -0.500000
v -0.375000 -0.065000 -0.437500
v -0.375000 -0.500000 -0.437500
v -0.500000 -0.500000 -0.500000
v -0.500000 -0.500000 -0.437500
v -0.500000 -0.065000 -0.437500
v -0.500000 -0.065000 -0.500000
v 0.375006 -0.375000 -0.500000
v 0.375006 -0.125000 -0.500000
v 0.375006 -0.125000 -0.437500
v 0.375006 -0.375000 -0.437500
v -0.375006 -0.375000 -0.500000
v -0.375006 -0.375000 -0.437500
v -0.375006 -0.125000 -0.437500
v -0.375006 -0.125000 -0.500000
v 0.500000 -0.500000 -0.500000
v 0.500000 -0.065000 -0.500000
v 0.500000 -0.065000 -0.437500
v 0.500000 -0.500000 -0.437500
v 0.375000 -0.500000 -0.500000
v 0.375000 -0.500000 -0.437500
v 0.375000 -0.065000 -0.437500
v 0.375000 -0.065000 -0.500000
vt 0.377610 0.378205
vt 0.622484 0.378175
vt 0.622515 0.623120
vt 0.377671 0.623151
g wood_structure_Wood_structure_nodebox-4.001_none.002_none.002
usemtl none.002
s off
f 59/11 60/12 61/13 62/14
f 63/14 64/11 65/12 66/13
f 59/11 63/14 66/13 60/12
f 62/14 61/13 65/12 64/11
f 59/11 62/14 64/13 63/12
f 60/12 66/11 65/14 61/13
f 67/11 71/12 74/13 68/14
f 70/14 69/11 73/12 72/13
f 67/11 70/12 72/13 71/14
f 68/11 74/12 73/13 69/14
f 75/11 76/12 77/13 78/14
f 79/14 80/11 81/12 82/13
f 75/14 79/11 82/12 76/13
f 78/11 77/12 81/13 80/14
f 75/11 78/12 80/13 79/14
f 76/11 82/12 81/13 77/14
g wood_structure_Wood_structure_nodebox-4.001_none.002_none.003
usemtl none.003
f 15/11 16/12 17/13 18/14
f 11/13 15/14 18/11 12/12
f 14/14 13/11 17/12 16/13
f 11/14 14/11 16/12 15/13
f 12/11 18/12 17/13 13/14
f 19/11 20/12 21/13 22/14
f 23/14 24/11 25/12 26/13
f 19/14 23/11 26/12 20/13
f 22/11 21/12 25/13 24/14
f 19/11 22/12 24/13 23/14
f 20/11 26/12 25/13 21/14
f 27/14 28/11 29/12 30/13
f 31/11 32/12 33/13 34/14
f 27/11 30/12 32/13 31/14
f 28/14 34/11 33/12 29/13
f 35/11 39/12 42/13 36/14
f 38/14 37/11 41/12 40/13
f 35/14 38/11 40/12 39/13
f 36/11 42/12 41/13 37/14
f 43/11 44/12 45/13 46/14
f 47/14 48/11 49/12 50/13
f 43/14 47/11 50/12 44/13
f 46/11 45/12 49/13 48/14
f 43/11 46/12 48/13 47/14
f 44/11 50/12 49/13 45/14
f 51/14 52/11 53/12 54/13
f 55/13 56/14 57/11 58/12
f 51/11 54/12 56/13 55/14
f 52/14 58/11 57/12 53/13

View File

@ -1,32 +0,0 @@
# Blender v2.69 (sub 0) OBJ File: ''
# www.blender.org
mtllib simple_bed.mtl
o Simple_Bed
v 0.500000 -0.500000 -0.500000
v 0.500000 0.060000 -0.500000
v 0.500000 0.060000 1.500000
v 0.500000 -0.500000 1.500000
v -0.500000 -0.500000 -0.500000
v -0.500000 -0.500000 1.500000
v -0.500000 0.060000 1.500000
v -0.500000 0.060000 -0.500000
vt 0.000112 0.780442
vt 0.000110 0.999969
vt 0.780324 0.999889
vt 0.780377 0.780471
vt 0.780636 0.390284
vt 0.999906 0.780382
vt 0.999906 0.390284
vt 0.780636 0.000047
vt 0.999906 0.000094
vt 0.390235 0.780320
vt 0.390235 0.000071
vt 0.000142 0.000142
usemtl none.002
s off
f 1/1 2/2 3/3 4/4
f 5/1 6/4 7/3 8/2
f 1/5 5/4 8/6 2/7
f 4/8 3/9 7/7 6/5
f 1/8 4/4 6/10 5/11
f 2/11 8/12 7/1 3/10

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

View File

@ -1,5 +0,0 @@
enable_bed_respawn (Enable bed respawn) bool true
enable_bed_night_skip (Enable night skip) bool true
bed_sleep_divide (Division of players needed to skip night) float 2

View File

@ -3,44 +3,30 @@ local org_file = world_path .. "/beds_spawns"
local file = world_path .. "/beds_spawns"
local bkwd = false
-- check for PA's beds mod spawns
local cf = io.open(world_path .. "/beds_player_spawns", "r")
if cf ~= nil then
io.close(cf)
file = world_path .. "/beds_player_spawns"
bkwd = true
end
function beds.read_spawns()
local spawns = beds.spawn
local input = io.open(file, "r")
if input and not bkwd then
repeat
local x = input:read("*n")
if x == nil then
break
end
local y = input:read("*n")
local z = input:read("*n")
local name = input:read("*l")
spawns[name:sub(2)] = {x = x, y = y, z = z}
until input:read(0) == nil
io.close(input)
elseif input and bkwd then
beds.spawn = minetest.deserialize(input:read("*all"))
input:close()
beds.save_spawns()
@ -49,54 +35,38 @@ function beds.read_spawns()
end
end
-- load player spawn positions
beds.read_spawns()
function beds.save_spawns()
if not beds.spawn then
return
end
local data = {}
local output = io.open(org_file, "w")
for k, v in pairs(beds.spawn) do
table.insert(data, string.format("%.1f %.1f %.1f %s\n", v.x, v.y, v.z, k))
end
output:write(table.concat(data))
io.close(output)
end
function beds.set_spawns()
for name,_ in pairs(beds.player) do
local player = minetest.get_player_by_name(name)
local p = player:get_pos()
-- but don't change spawn location if borrowing a bed
if not minetest.is_protected(p, name) then
beds.spawn[name] = p
end
end
beds.save_spawns()
end
function beds.remove_spawns_at(pos)
for name, p in pairs(beds.spawn) do
if vector.equals(vector.round(p), pos) then
beds.spawn[name] = nil
end
end
beds.save_spawns()
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 B

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 413 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

After

Width:  |  Height:  |  Size: 486 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 555 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 B

View File

@ -1,37 +0,0 @@
Minetest Game mod: binoculars
=============================
See license.txt for license information.
Authors of source code
----------------------
paramat (MIT)
Authors of media (textures)
---------------------------
paramat (CC BY-SA 3.0):
binoculars_binoculars.png
Crafting
--------
binoculars:binoculars
default:obsidian_glass O
default:bronze_ingot B
O_O
BBB
O_O
Usage
-----
In survival mode, use of zoom requires the binoculars item in your inventory,
they will allow a 10 degree field of view.
It can take up to 5 seconds for adding to or removal from inventory to have an
effect, however to instantly allow the use of this zoom 'use' (leftclick) the
item.
Zoom with a field of view of 15 degrees is automatically allowed in creative
mode and for any player with the 'creative' privilege.
The 'binoculars.update_player_property()' function is global so can be
redefined by a mod for alternative behaviour.

View File

@ -8,25 +8,16 @@ binoculars = {}
local S = minetest.get_translator("binoculars")
-- Detect creative mod
local creative_mod = minetest.get_modpath("creative")
-- Cache creative mode setting as fallback if creative mod not present
local creative_mode_cache = minetest.settings:get_bool("creative_mode")
-- Update player property
-- Global to allow overriding
function binoculars.update_player_property(player)
local creative_enabled =
(creative_mod and creative.is_enabled_for(player:get_player_name())) or
creative_mode_cache
local new_zoom_fov = 0
if player:get_inventory():contains_item(
"main", "binoculars:binoculars") then
new_zoom_fov = 10
elseif creative_enabled then
elseif minetest.is_creative_enabled(player:get_player_name()) then
new_zoom_fov = 15
end
@ -62,6 +53,7 @@ minetest.register_craftitem("binoculars:binoculars", {
description = S("Binoculars") .. "\n" .. S("Use with 'Zoom' key"),
inventory_image = "binoculars_binoculars.png",
stack_max = 1,
groups = {tool = 1},
on_use = function(itemstack, user, pointed_thing)
binoculars.update_player_property(user)

View File

@ -1,59 +0,0 @@
License of source code
----------------------
The MIT License (MIT)
Copyright (C) 2017 paramat
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.
For more details:
https://opensource.org/licenses/MIT
Licenses of media (textures)
----------------------------
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
Copyright (C) 2017 paramat
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
ShareAlike — If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/3.0/

View File

@ -0,0 +1,3 @@
# textdomain: binoculars
Binoculars=Binoklo
Use with 'Zoom' key=Uzi per 'Zomo' klavo

View File

@ -0,0 +1,3 @@
# textdomain: binoculars
Binoculars=Teropong
Use with 'Zoom' key=Pakai dengan tombol 'Zum'

View File

@ -0,0 +1,3 @@
# textdomain: binoculars
Binoculars=双眼鏡
Use with 'Zoom' key=ズームキーで使います

View File

@ -0,0 +1,3 @@
# textdomain: binoculars
Binoculars=lo reldarvistci
Use with 'Zoom' key=.i tu'a le jvinu banro batke cu tadji lo nu pilno

View File

@ -0,0 +1,3 @@
# textdomain: binoculars
Binoculars=Lornetka
Use with 'Zoom' key=Aby użyć naciśnij 'Zoom'

View File

@ -0,0 +1,3 @@
# textdomain: binoculars
Binoculars=Binóculos
Use with 'Zoom' key=Use com a tecla de 'Zoom'

View File

@ -1,3 +0,0 @@
# textdomain: binoculars
Binoculars=Kikare
Use with 'Zoom' key=Används med 'Zoom' knappen

View File

@ -0,0 +1,3 @@
# textdomain: binoculars
Binoculars=Ďalekohľad
Use with 'Zoom' key=Použi s klávesou "Priblíž"

View File

@ -0,0 +1,3 @@
# textdomain: binoculars
Binoculars=Kikare
Use with 'Zoom' key=Använd med 'Zoom'-knappen

View File

@ -0,0 +1,3 @@
# textdomain: binoculars
Binoculars=Бінокль
Use with 'Zoom' key=Використовується з правами 'Zoom'

View File

@ -1,4 +1,3 @@
name = binoculars
description = Minetest Game mod: binoculars
depends = default
optional_depends = creative

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

View File

@ -1,77 +0,0 @@
minetest mod boats
==========================
Boats improved for better performance and more realistic..
Information
-----------
This mod is named `boats`, it features work from original mod,
code changed to make it turn **quicker, better performance agains lag**,
and if you hit the shore too hard the boat is destroyed and drops 3 wood
![screenshot.png](screenshot.png)
#### Additions by TenPlus1
changed by TenPlus1 to add some new features
- boat is destroyed when crashing at speed (drops 3 wood)
- boats drop after 10 seconds if no driver
- boats can be damaged by mobs attacking player
- Improve physics of boat by implementing drag force (thanks gnag65)
- nil player check functions by misterskullz
Technical informaton
--------------------
When crafted you can use by putting and right click on,
then control with your directional keys:
#### Dependencies
* default
* mesecons (optional)
#### Crafting
W = any thing from wood group
```
W W
WWW
```
#### nodes
| Name | node | notes |
| ------------ | --------------- | ----- |
| Boat | boats:boat | it destroyed when crash at speed |
#### Controls (by default if not changed)
| Default key assigned | Action |
| -------------------- | -------------------------------------- |
| Right mouse button | Enter or exit boat when pointing at boat. |
| Forward | Speed up. Slow down when moving backwards. |
| Forward + backward | Enable cruise mode: accelerate to maximum speed without needing to hold. |
| Backward | Slow down. Speed up when moving backwards. Disable cruise mode. |
| Left | Turn to the left. Turn to the right when moving backwards. |
| Right | Turn to the right. Turn to the left when moving backwards. |
Licence
------
**Source code**
Modifications by TenPlus1
Originally by PilzAdam (MIT)
Various Minetest developers and contributors (MIT)
**Media (textures and model)**
Textures: Zeg9 (CC BY-SA 3.0)
original Model thetoon and Zeg9 (CC BY-SA 3.0),
modified by PavelS(SokolovPavel) (CC BY-SA 3.0),
modified by sofar (CC BY-SA 3.0)
Check [lisence.txt](lisence.txt)

31
mods/boats/README.txt Normal file
View File

@ -0,0 +1,31 @@
Minetest Game mod: boats
========================
See license.txt for license information.
Authors of source code
----------------------
Originally by PilzAdam (MIT)
Various Minetest developers and contributors (MIT)
Authors of media (textures and model)
-------------------------------------
Textures: Zeg9 (CC BY-SA 3.0)
Model: thetoon and Zeg9 (CC BY-SA 3.0),
modified by PavelS(SokolovPavel) (CC BY-SA 3.0),
modified by sofar (CC BY-SA 3.0)
Controls
--------
Right mouse button = Enter or exit boat when pointing at boat.
Forward = Speed up.
Slow down when moving backwards.
Forward + backward = Enable cruise mode: Boat will accelerate to maximum forward
speed and remain at that speed without needing to hold the
forward key.
Backward = Slow down.
Speed up when moving backwards.
Disable cruise mode.
Left = Turn to the left.
Turn to the right when moving backwards.
Right = Turn to the right.
Turn to the left when moving backwards.

View File

@ -1,3 +0,0 @@
default
player_api?
creative?

View File

@ -1,32 +1,7 @@
-- boats/init.lua
local is_pa = minetest.get_modpath("player_api")
-- translation support and 5.x version check
local S, is_50, is_53
if minetest.get_translator ~= nil then
S = minetest.get_translator("boats") -- 5.x translation function
else
if minetest.get_modpath("intllib") then
dofile(minetest.get_modpath("intllib") .. "/init.lua")
if intllib.make_gettext_pair then
gettext, ngettext = intllib.make_gettext_pair() -- new gettext method
else
gettext = intllib.Getter() -- old text file method
end
S = gettext
else -- boilerplate function
S = function(str, ...)
local args = {...}
return str:gsub("@%d+", function(match)
return args[tonumber(match:sub(2))]
end)
end
end
end
-- check for minetest 5.x compatibility
is_50 = minetest.has_feature("httpfetch_binary_data")
is_53 = minetest.has_feature("direct_velocity_on_players") or minetest.has_feature("is_creative_enabled") or false
-- Load support for MT game translation.
local S = minetest.get_translator("boats")
--
-- Helper functions
@ -49,21 +24,6 @@ local function get_v(v)
return math.sqrt(v.x ^ 2 + v.z ^ 2)
end
local creative = minetest.settings:get_bool("creative_mode")
function is_creative_enabled(name)
if creative or minetest.check_player_privs(name, {creative = true}) then
if is_53 then
return minetest.is_creative_enabled(name)
else
return true
end
end
return false
end
--
-- Boat entity
--
@ -76,7 +36,7 @@ local boat = {
collisionbox = {-0.5, -0.35, -0.5, 0.5, 0.3, 0.5},
visual = "mesh",
mesh = "boats_boat.obj",
textures = {"default_wood.png"}
textures = {"default_wood.png"},
},
driver = nil,
@ -95,11 +55,8 @@ function boat.on_rightclick(self, clicker)
if self.driver and name == self.driver then
-- Cleanup happens in boat.on_detach_child
clicker:set_detach()
if is_pa then
player_api.set_animation(clicker, "stand", 30)
else
default.player_set_animation(clicker, "stand", 30)
end
player_api.set_animation(clicker, "stand", 30)
local pos = clicker:get_pos()
pos = {x = pos.x, y = pos.y + 0.2, z = pos.z}
minetest.after(0.1, function()
@ -110,18 +67,10 @@ function boat.on_rightclick(self, clicker)
{x = 0.5, y = 1, z = -3}, {x = 0, y = 0, z = 0})
self.driver = name
if is_pa then
player_api.player_attached[name] = true
else
default.player_attached[name] = true
end
player_api.player_attached[name] = true
minetest.after(0.2, function()
if is_pa then
player_api.set_animation(clicker, "sit", 30)
else
default.player_set_animation(clicker, "sit", 30)
end
player_api.set_animation(clicker, "sit", 30)
end)
clicker:set_look_horizontal(self.object:get_yaw())
end
@ -131,11 +80,8 @@ end
-- If driver leaves server while driving boat
function boat.on_detach_child(self, child)
if child and child:get_player_name() == self.driver then
if is_pa then
player_api.player_attached[child:get_player_name()] = false
else
default.player_attached[child:get_player_name()] = false
end
player_api.player_attached[child:get_player_name()] = false
self.driver = nil
self.auto = false
end
@ -143,7 +89,7 @@ end
function boat.on_activate(self, staticdata, dtime_s)
self.object:set_armor_groups({fleshy = 100})
self.object:set_armor_groups({immortal = 1})
if staticdata then
self.v = tonumber(staticdata)
end
@ -165,16 +111,12 @@ function boat.on_punch(self, puncher)
if self.driver and name == self.driver then
self.driver = nil
puncher:set_detach()
if is_pa then
player_api.player_attached[name] = false
else
default.player_attached[name] = false
end
player_api.player_attached[name] = false
end
if not self.driver then
self.removed = true
local inv = puncher:get_inventory()
if not is_creative_enabled(name)
if not minetest.is_creative_enabled(name)
or not inv:contains_item("main", "boats:boat") then
local leftover = inv:add_item("main", "boats:boat")
-- if no room in inventory add a replacement boat to the world
@ -191,19 +133,8 @@ end
function boat.on_step(self, dtime)
-- after 10 seconds remove boat and drop as item if not boarded
self.count = (self.count or 0) + dtime
if self.count > 10 then
minetest.add_item(self.object:get_pos(), "boats:boat")
self.object:remove()
return
end
self.v = get_v(self.object:get_velocity()) * math.sign(self.v)
if self.driver then
self.count = 0 -- reset 10 second drop counter
local driver_objref = minetest.get_player_by_name(self.driver)
if driver_objref then
local ctrl = driver_objref:get_player_control()
@ -234,11 +165,6 @@ function boat.on_step(self, dtime)
self.object:set_yaw(self.object:get_yaw() - dtime * 0.9)
end
end
else
-- If driver leaves server while driving 'driver' is present
-- but driver objectref is nil. Reset boat properties.
self.driver = nil
self.auto = false
end
end
local velo = self.object:get_velocity()
@ -301,30 +227,6 @@ function boat.on_step(self, dtime)
end
self.object:set_velocity(new_velo)
self.object:set_acceleration(new_acce)
-- if boat comes to sudden stop then destroy boat and drop 3x wood
if (self.v2 or 0) - self.v >= 3 then
if self.driver then
--print ("Crash! with driver", self.v2 - self.v)
local driver_objref = minetest.get_player_by_name(self.driver)
default.player_attached[self.driver] = false
driver_objref:set_detach()
if is_pa then
player_api.set_animation(driver_objref, "stand" , 30)
else
default.player_set_animation(driver_objref, "stand" , 30)
end
else
--print ("Crash! no driver")
end
minetest.add_item(self.object:get_pos(), "default:wood 3")
self.object:remove()
return
end
self.v2 = self.v
end
@ -363,7 +265,7 @@ minetest.register_craftitem("boats:boat", {
boat:set_yaw(placer:get_look_horizontal())
end
local player_name = placer and placer:get_player_name() or ""
if not is_creative_enabled(player_name) then
if not minetest.is_creative_enabled(player_name) then
itemstack:take_item()
end
end
@ -386,6 +288,3 @@ minetest.register_craft({
recipe = "boats:boat",
burntime = 20,
})
print ("[MOD] Boats loaded")

View File

@ -33,7 +33,6 @@ Copyright (C) 2012-2016 Zeg9
Copyright (C) 2012-2016 thetoon
Copyright (C) 2012-2016 PavelS(SokolovPavel)
Copyright (C) 2016 sofar (sofar@foo-projects.org)
Copyright (C) 2019 Bartosz (gang65@poczta.onet.pl)
You are free to:
Share — copy and redistribute the material in any medium or format.

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=Schneller Bootsmodus an
Boat cruise mode off=Schneller Bootsmodus aus
Boat=Boot

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=La kroza maniero de la boato estas ŝaltita.
Boat cruise mode off=La kroza maniero de la boato estas malŝaltita.
Boat=Boato

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=Modo crucero en bote activado
Boat cruise mode off=Modo crucero en bote desactivado
Boat=Bote

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=Bateau mode rapide activé
Boat cruise mode off=Bateau mode rapide désactivé
Boat=Bateau

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=Mode perahu jelajah nyala
Boat cruise mode off=Mode perahu jelajah mati
Boat=Perahu

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=Modalità movimento automatico barca attivata
Boat cruise mode off=Modalità movimento automatico barca disattivata
Boat=Barca

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=クルージングモード・オン
Boat cruise mode off=クルージングモード・オフ
Boat=ボート

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=.i lo bloti cu zmiku le ka klama
Boat cruise mode off=.i lo bloti cu macnu le ka klama
Boat=lo bloti

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=Mod bot layar makan angin dibolehkan
Boat cruise mode off=Mod bot layar makan angin dilumpuhkan
Boat=Bot

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=Tryb rejsu łodką włączony
Boat cruise mode off=Tryb rejsu łodką wyłączony
Boat=Łódka

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=Modo de cruseiro do barco ligado
Boat cruise mode off=Modo de cruseiro do barco desligado
Boat=Barco

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=Автоход лодки включен
Boat cruise mode off=Автоход лодки выключен
Boat=Лодка

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=Cestovný režim loďky je zapnutý
Boat cruise mode off=Cestovný režim loďky je vypnutý
Boat=Loďka

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=Båtkryssningsläge på
Boat cruise mode off=Båtkryssningsläge av
Boat=Båt

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=Режим мандрування на човні увімкнено
Boat cruise mode off=Режим мандрування на човні вимкнено
Boat=Човен

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=巡航模式开启
Boat cruise mode off=巡航模式关闭
Boat=船

View File

@ -0,0 +1,4 @@
# textdomain: boats
Boat cruise mode on=巡航模式開啟
Boat cruise mode off=巡航模式關閉
Boat=船

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