root.hasTech, techType, techConfig
This commit is contained in:
parent
2e22dd9922
commit
82c6d4254c
@ -756,6 +756,29 @@ class Starbound : ISBFileLocator {
|
|||||||
1
|
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.pop()
|
||||||
|
|
||||||
state.load(polyfill, "@starbound.jar!/scripts/polyfill.lua")
|
state.load(polyfill, "@starbound.jar!/scripts/polyfill.lua")
|
||||||
|
Loading…
Reference in New Issue
Block a user