Compare commits
	
		
			46 Commits
		
	
	
		
			1.9a
			...
			aa47a70e12
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| aa47a70e12 | |||
|  | a823a200b7 | ||
| 0463712cbb | |||
| 1745cc0ba3 | |||
|  | 3c3733a226 | ||
|  | 55f919ab8f | ||
|  | 937b40aae4 | ||
|  | 97036d9f9a | ||
|  | 17a8c5ddd8 | ||
|  | 9fb5a93b2b | ||
|  | 00a79d26e5 | ||
|  | 303aa3ef91 | ||
|  | 89059f20b6 | ||
|  | 0d2af529ef | ||
|  | 7a7bb8dc51 | ||
|  | 4241c89c17 | ||
|  | 70d38d1c63 | ||
|  | 92c5b1ab8e | ||
|  | 62d2b302ed | ||
|  | 8b4ef8a4b7 | ||
|  | 35b2ecfdc1 | ||
|  | edbed14d9b | ||
|  | 4e4cb0625c | ||
|  | 77dbe040b8 | ||
|  | d6bd17f6b3 | ||
|  | b12502a7da | ||
|  | e707db9ab9 | ||
|  | 270dc19ec1 | ||
|  | c9c2bf03de | ||
|  | ee1eac039e | ||
|  | 4fb4fe1763 | ||
|  | 98a652259b | ||
|  | a8ad0435fa | ||
|  | 41021895ce | ||
|  | abd9274798 | ||
|  | e16c23c29c | ||
|  | 90adfb42c1 | ||
|  | c32feb44fc | ||
|  | 36878ce9a0 | ||
|  | 8b5de4f7f7 | ||
|  | 9e3997c689 | ||
|  | ce74f49773 | ||
|  | fb4805ccf0 | ||
|  | 2d332913c5 | ||
| 66fc47a1c3 | |||
|  | d6542a2697 | 
| @@ -9,6 +9,7 @@ read_globals = { | ||||
| 	"vector", | ||||
| 	"string", | ||||
| 	"table", | ||||
| 	"ItemStack", | ||||
| } | ||||
|  | ||||
| globals = { | ||||
|   | ||||
							
								
								
									
										46
									
								
								API.md
									
									
									
									
									
								
							
							
						
						| @@ -5,6 +5,9 @@ | ||||
| Custom recipes are nonconventional crafts outside the main crafting grid. | ||||
| They can be registered in-game dynamically and have a size beyond 3x3 items. | ||||
|  | ||||
| **Note:** the registration format differs from the default registration format in everything. | ||||
| The width is automatically calculated depending where you place the commas. Look at the examples attentively. | ||||
|  | ||||
| #### Registering a custom crafting type (example) | ||||
|  | ||||
| ```Lua | ||||
| @@ -35,7 +38,7 @@ craftguide.register_craft({ | ||||
| }) | ||||
| ``` | ||||
|  | ||||
| Recipes can also be registered in a Minecraft-like way: | ||||
| Recipes can be registered in a Minecraft-like way: | ||||
|  | ||||
| ```Lua | ||||
| craftguide.register_craft({ | ||||
| @@ -53,6 +56,38 @@ 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", | ||||
| 		} | ||||
| 	}, | ||||
|  | ||||
| 	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 from a given URL containing a JSON file (HTTP support is required¹): | ||||
|  | ||||
| ```Lua | ||||
| craftguide.register_craft({ | ||||
| 	url = "https://raw.githubusercontent.com/minetest-mods/craftguide/master/test.json" | ||||
| }) | ||||
| ``` | ||||
|  | ||||
| --- | ||||
|  | ||||
| ### Recipe filters | ||||
| @@ -168,3 +203,12 @@ You can add a stereotype like so: | ||||
| ```Lua | ||||
| craftguide.group_stereotypes.radioactive = "mod:item" | ||||
| ``` | ||||
|  | ||||
| #### `craftguide.export_url` | ||||
|  | ||||
| If set, the mod will export all the cached recipes and usages in a JSON format | ||||
| to the given URL (HTTP support is required¹). | ||||
|  | ||||
| --- | ||||
|  | ||||
| **¹** Add `craftguide` to the `secure.http_mods` or `secure.trusted_mods` setting in `minetest.conf`. | ||||
|   | ||||
| @@ -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 | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -21,3 +21,6 @@ Show recipe(s) of the pointed node=Mostra la ricetta del nodo puntato | ||||
| No node pointed=Nessun nodo puntato | ||||
| You don't know a recipe for this node=Non conosci una ricetta per questo nodo | ||||
| No recipe for this node=Nessuna ricetta per questo nodo | ||||
| Digging=Scavando | ||||
| Digging Chance=Probabilità di scavare | ||||
| @1 of chance to drop=@1 di probabilità di rilascio | ||||
|   | ||||
| @@ -5,6 +5,8 @@ Crafting Guide= | ||||
| Crafting Guide Sign= | ||||
| Usage @1 of @2= | ||||
| Recipe @1 of @2= | ||||
| No recipes= | ||||
| No usages= | ||||
| Burning time: @1= | ||||
| Cooking time: @1= | ||||
| Replaced by @1 on smelting= | ||||
| @@ -19,14 +21,8 @@ No item to show= | ||||
| Collect items to reveal more recipes= | ||||
| Show recipe(s) of the pointed node= | ||||
| No node pointed= | ||||
| You don't know a recipe or usage for this node= | ||||
| No recipe or usage for this node= | ||||
| Node= | ||||
| Entity= | ||||
| Craftitem= | ||||
| Tool= | ||||
| Name= | ||||
| Type= | ||||
| Groups= | ||||
| Unknown= | ||||
| None= | ||||
| You don't know a recipe or usage for this item= | ||||
| No recipe or usage for this item= | ||||
| Digging= | ||||
| Digging Chance= | ||||
| @1 of chance to drop= | ||||
|   | ||||
							
								
								
									
										8
									
								
								test.json
									
									
									
									
									
										Normal 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" | ||||
| } | ||||
| Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 5.8 KiB | 
							
								
								
									
										
											BIN
										
									
								
								textures/craftguide_clear_icon_hover.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 4.6 KiB | 
							
								
								
									
										
											BIN
										
									
								
								textures/craftguide_next_icon_hover.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 2.8 KiB | 
| Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 5.7 KiB | 
							
								
								
									
										
											BIN
										
									
								
								textures/craftguide_search_icon_hover.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 7.1 KiB |