Variable: define - ScreamingSandals/SimpleInventories GitHub Wiki
define
This variable can define new placeholders! There are more ways how to use this:
Yaml:
# example definitions
- define: "%myplaceholder% as Hello World"
- define: "%myplaceholder.myparameter.$% as Hello $"
- define: "%myplaceholder.other.$.$% as %otherplaceholder.$.otherparameter.$"
- define %otherplaceholder% as bronze
# usage
- STONE for 1 of %otherplaceholder%
Note that you can't do this:
- define: %placeholder%
stack: STONE # this will be ignored
You must do this:
- define: %placeholder%
- stack: STONE # stack can't have same hyphen as definition
Groovy:
inventory {
// example definitions
define '%myplaceholder% as Hello World'
define '%myplaceholder.myparameter.$% as Hello $'
define '%myplaceholder.other.$.$% as %otherplaceholder.$.otherparameter.$'
define '%otherplaceholder% as bronze'
// usage
item('STONE for 1 of %otherplaceholder%')
}