Translations:Modding:Creating Recipes/37/en

From Vintage Story Wiki
Revision as of 05:53, 14 June 2022 by FuzzyBot (talk | contribs) (Importing a new version from external source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Restricting to a specific class

The recipe can be limited to a specific class. This can be done by adding requiresTrait. This is recipe for sewing kit:

{
	ingredientPattern: "FFS,FF_",
	requiresTrait: "clothier",
	ingredients: {
		"F": { type: "item", code: "flaxtwine" },
		"S": { type: "item", code: "stick" }
	},
	width: 3,
	height: 2,
	output: { type: "item", code: "sewingkit"  }
}