diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/Starbound.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/Starbound.kt index ba6dbe36..59f74b02 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/Starbound.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/Starbound.kt @@ -453,6 +453,12 @@ class Starbound : ISBFileLocator { 1 } + state.setTableFunction("itemTags", this) { args -> + val name = args.getString() + args.lua.pushStrings(items[name]?.value?.itemTags ?: throw NoSuchElementException("No such item $name")) + 1 + } + state.pop() state.load(polyfill, "@starbound.jar!/scripts/polyfill.lua")