diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/Starbound.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/Starbound.kt index fc71da19..f41ca2d6 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/Starbound.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/Starbound.kt @@ -756,6 +756,29 @@ class Starbound : ISBFileLocator { 1 } + state.setTableFunction("createBiome", this) { args -> + TODO("createBiome") + } + + state.setTableFunction("hasTech", this) { args -> + args.push(args.getString() in techs) + 1 + } + + state.setTableFunction("techType", this) { args -> + val name = args.getString() + val tech = techs[name] ?: throw NoSuchElementException("No such tech $name") + args.push(tech.value.type) + 1 + } + + state.setTableFunction("techConfig", this) { args -> + val name = args.getString() + val tech = techs[name] ?: throw NoSuchElementException("No such tech $name") + tech.push(args) + 1 + } + state.pop() state.load(polyfill, "@starbound.jar!/scripts/polyfill.lua")