root.itemHasTag
This commit is contained in:
parent
31b4ee2c32
commit
eaa0ce58bf
@ -459,6 +459,13 @@ class Starbound : ISBFileLocator {
|
||||
1
|
||||
}
|
||||
|
||||
state.setTableFunction("itemHasTag", this) { args ->
|
||||
val name = args.getString()
|
||||
val tag = args.getString()
|
||||
args.lua.push((items[name]?.value?.itemTags ?: throw NoSuchElementException("No such item $name")).contains(tag))
|
||||
1
|
||||
}
|
||||
|
||||
state.pop()
|
||||
|
||||
state.load(polyfill, "@starbound.jar!/scripts/polyfill.lua")
|
||||
|
Loading…
Reference in New Issue
Block a user