Compare commits

..

25 Commits
1.8.1 ... 1.10

Author SHA1 Message Date
4fb4fe1763 Add support for dropped items + support for URL fetched recipes +
bugfixes
2019-10-10 17:34:43 +02:00
98a652259b test 2019-10-09 00:16:42 +02:00
a8ad0435fa Add test file 2019-10-09 00:11:23 +02:00
41021895ce Minor cleaning 2019-10-08 14:56:45 +02:00
abd9274798 Fix crash in progressive mode + refacto 2019-10-08 00:39:28 +02:00
e16c23c29c Minor refactoring 2019-10-05 00:53:33 +02:00
90adfb42c1 Minor refactoring 2019-10-05 00:32:48 +02:00
c32feb44fc Update template 2019-10-05 00:23:46 +02:00
36878ce9a0 Show item drops 2019-10-05 00:09:29 +02:00
8b5de4f7f7 Minor refactoring 2019-10-04 23:11:07 +02:00
9e3997c689 Remove infos from info panel 2019-10-04 22:54:41 +02:00
ce74f49773 Add prev/next buttons for recipes/usages 2019-10-04 22:40:23 +02:00
fb4805ccf0 Add button background only if engine >= 5.1 2019-10-04 21:50:32 +02:00
2d332913c5 Fix messages in craft command 2019-10-04 01:10:55 +02:00
5446e0dbdd Update README + API 2019-10-04 00:45:49 +02:00
16ceea1aaf Fix message 2019-10-04 00:25:10 +02:00
c570fa2337 Tune fs style 2019-10-04 00:20:20 +02:00
5d7bb6de53 Update locale template + fix craft command 2019-10-04 00:17:15 +02:00
138ac1ae2c Add missing textures 2019-10-03 23:58:27 +02:00
502318fb66 Major Interface Overhaul 2019-10-03 23:54:15 +02:00
937f5f0918 Fix aliased items once and for all(?) 2019-10-03 17:02:19 +02:00
b09870a5b2 Fix aliased items 2019-10-01 13:05:53 +02:00
9e48e9ea3e Fix missing recipes (again) 2019-09-30 18:04:50 +02:00
94637c624e Do not override alias func 2019-09-30 16:33:15 +02:00
bb6b3a4ee5 Show recipes for force-alised items 2019-09-30 11:17:01 +02:00
7 changed files with 648 additions and 295 deletions

View File

@ -9,6 +9,7 @@ read_globals = {
"vector", "vector",
"string", "string",
"table", "table",
"ItemStack",
} }
globals = { globals = {

55
API.md
View File

@ -35,7 +35,7 @@ craftguide.register_craft({
}) })
``` ```
Recipes can also be registered in a Minecraft-like way: Recipes can be registered in a Minecraft-like way:
```Lua ```Lua
craftguide.register_craft({ craftguide.register_craft({
@ -53,6 +53,47 @@ craftguide.register_craft({
}) })
``` ```
Multiples recipes can also be registered:
```Lua
craftguide.register_craft({
{
result = "default:mese",
items = {
"default:mese_crystal, default:mese_crystal",
"default:mese_crystal, default:mese_crystal",
}
},
{
result = "default:mese 2",
items = {
"default:mese_crystal, default:mese_crystal",
"default:mese_crystal, default:mese_crystal",
"default:mese_crystal, default:mese_crystal",
}
},
big = {
result = "default:mese 4",
items = {
"default:mese_crystal, default:mese_crystal",
"default:mese_crystal, default:mese_crystal",
"default:mese_crystal, default:mese_crystal",
"default:mese_crystal, default:mese_crystal",
}
},
})
```
Recipes can be registered via an URL (HTTP support is required¹):
```Lua
craftguide.register_craft({
url = https://raw.githubusercontent.com/minetest-mods/craftguide/master/test.json
})
```
--- ---
### Recipe filters ### Recipe filters
@ -169,13 +210,11 @@ You can add a stereotype like so:
craftguide.group_stereotypes.radioactive = "mod:item" craftguide.group_stereotypes.radioactive = "mod:item"
``` ```
#### `craftguide.background` #### `craftguide.http_post_data`
You can set a custom background theme by overriding this variable: If set, the mod will export all the cached recipes and usages in a JSON format
to the given URL (HTTP support is required¹).
```Lua ---
craftguide.background = "<file_name.png>#<middle>"
``` **¹** Add `craftguide` to the `secure.http_mods` or `secure.trusted_mods` setting in `minetest.conf`.
`middle` (number) refers to a 9-sliced background. Read the engine's Lua API documentation for more info.

View File

@ -19,4 +19,4 @@ For developers, `craftguide` also has a [modding API](https://github.com/minetes
Love this mod? Donations are appreciated: https://www.paypal.me/jpg84240 Love this mod? Donations are appreciated: https://www.paypal.me/jpg84240
![Preview2](https://i.imgur.com/IbexMwQ.png) ![Preview2](https://i.imgur.com/w7KMS9G.png)

868
init.lua

File diff suppressed because it is too large Load Diff

View File

@ -5,6 +5,8 @@ Crafting Guide=
Crafting Guide Sign= Crafting Guide Sign=
Usage @1 of @2= Usage @1 of @2=
Recipe @1 of @2= Recipe @1 of @2=
No recipes=
No usages=
Burning time: @1= Burning time: @1=
Cooking time: @1= Cooking time: @1=
Replaced by @1 on smelting= Replaced by @1 on smelting=
@ -19,5 +21,8 @@ No item to show=
Collect items to reveal more recipes= Collect items to reveal more recipes=
Show recipe(s) of the pointed node= Show recipe(s) of the pointed node=
No node pointed= No node pointed=
You don't know a recipe for this node= You don't know a recipe or usage for this item=
No recipe for this node= No recipe or usage for this item=
Digging=
Digging Chance=
@1 of chance to drop=

8
test.json Normal file
View File

@ -0,0 +1,8 @@
{
"items": [
"default:stone, default:stone, default:stone",
"default:stone, , default:stone",
"default:stone, default:stone, default:stone"
],
"result": "default:cobble 16"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B