Compare commits
17 Commits
doc_update
...
master
Author | SHA1 | Date |
---|---|---|
Yachie Kicchou | 0152c4a780 | |
Yachie Kicchou | 6e55e457d5 | |
Yachie Kicchou | 97798e43db | |
Yachie Kicchou | 4425903a72 | |
Yachie Kicchou | b08f5be928 | |
Yachie Kicchou | 23b5b97154 | |
Yachie Kicchou | 2af5c321f2 | |
Yachie Kicchou | 6cae857005 | |
the-real-herowl | 0f20e18e53 | |
the-real-herowl | 69d3fa5f85 | |
the-real-herowl | 5e673b8fee | |
Araca | 596c56d31f | |
teknomunk | 13ce4f9092 | |
teknomunk | 0a294c55a1 | |
teknomunk | 44bb07507d | |
cora | 3509b85a3e | |
CyberMango | 4a22287eb6 |
12
API.md
|
@ -1,10 +1,10 @@
|
|||
# API
|
||||
## Groups
|
||||
VoxeLibre makes very extensive use of groups. Making sure your items and objects have the correct group memberships is very important.
|
||||
MineClone 2 makes very extensive use of groups. Making sure your items and objects have the correct group memberships is very important.
|
||||
Groups are explained in `GROUPS.md`.
|
||||
|
||||
## Mod naming convention
|
||||
Mods mods in VoxeLibre follow a simple naming convention: Mods with the prefix "`vl_`" and “`mcl_`” are specific to VoxeLibre (formerly known as MineClone2), although they may be based on an existing standalone. Mods which lack this prefix are *usually* verbatim copies of a standalone mod. Some modifications may still have been applied, but the APIs are held compatible.
|
||||
Mods mods in MineClone 2 follow a simple naming convention: Mods with the prefix “`mcl_`” are specific to MineClone 2, although they may be based on an existing standalone. Mods which lack this prefix are *usually* verbatim copies of a standalone mod. Some modifications may still have been applied, but the APIs are held compatible.
|
||||
|
||||
## Adding items
|
||||
### Special fields
|
||||
|
@ -31,7 +31,7 @@ All nodes can have these fields:
|
|||
Use the `mcl_sounds` mod for the sounds.
|
||||
|
||||
## APIs
|
||||
A lot of things are possible by using one of the APIs in the mods. Many of them are documented in `API.md` files located in the directories of the specific mods. Some use `.txt` files or have some documentation in the comments along the code. Note that not all APIs are documented yet, but it is planned. The following APIs should be more or less stable but keep in mind that MineClone 2 is still unfinished. All directory names are relative to `mods/`
|
||||
A lot of things are possible by using one of the APIs in the mods. Note that not all APIs are documented yet, but it is planned. The following APIs should be more or less stable but keep in mind that MineClone 2 is still unfinished. All directory names are relative to `mods/`
|
||||
|
||||
### Items
|
||||
* Doors: `ITEMS/mcl_doors`
|
||||
|
@ -46,7 +46,8 @@ A lot of things are possible by using one of the APIs in the mods. Many of them
|
|||
### Mobs
|
||||
* Mobs: `ENTITIES/mcl_mobs`
|
||||
|
||||
VoxeLibre uses its own mobs framework, which is a fork of Mobs Redo [`mobs`] by TenPlus1.
|
||||
MineClone 2 uses its own mobs framework, called “Mobs Redo: MineClone 2 Edition” or “MRM” for short.
|
||||
This is a fork of Mobs Redo [`mobs`] by TenPlus1.
|
||||
|
||||
You can add your own mobs, spawn eggs and spawning rules with this mod.
|
||||
API documnetation is included in `ENTITIES/mcl_mobs/api.txt`.
|
||||
|
@ -67,7 +68,6 @@ chances are good that it works out of the box.
|
|||
|
||||
### Utility APIs
|
||||
* Change player physics: `PLAYER/playerphysics`
|
||||
* Change player FOV: `PLAYER/mcl_fovapi`
|
||||
* Select random treasures: `CORE/mcl_loot`
|
||||
* Get flowing direction of liquids: `CORE/flowlib`
|
||||
* `on_walk_over` callback for nodes: `CORE/walkover`
|
||||
|
@ -77,7 +77,7 @@ chances are good that it works out of the box.
|
|||
* Flowers and flower pots
|
||||
|
||||
### Unstable APIs
|
||||
The following APIs may be subject to change in the future. You could already use these APIs but there will probably be breaking changes in the future, or the API is not as fleshed out as it should be. Use at your own risk!
|
||||
The following APIs may be subject to change in future. You could already use these APIs but there will probably be breaking changes in the future, or the API is not as fleshed out as it should be. Use at your own risk!
|
||||
|
||||
* Panes (like glass panes and iron bars): `ITEMS/xpanes`
|
||||
* `_on_ignite` callback: `ITEMS/mcl_fire`
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
# Contributing to VoxeLibre
|
||||
So you want to contribute to VoxeLibre?
|
||||
# Contributing to MineClone2
|
||||
So you want to contribute to MineClone2?
|
||||
Wow, thank you! :-)
|
||||
|
||||
VoxeLibre is maintained by AncientMariner and Herowl. If you have any
|
||||
MineClone2 is maintained by AncientMariner and Nicu. If you have any
|
||||
problems or questions, contact us on Discord/Matrix (See Links section below).
|
||||
|
||||
You can help with VoxeLibre's development in many different ways,
|
||||
You can help with MineClone2's development in many different ways,
|
||||
whether you're a programmer or not.
|
||||
|
||||
## VoxeLibre's development target is to...
|
||||
- Create a stable, peformant, moddable, free/libre game inspired by Minecraft
|
||||
## MineClone2's development target is to...
|
||||
- Create a stable, peformant, moddable, free/libre game based on Minecraft
|
||||
using the Minetest engine, usable in both singleplayer and multiplayer.
|
||||
- Currently, a lot of features are already implemented.
|
||||
Polishing existing features is always welcome.
|
||||
|
||||
## Links
|
||||
* [Mesehub](https://git.minetest.land/VoxeLibre/VoxeLibre)
|
||||
* [Mesehub](https://git.minetest.land/MineClone2/MineClone2)
|
||||
* [Discord](https://discord.gg/xE4z8EEpDC)
|
||||
* [YouTube](https://www.youtube.com/channel/UClI_YcsXMF3KNeJtoBfnk9A)
|
||||
* [IRC](https://web.libera.chat/#mineclone2)
|
||||
|
@ -26,23 +26,23 @@ Polishing existing features is always welcome.
|
|||
* [OpenCollective](https://opencollective.com/mineclone2)
|
||||
|
||||
## Using git
|
||||
VoxeLibre is developed using the version control system
|
||||
MineClone2 is developed using the version control system
|
||||
[git](https://git-scm.com/). If you want to contribute code to the
|
||||
project, it is **highly recommended** that you learn the git basics.
|
||||
For non-programmers and people who do not plan to contribute code to
|
||||
VoxeLibre, git is not required. However, git is a tool that will be
|
||||
MineClone2, git is not required. However, git is a tool that will be
|
||||
referenced frequently because of its usefulness. As such, it is valuable
|
||||
in learning how git works and its terminology. It can also help you
|
||||
keeping your game updated, and easily test pull requests.
|
||||
|
||||
Look at our wiki for some concrete guides:
|
||||
https://git.minetest.land/VoxeLibre/VoxeLibre/wiki/
|
||||
https://git.minetest.land/MineClone2/MineClone2/wiki/
|
||||
|
||||
## How you can help as a non-programmer
|
||||
As someone who does not know how to write programs in Lua or does not
|
||||
know how to use the Minetest API, you can still help us out a lot. For
|
||||
example, by opening an issue in the
|
||||
[Issue tracker](https://git.minetest.land/VoxeLibre/VoxeLibre/issues),
|
||||
[Issue tracker](https://git.minetest.land/MineClone2/MineClone2/issues),
|
||||
you can report a bug or request a feature.
|
||||
|
||||
### Rules about both bugs and feature requests
|
||||
|
@ -75,7 +75,7 @@ in singleplayer, post a screenshot of the message that Minetest showed
|
|||
when the crash happened (or copy the message into your issue). If you
|
||||
are a server admin, you can find error messages in the log file of the
|
||||
server.
|
||||
* Tell us which VoxeLibre and Minetest versions you are using (from Minetest 5.7 type /ver, for previous versions, check the game.conf or README.md file).
|
||||
* Tell us which MineClone2 and Minetest versions you are using (from Minetest 5.7 type /ver, for previous versions, check the game.conf or README.md file).
|
||||
* Tell us how to reproduce the problem: What you were doing to trigger
|
||||
the bug, e.g. before the crash happened or what causes the faulty
|
||||
behavior.
|
||||
|
@ -84,14 +84,14 @@ behavior.
|
|||
* Ensure the requested feature fulfills our development targets and
|
||||
goals.
|
||||
* Begging or excessive attention seeking does not help us in the
|
||||
slightest, and may very well disrupt VoxeLibre development. It's better
|
||||
slightest, and may very well disrupt MineClone2 development. It's better
|
||||
to put that energy into helping or researching the feature in question.
|
||||
After all, we're just volunteers working on our spare time.
|
||||
* Ensure the requested feature has not been implemented in VoxeLibre
|
||||
* Ensure the requested feature has not been implemented in MineClone2
|
||||
latest or development versions.
|
||||
|
||||
### Testing code
|
||||
If you want to help us with speeding up VoxeLibre development and
|
||||
If you want to help us with speeding up MineClone2 development and
|
||||
making the game more stable, a great way to do that is by testing out
|
||||
new features from contributors. For most new things that get into the
|
||||
game, a pull request is created. A pull request is essentially a
|
||||
|
@ -103,16 +103,14 @@ tell us if the code works as expected without any issues. Ideally, you
|
|||
would report issues will pull requests similar to when you were
|
||||
reporting bugs that are the mainline (See Reporting bugs section). You
|
||||
can find currently open pull requests here:
|
||||
<https://git.minetest.land/VoxeLibre/VoxeLibre/pulls>. Note that pull
|
||||
<https://git.minetest.land/MineClone2/MineClone2/pulls>. Note that pull
|
||||
requests that start with a `WIP:` are not done yet and therefore could
|
||||
still undergo substantial change. Testing these is still helpful however
|
||||
because that is the reason developers put them up as WIP so other people
|
||||
can have a look at the PR. The wiki has an article with instructions
|
||||
on how to test Pull Requests:
|
||||
<https://git.minetest.land/VoxeLibre/VoxeLibre/wiki/Testing-Pull-Requests>.
|
||||
can have a look at the PR.
|
||||
|
||||
### Contributing assets
|
||||
Due to license problems, VoxeLibre cannot use Minecraft's assets,
|
||||
Due to license problems, MineClone2 cannot use Minecraft's assets,
|
||||
therefore we are always looking for asset contributions.
|
||||
|
||||
To contribute assets, it can be useful to learn git basics and read
|
||||
|
@ -130,9 +128,9 @@ If you want to make such contributions, join our Discord server. Demands
|
|||
for textures will be communicated there.
|
||||
|
||||
#### Sounds
|
||||
VoxeLibre currently does not have a consistent way to handle sounds.
|
||||
MineClone2 currently does not have a consistent way to handle sounds.
|
||||
The sounds in the game come from different sources, like the SnowZone
|
||||
resource pack or minetest_game. Unfortunately, VoxeLibre does not play
|
||||
resource pack or minetest_game. Unfortunately, MineClone2 does not play
|
||||
a sound in every situation you would get one in Minecraft. Any help with
|
||||
sounds is greatly appreciated, however if you add new sounds you should
|
||||
probably work together with a programmer, to write the code to actually
|
||||
|
@ -142,7 +140,7 @@ changes made by the contributor. Use the README files in the mod to
|
|||
communicate this information.
|
||||
|
||||
#### 3D Models
|
||||
Many of the 3D Models in VoxeLibre come from
|
||||
Most of the 3D Models in MineClone2 come from
|
||||
[22i's repository](https://github.com/22i/minecraft-voxel-blender-models).
|
||||
Similar to the textures, we need people that can make 3D Models with
|
||||
Blender on demand. Many of the models have to be patched, some new
|
||||
|
@ -156,7 +154,7 @@ also be credited in the Contributors section.
|
|||
### Contributing Translations
|
||||
|
||||
#### Workflow
|
||||
To add/update support for your language to VoxeLibre, you should take
|
||||
To add/update support for your language to MineClone2, you should take
|
||||
the steps documented in the section for Programmers, add/update the
|
||||
translation files of the mods that you want to update. You can add
|
||||
support for all mods, just some of them or only one mod; you can update
|
||||
|
@ -180,7 +178,7 @@ If you have commited the results yourself, you will also be credited in
|
|||
the Contributors section.
|
||||
|
||||
### Profiling
|
||||
If you own a server, a great way to help us improve VoxeLibre's code
|
||||
If you own a server, a great way to help us improve MineClone2's code
|
||||
is by giving us profiler results. Profiler results give us detailed
|
||||
information about the game's performance and let us know places to
|
||||
investigate optimization issues. This way we can make the game faster.
|
||||
|
@ -216,7 +214,7 @@ OpenCollective Funders are credited in their own section in
|
|||
they have made their donation Incognito).
|
||||
|
||||
## How you can help as a programmer
|
||||
(Almost) all the VoxeLibre development is done using pull requests.
|
||||
(Almost) all the MineClone2 development is done using pull requests.
|
||||
|
||||
### Recommended workflow
|
||||
* Fork the repository (in case you have not already)
|
||||
|
@ -239,11 +237,11 @@ is no issue on the topic, open one. If there is an issue, tell us that
|
|||
you'd like to take care of it, to avoid duplicate work.
|
||||
|
||||
### Don't hesitate to ask for help
|
||||
We appreciate any contributing effort to VoxeLibre. If you are a
|
||||
We appreciate any contributing effort to MineClone2. If you are a
|
||||
relatively new programmer, you can reach us on Discord, Matrix or IRC
|
||||
for questions about git, Lua, Minetest API, VoxeLibre codebase or
|
||||
anything related to VoxeLibre. We can help you avoid writing code that
|
||||
would be deemed inadequate, or help you become familiar with VoxeLibre
|
||||
for questions about git, Lua, Minetest API, MineClone2 codebase or
|
||||
anything related to MineClone2. We can help you avoid writing code that
|
||||
would be deemed inadequate, or help you become familiar with MineClone2
|
||||
better, or assist you use development tools.
|
||||
|
||||
### Maintain your own code, even if already got merged
|
||||
|
@ -273,8 +271,8 @@ of the results)
|
|||
excessive git bureaucracy commits in master)
|
||||
* We use merge to add the commits from a PR/branch to master
|
||||
* Submodules should only be used if a) upstream is highly reliable and
|
||||
b) it is 100% certain that no VL specific changes to the code will be
|
||||
needed (this has never been the case before, hence VL is submodule free so far)
|
||||
b) it is 100% certain that no mcl2 specific changes to the code will be
|
||||
needed (this has never been the case before, hence mcl2 is submodule free so far)
|
||||
* Commit messages should be descriptive
|
||||
* Try to group your submissions best as you can:
|
||||
* Try to keep your PRs small: In some cases things reasonably be can't
|
||||
|
@ -359,14 +357,14 @@ end
|
|||
|
||||
### Developer status
|
||||
Active and trusted contributors are often granted write access to the
|
||||
VoxeLibre repository as a contributor. Those that have demonstrated the right
|
||||
MineClone2 repository as a contributor. Those that have demonstrated the right
|
||||
technical skills and behaviours may be granted developer access. These are the
|
||||
most trusted contributors who will contribute to ensure coding standards and
|
||||
processes are followed.
|
||||
|
||||
#### Developer responsibilities
|
||||
- If you have developer/contributor privileges you can just open a new branch
|
||||
in the VL repository (which is preferred). From that you create a pull request.
|
||||
in the mcl2 repository (which is preferred). From that you create a pull request.
|
||||
This way other people can review your changes and make sure they work
|
||||
before they get merged.
|
||||
- If you do not (yet) have developer privs you do your work on a branch
|
||||
|
@ -399,7 +397,7 @@ technical guidelines
|
|||
#### Release process
|
||||
* Run `tools/generate_ingame_credits.lua` to update the ingame credits
|
||||
from `CREDITS.md` and commit the result (if anything changed)
|
||||
* Launch VoxeLibre to make sure it still runs
|
||||
* Launch MineClone2 to make sure it still runs
|
||||
* Update the version number in README.md
|
||||
* Use `git tag <version number>` to tag the latest commit with the
|
||||
version number
|
||||
|
|
|
@ -129,6 +129,7 @@
|
|||
* Bakawun
|
||||
* JoseDouglas26
|
||||
* Zasco
|
||||
* Yachie Kicchou
|
||||
|
||||
## Music
|
||||
* Jordach for the jukebox music compilation from Big Freaking Dig
|
||||
|
|
|
@ -25,7 +25,7 @@ The basic digging time groups determine by which tools a node can be dug.
|
|||
* `handy=1`: Breakable by hand and this node gives it useful drop when dug by hand. All nodes which are breakable by pickaxe, axe, shovel, sword or shears are also automatically breakable by hand, but not neccess
|
||||
* `creative_breakable=1`: Block is breakable by hand in creative mode. This group is implied if the node belongs to any other digging group
|
||||
|
||||
Please read <http://minecraft.gamepedia.com/Breaking> to learn how digging times work in Minecraft, as VoxeLibre is based on the same system.
|
||||
Please read <http://minecraft.gamepedia.com/Breaking> to learn how digging times work in Minecraft, as MineClone 2 is based on the same system.
|
||||
|
||||
### Groups for interactions
|
||||
|
||||
|
@ -117,7 +117,7 @@ These groups correspond to the Minecraft materials. They classify the block into
|
|||
* `material_glass=1`: Glass
|
||||
|
||||
Currently, these groups are used for the note block.
|
||||
Note that not all Minecraft materials are used so far. More Minecraft materials will likely only be added when they are needed for a concrete use case.
|
||||
Note that not all Minecraft materials are used so far. More Minecraft materials will lilely only be added when they are needed for a concrete use case.
|
||||
|
||||
### Declarative groups
|
||||
These groups are used mostly for informational purposes
|
||||
|
|
|
@ -6,15 +6,15 @@ How to play:
|
|||
- Navigate to https://www.minetest.net/ to download the client.
|
||||
- Once installed, open and select the "Content" tab
|
||||
|
||||
#### Install VoxeLibre from ContentDB
|
||||
#### Install MineClone2 from ContentDB
|
||||
- Click "Browse Online Content" and filter by Games (select "Games" from the dropdown box)
|
||||
- Find "VoxeLibre" (should be first on the list or on the first page)
|
||||
- Click the [+] button next to VoxeLibre and wait for download to finish
|
||||
- Find "MineClone2" (should be first on the list or on the first page)
|
||||
- Click the [+] button next to MineClone2 and wait for download to finish
|
||||
- Click "Back to Main Menu"
|
||||
|
||||
#### Create new world and play
|
||||
- Click "Start Game" tab
|
||||
- At the bottom click the VoxeLibre icon (the 2 dirt with grass blocks)
|
||||
- At the bottom click the MineClone2 icon (the 2 dirt with grass blocks)
|
||||
- Click "New", give your world a name
|
||||
- You can leave seed blank or put in a word of your choice
|
||||
- Select your new world
|
||||
|
|
14
LEGAL.md
|
@ -1,14 +1,14 @@
|
|||
# Legal information
|
||||
This is a game inspired by Minecraft with unique content.
|
||||
This is a fan game, not developed or endorsed by Mojang AB.
|
||||
|
||||
Copying is an act of love. Please copy and share! <3
|
||||
Here's the detailed legalese for those who need it:
|
||||
|
||||
## License of source code
|
||||
VoxeLibre (by Lizzy Fleckenstein, Wuzzy, davedevils and countless others)
|
||||
is inspired by Minecraft.
|
||||
MineClone 2 (by Lizzy Fleckenstein, Wuzzy, davedevils and countless others)
|
||||
is an imitation of Minecraft.
|
||||
|
||||
VoxeLibre is free software: you can redistribute it and/or modify
|
||||
MineClone 2 is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
@ -22,15 +22,15 @@ details.
|
|||
In the mods you might find in the read-me or license
|
||||
text files a different license. This counts as dual-licensing.
|
||||
You can choose which license applies to you: Either the
|
||||
license of VoxeLibre (GNU GPLv3) or the mod's license.
|
||||
license of MineClone 2 (GNU GPLv3) or the mod's license.
|
||||
|
||||
VoxeLibre is a direct continuation of the discontinued MineClone
|
||||
MineClone 2 is a direct continuation of the discontinued MineClone
|
||||
project by davedevils.
|
||||
|
||||
Mod credits:
|
||||
See `README.txt` or `README.md` in each mod directory for information about other authors.
|
||||
For mods that do not have such a file, the license is the source code license
|
||||
of VoxeLibre and the author is Wuzzy.
|
||||
of MineClone 2 and the author is Wuzzy.
|
||||
|
||||
## License of media (textures and sounds)
|
||||
No non-free licenses are used anywhere.
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
# Models in Minetest/VoxeLibre
|
||||
# Models in Minetest/Mineclone2
|
||||
|
||||
Models are an important part of all entities & unique nodes in VoxeLibre. They provide a 3 dimensional map of an object for which textures are then applied to. This document is for modders, it quickly highlights some important information for the software needed to open models in VoxeLibre.
|
||||
Models are an important part of all entities & unique nodes in Mineclone2. They provide a 3 dimensional map of an object for which textures are then applied to. This document is for modders, it quickly highlights some important information for the software needed to open models in Mineclone2.
|
||||
|
||||
## Minetest Wiki
|
||||
|
||||
For more detailed information on actually using blender to create and modify models for Minetest/VoxeLibre, please visit the Minetest wiki's page on using Blender [Here](https://wiki.minetest.net/Using_Blender)
|
||||
For more detailed information on actually using blender to create and modify models for Minetest/Mineclone2, please visit the Minetest wiki's page on using Blender [Here](https://wiki.minetest.net/Using_Blender)
|
||||
|
||||
## Recommended software
|
||||
|
||||
|
|
16
README.md
|
@ -1,6 +1,6 @@
|
|||
# VoxeLibre
|
||||
A game inspired by Minecraft for Minetest. Forked from MineClone by davedevils.
|
||||
Developed by many people, see CREDITS.md for a complete list.
|
||||
An unofficial Minecraft-like game for Minetest. Forked from MineClone by davedevils.
|
||||
Developed by many people. Not developed or endorsed by Mojang AB.
|
||||
|
||||
### Gameplay
|
||||
You start in a randomly-generated world made entirely of cubes. You can explore
|
||||
|
@ -67,16 +67,16 @@ an explanation.
|
|||
This game requires [Minetest](http://minetest.net) to run (version 5.4.1 or
|
||||
later). So you need to install Minetest first. Only stable versions of Minetest
|
||||
are officially supported.
|
||||
There is no support for running VoxeLibre in development versions of Minetest.
|
||||
There is no support for running MineClone2 in development versions of Minetest.
|
||||
|
||||
To install VoxeLibre (if you haven't already), move this directory into the
|
||||
To install MineClone2 (if you haven't already), move this directory into the
|
||||
“games” directory of your Minetest data directory. Consult the help of
|
||||
Minetest to learn more.
|
||||
|
||||
## Useful links
|
||||
The VoxeLibre repository is hosted at Mesehub. To contribute or report issues, head there.
|
||||
The MineClone2 repository is hosted at Mesehub. To contribute or report issues, head there.
|
||||
|
||||
* Mesehub: <https://git.minetest.land/VoxeLibre/VoxeLibre>
|
||||
* Mesehub: <https://git.minetest.land/MineClone2/MineClone2>
|
||||
* Discord: <https://discord.gg/xE4z8EEpDC>
|
||||
* YouTube: <https://www.youtube.com/channel/UClI_YcsXMF3KNeJtoBfnk9A>
|
||||
* ContentDB: <https://content.minetest.net/packages/wuzzy/mineclone2/>
|
||||
|
@ -104,7 +104,7 @@ well on really low spec computers.
|
|||
This game is currently in **beta** stage.
|
||||
It is playable, but not yet feature-complete.
|
||||
Backwards-compability is not entirely guaranteed, updating your world might cause small bugs.
|
||||
If you want to use the development version of VoxeLibre in production, the master branch is usually relatively stable.
|
||||
If you want to use the development version of MineClone2 in production, the master branch is usually relatively stable.
|
||||
|
||||
The following main features are available:
|
||||
|
||||
|
@ -187,7 +187,7 @@ Technical differences from Minecraft:
|
|||
* Different engine (Minetest)
|
||||
* Different easter eggs
|
||||
|
||||
… and finally, VoxeLibre is free software (“free” as in “freedom”)!
|
||||
… and finally, MineClone2 is free software (“free” as in “freedom”)!
|
||||
|
||||
## Other readme files
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ Note: If you have to do more than 1 hotfix release, can do it on the same releas
|
|||
|
||||
### Release via ContentDB
|
||||
|
||||
* Go to VoxeLibre page (https://content.minetest.net/packages/Wuzzy/mineclone2/)
|
||||
* Go to MineClone2 page (https://content.minetest.net/packages/Wuzzy/mineclone2/)
|
||||
* Click +Release
|
||||
* Enter the release tag number in the title and Git reference box. For example (without quotes): "0.82.1"
|
||||
* In the minimum minetest version, put the oldest supported version (as of 14/02/2023 it is 5.5), leave the Maximum minetest version blank
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
title = MineClone 2
|
||||
title = VoxeLibre
|
||||
description = A survival sandbox game. Survive, gather, hunt, build, explore, and do much more.
|
||||
disallowed_mapgens = v6
|
||||
version=0.87.0-SNAPSHOT
|
||||
|
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 42 KiB |
BIN
menu/header.png
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 42 KiB |
|
@ -113,6 +113,55 @@ local function disable_physics(object, luaentity, ignore_check, reset_movement)
|
|||
end
|
||||
end
|
||||
|
||||
local function try_object_pickup(player, inv, object, checkpos)
|
||||
if not inv then return end
|
||||
|
||||
local le = object:get_luaentity()
|
||||
|
||||
-- Check magnet timer
|
||||
if not (le._magnet_timer >= 0) then return end
|
||||
if not (le._magnet_timer < item_drop_settings.magnet_time) then return end
|
||||
|
||||
-- Don't try to collect again
|
||||
if le._removed then return end
|
||||
|
||||
-- Ignore if itemstring is not set yet
|
||||
if le.itemstring == "" then return end
|
||||
|
||||
-- Add what we can to the inventory
|
||||
local itemstack = ItemStack(le.itemstring)
|
||||
local leftovers = inv:add_item("main", itemstack )
|
||||
|
||||
check_pickup_achievements(object, player)
|
||||
|
||||
if leftovers:is_empty() then
|
||||
-- Destroy entity
|
||||
-- This just prevents this section to be run again because object:remove() doesn't remove the item immediately.
|
||||
le.target = checkpos
|
||||
le._removed = true
|
||||
|
||||
-- Stop the object
|
||||
object:set_velocity(vector.zero())
|
||||
object:set_acceleration(vector.zero())
|
||||
object:move_to(checkpos)
|
||||
|
||||
-- Update sound pool
|
||||
local name = player:get_player_name()
|
||||
pool[name] = ( pool[name] or 0 ) + 1
|
||||
|
||||
-- Make sure the object gets removed
|
||||
minetest.after(0.25, function()
|
||||
--safety check
|
||||
if object and object:get_luaentity() then
|
||||
object:remove()
|
||||
end
|
||||
end)
|
||||
else
|
||||
-- Update entity itemstring
|
||||
le.itemstring = leftovers:to_string()
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_globalstep(function(_)
|
||||
tick = not tick
|
||||
|
||||
|
@ -147,40 +196,7 @@ minetest.register_globalstep(function(_)
|
|||
object:get_luaentity() and object:get_luaentity().name == "__builtin:item" and object:get_luaentity()._magnet_timer
|
||||
and (object:get_luaentity()._insta_collect or (object:get_luaentity().age > item_drop_settings.age)) then
|
||||
|
||||
if object:get_luaentity()._magnet_timer >= 0 and
|
||||
object:get_luaentity()._magnet_timer < item_drop_settings.magnet_time and inv and
|
||||
inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then
|
||||
|
||||
-- Collection
|
||||
if not object:get_luaentity()._removed then
|
||||
-- Ignore if itemstring is not set yet
|
||||
if object:get_luaentity().itemstring ~= "" then
|
||||
inv:add_item("main", ItemStack(object:get_luaentity().itemstring))
|
||||
|
||||
check_pickup_achievements(object, player)
|
||||
|
||||
-- Destroy entity
|
||||
-- This just prevents this section to be run again because object:remove() doesn't remove the item immediately.
|
||||
object:get_luaentity().target = checkpos
|
||||
object:get_luaentity()._removed = true
|
||||
|
||||
object:set_velocity(vector.zero())
|
||||
object:set_acceleration(vector.zero())
|
||||
|
||||
object:move_to(checkpos)
|
||||
|
||||
pool[name] = pool[name] + 1
|
||||
|
||||
minetest.after(0.25, function()
|
||||
--safety check
|
||||
if object and object:get_luaentity() then
|
||||
object:remove()
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
try_object_pickup( player, inv, object, checkpos )
|
||||
elseif not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "mcl_experience:orb" then
|
||||
local entity = object:get_luaentity()
|
||||
entity.collector = player:get_player_name()
|
||||
|
|
|
@ -177,7 +177,6 @@ minetest.register_entity("mcl_experience:orb", {
|
|||
delete_timer = 0,
|
||||
radius = 4,
|
||||
|
||||
|
||||
on_activate = function(self, staticdata, dtime_s)
|
||||
self.object:set_velocity(vector.new(
|
||||
math.random(-2,2)*math.random(),
|
||||
|
@ -187,9 +186,13 @@ minetest.register_entity("mcl_experience:orb", {
|
|||
self.object:set_armor_groups({immortal = 1})
|
||||
self.object:set_velocity({x = 0, y = 2, z = 0})
|
||||
self.object:set_acceleration(gravity)
|
||||
local xp = tonumber(staticdata)
|
||||
|
||||
-- Assign 0 xp in case the entity was persisted even though it should not have been (static_save = false)
|
||||
-- This was a minetest bug for a while: https://github.com/minetest/minetest/issues/14420
|
||||
local xp = tonumber(staticdata) or 0
|
||||
self._xp = xp
|
||||
size = xp_to_size(xp)
|
||||
|
||||
self.object:set_properties({
|
||||
visual_size = {x = size, y = size},
|
||||
glow = 14,
|
||||
|
|
|
@ -182,6 +182,10 @@ local function apply_bone_meal(pointed_thing, user)
|
|||
local n = minetest.get_node(pos)
|
||||
if n.name == "" then return false end
|
||||
|
||||
if mcl_util.check_area_protection(pos, pointed_thing.above, user) then
|
||||
return false
|
||||
end
|
||||
|
||||
for _, func in pairs(mcl_dye.bone_meal_callbacks) do
|
||||
if func(pointed_thing, user) then
|
||||
return true
|
||||
|
|
|
@ -4,10 +4,7 @@
|
|||
--- DateTime: 10/14/22 4:05 PM
|
||||
---
|
||||
|
||||
--local logging = minetest.settings:get_bool("mcl_logging_mcl_signs",true)
|
||||
|
||||
local DEBUG = minetest.settings:get_bool("mcl_logging_mcl_signs", false) -- special debug setting.
|
||||
|
||||
if DEBUG then
|
||||
minetest.log("action", "[mcl_signs] Signs API Loading")
|
||||
end
|
||||
|
@ -115,9 +112,6 @@ mcl_signs.registered_signs = {}
|
|||
mcl_signs.registered_signs.wall_signs = {}
|
||||
mcl_signs.registered_signs.standing_signs = {}
|
||||
mcl_signs.registered_signs.hanging_signs = {} -- unused. prepping for future use.
|
||||
-- DEFINE SIGN BASE TYPES
|
||||
mcl_signs.wall_standard = {} -- initialize
|
||||
mcl_signs.standing_standard = {} -- initialize
|
||||
|
||||
function mcl_signs.build_signs_info()
|
||||
local n = 23 / 56 - 1 / 128 -- some required magic number from the original code.
|
||||
|
@ -141,37 +135,110 @@ function mcl_signs.build_signs_info()
|
|||
|
||||
end
|
||||
|
||||
-- wall signs' & hanging signs' base (definition)
|
||||
mcl_signs.wall_standard = {
|
||||
description = S("Sign"),
|
||||
_tt_help = S("Can be written"),
|
||||
_doc_items_longdesc = S("Signs can be written and come in two variants: Wall sign and sign on a sign post. Signs can be placed on the top and the sides of other blocks, but not below them."),
|
||||
_doc_items_usagehelp = S("After placing the sign, you can write something on it. You have 4 lines of text with up to 15 characters for each line; anything beyond these limits is lost. Not all characters are supported. The text can not be changed once it has been written; you have to break and place the sign again. Can be colored and made to glow."),
|
||||
inventory_image = "mcl_signs_default_sign.png",
|
||||
walkable = false,
|
||||
is_ground_content = false,
|
||||
wield_image = "mcl_signs_default_sign.png",
|
||||
node_placement_prediction = "",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "wallmounted",
|
||||
drawtype = "mesh",
|
||||
mesh = "mcl_signs_signonwallmount.obj",
|
||||
selection_box = { type = "wallmounted", wall_side = { -0.5, -7 / 28, -0.5, -23 / 56, 7 / 28, 0.5 } },
|
||||
tiles = { "mcl_signs_sign.png" },
|
||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
|
||||
groups = mcl_signs.sign_groups,
|
||||
-- DEFINE SIGN BASE TYPES
|
||||
local common_definition = {
|
||||
_mcl_hardness = 1,
|
||||
_mcl_blast_resistance = 1,
|
||||
stack_max = 16,
|
||||
sounds = node_sounds,
|
||||
groups = mcl_signs.sign_groups,
|
||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
|
||||
drawtype = "mesh",
|
||||
paramtype = "light",
|
||||
tiles = { "mcl_signs_sign.png" },
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
is_ground_content = false,
|
||||
|
||||
on_timer = function(pos)
|
||||
on_rightclick = function (pos, node, clicker, itemstack, pointed_thing)
|
||||
if DEBUG then
|
||||
minetest.log("verbose", "[mcl_signs] Sign Right Click event.")
|
||||
end
|
||||
|
||||
-- make sure player is clicking
|
||||
if not clicker or not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local iname = item:get_name()
|
||||
|
||||
local protected = mcl_util.check_position_protection(pos, clicker)
|
||||
|
||||
if node and not protected then
|
||||
if DEBUG then
|
||||
minetest.log("verbose", "[mcl_signs] Sign Right Click event on valid node.")
|
||||
end
|
||||
|
||||
-- handle glow from glow_ink_sac *first*
|
||||
if (iname == "mcl_mobitems:glow_ink_sac") then
|
||||
clicker:set_wielded_item(item)
|
||||
local success = mcl_signs:glow_sign(pos)
|
||||
if success then
|
||||
if DEBUG then
|
||||
minetest.log("verbose", "[mcl_signs] Sign Glow Success.")
|
||||
end
|
||||
itemstack:take_item()
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
-- check the wielded item to make sure that it is a dye.
|
||||
local txt_color = mcl_signs:get_color_for_sign(iname)
|
||||
if txt_color ~= "false" then
|
||||
clicker:set_wielded_item(item)
|
||||
local success = mcl_signs:color_sign(pos, txt_color)
|
||||
-- "mcl_dye:black" is a special case: it makes the sign's lettering black AND removes glow.
|
||||
if (iname == "mcl_dye:black") then
|
||||
success = mcl_signs:glow_sign(pos, true)
|
||||
if success and DEBUG then
|
||||
minetest.log("verbose", "[mcl_signs] Sign Glow removal Success.")
|
||||
end
|
||||
end
|
||||
if success then
|
||||
if DEBUG then
|
||||
minetest.log("verbose", "[mcl_signs] Sign Color Success.")
|
||||
end
|
||||
itemstack:take_item()
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
-- No modifier item in hand, open the sign for edition
|
||||
local old_text = minetest.get_meta(pos):get_string("text")
|
||||
mcl_signs:show_formspec(clicker, pos, old_text)
|
||||
end
|
||||
end,
|
||||
|
||||
on_destruct = function(pos)
|
||||
mcl_signs:destruct_sign(pos)
|
||||
end,
|
||||
|
||||
-- Not Useless Code. this force updates the sign.
|
||||
on_punch = function(pos, node, puncher)
|
||||
mcl_signs:update_sign(pos)
|
||||
end,
|
||||
}
|
||||
|
||||
-- wall signs' & hanging signs' base (definition)
|
||||
mcl_signs.wall_standard = table.copy(common_definition)
|
||||
mcl_signs.wall_standard.description = S("Sign")
|
||||
mcl_signs.wall_standard._tt_help = S("Can be written")
|
||||
mcl_signs.wall_standard._doc_items_longdesc = S("Signs can be written and come in two variants: Wall sign and sign on a sign post. Signs can be placed on the top and the sides of other blocks, but not below them.")
|
||||
mcl_signs.wall_standard._doc_items_usagehelp = S("After placing the sign, you can write something on it. You have 4 lines of text with up to 15 characters for each line; anything beyond these limits is lost. Not all characters are supported. The text can not be changed once it has been written; you have to break and place the sign again. Can be colored and made to glow.")
|
||||
mcl_signs.wall_standard.inventory_image = "mcl_signs_default_sign.png"
|
||||
mcl_signs.wall_standard.wield_image = "mcl_signs_default_sign.png"
|
||||
mcl_signs.wall_standard.node_placement_prediction = ""
|
||||
mcl_signs.wall_standard.paramtype2 = "wallmounted"
|
||||
mcl_signs.wall_standard.mesh = "mcl_signs_signonwallmount.obj"
|
||||
mcl_signs.wall_standard.selection_box = { type = "wallmounted", wall_side = { -0.5, -7 / 28, -0.5, -23 / 56, 7 / 28, 0.5 } }
|
||||
mcl_signs.wall_standard.on_timer = function(pos)
|
||||
-- fix for /ClearObjects
|
||||
mcl_signs:update_sign(pos)
|
||||
-- note: update_sign decides to keep the timer running based on if there is text.
|
||||
-- This prevents every sign from having a timer, when not needed.
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
end
|
||||
mcl_signs.wall_standard.on_place = function(itemstack, placer, pointed_thing)
|
||||
local above = pointed_thing.above
|
||||
local under = pointed_thing.under
|
||||
|
||||
|
@ -192,9 +259,6 @@ mcl_signs.wall_standard = {
|
|||
end
|
||||
|
||||
local wdir = minetest.dir_to_wallmounted(dir)
|
||||
|
||||
--local placer_pos = placer:get_pos()
|
||||
|
||||
local fdir = minetest.dir_to_facedir(dir)
|
||||
|
||||
local sign_info
|
||||
|
@ -272,18 +336,10 @@ mcl_signs.wall_standard = {
|
|||
|
||||
minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true)
|
||||
|
||||
mcl_signs:show_formspec(placer, place_pos)
|
||||
mcl_signs:show_formspec(placer, place_pos, "")
|
||||
return itemstack
|
||||
end,
|
||||
on_destruct = function(pos)
|
||||
mcl_signs:destruct_sign(pos)
|
||||
end,
|
||||
|
||||
-- Not Useless Code. force updates the sign.
|
||||
on_punch = function(pos, node, puncher)
|
||||
mcl_signs:update_sign(pos)
|
||||
end,
|
||||
on_rotate = function(pos, node, user, mode)
|
||||
end
|
||||
mcl_signs.wall_standard.on_rotate = function(pos, node, user, mode)
|
||||
if mode == screwdriver.ROTATE_FACE then
|
||||
local r = screwdriver.rotate.wallmounted(pos, node, mode)
|
||||
node.param2 = r
|
||||
|
@ -293,105 +349,21 @@ mcl_signs.wall_standard = {
|
|||
else
|
||||
return false
|
||||
end
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
if DEBUG then
|
||||
minetest.log("verbose", "[mcl_signs] Wall_Sign Right Click event.")
|
||||
end
|
||||
|
||||
-- make sure player is clicking
|
||||
if not clicker or not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local iname = item:get_name()
|
||||
|
||||
local protected = mcl_util.check_position_protection(pos, clicker)
|
||||
|
||||
if node and not protected then
|
||||
if DEBUG then
|
||||
minetest.log("verbose", "[mcl_signs] Wall_Sign Right Click event on valid node.")
|
||||
end
|
||||
|
||||
-- handle glow from glow_ink_sac *first*
|
||||
if (iname == "mcl_mobitems:glow_ink_sac") then
|
||||
clicker:set_wielded_item(item)
|
||||
local success = mcl_signs:glow_sign(pos)
|
||||
if success then
|
||||
if DEBUG then
|
||||
minetest.log("verbose", "[mcl_signs] Sign Glow Success.")
|
||||
end
|
||||
itemstack:take_item()
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
-- "mcl_dye:black" is a special case: it makes the sign's lettering black AND removes glow.
|
||||
if (iname == "mcl_dye:black") then
|
||||
clicker:set_wielded_item(item)
|
||||
local success = mcl_signs:glow_sign(pos, true)
|
||||
mcl_signs:color_sign(pos, mcl_colors.BLACK)
|
||||
if success then
|
||||
if DEBUG then
|
||||
minetest.log("verbose", "[mcl_signs] Sign Glow removal Success.")
|
||||
end
|
||||
|
||||
itemstack:take_item()
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
-- check the wielded item to make sure that it is a dye.
|
||||
local txt_color = mcl_signs:get_color_for_sign(iname)
|
||||
if txt_color ~= "false" then
|
||||
clicker:set_wielded_item(item)
|
||||
local success = mcl_signs:color_sign(pos, txt_color)
|
||||
if success then
|
||||
if DEBUG then
|
||||
minetest.log("verbose", "[mcl_signs] Sign Color Success.")
|
||||
end
|
||||
itemstack:take_item()
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
_mcl_hardness = 1,
|
||||
_mcl_blast_resistance = 1,
|
||||
}
|
||||
-- standing sign base (definition)
|
||||
mcl_signs.standing_standard = {
|
||||
paramtype = "light",
|
||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
is_ground_content = false,
|
||||
paramtype2 = "facedir",
|
||||
drawtype = "mesh",
|
||||
mesh = "mcl_signs_sign.obj",
|
||||
selection_box = { type = "fixed", fixed = { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } },
|
||||
tiles = { "mcl_signs_sign.png" },
|
||||
groups = mcl_signs.sign_groups,
|
||||
drop = "mcl_signs:wall_sign",
|
||||
stack_max = 16,
|
||||
sounds = node_sounds,
|
||||
|
||||
on_destruct = function(pos)
|
||||
mcl_signs:destruct_sign(pos)
|
||||
end,
|
||||
|
||||
on_timer = function(pos)
|
||||
mcl_signs.standing_standard = table.copy(common_definition)
|
||||
mcl_signs.standing_standard.paramtype2 = "facedir"
|
||||
mcl_signs.standing_standard.mesh = "mcl_signs_sign.obj"
|
||||
mcl_signs.standing_standard.selection_box = { type = "fixed", fixed = { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } }
|
||||
mcl_signs.standing_standard.drop = "mcl_signs:wall_sign"
|
||||
mcl_signs.standing_standard.on_timer = function(pos)
|
||||
-- fix for /ClearObjects
|
||||
mcl_signs:update_sign(pos)
|
||||
minetest.get_node_timer(pos):start(40.0)
|
||||
end,
|
||||
|
||||
-- Not Useless Code. this force updates the sign.
|
||||
on_punch = function(pos, node, puncher)
|
||||
mcl_signs:update_sign(pos)
|
||||
end,
|
||||
on_rotate = function(pos, node, user, mode)
|
||||
end
|
||||
mcl_signs.standing_standard.on_rotate = function(pos, node, user, mode)
|
||||
if mode == screwdriver.ROTATE_FACE then
|
||||
node.name = "mcl_signs:standing_sign22_5"
|
||||
minetest.swap_node(pos, node)
|
||||
|
@ -400,61 +372,8 @@ mcl_signs.standing_standard = {
|
|||
end
|
||||
mcl_signs:update_sign(pos, nil, nil, true)
|
||||
return true
|
||||
end,
|
||||
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
|
||||
if DEBUG then
|
||||
minetest.log("verbose", "[mcl_signs] Standing_Sign Right Click event.")
|
||||
end
|
||||
|
||||
-- make sure player is clicking
|
||||
if not clicker or not clicker:is_player() then
|
||||
return
|
||||
end
|
||||
|
||||
local item = clicker:get_wielded_item()
|
||||
local iname = item:get_name()
|
||||
|
||||
local protected = mcl_util.check_position_protection(pos, clicker)
|
||||
|
||||
if node and not protected then
|
||||
-- handle glow from glow_ink_sac *first*
|
||||
if DEBUG then
|
||||
minetest.log("verbose", "[mcl_signs] Standing_Sign Right Click event on valid node.")
|
||||
end
|
||||
|
||||
if (iname == "mcl_mobitems:glow_ink_sac") then
|
||||
clicker:set_wielded_item(item)
|
||||
local success = mcl_signs:glow_sign(pos)
|
||||
if success then
|
||||
if DEBUG then
|
||||
minetest.log("verbose", "[mcl_signs] Sign Glow Success.")
|
||||
end
|
||||
itemstack:take_item()
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
-- check the wielded item to make sure that it is a dye.
|
||||
local txt_color = mcl_signs:get_color_for_sign(iname)
|
||||
if txt_color ~= "false" then
|
||||
clicker:set_wielded_item(item)
|
||||
local success = mcl_signs:color_sign(pos, txt_color)
|
||||
if success then
|
||||
if DEBUG then
|
||||
minetest.log("verbose", "[mcl_signs] Sign Color Success.")
|
||||
end
|
||||
itemstack:take_item()
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
_mcl_hardness = 1,
|
||||
_mcl_blast_resistance = 1,
|
||||
}
|
||||
|
||||
-- HELPER FUNCTIONS' VARIABLES
|
||||
local sign_glow = 6
|
||||
local Dyes_table = {
|
||||
|
@ -663,7 +582,7 @@ function mcl_signs.register_sign (modname, color, _name, ttsign)
|
|||
|
||||
minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true)
|
||||
|
||||
mcl_signs:show_formspec(placer, place_pos)
|
||||
mcl_signs:show_formspec(placer, place_pos, "")
|
||||
return itemstack
|
||||
end
|
||||
|
||||
|
@ -916,7 +835,7 @@ function mcl_signs.register_sign_custom (modname, _name, tiles, color, inventory
|
|||
|
||||
minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true)
|
||||
|
||||
mcl_signs:show_formspec(placer, place_pos)
|
||||
mcl_signs:show_formspec(placer, place_pos, "")
|
||||
return itemstack
|
||||
end
|
||||
minetest.register_node(":mcl_signs:wall_sign" .. _name, new_sign)
|
||||
|
@ -1152,7 +1071,7 @@ function mcl_signs.reregister_sign (modname, color, _name, ttsign)
|
|||
|
||||
minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true)
|
||||
|
||||
mcl_signs:show_formspec(placer, place_pos)
|
||||
mcl_signs:show_formspec(placer, place_pos, "")
|
||||
return itemstack
|
||||
end
|
||||
|
||||
|
@ -1401,7 +1320,7 @@ function mcl_signs.reregister_sign_custom (modname, _name, tiles, color, invento
|
|||
|
||||
minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true)
|
||||
|
||||
mcl_signs:show_formspec(placer, place_pos)
|
||||
mcl_signs:show_formspec(placer, place_pos, "")
|
||||
return itemstack
|
||||
end
|
||||
minetest.override_item("mcl_signs:wall_sign" .. _name, new_sign)
|
||||
|
@ -1883,7 +1802,7 @@ function mcl_signs:update_sign(pos, fields, sender, force_remove, text_color)
|
|||
return false
|
||||
end
|
||||
local text = meta:get_string("text", "")
|
||||
if fields and (text == "" and fields.text) then
|
||||
if fields and fields.text then
|
||||
meta:set_string("text", fields.text)
|
||||
text = fields.text
|
||||
end
|
||||
|
@ -2040,11 +1959,13 @@ function mcl_signs:update_sign(pos, fields, sender, force_remove, text_color)
|
|||
|
||||
end
|
||||
|
||||
function mcl_signs:show_formspec(player, pos)
|
||||
function mcl_signs:show_formspec(player, pos, old_text)
|
||||
minetest.show_formspec(
|
||||
player:get_player_name(),
|
||||
"mcl_signs:set_text_" .. pos.x .. "_" .. pos.y .. "_" .. pos.z,
|
||||
"size[6,3]textarea[0.25,0.25;6,1.5;text;" .. F(S("Enter sign text:")) .. ";]label[0,1.5;" .. F(S("Maximum line length: 15")) .. "\n" .. F(S("Maximum lines: 4")) .. "]button_exit[0,2.5;6,1;submit;" .. F(S("Done")) .. "]"
|
||||
"size[6,3]textarea[0.25,0.25;6,1.5;text;" .. F(S("Enter sign text:")) .. ";".. F(old_text) .. "]" ..
|
||||
"label[0,1.5;" .. F(S("Maximum line length: 15")) ..
|
||||
"\n" .. F(S("Maximum lines: 4")) .. "]button_exit[0,2.5;6,1;submit;" .. F(S("Done")) .. "]"
|
||||
)
|
||||
end
|
||||
|
||||
|
|
Before Width: | Height: | Size: 532 B After Width: | Height: | Size: 594 B |
After Width: | Height: | Size: 484 B |
Before Width: | Height: | Size: 676 B After Width: | Height: | Size: 429 B |
Before Width: | Height: | Size: 675 B After Width: | Height: | Size: 1.4 KiB |