diff --git a/build.gradle.kts b/build.gradle.kts
index 90efe8e..c85d539 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,135 +1,16 @@
-import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
-
plugins {
- kotlin("multiplatform") version "1.5.31"
+ base
+
+// val kotlinVersion = "1.5.31"
+// kotlin("jvm") version kotlinVersion apply false
+// kotlin("js") version kotlinVersion apply false
+// kotlin("multiplatform") version kotlinVersion apply false
+
+// id("com.github.node-gradle.node") version "3.1.1" apply false
}
group = "dev.adamko.factoriowebmap"
-version = "1.0-SNAPSHOT"
-
-//repositories {
-// mavenCentral()
-// maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
-//}
-
-
-kotlin {
-
- //
- val hostOs = System.getProperty("os.name")
- val isMingwX64 = hostOs.startsWith("Windows")
- val nativeTarget = when {
- hostOs == "Mac OS X" -> macosX64("native")
- hostOs == "Linux" -> linuxX64("native")
- isMingwX64 -> mingwX64("native")
- else -> throw GradleException(
- "Host OS '$hostOs' is not supported in Kotlin/Native.")
- }
-
- nativeTarget.apply {
- binaries {
- executable {
- entryPoint = "main"
- }
- sharedLib {
- baseName = if (isMingwX64) "libnative" else "native"
- }
- }
- }
- sourceSets {
- val nativeMain by getting {
- dependencies {
- implementation("com.soywiz.korlibs.luak:luak:2.4.3")
- }
- }
- val nativeTest by getting {
- dependencies {
- implementation(kotlin("test"))
-
- }
- }
- }
- //
-
- //
- js(IR) {
- binaries.executable()
- browser {
- commonWebpackConfig {
- cssSupport.enabled = true
- }
- }
-
- useCommonJs()
- nodejs()
-
- compilations.all {
- packageJson {
- customField(
- "scripts", mapOf(
- "build" to "tstl",
- "dev" to "tstl --watch",
- )
- )
- }
- }
-// compilations["main"]
-// .packageJson {
-// customField(
-// "scripts", mapOf(
-// "build" to "tstl",
-// "dev" to "tstl --watch",
-// )
-// )
-// }
- }
-
- sourceSets {
-
- val jsMain by getting {
- kotlin.srcDir("externals02")
-// kotlin.srcDir("externals")
-
- dependencies {
-
- val kotlinWrappersVersion = "0.0.1-pre.254-kotlin-1.5.31"
- implementation(
- project.dependencies.enforcedPlatform(
- "org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:${kotlinWrappersVersion}"
- )
- )
-
- implementation("org.jetbrains.kotlin-wrappers:kotlin-react")
- implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom")
- implementation(npm("react", "17.0.2"))
- implementation(npm("react-dom", "17.0.2"))
-
-// implementation("org.jetbrains.kotlinx:kotlinx-nodejs:0.0.7") {
-// because("https://github.com/Kotlin/kotlinx-nodejs")
-// }
-
- val generateExternals = false
- implementation(npm("typescript-to-lua", "1.0.1", generateExternals = generateExternals))
- implementation(npm("typed-factorio", "0.7.1", generateExternals = generateExternals))
- implementation(npm("lua-types", "2.11.0", generateExternals = generateExternals))
- implementation(npm("typescript", "4.4.3", generateExternals = generateExternals))
- }
- }
-
- val jsTest by getting {
- dependencies {
- implementation(kotlin("test-js"))
- }
- }
- }
- //
-
-}
-
-configure {
- versions.dukat.version = "0.5.8-rc.4-dev.20211001"
-// versions.dukat.version = "0.5.8-rc.4"
-}
+version = "0.0.2"
tasks.wrapper {
gradleVersion = "7.2"
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
new file mode 100644
index 0000000..4f2b743
--- /dev/null
+++ b/buildSrc/build.gradle.kts
@@ -0,0 +1,15 @@
+plugins {
+ `kotlin-dsl`
+}
+
+dependencies {
+
+ val kotlinVersion = "1.5.31"
+
+ implementation(platform("org.jetbrains.kotlin:kotlin-bom:$kotlinVersion"))
+
+ implementation("org.jetbrains.kotlin:kotlin-gradle-plugin")
+
+ implementation("com.github.node-gradle:gradle-node-plugin:3.1.1")
+
+}
diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts
new file mode 100644
index 0000000..3080aa2
--- /dev/null
+++ b/buildSrc/settings.gradle.kts
@@ -0,0 +1,43 @@
+rootProject.name = "buildSrc"
+
+enableFeaturePreview("VERSION_CATALOGS")
+enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
+
+@Suppress("UnstableApiUsage")
+dependencyResolutionManagement {
+
+ repositories {
+ mavenCentral()
+ gradlePluginPortal()
+ maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev/")
+ maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
+
+ // Declare the Node.js download repository
+ ivy {
+ name = "Node.js"
+ setUrl("https://nodejs.org/dist/")
+ patternLayout {
+ artifact("v[revision]/[artifact](-v[revision]-[classifier]).[ext]")
+ }
+ metadataSources {
+ artifact()
+ }
+ content {
+ includeModule("org.nodejs", "node")
+ }
+ }
+ }
+
+ pluginManagement {
+
+ repositories {
+ mavenCentral()
+ gradlePluginPortal()
+ maven {
+ url = uri("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev/")
+ }
+ }
+
+ }
+
+}
diff --git a/buildSrc/src/main/kotlin/dev/adamko/factoriowebmap/archetype/base.gradle.kts b/buildSrc/src/main/kotlin/dev/adamko/factoriowebmap/archetype/base.gradle.kts
new file mode 100644
index 0000000..02ed00f
--- /dev/null
+++ b/buildSrc/src/main/kotlin/dev/adamko/factoriowebmap/archetype/base.gradle.kts
@@ -0,0 +1,15 @@
+package dev.adamko.factoriowebmap.archetype
+
+plugins {
+ base
+}
+
+group = rootProject.group.toString() + "." + project.name
+version = rootProject.version
+
+val projectId by extra(rootProject.name + "-" + project.name)
+val modBuildDir by extra(layout.buildDirectory.dir(projectId).get())
+
+//group = "dev.adamko.factoriowebmap"
+//version = "0.0.1"
+
diff --git a/buildSrc/src/main/kotlin/dev/adamko/factoriowebmap/archetype/kotlin-js.gradle.kts b/buildSrc/src/main/kotlin/dev/adamko/factoriowebmap/archetype/kotlin-js.gradle.kts
new file mode 100644
index 0000000..176bf65
--- /dev/null
+++ b/buildSrc/src/main/kotlin/dev/adamko/factoriowebmap/archetype/kotlin-js.gradle.kts
@@ -0,0 +1,72 @@
+package dev.adamko.factoriowebmap.archetype
+
+import org.gradle.kotlin.dsl.kotlin
+import com.github.gradle.node.npm.task.NpmTask
+import com.github.gradle.node.task.NodeTask
+import org.jetbrains.kotlin.gradle.targets.js.dukat.DtsResolver
+import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.RootPackageJsonTask
+import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinPackageJsonTask
+import org.jetbrains.kotlin.util.parseSpaceSeparatedArgs
+import org.jetbrains.kotlin.gradle.targets.js.npm.NpmProject
+
+
+plugins {
+ kotlin("js")
+ id("com.github.node-gradle.node")
+ id("dev.adamko.factoriowebmap.archetype.base")
+}
+
+kotlin {
+ js(IR) {
+
+ binaries.executable()
+
+ useCommonJs()
+ nodejs()
+//
+//// compilations.all {
+// compilations["main"].apply {
+// packageJson {
+// customField(
+// "scripts",
+// mapOf(
+// "build" to "tstl",
+// "dev" to "tstl --watch",
+// )
+// )
+// }
+// }
+ }
+}
+
+val rootPackageJson by rootProject.tasks.getting(RootPackageJsonTask::class)
+
+//fun NpmTask.setNodeModulesPath(path: String): Unit =
+// environment.put("NODE_PATH", path)
+//
+//fun NpmTask.setNodeModulesPath(folder: File): Unit =
+// setNodeModulesPath(folder.normalize().absolutePath)
+
+
+val nodePath: Directory by extra {
+ val file = rootPackageJson.rootPackageJson.parentFile.normalize()
+ logger.lifecycle("Found root NODE_PATH: $file")
+ project.layout.dir(provider { file }).get()
+}
+
+val nodeModulesDir: Directory by extra {
+ val file = nodePath.dir(NpmProject.NODE_MODULES)
+ logger.lifecycle("Found root NODE_MODULES: $file")
+ file
+}
+
+node {
+ download.set(true)
+ version.set("14.18.0")
+
+ distBaseUrl.set(null as String?) // set by dependencyResolutionManagement
+
+ nodeProjectDir.set(nodePath)
+// nodeProjectDir.set(packageJson.packageJson.parentFile.normalize())
+}
+
diff --git a/buildSrc/src/main/kotlin/dev/adamko/factoriowebmap/archetype/kotlin-jvm.gradle.kts b/buildSrc/src/main/kotlin/dev/adamko/factoriowebmap/archetype/kotlin-jvm.gradle.kts
new file mode 100644
index 0000000..4ad22ae
--- /dev/null
+++ b/buildSrc/src/main/kotlin/dev/adamko/factoriowebmap/archetype/kotlin-jvm.gradle.kts
@@ -0,0 +1,13 @@
+package dev.adamko.factoriowebmap.archetype
+
+plugins {
+ id("dev.adamko.factoriowebmap.archetype.base")
+ kotlin("jvm")
+}
+
+kotlin {
+}
+
+dependencies {
+ implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
+}
diff --git a/modules/mod/build.gradle.kts b/modules/mod/build.gradle.kts
index 2c1a95a..742c8f3 100644
--- a/modules/mod/build.gradle.kts
+++ b/modules/mod/build.gradle.kts
@@ -1,7 +1,8 @@
+import com.github.gradle.node.npm.task.NpmTask
import org.jetbrains.kotlin.util.parseSpaceSeparatedArgs
plugins {
-// kotlin("js")
+ base
id("com.github.node-gradle.node")
}
@@ -11,141 +12,62 @@ version = rootProject.version
node {
download.set(true)
version.set("14.18.0")
-// version.set("16.10.0")
+
+ nodeProjectDir.set(layout.projectDirectory.dir("src"))
+
+ distBaseUrl.set(null as String?) // set root dependencyResolutionManagement
}
-// "@types/node": "ts4.4",
-// 16.10.3 = ts4.4, see https://www.npmjs.com/package/@types/node
+val projectId = rootProject.name + "-" + project.name
+val modBuildDir = layout.buildDirectory.dir(projectId).get()
+//val tsSrcDir = layout.projectDirectory.dir("src")
-//repositories {
-// mavenCentral()
-// maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev/")
-// maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
-//}
-
-//kotlin {
-// js(IR) {
-//
-// binaries.executable()
-//
-// browser {
-// commonWebpackConfig {
-// cssSupport.enabled = true
-// }
-// }
-//
-// useCommonJs()
-// nodejs()
-//
-// compilations["main"].apply {
-// packageJson {
-// customField(
-// "scripts",
-// mapOf(
-// "build" to "tstl",
-// "dev" to "tstl --watch",
-// )
-// )
-// }
-// }
-// }
-//
-// sourceSets {
-// val main by getting {
-//// kotlin.srcDir("externals02")
-//// kotlin.srcDir("externals")
-//
-// dependencies {
-//
-// val kotlinWrappersVersion = "0.0.1-pre.254-kotlin-1.5.31"
-// implementation(
-// project.dependencies.enforcedPlatform(
-// "org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:${kotlinWrappersVersion}"
-// )
-// )
-//
-// implementation("org.jetbrains.kotlin-wrappers:kotlin-react")
-// implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom")
-// implementation(npm("react", "17.0.2"))
-// implementation(npm("react-dom", "17.0.2"))
-//
-//// implementation("org.jetbrains.kotlinx:kotlinx-nodejs:0.0.7") {
-//// because("https://github.com/Kotlin/kotlinx-nodejs")
-//// }
-//
-// val generateExternals = false
-// implementation(npm("typescript-to-lua", "1.0.1", generateExternals = generateExternals))
-// implementation(npm("typed-factorio", "0.7.1", generateExternals = generateExternals))
-// implementation(npm("lua-types", "2.11.0", generateExternals = generateExternals))
-// implementation(npm("typescript", "4.4.3", generateExternals = generateExternals))
-// }
-// }
-//
-// val test by getting {
-// dependencies {
-// implementation(kotlin("test-js"))
-// }
-// }
-// }
-//
-//}
-
-val tstlTask = tasks.register("tstl") {
+val tstlTask = tasks.register("tstl") {
description = "Typescript To Lua"
- group = "${rootProject.group}"
+ group = projectId
+
dependsOn(tasks.npmInstall)
+ execOverrides { standardOutput = System.out }
+
npmCommand.set(listOf("run", "build"))
- args.set(listOf("--", "--outDir", "$buildDir/npm-output"))
-// args.set(listOf("test"))
+
+ val outputDir = modBuildDir.dir("tstl")
+ args.set(parseSpaceSeparatedArgs("-- --outDir $outputDir"))
+ outputs.dir(outputDir)
+
ignoreExitValue.set(false)
-// environment.set(mapOf("MY_CUSTOM_VARIABLE" to "hello"))
- workingDir.set(projectDir)
- execOverrides {
- standardOutput = System.out
- }
- inputs.dir("node_modules")
- inputs.dir(fileTree("src/main/typescript"))
- inputs.files(
- "tsconfig.json",
- "package.json",
- )
- outputs.dir("$buildDir/factorio-web-map/")
+// workingDir.set(tsSrcDir.asFile)
+ inputs.dir(node.nodeProjectDir)
+// inputs.dir("node_modules")
+// inputs.dir(fileTree("src"))
+// inputs.files(
+// "tsconfig.json",
+// "package.json",
+// )
+// outputs.dir("$buildDir/factorio-web-map/")
// outputs.dir("$buildDir/npm-output")
-// outputs.upToDateWhen { true }
+// outputs.upToDateWhen { false }
}
-//sourceSets {
-// val typescript by creating {
-// setBuildDir("src/main/typescript")
-// }
-//}
+val modPackageTask = tasks.register("package") {
+ description = "Package mod"
+ group = projectId
+ dependsOn(tstlTask)
-//dependencies {
-// val kotlinWrappersVersion = "0.0.1-pre.254-kotlin-1.5.31"
-// implementation(
-// project.dependencies.enforcedPlatform(
-// "org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:${kotlinWrappersVersion}"
-// )
-// )
-//
-// implementation("org.jetbrains.kotlin-wrappers:kotlin-react")
-// implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom")
-// implementation(npm("react", "17.0.2"))
-// implementation(npm("react-dom", "17.0.2"))
-//
-// // @types/node
+ from(layout.projectDirectory.dir("src")) {
+ exclude("*.ts")
+ into(rootProject.name)
+ }
+ from(tstlTask) {
+ into(rootProject.name)
+ }
+
+ archiveFileName.set("${rootProject.name}_${rootProject.version}.zip")
+ destinationDirectory.set(modBuildDir.dir("dist"))
+
+}
+
+tasks.build { dependsOn(tstlTask, modPackageTask) }
-//// implementation("org.jetbrains.kotlinx:kotlinx-nodejs:0.0.7") {
-//// because("https://github.com/Kotlin/kotlinx-nodejs")
-//// }
-//
-// val generateExternals = false
-// implementation(npm("typescript-to-lua", "1.0.1", generateExternals = generateExternals))
-// implementation(npm("typed-factorio", "0.7.1", generateExternals = generateExternals))
-// implementation(npm("lua-types", "2.11.0", generateExternals = generateExternals))
-// implementation(npm("typescript", "4.4.3", generateExternals = generateExternals))
-//
-// testImplementation(kotlin("test-js"))
-//}
\ No newline at end of file
diff --git a/modules/mod/data.ts b/modules/mod/data.ts
new file mode 100644
index 0000000..eef4c4c
--- /dev/null
+++ b/modules/mod/data.ts
@@ -0,0 +1 @@
+// require("item")
\ No newline at end of file
diff --git a/modules/mod/events.lua b/modules/mod/events.lua
deleted file mode 100644
index ef8f222..0000000
--- a/modules/mod/events.lua
+++ /dev/null
@@ -1,9 +0,0 @@
---[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
-script.on_event(
- {defines.events.on_pre_build, defines.events.on_player_dropped_item},
- function(e)
- log(
- (("player " .. tostring(e.player_index)) .. " dropped item, tick:") .. tostring(e.tick)
- )
- end
-)
diff --git a/modules/mod/item.ts b/modules/mod/item.ts
new file mode 100644
index 0000000..d39f9dd
--- /dev/null
+++ b/modules/mod/item.ts
@@ -0,0 +1,12 @@
+import * as util from "util";
+import { Data, Mods } from "typed-factorio/data/types"
+
+
+declare const data: Data
+declare const mods: Mods
+
+let fireArmour = util.table.deepcopy(data.raw["armor"]["heavy-armor"])
+
+fireArmour.name = "fire-armour"
+fireArmour.icon
+
diff --git a/modules/mod/settings.gradle.kts b/modules/mod/settings.gradle.kts
deleted file mode 100644
index 90bb0a9..0000000
--- a/modules/mod/settings.gradle.kts
+++ /dev/null
@@ -1,3 +0,0 @@
-rootProject.name = "factorio-web-map-mod"
-
-rootProject.description = "Factorio Web Map mod"
diff --git a/modules/mod/src/changelog.txt b/modules/mod/src/changelog.txt
new file mode 100644
index 0000000..956eb6b
--- /dev/null
+++ b/modules/mod/src/changelog.txt
@@ -0,0 +1,4 @@
+---------------------------------------------------------------------------------------------------
+Version: 0.0.1
+ Features:
+ - Factorio Web Map
diff --git a/modules/mod/src/control.ts b/modules/mod/src/control.ts
new file mode 100644
index 0000000..544678b
--- /dev/null
+++ b/modules/mod/src/control.ts
@@ -0,0 +1 @@
+require("events")
\ No newline at end of file
diff --git a/modules/mod/src/events.ts b/modules/mod/src/events.ts
new file mode 100644
index 0000000..dc2b9b5
--- /dev/null
+++ b/modules/mod/src/events.ts
@@ -0,0 +1,19 @@
+script.on_event(
+ [defines.events.on_pre_build, defines.events.on_player_dropped_item],
+ (e: OnPreBuildEvent | OnPlayerDroppedItemEvent) => {
+ game.print("player " + e.player_index + " dropped item, tick:" + e.tick)
+ }
+);
+
+script.on_event(
+ defines.events.on_tick,
+ (e: OnTickEvent) => {
+ if (e.tick % 60 == 0) {
+ game.print("test mod tick: " + e.tick)
+ }
+ }
+);
+
+script.on_load(() => {
+ game.print("loaded Factorio Web Map!")
+});
diff --git a/modules/mod/src/info.json b/modules/mod/src/info.json
new file mode 100644
index 0000000..f24f7d0
--- /dev/null
+++ b/modules/mod/src/info.json
@@ -0,0 +1,8 @@
+{
+ "name": "factorio-web-map",
+ "version": "0.0.1",
+ "title": "Factorio Web Map",
+ "author": "fredthedeadhead",
+ "factorio_version": "1.1",
+ "dependencies": []
+}
diff --git a/modules/mod/src/main/typescript/events.ts b/modules/mod/src/main/typescript/events.ts
deleted file mode 100644
index c8453b4..0000000
--- a/modules/mod/src/main/typescript/events.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-script.on_event(
- [defines.events.on_pre_build, defines.events.on_player_dropped_item],
- (e: OnPreBuildEvent | OnPlayerDroppedItemEvent) => {
- log("player " + e.player_index + " dropped item, tick:" + e.tick)
- }
-)
\ No newline at end of file
diff --git a/modules/mod/package-lock.json b/modules/mod/src/package-lock.json
similarity index 100%
rename from modules/mod/package-lock.json
rename to modules/mod/src/package-lock.json
diff --git a/modules/mod/package.json b/modules/mod/src/package.json
similarity index 89%
rename from modules/mod/package.json
rename to modules/mod/src/package.json
index dc0fc6b..8690038 100644
--- a/modules/mod/package.json
+++ b/modules/mod/src/package.json
@@ -16,7 +16,6 @@
},
"dependencies": {
"react": "17.0.2",
- "react-dom": "17.0.2",
"typescript-to-lua": "1.0.1",
"typed-factorio": "0.7.1",
"lua-types": "2.11.0",
@@ -24,5 +23,8 @@
},
"peerDependencies": {},
"optionalDependencies": {},
- "bundledDependencies": []
+ "bundledDependencies": [],
+ "//": {
+ "react-dom": "17.0.2"
+ }
}
diff --git a/modules/mod/src/thumbnail.png b/modules/mod/src/thumbnail.png
new file mode 100644
index 0000000..d443178
Binary files /dev/null and b/modules/mod/src/thumbnail.png differ
diff --git a/modules/mod/tsconfig.json b/modules/mod/src/tsconfig.json
similarity index 100%
rename from modules/mod/tsconfig.json
rename to modules/mod/src/tsconfig.json
diff --git a/modules/mod/test/docker-compose.yml b/modules/mod/test/docker-compose.yml
new file mode 100644
index 0000000..5359a78
--- /dev/null
+++ b/modules/mod/test/docker-compose.yml
@@ -0,0 +1,19 @@
+version: "3.9"
+services:
+ factorio:
+ image: factoriotools/factorio:1.1.41
+# logging:
+# driver: "json-file"
+ container_name: "factorio"
+ restart: "unless-stopped"
+ ports:
+ - "34197:34197/udp"
+ - "27015:27015/tcp"
+ volumes:
+ - "./data:/factorio"
+# environment:
+# - PUID=1000
+# - PGID=1000
+# - UPDATE_MODS_ON_START=true
+# - USERNAME=FactorioUsername
+# - TOKEN=FactorioToken
diff --git a/modules/mod2/build.gradle.kts b/modules/mod2/build.gradle.kts
new file mode 100644
index 0000000..c981bd1
--- /dev/null
+++ b/modules/mod2/build.gradle.kts
@@ -0,0 +1,159 @@
+import com.github.gradle.node.npm.task.NpmTask
+import com.github.gradle.node.task.NodeTask
+import org.gradle.api.internal.project.ProjectInternal
+import org.jetbrains.kotlin.gradle.targets.js.dukat.DukatRunner
+import org.jetbrains.kotlin.gradle.targets.js.dukat.ExternalsOutputFormat
+import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.RootPackageJsonTask
+import org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinPackageJsonTask
+import org.jetbrains.kotlin.util.parseSpaceSeparatedArgs
+import org.jetbrains.kotlin.gradle.targets.js.npm.NpmProject
+import org.jetbrains.kotlin.gradle.targets.js.npm.npmProject
+
+plugins {
+ id("dev.adamko.factoriowebmap.archetype.kotlin-js")
+}
+
+//group = rootProject.group.toString() + "." + project.name
+//version = rootProject.version
+//
+//val projectId = rootProject.name + "-" + project.name
+val projectId: String by project.extra
+val modBuildDir: Directory = layout.buildDirectory.dir(projectId).get()
+val nodeModulesDir: Directory by project.extra
+
+kotlin {
+
+ js(IR) {
+
+ binaries.executable()
+
+ useCommonJs()
+ nodejs()
+
+// compilations.all {
+ compilations["main"].apply {
+ packageJson {
+ customField(
+ "scripts",
+ mapOf(
+ "build" to "tstl",
+ "dev" to "tstl --watch",
+ )
+ )
+ }
+ }
+
+
+// kotlin.srcDir("src/main/myKotlin")
+// }
+ sourceSets["main"].apply {
+// sourceSets.create("dukat").apply {
+ kotlin.srcDir(project.layout.projectDirectory.dir("dukat-custom"))
+ }
+
+
+// sourceSets {
+// all {
+// languageSettings.optIn("kotlin.ExperimentalStdlibApi")
+// languageSettings.optIn("kotlin.time.ExperimentalTime")
+// }
+// }
+ }
+}
+
+dependencies {
+ val kotlinWrappersVersion = "0.0.1-pre.254-kotlin-1.5.31"
+ implementation(
+ project.dependencies.enforcedPlatform(
+ "org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:${kotlinWrappersVersion}"
+ )
+ )
+
+ implementation("org.jetbrains.kotlin-wrappers:kotlin-react")
+// implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom")
+ implementation(npm("react", "17.0.2"))
+// implementation(npm("react-dom", "17.0.2"))
+
+// implementation("org.jetbrains.kotlinx:kotlinx-nodejs:0.0.7") {
+// because("https://github.com/Kotlin/kotlinx-nodejs")
+// }
+
+ val generateExternals = false
+ implementation(npm("typescript-to-lua", "1.0.1", generateExternals = generateExternals))
+ implementation(npm("typed-factorio", "0.7.1", generateExternals = true))
+ implementation(npm("lua-types", "2.11.0", generateExternals = generateExternals))
+ implementation(npm("typescript", "4.4.3", generateExternals = generateExternals))
+
+ testImplementation(kotlin("test-js"))
+}
+
+//val rootPackageJson: RootPackageJsonTask by tasks.getting(RootPackageJsonTask::class)
+//val rootPackageJson by rootProject.tasks.getting(RootPackageJsonTask::class)
+//val packageJson by rootProject.tasks.getting(KotlinPackageJsonTask::class)
+//val packageJson : RootPackageJsonTask by tasks.named(RootPackageJsonTask.NAME)
+
+//node {
+// download.set(true)
+// version.set("14.18.0")
+//
+// distBaseUrl.set(null as String?) // set by dependencyResolutionManagement
+//
+// nodeProjectDir.set(rootPackageJson.rootPackageJson.parentFile.normalize())
+//// nodeProjectDir.set(packageJson.packageJson.parentFile.normalize())
+//}
+
+
+//fun NpmTask.setNodeModulesPath(path: String): Unit =
+// environment.put("NODE_PATH", path)
+//
+//fun NpmTask.setNodeModulesPath(folder: File): Unit =
+// setNodeModulesPath(folder.normalize().absolutePath)
+
+tasks {
+ register("tstl") {
+ description = "Typescript To Lua"
+ group = projectId
+
+ dependsOn(build)
+
+// setNodeModulesPath(node.nodeProjectDir.dir("node_modules").get().asFile)
+// setNodeModulesPath(node.nodeProjectDir.dir(NpmProject.NODE_MODULES).get().asFile)
+ val nodeModulesDir: Directory by project.extra
+ environment.put("NODE_PATH", nodeModulesDir.asFile.absolutePath)
+
+ execOverrides { standardOutput = System.out }
+
+ npmCommand.set(listOf("run", "build"))
+
+ val outputDir = modBuildDir.dir("tstl")
+ args.set(parseSpaceSeparatedArgs("-- --outDir $outputDir"))
+ outputs.dir(outputDir)
+
+ ignoreExitValue.set(false)
+ inputs.dir(rootProject.layout.buildDirectory.dir("js"))
+ }
+
+ register("dukat-typed-factorio") {
+ group = projectId
+
+ val npmProject = kotlin.js().compilations["main"].npmProject
+
+ val files = nodeModulesDir.dir("typed-factorio")
+ .asFileTree
+ .filter { it.extension in setOf("ts", "d.ts") }
+ .files
+
+ logger.lifecycle("Converting typed-factorio files: ${files.joinToString { it.name }}")
+
+ val runner = DukatRunner(
+ npmProject,
+ files,
+ ExternalsOutputFormat.SOURCE,
+ project.layout.projectDirectory.dir("dukat-custom").asFile,
+ )
+ val services = (project as ProjectInternal).services
+ doLast {
+ runner.execute(services)
+ }
+ }
+}
diff --git a/modules/mod2/dukat-custom/5.2-only.bit32.module_lua-types.kt b/modules/mod2/dukat-custom/5.2-only.bit32.module_lua-types.kt
new file mode 100644
index 0000000..92589f5
--- /dev/null
+++ b/modules/mod2/dukat-custom/5.2-only.bit32.module_lua-types.kt
@@ -0,0 +1,41 @@
+@file:JsQualifier("bit32")
+@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
+package bit32
+
+import kotlin.js.*
+import org.khronos.webgl.*
+import org.w3c.dom.*
+import org.w3c.dom.events.*
+import org.w3c.dom.parsing.*
+import org.w3c.dom.svg.*
+import org.w3c.dom.url.*
+import org.w3c.fetch.*
+import org.w3c.files.*
+import org.w3c.notifications.*
+import org.w3c.performance.*
+import org.w3c.workers.*
+import org.w3c.xhr.*
+
+external fun arshift(x: Number, disp: Number): Number
+
+external fun band(vararg operands: Number): Number
+
+external fun bnot(x: Number): Number
+
+external fun bor(vararg operands: Number): Number
+
+external fun btest(vararg operands: Number): Boolean
+
+external fun bxor(vararg operands: Number): Number
+
+external fun extract(n: Number, field: Number, width: Number = definedExternally): Number
+
+external fun replace(n: Number, v: Number, field: Number, width: Number = definedExternally): Number
+
+external fun lrotate(x: Number, disp: Number): Number
+
+external fun lshift(x: Number, disp: Number): Number
+
+external fun rrotate(x: Number, disp: Number): Number
+
+external fun rshift(x: Number, disp: Number): Number
\ No newline at end of file
diff --git a/modules/mod2/dukat-custom/5.2-only.module_lua-types.kt b/modules/mod2/dukat-custom/5.2-only.module_lua-types.kt
new file mode 100644
index 0000000..85d3c1e
--- /dev/null
+++ b/modules/mod2/dukat-custom/5.2-only.module_lua-types.kt
@@ -0,0 +1,17 @@
+@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
+
+import kotlin.js.*
+import org.khronos.webgl.*
+import org.w3c.dom.*
+import org.w3c.dom.events.*
+import org.w3c.dom.parsing.*
+import org.w3c.dom.svg.*
+import org.w3c.dom.url.*
+import org.w3c.fetch.*
+import org.w3c.files.*
+import org.w3c.notifications.*
+import org.w3c.performance.*
+import org.w3c.workers.*
+import org.w3c.xhr.*
+
+external fun collectgarbage(opt: String /* "count" | "generational" | "incremental" */): dynamic /* Unit */
\ No newline at end of file
diff --git a/modules/mod2/dukat-custom/5.2-plus-or-jit.module_lua-types.kt b/modules/mod2/dukat-custom/5.2-plus-or-jit.module_lua-types.kt
new file mode 100644
index 0000000..f68ae03
--- /dev/null
+++ b/modules/mod2/dukat-custom/5.2-plus-or-jit.module_lua-types.kt
@@ -0,0 +1,37 @@
+@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
+
+import kotlin.js.*
+import org.khronos.webgl.*
+import org.w3c.dom.*
+import org.w3c.dom.events.*
+import org.w3c.dom.parsing.*
+import org.w3c.dom.svg.*
+import org.w3c.dom.url.*
+import org.w3c.fetch.*
+import org.w3c.files.*
+import org.w3c.notifications.*
+import org.w3c.performance.*
+import org.w3c.workers.*
+import org.w3c.xhr.*
+
+external fun load(chunk: String, chunkname: String = definedExternally, mode: String /* "b" | "t" | "bt" */ = definedExternally, env: Any? = definedExternally): dynamic /* JsTuple<() -> Any> | JsTuple */
+
+external fun load(chunk: String): dynamic /* JsTuple<() -> Any> | JsTuple */
+
+external fun load(chunk: String, chunkname: String = definedExternally): dynamic /* JsTuple<() -> Any> | JsTuple */
+
+external fun load(chunk: String, chunkname: String = definedExternally, mode: String /* "b" | "t" | "bt" */ = definedExternally): dynamic /* JsTuple<() -> Any> | JsTuple */
+
+external fun load(chunk: () -> String?, chunkname: String = definedExternally, mode: String /* "b" | "t" | "bt" */ = definedExternally, env: Any? = definedExternally): dynamic /* JsTuple<() -> Any> | JsTuple */
+
+external fun load(chunk: () -> String?): dynamic /* JsTuple<() -> Any> | JsTuple */
+
+external fun load(chunk: () -> String?, chunkname: String = definedExternally): dynamic /* JsTuple<() -> Any> | JsTuple */
+
+external fun load(chunk: () -> String?, chunkname: String = definedExternally, mode: String /* "b" | "t" | "bt" */ = definedExternally): dynamic /* JsTuple<() -> Any> | JsTuple */
+
+external fun loadfile(filename: String = definedExternally, mode: String /* "b" | "t" | "bt" */ = definedExternally, env: Any? = definedExternally): dynamic /* JsTuple<() -> Any> | JsTuple */
+
+external fun , R, E> xpcall(f: (self: This, args: Args) -> R, msgh: (self: Unit, err: Any) -> E, context: This, vararg args: Args): dynamic /* JsTuple | JsTuple */
+
+external fun , R, E> xpcall(f: (self: Unit, args: Args) -> R, msgh: (err: Any) -> E, vararg args: Args): dynamic /* JsTuple | JsTuple */
\ No newline at end of file
diff --git a/modules/mod2/dukat-custom/5.2-plus.module_lua-types.kt b/modules/mod2/dukat-custom/5.2-plus.module_lua-types.kt
new file mode 100644
index 0000000..b7e567f
--- /dev/null
+++ b/modules/mod2/dukat-custom/5.2-plus.module_lua-types.kt
@@ -0,0 +1,22 @@
+@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
+
+import kotlin.js.*
+import org.khronos.webgl.*
+import org.w3c.dom.*
+import org.w3c.dom.events.*
+import org.w3c.dom.parsing.*
+import org.w3c.dom.svg.*
+import org.w3c.dom.url.*
+import org.w3c.fetch.*
+import org.w3c.files.*
+import org.w3c.notifications.*
+import org.w3c.performance.*
+import org.w3c.workers.*
+import org.w3c.xhr.*
+import tsstdlib.Record
+
+external var _ENV: Record
+
+external fun collectgarbage(opt: String /* "isrunning" */): Boolean
+
+external fun module(name: String, vararg options: Function<*>)
\ No newline at end of file
diff --git a/modules/mod2/dukat-custom/builtin-types.module_typed-factorio.kt b/modules/mod2/dukat-custom/builtin-types.module_typed-factorio.kt
new file mode 100644
index 0000000..f03d9c3
--- /dev/null
+++ b/modules/mod2/dukat-custom/builtin-types.module_typed-factorio.kt
@@ -0,0 +1,33 @@
+@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
+
+import kotlin.js.*
+import org.khronos.webgl.*
+import org.w3c.dom.*
+import org.w3c.dom.events.*
+import org.w3c.dom.parsing.*
+import org.w3c.dom.svg.*
+import org.w3c.dom.url.*
+import org.w3c.fetch.*
+import org.w3c.files.*
+import org.w3c.notifications.*
+import org.w3c.performance.*
+import org.w3c.workers.*
+import org.w3c.xhr.*
+
+typealias float = Number
+
+typealias double = Number
+
+typealias int = Number
+
+typealias int8 = Number
+
+typealias uint = Number
+
+typealias uint8 = Number
+
+typealias uint16 = Number
+
+typealias uint64 = Number
+
+typealias table = Any?
\ No newline at end of file
diff --git a/modules/mod2/dukat-custom/classes.module_typed-factorio.kt b/modules/mod2/dukat-custom/classes.module_typed-factorio.kt
new file mode 100644
index 0000000..1f051a8
--- /dev/null
+++ b/modules/mod2/dukat-custom/classes.module_typed-factorio.kt
@@ -0,0 +1,5723 @@
+@file:Suppress("INTERFACE_WITH_SUPERCLASS", "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS")
+
+import kotlin.js.*
+import org.khronos.webgl.*
+import org.w3c.dom.*
+import org.w3c.dom.events.*
+import org.w3c.dom.parsing.*
+import org.w3c.dom.svg.*
+import org.w3c.dom.url.*
+import org.w3c.fetch.*
+import org.w3c.files.*
+import org.w3c.notifications.*
+import org.w3c.performance.*
+import org.w3c.workers.*
+import org.w3c.xhr.*
+import tsstdlib.Omit
+import tsstdlib.Record
+import defines.wire_type
+import defines.circuit_connector_id
+import tsstdlib.Position
+import defines.inventory
+import defines.direction
+import defines.shooting
+import defines.gui_type
+import defines.control_behavior.type
+import defines.rail_direction
+import defines.rail_connection_direction
+import defines.logistic_member_index
+import defines.signal_state
+import defines.chain_signal_state
+import defines.entity_status
+import defines.flow_precision_index
+import defines.difficulty
+import tsstdlib.Extract
+import defines.control_behavior.inserter.circuit_mode_of_operation
+import defines.control_behavior.inserter.hand_read_mode
+import defines.deconstruction_item.entity_filter_mode
+import defines.deconstruction_item.tile_filter_mode
+import defines.deconstruction_item.tile_selection_mode
+import defines.control_behavior.logistic_container.circuit_mode_of_operation as _defines_control_behavior_logistic_container_circuit_mode_of_operation
+import defines.logistic_mode
+import defines.control_behavior.mining_drill.resource_read_mode
+import defines.input_action
+import defines.controllers
+import defines.alert_type
+import defines.render_mode
+import defines.rich_text_setting
+import defines.build_check_type
+import defines.chunk_generated_status
+import defines.train_state
+import defines.control_behavior.transport_belt.content_read_mode
+import defines.group_state
+
+external interface LuaAISettings {
+ var allow_destroy_when_commands_fail: Boolean
+ var allow_try_return_to_spawner: Boolean
+ var do_separation: Boolean
+ var path_resolution_modifier: int8
+ var valid: Boolean
+ var object_name: String /* "LuaAISettings" */
+ fun help(): String
+}
+
+external interface LuaAccumulatorControlBehavior : LuaControlBehavior {
+ var output_signal: SignalID
+ var valid: Boolean
+ var object_name: String /* "LuaAccumulatorControlBehavior" */
+ fun help(): String
+}
+
+external interface LuaAchievementPrototype {
+ var name: String
+ var order: String
+ var localised_name: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var localised_description: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var allowed_without_fight: Boolean
+ var hidden: Boolean
+ var valid: Boolean
+ var object_name: String /* "LuaAchievementPrototype" */
+ fun help(): String
+}
+
+external interface LuaAmmoCategoryPrototype {
+ var name: String
+ var order: String
+ var localised_name: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var localised_description: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var bonus_gui_order: String
+ var valid: Boolean
+ var object_name: String /* "LuaAmmoCategoryPrototype" */
+ fun help(): String
+}
+
+external interface LuaArithmeticCombinatorControlBehavior : LuaCombinatorControlBehavior {
+ var parameters: ArithmeticCombinatorParameters
+ var valid: Boolean
+ var object_name: String /* "LuaArithmeticCombinatorControlBehavior" */
+ fun help(): String
+}
+
+external interface LuaAutoplaceControlPrototype {
+ var name: String
+ var order: String
+ var localised_name: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var localised_description: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var richness: Boolean
+ var control_order: String
+ var category: String
+ var valid: Boolean
+ var object_name: String /* "LuaAutoplaceControlPrototype" */
+ fun help(): String
+}
+
+external interface `T$0` {
+ var player_index: uint
+ var message: String
+}
+
+external interface `T$1` {
+ var item_stack: LuaItemStack
+ var player_index: uint
+ var recipe: LuaRecipe
+}
+
+external interface `T$2` {
+ var player_index: uint
+ var entity: LuaEntity
+ var from_player: Boolean
+}
+
+external interface `T$3` {
+ var entity: LuaEntity
+}
+
+external interface `T$4` {
+ var player_index: uint
+ var market: LuaEntity
+ var offer_index: uint
+ var count: uint
+}
+
+external interface `T$5` {
+ var entity: LuaEntity
+ var tags: Tags?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$6` {
+ var surface_index: uint
+ var tiles: Array
+}
+
+external interface `T$7` {
+ var is_simulation: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+ var is_tutorial: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+ var campaign_name: String?
+ get() = definedExternally
+ set(value) = definedExternally
+ var level_name: String
+ var mod_name: String?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface LuaBootstrap {
+ fun on_init(f: (() -> Unit)?)
+ fun on_load(f: (() -> Unit)?)
+ fun on_configuration_changed(f: ((param1: ConfigurationChangedData) -> Unit)?)
+ fun on_event(event: E, f: ((data: Any) -> Unit)?, filters: Array = definedExternally)
+ fun on_event(event: E, f: ((data: Any) -> Unit)?)
+ fun on_event(event: Array, f: ((data: Any) -> Unit)?)
+ fun on_event(event: String, f: ((data: CustomInputEvent) -> Unit)?)
+ fun on_nth_tick(tick: uint?, f: ((param1: NthTickEventData) -> Unit)?)
+ fun on_nth_tick(tick: Array?, f: ((param1: NthTickEventData) -> Unit)?)
+ fun register_on_entity_destroyed(entity: LuaEntity): uint64
+ fun generate_event_name(): uint /* uint & `T$93` */
+ fun get_event_handler(event: E): (data: Any) -> Unit
+ fun get_event_handler(event: String): (data: CustomInputEvent) -> Unit
+ fun get_event_order(): String
+ fun set_event_filter(event: E, filters: Array?)
+ fun get_event_filter(event: E): Array?
+ fun raise_event(event: E, data: Omit)
+ fun raise_console_chat(params: `T$0`)
+ fun raise_player_crafted_item(params: `T$1`)
+ fun raise_player_fast_transferred(params: `T$2`)
+ fun raise_biter_base_built(params: `T$3`)
+ fun raise_market_item_purchased(params: `T$4`)
+ fun raise_script_built(params: `T$3`)
+ fun raise_script_destroy(params: `T$3`)
+ fun raise_script_revive(params: `T$5`)
+ fun raise_script_set_tiles(params: `T$6`)
+ var mod_name: String
+ var level: `T$7`
+ var active_mods: Record
+ var object_name: String /* "LuaBootstrap" */
+}
+
+external interface LuaBurner {
+ var owner: dynamic /* LuaEntity | LuaEquipment */
+ get() = definedExternally
+ set(value) = definedExternally
+ var inventory: LuaInventory
+ var burnt_result_inventory: LuaInventory
+ var heat: double
+ var heat_capacity: double
+ var remaining_burning_fuel: double
+ var currently_burning: LuaItemPrototype
+ var fuel_categories: Record
+ var valid: Boolean
+ var object_name: String /* "LuaBurner" */
+ fun help(): String
+}
+
+external interface `T$8` {
+ var minimum_intensity: float
+ var maximum_intensity: float
+ var derivation_change_frequency: float
+ var derivation_change_deviation: float
+ var border_fix_speed: float
+ var minimum_light_size: float
+ var light_intensity_to_size_coefficient: float
+ var color: dynamic /* ColorTable | JsTuple */
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface LuaBurnerPrototype {
+ var emissions: double
+ var render_no_network_icon: Boolean
+ var render_no_power_icon: Boolean
+ var effectivity: double
+ var fuel_inventory_size: uint
+ var burnt_inventory_size: uint
+ var smoke: Array
+ var light_flicker: `T$8`
+ var fuel_categories: Record
+ var valid: Boolean
+ var object_name: String /* "LuaBurnerPrototype" */
+ fun help(): String
+}
+
+external interface LuaChunkIterator : LuaIterable {
+ @nativeInvoke
+ operator fun invoke(): ChunkPositionAndArea?
+ var valid: Boolean
+ var object_name: String /* "LuaChunkIterator" */
+ fun help(): String
+}
+
+external interface LuaCircuitNetwork {
+ fun get_signal(signal: SignalID): int
+ var entity: LuaEntity
+ var wire_type: wire_type
+ var circuit_connector_id: circuit_connector_id
+ var signals: Array?
+ var network_id: uint
+ var connected_circuit_count: uint
+ var valid: Boolean
+ var object_name: String /* "LuaCircuitNetwork" */
+ fun help(): String
+}
+
+external interface LuaCombinatorControlBehavior : LuaControlBehavior {
+ fun get_signal_last_tick(signal: SignalID): int?
+ var signals_last_tick: Array
+}
+
+external interface LuaCommandProcessor {
+ fun add_command(name: String, help: Any /* JsTuple */, _function: (param1: CustomCommandData) -> Unit)
+ fun add_command(name: String, help: String, _function: (param1: CustomCommandData) -> Unit)
+ fun add_command(name: String, help: Number, _function: (param1: CustomCommandData) -> Unit)
+ fun remove_command(name: String): Boolean
+ var commands: Record | String | Number */>
+ var game_commands: Record | String | Number */>
+ var object_name: String /* "LuaCommandProcessor" */
+}
+
+external interface LuaConstantCombinatorControlBehavior : LuaControlBehavior {
+ fun set_signal(index: uint, signal: Signal)
+ fun get_signal(index: uint): Signal
+ var parameters: Array
+ var enabled: Boolean
+ var signals_count: uint
+ var valid: Boolean
+ var object_name: String /* "LuaConstantCombinatorControlBehavior" */
+ fun help(): String
+}
+
+external interface LuaContainerControlBehavior : LuaControlBehavior {
+ var valid: Boolean
+ var object_name: String /* "LuaContainerControlBehavior" */
+ fun help(): String
+}
+
+external interface BaseControlSetGuiArrow {
+ var type: String /* "nowhere" | "goal" | "entity_info" | "active_window" | "entity" | "position" | "crafting_queue" | "item_stack" */
+}
+
+external interface EntityControlSetGuiArrow : BaseControlSetGuiArrow {
+ override var type: String /* "entity" */
+ var entity: LuaEntity
+}
+
+external interface PositionControlSetGuiArrow : BaseControlSetGuiArrow {
+ override var type: String /* "position" */
+ var position: Position
+}
+
+external interface CraftingQueueControlSetGuiArrow : BaseControlSetGuiArrow {
+ override var type: String /* "crafting_queue" */
+ var crafting_queueindex: uint
+}
+
+external interface ItemStackControlSetGuiArrow : BaseControlSetGuiArrow {
+ override var type: String /* "item_stack" */
+ var inventory_index: inventory
+ var item_stack_index: uint
+ var source: String /* "player" | "target" */
+}
+
+external interface OtherControlSetGuiArrow : BaseControlSetGuiArrow {
+ override var type: String /* "nowhere" | "goal" | "entity_info" | "active_window" */
+}
+
+external interface `T$9` {
+ var count: uint
+ var recipe: dynamic /* String | LuaRecipe */
+ get() = definedExternally
+ set(value) = definedExternally
+ var silent: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$10` {
+ var index: uint
+ var count: uint
+}
+
+external interface `T$11` {
+ var walking: Boolean
+ var direction: direction
+}
+
+external interface `T$12` {
+ var mining: Boolean
+ var position: Position?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$13` {
+ var state: shooting
+ var position: Position
+}
+
+external interface `T$14` {
+ var repairing: Boolean
+ var position: Position
+}
+
+external interface LuaControl {
+ fun get_inventory(inventory: inventory): LuaInventory?
+ fun get_main_inventory(): LuaInventory?
+ fun can_insert(items: String): Boolean
+ fun can_insert(items: ItemStackDefinition): Boolean
+ fun can_insert(items: LuaItemStack): Boolean
+ fun insert(items: String): uint
+ fun insert(items: ItemStackDefinition): uint
+ fun insert(items: LuaItemStack): uint
+ fun set_gui_arrow(params: EntityControlSetGuiArrow)
+ fun set_gui_arrow(params: PositionControlSetGuiArrow)
+ fun set_gui_arrow(params: CraftingQueueControlSetGuiArrow)
+ fun set_gui_arrow(params: ItemStackControlSetGuiArrow)
+ fun set_gui_arrow(params: OtherControlSetGuiArrow)
+ fun clear_gui_arrow()
+ fun get_item_count(item: String = definedExternally): uint
+ fun has_items_inside(): Boolean
+ fun can_reach_entity(entity: LuaEntity): Boolean
+ fun clear_items_inside()
+ fun remove_item(items: String): uint
+ fun remove_item(items: ItemStackDefinition): uint
+ fun remove_item(items: LuaItemStack): uint
+ fun teleport(position: Position, surface: uint = definedExternally): Boolean
+ fun teleport(position: Position): Boolean
+ fun teleport(position: Position, surface: String = definedExternally): Boolean
+ fun teleport(position: Position, surface: LuaSurface = definedExternally): Boolean
+ fun update_selected_entity(position: Position)
+ fun clear_selected_entity()
+ fun disable_flashlight()
+ fun enable_flashlight()
+ fun is_flashlight_enabled()
+ fun get_craftable_count(recipe: String): uint
+ fun get_craftable_count(recipe: LuaRecipe): uint
+ fun begin_crafting(params: `T$9`): uint
+ fun cancel_crafting(params: `T$10`)
+ fun mine_entity(entity: LuaEntity, force: Boolean = definedExternally): Boolean
+ fun mine_tile(tile: LuaTile): Boolean
+ fun is_player(): Boolean
+ fun open_technology_gui(technology: String = definedExternally)
+ fun open_technology_gui()
+ fun open_technology_gui(technology: LuaTechnology = definedExternally)
+ fun open_technology_gui(technology: LuaTechnologyPrototype = definedExternally)
+ fun set_personal_logistic_slot(slot_index: uint, value: PersonalLogisticParameters): Boolean
+ fun set_vehicle_logistic_slot(slot_index: uint, value: PersonalLogisticParameters): Boolean
+ fun get_personal_logistic_slot(slot_index: uint): PersonalLogisticParameters
+ fun get_vehicle_logistic_slot(slot_index: uint): PersonalLogisticParameters
+ fun clear_personal_logistic_slot(slot_index: uint)
+ fun clear_vehicle_logistic_slot(slot_index: uint)
+ fun is_cursor_blueprint(): Boolean
+ fun get_blueprint_entities(): Array?
+ fun is_cursor_empty(): Boolean
+ var surface: LuaSurface
+ var position: PositionTable
+ var vehicle: LuaEntity?
+ var force: dynamic /* String | LuaForce */
+ get() = definedExternally
+ set(value) = definedExternally
+ var selected: LuaEntity?
+ var opened: dynamic /* LuaEntity? | LuaItemStack? | LuaEquipment? | LuaEquipmentGrid? | LuaPlayer? | ChooseElemButtonGuiElementMembers | DropDownGuiElementMembers | EmptyWidgetGuiElementMembers | EntityPreviewGuiElementMembers | ListBoxGuiElementMembers | ScrollPaneGuiElementMembers | SpriteButtonGuiElementMembers | TabbedPaneGuiElementMembers | TextBoxGuiElementMembers | ButtonGuiElementMembers | CameraGuiElementMembers | CheckboxGuiElementMembers | FlowGuiElementMembers | FrameGuiElementMembers | LabelGuiElementMembers | LineGuiElementMembers | MinimapGuiElementMembers | ProgressbarGuiElementMembers | RadiobuttonGuiElementMembers | SliderGuiElementMembers | SpriteGuiElementMembers | SwitchGuiElementMembers | TabGuiElementMembers | TableGuiElementMembers | TextfieldGuiElementMembers | defines.gui_type? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var crafting_queue_size: uint
+ var crafting_queue_progress: double
+ var walking_state: `T$11`
+ var riding_state: RidingState
+ var mining_state: `T$12`
+ var shooting_state: `T$13`
+ var picking_state: Boolean
+ var repair_state: `T$14`
+ var cursor_stack: LuaItemStack?
+ var cursor_ghost: dynamic /* LuaItemStack | LuaItemPrototype | String */
+ get() = definedExternally
+ set(value) = definedExternally
+ var driving: Boolean
+ var crafting_queue: Array
+ var following_robots: Array
+ var cheat_mode: Boolean
+ var character_crafting_speed_modifier: double
+ var character_mining_speed_modifier: double
+ var character_additional_mining_categories: Array
+ var character_running_speed_modifier: double
+ var character_build_distance_bonus: uint
+ var character_item_drop_distance_bonus: uint
+ var character_reach_distance_bonus: uint
+ var character_resource_reach_distance_bonus: uint
+ var character_item_pickup_distance_bonus: uint
+ var character_loot_pickup_distance_bonus: uint
+ var character_inventory_slots_bonus: uint
+ var character_trash_slot_count_bonus: uint
+ var character_maximum_following_robot_count_bonus: uint
+ var character_health_bonus: float
+ var character_personal_logistic_requests_enabled: Boolean
+ var vehicle_logistic_requests_enabled: Boolean
+ var opened_gui_type: gui_type?
+ var build_distance: uint
+ var drop_item_distance: uint
+ var reach_distance: uint
+ var item_pickup_distance: double
+ var loot_pickup_distance: double
+ var resource_reach_distance: double
+ var in_combat: Boolean
+ var character_running_speed: double
+ var character_mining_progress: double
+}
+
+external interface LuaControlBehavior {
+ fun get_circuit_network(wire: wire_type, circuit_connector: circuit_connector_id = definedExternally): LuaCircuitNetwork?
+ var type: type
+ var entity: LuaEntity
+}
+
+external interface LuaCustomChartTag {
+ fun destroy()
+ var icon: SignalID?
+ var last_user: LuaPlayer
+ var position: PositionTable
+ var text: String
+ var tag_number: uint
+ var force: LuaForce
+ var surface: LuaSurface
+ var valid: Boolean
+ var object_name: String /* "LuaCustomChartTag" */
+ fun help(): String
+}
+
+external interface LuaCustomInputPrototype {
+ var name: String
+ var order: String
+ var localised_name: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var localised_description: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var key_sequence: String
+ var alternative_key_sequence: String?
+ var linked_game_control: String?
+ var consuming: String /* "none" | "game-only" */
+ var action: String
+ var enabled: Boolean
+ var enabled_while_spectating: Boolean
+ var enabled_while_in_cutscene: Boolean
+ var include_selected_prototype: Boolean
+ var item_to_spawn: LuaItemPrototype?
+ var valid: Boolean
+ var object_name: String /* "LuaCustomInputPrototype" */
+ fun help(): String
+}
+
+typealias CustomTableIndex = Any
+
+external interface LuaCustomTableMembers {
+ var length: () -> uint /* () -> uint & LuaExtension */
+ var valid: Boolean
+ var object_name: String /* "LuaCustomTable" */
+ fun help(): String
+}
+
+external interface LuaDamagePrototype {
+ var name: String
+ var order: String
+ var localised_name: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var localised_description: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var hidden: Boolean
+ var valid: Boolean
+ var object_name: String /* "LuaDamagePrototype" */
+ fun help(): String
+}
+
+external interface LuaDeciderCombinatorControlBehavior : LuaCombinatorControlBehavior {
+ var parameters: DeciderCombinatorParameters
+ var valid: Boolean
+ var object_name: String /* "LuaDeciderCombinatorControlBehavior" */
+ fun help(): String
+}
+
+external interface LuaDecorativePrototype {
+ var name: String
+ var order: String
+ var localised_name: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var localised_description: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var collision_box: BoundingBoxTable
+ var collision_mask: CollisionMask
+ var collision_mask_with_flags: CollisionMaskWithFlags
+ var autoplace_specification: AutoplaceSpecification?
+ var valid: Boolean
+ var object_name: String /* "LuaDecorativePrototype" */
+ fun help(): String
+}
+
+external interface LuaElectricEnergySourcePrototype {
+ var buffer_capacity: double
+ var usage_priority: String
+ var input_flow_limit: double
+ var output_flow_limit: double
+ var drain: double
+ var emissions: double
+ var render_no_network_icon: Boolean
+ var render_no_power_icon: Boolean
+ var valid: Boolean
+ var object_name: String /* "LuaElectricEnergySourcePrototype" */
+ fun help(): String
+}
+
+external interface `T$15` {
+ var do_cliff_correction: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+ var raise_destroy: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$16` {
+ var force: dynamic /* String | LuaForce */
+ get() = definedExternally
+ set(value) = definedExternally
+ var target: dynamic /* LuaEntity | LuaEntityPrototype | String */
+ get() = definedExternally
+ set(value) = definedExternally
+ var player: dynamic /* uint? | String? | LuaPlayer? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var direction: direction?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$17` {
+ var return_item_request_proxy: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+ var raise_revive: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$18` {
+ var rail_direction: rail_direction
+ var rail_connection_direction: rail_connection_direction
+}
+
+external interface `T$19` {
+ var reverse: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+ var by_player: dynamic /* uint? | String? | LuaPlayer? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var spill_items: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+ var enable_looted: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+ var force: dynamic /* LuaForce? | String? */
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$20` {
+ var position: Position
+ var surface: LuaSurface?
+ get() = definedExternally
+ set(value) = definedExternally
+ var force: dynamic /* String? | LuaForce? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var create_build_effect_smoke: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$21` {
+ var name: String
+ var amount: double
+ var minimum_temperature: double?
+ get() = definedExternally
+ set(value) = definedExternally
+ var maximum_temperature: double?
+ get() = definedExternally
+ set(value) = definedExternally
+ var temperature: double?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$22` {
+ var inventory: LuaInventory?
+ get() = definedExternally
+ set(value) = definedExternally
+ var force: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+ var raise_destroyed: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+ var ignore_minable: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$23` {
+ var red: Array
+ var green: Array
+}
+
+external interface LuaEntity : LuaControl {
+ fun get_output_inventory(): LuaInventory
+ fun get_module_inventory(): LuaInventory?
+ fun get_fuel_inventory(): LuaInventory?
+ fun get_burnt_result_inventory(): LuaInventory?
+ fun damage(damage: float, force: String, type: String = definedExternally, dealer: LuaEntity = definedExternally): float
+ fun damage(damage: float, force: String): float
+ fun damage(damage: float, force: String, type: String = definedExternally): float
+ fun damage(damage: float, force: LuaForce, type: String = definedExternally, dealer: LuaEntity = definedExternally): float
+ fun damage(damage: float, force: LuaForce): float
+ fun damage(damage: float, force: LuaForce, type: String = definedExternally): float
+ fun can_be_destroyed(): Boolean
+ fun destroy(params: `T$15` = definedExternally): Boolean
+ fun set_command(command: AttackCommand)
+ fun set_command(command: GoToLocationCommand)
+ fun set_command(command: CompoundCommand)
+ fun set_command(command: GroupCommand)
+ fun set_command(command: AttackAreaCommand)
+ fun set_command(command: WanderCommand)
+ fun set_command(command: StopCommand)
+ fun set_command(command: FleeCommand)
+ fun set_command(command: BuildBaseCommand)
+ fun set_distraction_command(command: AttackCommand)
+ fun set_distraction_command(command: GoToLocationCommand)
+ fun set_distraction_command(command: CompoundCommand)
+ fun set_distraction_command(command: GroupCommand)
+ fun set_distraction_command(command: AttackAreaCommand)
+ fun set_distraction_command(command: WanderCommand)
+ fun set_distraction_command(command: StopCommand)
+ fun set_distraction_command(command: FleeCommand)
+ fun set_distraction_command(command: BuildBaseCommand)
+ fun has_command(): Boolean
+ fun die(force: String = definedExternally, cause: LuaEntity = definedExternally): Boolean
+ fun die(): Boolean
+ fun die(force: String = definedExternally): Boolean
+ fun die(force: LuaForce = definedExternally, cause: LuaEntity = definedExternally): Boolean
+ fun die(force: LuaForce = definedExternally): Boolean
+ fun has_flag(flag: String): Boolean
+ fun ghost_has_flag(flag: String): Boolean
+ fun add_market_item(offer: Offer)
+ fun remove_market_item(offer: uint): Boolean
+ fun get_market_items(): Array
+ fun clear_market_items()
+ fun connect_neighbour(target: LuaEntity): Boolean
+ fun connect_neighbour(target: WireConnectionDefinition): Boolean
+ fun disconnect_neighbour(target: wire_type = definedExternally)
+ fun disconnect_neighbour()
+ fun disconnect_neighbour(target: LuaEntity = definedExternally)
+ fun disconnect_neighbour(target: WireConnectionDefinition = definedExternally)
+ fun order_deconstruction(force: String, player: uint = definedExternally): Boolean
+ fun order_deconstruction(force: String): Boolean
+ fun order_deconstruction(force: String, player: String = definedExternally): Boolean
+ fun order_deconstruction(force: String, player: LuaPlayer = definedExternally): Boolean
+ fun order_deconstruction(force: LuaForce, player: uint = definedExternally): Boolean
+ fun order_deconstruction(force: LuaForce): Boolean
+ fun order_deconstruction(force: LuaForce, player: String = definedExternally): Boolean
+ fun order_deconstruction(force: LuaForce, player: LuaPlayer = definedExternally): Boolean
+ fun cancel_deconstruction(force: String, player: uint = definedExternally)
+ fun cancel_deconstruction(force: String)
+ fun cancel_deconstruction(force: String, player: String = definedExternally)
+ fun cancel_deconstruction(force: String, player: LuaPlayer = definedExternally)
+ fun cancel_deconstruction(force: LuaForce, player: uint = definedExternally)
+ fun cancel_deconstruction(force: LuaForce)
+ fun cancel_deconstruction(force: LuaForce, player: String = definedExternally)
+ fun cancel_deconstruction(force: LuaForce, player: LuaPlayer = definedExternally)
+ fun to_be_deconstructed(): Boolean
+ fun order_upgrade(params: `T$16`): Boolean
+ fun cancel_upgrade(force: String, player: uint = definedExternally): Boolean
+ fun cancel_upgrade(force: String): Boolean
+ fun cancel_upgrade(force: String, player: String = definedExternally): Boolean
+ fun cancel_upgrade(force: String, player: LuaPlayer = definedExternally): Boolean
+ fun cancel_upgrade(force: LuaForce, player: uint = definedExternally): Boolean
+ fun cancel_upgrade(force: LuaForce): Boolean
+ fun cancel_upgrade(force: LuaForce, player: String = definedExternally): Boolean
+ fun cancel_upgrade(force: LuaForce, player: LuaPlayer = definedExternally): Boolean
+ fun to_be_upgraded(): Boolean
+ fun get_request_slot(slot: uint): dynamic /* String? | ItemStackDefinition? */
+ fun set_request_slot(request: String, slot: uint): Boolean
+ fun set_request_slot(request: ItemStackDefinition, slot: uint): Boolean
+ fun set_request_slot(request: LuaItemStack, slot: uint): Boolean
+ fun clear_request_slot(slot: uint)
+ fun is_crafting()
+ fun is_opened(): Boolean
+ fun is_opening(): Boolean
+ fun is_closed(): Boolean
+ fun is_closing(): Boolean
+ fun request_to_open(force: String, extra_time: uint = definedExternally)
+ fun request_to_open(force: String)
+ fun request_to_open(force: LuaForce, extra_time: uint = definedExternally)
+ fun request_to_open(force: LuaForce)
+ fun request_to_close(force: String)
+ fun request_to_close(force: LuaForce)
+ fun get_transport_line(index: uint): LuaTransportLine
+ fun get_max_transport_line_index(): uint
+ fun launch_rocket(): Boolean
+ fun revive(params: `T$17` = definedExternally): dynamic /* JsTuple | JsTuple, LuaEntity, LuaEntity?> */
+ fun silent_revive(params: `T$17` = definedExternally): dynamic /* JsTuple | JsTuple, LuaEntity, LuaEntity?> */
+ fun get_connected_rail(params: `T$18`): LuaEntity
+ fun get_connected_rails(): Array
+ fun get_rail_segment_entity(direction: rail_direction, in_else_out: Boolean): LuaEntity?
+ fun get_rail_segment_end(direction: rail_direction): dynamic /* JsTuple */
+ fun get_rail_segment_length(): double
+ fun get_rail_segment_overlaps(): Array
+ fun get_filter(slot_index: uint): String?
+ fun set_filter(slot_index: uint, item: String)
+ fun get_infinity_container_filter(index: uint): InfinityInventoryFilter?
+ fun set_infinity_container_filter(index: uint, filter: InfinityInventoryFilter?)
+ fun get_infinity_pipe_filter(): InfinityPipeFilter?
+ fun set_infinity_pipe_filter(filter: InfinityPipeFilter?)
+ fun get_heat_setting(): HeatSetting
+ fun set_heat_setting(filter: HeatSetting)
+ fun get_control_behavior(): LuaControlBehavior?
+ fun get_or_create_control_behavior(): LuaControlBehavior?
+ fun get_circuit_network(wire: wire_type, circuit_connector: circuit_connector_id = definedExternally): LuaCircuitNetwork?
+ fun get_merged_signal(signal: SignalID, circuit_connector: circuit_connector_id = definedExternally): int
+ fun get_merged_signals(circuit_connector: circuit_connector_id = definedExternally): Array?
+ fun supports_backer_name(): Boolean
+ fun copy_settings(entity: LuaEntity, by_player: uint = definedExternally): Record
+ fun copy_settings(entity: LuaEntity): Record
+ fun copy_settings(entity: LuaEntity, by_player: String = definedExternally): Record
+ fun copy_settings(entity: LuaEntity, by_player: LuaPlayer = definedExternally): Record
+ fun get_logistic_point(index: logistic_member_index = definedExternally): dynamic /* LuaLogisticPoint | Array */
+ fun play_note(instrument: uint, note: uint): Boolean
+ fun connect_rolling_stock(direction: rail_direction): Boolean
+ fun disconnect_rolling_stock(direction: rail_direction): Boolean
+ fun update_connections()
+ fun get_recipe(): LuaRecipe?
+ fun set_recipe(recipe: String?): Record
+ fun set_recipe(recipe: LuaRecipe?): Record
+ fun rotate(params: `T$19` = definedExternally): Boolean
+ fun get_driver(): dynamic /* LuaEntity? | LuaPlayer? */
+ fun set_driver(driver: LuaEntity?)
+ fun set_driver(driver: uint?)
+ fun set_driver(driver: String?)
+ fun set_driver(driver: LuaPlayer?)
+ fun get_passenger(): dynamic /* LuaEntity? | LuaPlayer? */
+ fun set_passenger(passenger: LuaEntity)
+ fun set_passenger(passenger: uint)
+ fun set_passenger(passenger: String)
+ fun set_passenger(passenger: LuaPlayer)
+ fun is_connected_to_electric_network(): Boolean
+ fun get_train_stop_trains(): Array
+ fun get_stopped_train(): LuaTrain?
+ fun clone(params: `T$20`): LuaEntity?
+ fun get_fluid_count(fluid: String = definedExternally): double
+ fun get_fluid_contents(): Record
+ fun remove_fluid(params: `T$21`): double
+ fun insert_fluid(fluid: Fluid): double
+ fun clear_fluid_inside()
+ fun get_beam_source(): BeamTarget
+ fun set_beam_source(source: LuaEntity)
+ fun set_beam_source(source: Position)
+ fun get_beam_target(): BeamTarget
+ fun set_beam_target(target: LuaEntity)
+ fun set_beam_target(target: Position)
+ fun get_radius(): double
+ fun get_health_ratio(): float
+ fun create_build_effect_smoke()
+ fun release_from_spawner()
+ fun toggle_equipment_movement_bonus()
+ fun can_shoot(target: LuaEntity, position: Position): Boolean
+ fun start_fading_out()
+ fun get_upgrade_target(): LuaEntityPrototype?
+ fun get_upgrade_direction(): direction?
+ fun get_damage_to_be_taken(): float
+ fun deplete()
+ fun mine(params: `T$22` = definedExternally): Boolean
+ fun spawn_decorations()
+ fun can_wires_reach(entity: LuaEntity): Boolean
+ fun get_connected_rolling_stock(direction: rail_direction): LuaEntity
+ fun is_registered_for_construction(): Boolean
+ fun is_registered_for_deconstruction(force: String): Boolean
+ fun is_registered_for_deconstruction(force: LuaForce): Boolean
+ fun is_registered_for_upgrade(): Boolean
+ fun is_registered_for_repair(): Boolean
+ fun add_autopilot_destination(position: Position)
+ fun connect_linked_belts(neighbour: LuaEntity?)
+ fun disconnect_linked_belts()
+ var name: String /* "inserter" | "filter-inserter" */
+ var ghost_name: String
+ var localised_name: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var localised_description: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var ghost_localised_name: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var ghost_localised_description: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var type: String
+ var ghost_type: String
+ var active: Boolean
+ var destructible: Boolean
+ var minable: Boolean
+ var rotatable: Boolean
+ var operable: Boolean
+ var health: float?
+ var direction: direction
+ var supports_direction: Boolean
+ var orientation: RealOrientation
+ var cliff_orientation: String /* "west-to-east" | "north-to-south" | "east-to-west" | "south-to-north" | "west-to-north" | "north-to-east" | "east-to-south" | "south-to-west" | "west-to-south" | "north-to-west" | "east-to-north" | "south-to-east" | "west-to-none" | "none-to-east" | "east-to-none" | "none-to-west" | "north-to-none" | "none-to-south" | "south-to-none" | "none-to-north" */
+ var relative_turret_orientation: RealOrientation?
+ var torso_orientation: RealOrientation
+ var amount: uint
+ var initial_amount: uint?
+ var effectivity_modifier: float
+ var consumption_modifier: float
+ var friction_modifier: float
+ var driver_is_gunner: Boolean
+ var vehicle_automatic_targeting_parameters: VehicleAutomaticTargetingParameters
+ var speed: float
+ var effective_speed: float
+ var stack: LuaItemStack
+ var prototype: LuaEntityPrototype
+ var ghost_prototype: dynamic /* LuaEntityPrototype | LuaTilePrototype */
+ get() = definedExternally
+ set(value) = definedExternally
+ var drop_position: Position
+ var pickup_position: Position
+ var drop_target: LuaEntity?
+ var pickup_target: LuaEntity
+ var selected_gun_index: uint?
+ var energy: double
+ var temperature: double?
+ var previous_recipe: LuaRecipe?
+ var held_stack: LuaItemStack
+ var held_stack_position: PositionTable
+ var train: LuaTrain?
+ var neighbours: dynamic /* Record>? | Array>? | LuaEntity? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var belt_neighbours: Record>
+ var fluidbox: LuaFluidBox
+ var backer_name: String?
+ var entity_label: String?
+ var time_to_live: uint
+ var color: dynamic /* ColorTable? | JsTuple */
+ get() = definedExternally
+ set(value) = definedExternally
+ var text: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var signal_state: signal_state
+ var chain_signal_state: chain_signal_state
+ var to_be_looted: Boolean
+ var crafting_speed: double
+ var crafting_progress: float
+ var bonus_progress: double
+ var productivity_bonus: double
+ var pollution_bonus: double
+ var speed_bonus: double
+ var consumption_bonus: double
+ var belt_to_ground_type: String /* "input" | "output" */
+ var loader_type: String /* "input" | "output" */
+ var rocket_parts: uint
+ var logistic_network: LuaLogisticNetwork
+ var logistic_cell: LuaLogisticCell?
+ var item_requests: Record
+ var player: LuaPlayer?
+ var unit_group: LuaUnitGroup?
+ var damage_dealt: double
+ var kills: uint
+ var last_user: LuaPlayer?
+ var electric_buffer_size: double?
+ var electric_input_flow_limit: double?
+ var electric_output_flow_limit: double?
+ var electric_drain: double?
+ var electric_emissions: double?
+ var unit_number: uint?
+ var ghost_unit_number: uint?
+ var mining_progress: double?
+ var bonus_mining_progress: double?
+ var power_production: double
+ var power_usage: double
+ var bounding_box: BoundingBoxTable
+ var secondary_bounding_box: BoundingBoxTable?
+ var selection_box: BoundingBoxTable
+ var secondary_selection_box: BoundingBoxTable?
+ var mining_target: LuaEntity?
+ var circuit_connected_entities: `T$23`
+ var circuit_connection_definitions: Array
+ var request_slot_count: uint
+ var filter_slot_count: uint
+ var loader_container: LuaEntity
+ var grid: LuaEquipmentGrid?
+ var graphics_variation: uint8?
+ var tree_color_index: uint8
+ var tree_color_index_max: uint8
+ var tree_stage_index: uint8
+ var tree_stage_index_max: uint8
+ var tree_gray_stage_index: uint8
+ var tree_gray_stage_index_max: uint8
+ var burner: LuaBurner?
+ var shooting_target: LuaEntity?
+ var proxy_target: LuaEntity?
+ var stickers: Array?
+ var sticked_to: LuaEntity
+ var parameters: ProgrammableSpeakerParameters
+ var alert_parameters: ProgrammableSpeakerAlertParameters
+ var electric_network_statistics: LuaFlowStatistics
+ var inserter_stack_size_override: uint
+ var products_finished: uint
+ var spawner: LuaEntity?
+ var units: Array
+ var power_switch_state: Boolean
+ var effects: ModuleEffects?
+ var infinity_container_filters: Array
+ var remove_unfiltered_items: Boolean
+ var character_corpse_player_index: uint
+ var character_corpse_tick_of_death: uint
+ var character_corpse_death_cause: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var associated_player: LuaPlayer?
+ var tick_of_last_attack: uint
+ var tick_of_last_damage: uint
+ var splitter_filter: LuaItemPrototype?
+ var inserter_filter_mode: String /* "whitelist" | "blacklist" */
+ var splitter_input_priority: String /* "left" | "none" | "right" */
+ var splitter_output_priority: String /* "left" | "none" | "right" */
+ var armed: Boolean
+ var recipe_locked: Boolean
+ var connected_rail: LuaEntity?
+ var trains_in_block: uint
+ var timeout: uint
+ var neighbour_bonus: double
+ var ai_settings: LuaAISettings
+ var highlight_box_type: String
+ var highlight_box_blink_interval: uint
+ var status: entity_status?
+ var enable_logistics_while_moving: Boolean
+ var render_player: LuaPlayer?
+ var render_to_forces: Array?
+ var pump_rail_target: LuaEntity?
+ var moving: Boolean
+ var electric_network_id: uint?
+ var allow_dispatching_robots: Boolean
+ var auto_launch: Boolean
+ var energy_generated_last_tick: double
+ var storage_filter: LuaItemPrototype
+ var request_from_buffers: Boolean
+ var corpse_expires: Boolean
+ var corpse_immune_to_entity_placement: Boolean
+ var tags: Tags?
+ var command: dynamic /* AttackCommand? | GoToLocationCommand? | CompoundCommand? | GroupCommand? | AttackAreaCommand? | WanderCommand? | StopCommand? | FleeCommand? | BuildBaseCommand? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var distraction_command: dynamic /* AttackCommand? | GoToLocationCommand? | CompoundCommand? | GroupCommand? | AttackAreaCommand? | WanderCommand? | StopCommand? | FleeCommand? | BuildBaseCommand? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var time_to_next_effect: uint
+ var autopilot_destination: Position?
+ var autopilot_destinations: Array
+ var trains_count: uint?
+ var trains_limit: uint
+ var is_entity_with_force: Boolean
+ var is_entity_with_owner: Boolean
+ var is_entity_with_health: Boolean
+ var combat_robot_owner: LuaEntity
+ var link_id: uint
+ var follow_target: LuaEntity
+ var follow_offset: Position?
+ var linked_belt_type: String /* "input" | "output" */
+ var linked_belt_neighbour: LuaEntity?
+ var valid: Boolean
+ var object_name: String /* "LuaEntity" */
+ fun help(): String
+}
+
+external interface `T$24` {
+ var minable: Boolean
+ var mining_time: double
+ var mining_particle: String?
+ get() = definedExternally
+ set(value) = definedExternally
+ var products: Array?
+ get() = definedExternally
+ set(value) = definedExternally
+ var fluid_amount: double?
+ get() = definedExternally
+ set(value) = definedExternally
+ var required_fluid: String?
+ get() = definedExternally
+ set(value) = definedExternally
+ var mining_trigger: Array?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$25` {
+ var min: double
+ var max: double
+}
+
+external interface `T$26` {
+ var smoke_name: String
+ var offsets: Array
+ var offset_deviation: dynamic /* BoundingBoxTable | JsTuple */
+ get() = definedExternally
+ set(value) = definedExternally
+ var initial_height: float
+ var max_radius: float?
+ get() = definedExternally
+ set(value) = definedExternally
+ var speed: dynamic /* typealias Vector = dynamic */
+ get() = definedExternally
+ set(value) = definedExternally
+ var speed_multiplier: float
+ var speed_multiplier_deviation: float
+ var starting_frame: float
+ var starting_frame_deviation: float
+ var starting_frame_speed: float
+ var starting_frame_speed_deviation: float
+ var speed_from_center: float
+ var speed_from_center_deviation: float
+}
+
+external interface LuaEntityPrototype {
+ fun has_flag(flag: String /* "not-rotatable" | "placeable-neutral" | "placeable-player" | "placeable-enemy" | "placeable-off-grid" | "player-creation" | "filter-directions" | "fast-replaceable-no-build-while-moving" | "breaths-air" | "not-repairable" | "not-on-map" | "not-deconstructable" | "not-blueprintable" | "hide-from-bonus-gui" | "hide-alt-info" | "fast-replaceable-no-cross-type-while-moving" | "no-gap-fill-while-building" | "not-flammable" | "no-automated-item-removal" | "no-automated-item-insertion" | "not-upgradable" */): Boolean
+ fun get_inventory_size(index: inventory): uint?
+ var type: String
+ var name: String
+ var localised_name: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var localised_description: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var max_health: float
+ var infinite_resource: Boolean?
+ var minimum_resource_amount: uint?
+ var normal_resource_amount: uint?
+ var infinite_depletion_resource_amount: uint?
+ var resource_category: String?
+ var mineable_properties: `T$24`
+ var items_to_place_this: Array?
+ var collision_box: BoundingBoxTable
+ var secondary_collision_box: BoundingBoxTable?
+ var map_generator_bounding_box: BoundingBoxTable
+ var selection_box: BoundingBoxTable
+ var drawing_box: BoundingBoxTable
+ var sticker_box: BoundingBoxTable
+ var collision_mask: CollisionMask
+ var collision_mask_with_flags: CollisionMaskWithFlags
+ var default_collision_mask_with_flags: CollisionMaskWithFlags
+ var order: String
+ var group: LuaGroup
+ var subgroup: LuaGroup
+ var healing_per_tick: float
+ var emissions_per_second: double
+ var corpses: Record
+ var selectable_in_game: Boolean
+ var selection_priority: uint
+ var weight: double?
+ var resistances: Record
+ var fast_replaceable_group: String?
+ var next_upgrade: LuaEntityPrototype?
+ var loot: Array?
+ var repair_speed_modifier: uint?
+ var turret_range: uint?
+ var autoplace_specification: AutoplaceSpecification?
+ var belt_speed: double?
+ var result_units: Array
+ var attack_result: Array?
+ var final_attack_result: Array?
+ var attack_parameters: dynamic /* ProjectileAttackParameters? | StreamAttackParameters? | OtherAttackParameters? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var spawn_cooldown: `T$25`?
+ var mining_drill_radius: double?
+ var mining_speed: double?
+ var logistic_mode: String /* "requester" | "active-provider" | "passive-provider" | "buffer" | "storage" | "none" */
+ var max_underground_distance: uint8?
+ var flags: EntityPrototypeFlags
+ var remains_when_mined: Array
+ var additional_pastable_entities: Array
+ var allow_copy_paste: Boolean
+ var shooting_cursor_size: double
+ var created_smoke: `T$26`?
+ var created_effect: Array?
+ var map_color: ColorTable?
+ var friendly_map_color: ColorTable
+ var enemy_map_color: ColorTable
+ var build_base_evolution_requirement: double
+ var instruments: Array?
+ var max_polyphony: uint?
+ var module_inventory_size: uint?
+ var ingredient_count: uint?
+ var crafting_speed: double?
+ var crafting_categories: Record
+ var resource_categories: Record?
+ var supply_area_distance: double?
+ var max_wire_distance: double
+ var max_circuit_wire_distance: double
+ var energy_usage: double?
+ var max_energy_usage: double
+ var max_energy_production: double
+ var effectivity: double?
+ var consumption: double?
+ var friction_force: double?
+ var braking_force: double?
+ var air_resistance: double?
+ var tank_driving: Boolean?
+ var rotation_speed: double?
+ var turret_rotation_speed: double?
+ var guns: Record?
+ var speed: double?
+ var speed_multiplier_when_out_of_energy: float?
+ var max_payload_size: uint?
+ var draw_cargo: Boolean?
+ var energy_per_move: double?
+ var energy_per_tick: double?
+ var max_energy: double?
+ var min_to_charge: float?
+ var max_to_charge: float?
+ var burner_prototype: LuaBurnerPrototype?
+ var electric_energy_source_prototype: LuaElectricEnergySourcePrototype?
+ var heat_energy_source_prototype: LuaHeatEnergySourcePrototype?
+ var fluid_energy_source_prototype: LuaFluidEnergySourcePrototype?
+ var void_energy_source_prototype: LuaVoidEnergySourcePrototype?
+ var building_grid_bit_shift: uint
+ var fluid_usage_per_tick: double?
+ var maximum_temperature: double?
+ var target_temperature: double?
+ var fluid: LuaFluidPrototype?
+ var fluid_capacity: double
+ var pumping_speed: double?
+ var stack: Boolean
+ var allow_custom_vectors: Boolean
+ var allow_burner_leech: Boolean
+ var inserter_extension_speed: double?
+ var inserter_rotation_speed: double?
+ var inserter_pickup_position: dynamic /* typealias Vector = dynamic */
+ get() = definedExternally
+ set(value) = definedExternally
+ var inserter_drop_position: dynamic /* typealias Vector = dynamic */
+ get() = definedExternally
+ set(value) = definedExternally
+ var inserter_chases_belt_items: Boolean?
+ var count_as_rock_for_filtered_deconstruction: Boolean
+ var filter_count: uint?
+ var time_to_live: uint
+ var distribution_effectivity: double?
+ var explosion_beam: double?
+ var explosion_rotate: double?
+ var tree_color_count: uint8?
+ var alert_when_damaged: Boolean?
+ var alert_when_attacking: Boolean?
+ var color: ColorTable?
+ var collision_mask_collides_with_self: Boolean
+ var collision_mask_collides_with_tiles_only: Boolean
+ var collision_mask_considers_tile_transitions: Boolean
+ var allowed_effects: Record?
+ var rocket_parts_required: uint?
+ var rocket_rising_delay: uint8?
+ var launch_wait_time: uint8?
+ var light_blinking_speed: double?
+ var door_opening_speed: double?
+ var rising_speed: double?
+ var engine_starting_speed: double?
+ var flying_speed: double?
+ var flying_acceleration: double?
+ var fixed_recipe: String?
+ var construction_radius: double?
+ var logistic_radius: double?
+ var energy_per_hit_point: double?
+ var create_ghost_on_death: Boolean
+ var timeout: uint
+ var fluidbox_prototypes: Array
+ var neighbour_bonus: double
+ var neighbour_collision_increase: double
+ var container_distance: double
+ var belt_distance: double
+ var belt_length: double
+ var is_building: Boolean
+ var automated_ammo_count: uint?
+ var max_speed: double?
+ var darkness_for_all_lamps_on: float?
+ var darkness_for_all_lamps_off: float?
+ var always_on: Boolean?
+ var min_darkness_to_spawn: float
+ var max_darkness_to_spawn: float
+ var call_for_help_radius: double
+ var max_count_of_owned_units: double
+ var max_friends_around_to_spawn: double
+ var spawning_radius: double
+ var spawning_spacing: double
+ var radius: double
+ var cliff_explosive_prototype: String?
+ var rocket_entity_prototype: LuaEntityPrototype?
+ var has_belt_immunity: Boolean?
+ var vision_distance: double?
+ var pollution_to_join_attack: float?
+ var min_pursue_time: uint?
+ var max_pursue_distance: double?
+ var radar_range: uint?
+ var move_while_shooting: Boolean?
+ var can_open_gates: Boolean?
+ var affected_by_tiles: Boolean?
+ var distraction_cooldown: uint?
+ var spawning_time_modifier: double?
+ var alert_icon_shift: dynamic /* typealias Vector = dynamic */
+ get() = definedExternally
+ set(value) = definedExternally
+ var lab_inputs: Array?
+ var researching_speed: double?
+ var item_slot_count: uint?
+ var base_productivity: double?
+ var allow_access_to_all_forces: Boolean
+ var supports_direction: Boolean
+ var terrain_friction_modifier: float
+ var allow_passengers: Boolean
+ var max_distance_of_sector_revealed: uint
+ var max_distance_of_nearby_sector_revealed: uint
+ var adjacent_tile_collision_box: BoundingBoxTable
+ var adjacent_tile_collision_mask: CollisionMask
+ var adjacent_tile_collision_test: CollisionMask
+ var center_collision_mask: CollisionMask
+ var grid_prototype: LuaEquipmentGridPrototype?
+ var remove_decoratives: String
+ var related_underground_belt: LuaEntityPrototype
+ var running_speed: double
+ var maximum_corner_sliding_distance: double
+ var build_distance: uint
+ var drop_item_distance: uint
+ var reach_distance: uint
+ var reach_resource_distance: double
+ var item_pickup_distance: double
+ var loot_pickup_distance: double
+ var enter_vehicle_distance: double
+ var ticks_to_keep_gun: uint
+ var ticks_to_keep_aiming_direction: uint
+ var ticks_to_stay_in_combat: uint
+ var respawn_time: uint
+ var damage_hit_tint: ColorTable
+ var character_corpse: LuaEntityPrototype
+ var valid: Boolean
+ var object_name: String /* "LuaEntityPrototype" */
+ fun help(): String
+}
+
+external interface `T$27` {
+ var width: uint
+ var height: uint
+}
+
+external interface LuaEquipment {
+ var name: String
+ var type: String
+ var position: PositionTable
+ var shape: `T$27`
+ var shield: double
+ var max_shield: double
+ var max_solar_power: double
+ var movement_bonus: double
+ var generator_power: double
+ var energy: double
+ var max_energy: double
+ var prototype: LuaEquipmentPrototype
+ var burner: LuaBurner?
+ var valid: Boolean
+ var object_name: String /* "LuaEquipment" */
+ fun help(): String
+}
+
+external interface LuaEquipmentCategoryPrototype {
+ var name: String
+ var order: String
+ var localised_name: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var localised_description: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var valid: Boolean
+ var object_name: String /* "LuaEquipmentCategoryPrototype" */
+ fun help(): String
+}
+
+external interface `T$28` {
+ var position: Position?
+ get() = definedExternally
+ set(value) = definedExternally
+ var equipment: LuaEquipment?
+ get() = definedExternally
+ set(value) = definedExternally
+ var by_player: dynamic /* uint? | String? | LuaPlayer? */
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$29` {
+ var name: String
+ var position: Position?
+ get() = definedExternally
+ set(value) = definedExternally
+ var by_player: dynamic /* uint? | String? | LuaPlayer? */
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$30` {
+ var equipment: LuaEquipment
+ var position: Position
+}
+
+external interface LuaEquipmentGrid {
+ fun take(params: `T$28`): dynamic /* String? | ItemStackDefinition? */
+ fun take_all(by_player: uint = definedExternally): Record
+ fun take_all(): Record
+ fun take_all(by_player: String = definedExternally): Record
+ fun take_all(by_player: LuaPlayer = definedExternally): Record
+ fun clear(by_player: uint = definedExternally)
+ fun clear()
+ fun clear(by_player: String = definedExternally)
+ fun clear(by_player: LuaPlayer = definedExternally)
+ fun put(params: `T$29`): LuaEquipment?
+ fun can_move(params: `T$30`): Boolean
+ fun move(params: `T$30`): Boolean
+ fun get(position: Position): LuaEquipment?
+ fun get_contents(): Record
+ var prototype: LuaEquipmentGridPrototype
+ var width: uint
+ var height: uint
+ var equipment: Array
+ var generator_energy: double
+ var max_solar_energy: double
+ var available_in_batteries: double
+ var battery_capacity: double
+ var shield: float
+ var max_shield: float
+ var inhibit_movement_bonus: Boolean
+ var valid: Boolean
+ var object_name: String /* "LuaEquipmentGrid" */
+ fun help(): String
+}
+
+external interface LuaEquipmentGridPrototype {
+ var name: String
+ var order: String
+ var localised_name: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var localised_description: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var equipment_categories: Array
+ var width: uint
+ var height: uint
+ var locked: Boolean
+ var valid: Boolean
+ var object_name: String /* "LuaEquipmentGridPrototype" */
+ fun help(): String
+}
+
+external interface `T$31` {
+ var width: uint
+ var height: uint
+ var points: Array?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$32` {
+ var spawn_and_station_height: float
+ var spawn_and_station_shadow_height_offset: float
+ var charge_approach_distance: float
+ var logistic_radius: float
+ var construction_radius: float
+ var charging_station_count: uint
+ var charging_distance: float
+ var charging_station_shift: dynamic /* typealias Vector = dynamic */
+ get() = definedExternally
+ set(value) = definedExternally
+ var charging_energy: double
+ var charging_threshold_distance: float
+ var robot_vertical_acceleration: float
+ var stationing_offset: dynamic /* typealias Vector = dynamic */
+ get() = definedExternally
+ set(value) = definedExternally
+ var robot_limit: uint
+ var logistics_connection_distance: float
+ var robots_shrink_when_entering_and_exiting: Boolean
+}
+
+external interface LuaEquipmentPrototype {
+ var name: String
+ var type: String
+ var order: String
+ var localised_name: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var localised_description: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var shape: `T$31`
+ var take_result: LuaItemPrototype?
+ var energy_production: double
+ var shield: float
+ var energy_per_shield: double
+ var logistic_parameters: `T$32`
+ var energy_consumption: double
+ var movement_bonus: float
+ var energy_source: LuaElectricEnergySourcePrototype
+ var equipment_categories: Array
+ var burner_prototype: LuaBurnerPrototype?
+ var electric_energy_source_prototype: LuaElectricEnergySourcePrototype?
+ var background_color: ColorTable
+ var attack_parameters: dynamic /* ProjectileAttackParameters? | StreamAttackParameters? | OtherAttackParameters? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var automatic: Boolean
+ var valid: Boolean
+ var object_name: String /* "LuaEquipmentPrototype" */
+ fun help(): String
+}
+
+external interface `T$33` {
+ var name: String
+ var input: Boolean
+ var precision_index: flow_precision_index
+ var count: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface LuaFlowStatistics {
+ fun get_input_count(name: String): dynamic /* uint64 | double */
+ fun set_input_count(name: String, count: uint64)
+ fun get_output_count(name: String): dynamic /* uint64 | double */
+ fun set_output_count(name: String, count: uint64)
+ fun get_flow_count(params: `T$33`): double
+ fun on_flow(name: String, count: float)
+ fun clear()
+ var input_counts: Record
+ var output_counts: Record
+ var force: LuaForce?
+ var valid: Boolean
+ var object_name: String /* "LuaFlowStatistics" */
+ fun help(): String
+}
+
+typealias LuaFluidBox = Array
+
+external interface LuaFluidBoxPrototype {
+ var entity: LuaEntityPrototype
+ var index: uint
+ var pipe_connections: Array
+ var production_type: String /* "input" | "output" | "input-output" | "none" */
+ var base_area: double
+ var base_level: double
+ var height: double
+ var volume: double
+ var filter: LuaFluidPrototype?
+ var minimum_temperature: double?
+ var maximum_temperature: double?
+ var secondary_draw_orders: Array
+ var render_layer: String
+ var valid: Boolean
+ var object_name: String /* "LuaFluidBoxPrototype" */
+ fun help(): String
+}
+
+external interface LuaFluidEnergySourcePrototype {
+ var emissions: double
+ var render_no_network_icon: Boolean
+ var render_no_power_icon: Boolean
+ var effectivity: double
+ var burns_fluid: Boolean
+ var scale_fluid_usage: Boolean
+ var fluid_usage_per_tick: double
+ var smoke: Array
+ var maximum_temperature: double
+ var fluid_box: LuaFluidBoxPrototype
+ var valid: Boolean
+ var object_name: String /* "LuaFluidEnergySourcePrototype" */
+ fun help(): String
+}
+
+external interface LuaFluidPrototype {
+ var name: String
+ var localised_name: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var localised_description: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var default_temperature: double
+ var max_temperature: double
+ var heat_capacity: double
+ var order: String
+ var group: LuaGroup
+ var subgroup: LuaGroup
+ var base_color: ColorTable
+ var flow_color: ColorTable
+ var gas_temperature: double
+ var emissions_multiplier: double
+ var fuel_value: double
+ var hidden: Boolean
+ var valid: Boolean
+ var object_name: String /* "LuaFluidPrototype" */
+ fun help(): String
+}
+
+external interface LuaFontPrototype {
+ var name: String
+ var from: String
+ var size: int
+ var spacing: float
+ var border: Boolean
+ var filtered: Boolean
+ var border_color: ColorTable?
+ var valid: Boolean
+ var object_name: String /* "LuaFontPrototype" */
+ fun help(): String
+}
+
+external interface `T$34` {
+ var path: dynamic /* String | */
+ get() = definedExternally
+ set(value) = definedExternally
+ var position: Position?
+ get() = definedExternally
+ set(value) = definedExternally
+ var volume_modifier: double?
+ get() = definedExternally
+ set(value) = definedExternally
+ var override_sound_type: String? /* "game-effect" | "gui-effect" | "ambient" | "environment" | "walking" | "alert" | "wind" */
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$35` {
+ var name: dynamic /* String? | Array? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var surface: dynamic /* uint? | String? | LuaSurface? */
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface LuaForce {
+ fun get_entity_count(name: String): uint
+ fun disable_research()
+ fun enable_research()
+ fun disable_all_prototypes()
+ fun enable_all_prototypes()
+ fun reset_recipes()
+ fun enable_all_recipes()
+ fun enable_all_technologies()
+ fun research_all_technologies(include_disabled_prototypes: Boolean = definedExternally)
+ fun reset_technologies()
+ fun reset()
+ fun reset_technology_effects()
+ fun chart(surface: uint, area: BoundingBoxTable)
+ fun chart(surface: uint, area: Any /* JsTuple */)
+ fun chart(surface: String, area: BoundingBoxTable)
+ fun chart(surface: String, area: Any /* JsTuple */)
+ fun chart(surface: LuaSurface, area: BoundingBoxTable)
+ fun chart(surface: LuaSurface, area: Any /* JsTuple */)
+ fun clear_chart(surface: uint = definedExternally)
+ fun clear_chart()
+ fun clear_chart(surface: String = definedExternally)
+ fun clear_chart(surface: LuaSurface = definedExternally)
+ fun rechart()
+ fun chart_all(surface: uint = definedExternally)
+ fun chart_all()
+ fun chart_all(surface: String = definedExternally)
+ fun chart_all(surface: LuaSurface = definedExternally)
+ fun is_chunk_charted(surface: uint, position: ChunkPositionTable): Boolean
+ fun is_chunk_charted(surface: uint, position: Any /* JsTuple */): Boolean
+ fun is_chunk_charted(surface: String, position: ChunkPositionTable): Boolean
+ fun is_chunk_charted(surface: String, position: Any /* JsTuple */): Boolean
+ fun is_chunk_charted(surface: LuaSurface, position: ChunkPositionTable): Boolean
+ fun is_chunk_charted(surface: LuaSurface, position: Any /* JsTuple */): Boolean
+ fun is_chunk_visible(surface: uint, position: ChunkPositionTable): Boolean
+ fun is_chunk_visible(surface: uint, position: Any /* JsTuple */): Boolean
+ fun is_chunk_visible(surface: String, position: ChunkPositionTable): Boolean
+ fun is_chunk_visible(surface: String, position: Any /* JsTuple */): Boolean
+ fun is_chunk_visible(surface: LuaSurface, position: ChunkPositionTable): Boolean
+ fun is_chunk_visible(surface: LuaSurface, position: Any /* JsTuple */): Boolean
+ fun cancel_charting(surface: uint = definedExternally)
+ fun cancel_charting()
+ fun cancel_charting(surface: String = definedExternally)
+ fun cancel_charting(surface: LuaSurface = definedExternally)
+ fun get_ammo_damage_modifier(ammo: String): double
+ fun set_ammo_damage_modifier(ammo: String, modifier: double)
+ fun get_gun_speed_modifier(ammo: String): double
+ fun set_gun_speed_modifier(ammo: String, modifier: double)
+ fun get_turret_attack_modifier(turret: String): double
+ fun set_turret_attack_modifier(turret: String, modifier: double)
+ fun set_cease_fire(other: String, cease_fire: Boolean)
+ fun set_cease_fire(other: LuaForce, cease_fire: Boolean)
+ fun get_cease_fire(other: String): Boolean
+ fun get_cease_fire(other: LuaForce): Boolean
+ fun set_friend(other: String, friend: Boolean)
+ fun set_friend(other: LuaForce, friend: Boolean)
+ fun get_friend(other: String): Boolean
+ fun get_friend(other: LuaForce): Boolean
+ fun is_pathfinder_busy(): Boolean
+ fun kill_all_units()
+ fun find_logistic_network_by_position(position: Position, surface: uint): LuaLogisticNetwork?
+ fun find_logistic_network_by_position(position: Position, surface: String): LuaLogisticNetwork?
+ fun find_logistic_network_by_position(position: Position, surface: LuaSurface): LuaLogisticNetwork?
+ fun set_spawn_position(position: Position, surface: uint)
+ fun set_spawn_position(position: Position, surface: String)
+ fun set_spawn_position(position: Position, surface: LuaSurface)
+ fun get_spawn_position(surface: uint): PositionTable
+ fun get_spawn_position(surface: String): PositionTable
+ fun get_spawn_position(surface: LuaSurface): PositionTable
+ fun unchart_chunk(position: ChunkPositionTable, surface: uint)
+ fun unchart_chunk(position: ChunkPositionTable, surface: String)
+ fun unchart_chunk(position: ChunkPositionTable, surface: LuaSurface)
+ fun unchart_chunk(position: Any /* JsTuple */, surface: uint)
+ fun unchart_chunk(position: Any /* JsTuple */, surface: String)
+ fun unchart_chunk(position: Any /* JsTuple */, surface: LuaSurface)
+ fun get_item_launched(item: String): uint
+ fun set_item_launched(item: String, count: uint)
+ fun print(message: Any /* JsTuple */, color: ColorTable = definedExternally)
+ fun print(message: Any /* JsTuple */)
+ fun print(message: Any /* JsTuple */, color: Any /* JsTuple */ = definedExternally)
+ fun print(message: String, color: ColorTable = definedExternally)
+ fun print(message: String)
+ fun print(message: String, color: Any /* JsTuple */ = definedExternally)
+ fun print(message: Number, color: ColorTable = definedExternally)
+ fun print(message: Number)
+ fun print(message: Number, color: Any /* JsTuple */ = definedExternally)
+ fun get_trains(surface: uint = definedExternally): Array
+ fun get_trains(): Array
+ fun get_trains(surface: String = definedExternally): Array
+ fun get_trains(surface: LuaSurface = definedExternally): Array
+ fun add_chart_tag(surface: uint, tag: ChartTagSpec): LuaCustomChartTag?
+ fun add_chart_tag(surface: String, tag: ChartTagSpec): LuaCustomChartTag?
+ fun add_chart_tag(surface: LuaSurface, tag: ChartTagSpec): LuaCustomChartTag?
+ fun find_chart_tags(surface: uint, area: BoundingBoxTable = definedExternally): Array
+ fun find_chart_tags(surface: uint): Array
+ fun find_chart_tags(surface: uint, area: Any /* JsTuple */ = definedExternally): Array
+ fun find_chart_tags(surface: String, area: BoundingBoxTable = definedExternally): Array
+ fun find_chart_tags(surface: String): Array
+ fun find_chart_tags(surface: String, area: Any /* JsTuple */ = definedExternally): Array
+ fun find_chart_tags(surface: LuaSurface, area: BoundingBoxTable = definedExternally): Array
+ fun find_chart_tags(surface: LuaSurface): Array
+ fun find_chart_tags(surface: LuaSurface, area: Any /* JsTuple */ = definedExternally): Array
+ fun get_saved_technology_progress(technology: String): double?
+ fun get_saved_technology_progress(technology: LuaTechnology): double?
+ fun get_saved_technology_progress(technology: LuaTechnologyPrototype): double?
+ fun set_saved_technology_progress(technology: String, progress: double?)
+ fun set_saved_technology_progress(technology: LuaTechnology, progress: double?)
+ fun set_saved_technology_progress(technology: LuaTechnologyPrototype, progress: double?)
+ fun reset_evolution()
+ fun play_sound(params: `T$34`)
+ fun get_train_stops(params: `T$35` = definedExternally): Array
+ fun get_hand_crafting_disabled_for_recipe(recipe: String): Boolean
+ fun get_hand_crafting_disabled_for_recipe(recipe: LuaRecipe): Boolean
+ fun set_hand_crafting_disabled_for_recipe(recipe: String, hand_crafting_disabled: Boolean)
+ fun set_hand_crafting_disabled_for_recipe(recipe: LuaRecipe, hand_crafting_disabled: Boolean)
+ fun add_research(technology: String): Boolean
+ fun add_research(technology: LuaTechnology): Boolean
+ fun add_research(technology: LuaTechnologyPrototype): Boolean
+ fun cancel_current_research()
+ fun get_linked_inventory(prototype: LuaEntity, link_id: uint): LuaInventory?
+ fun get_linked_inventory(prototype: LuaEntityPrototype, link_id: uint): LuaInventory?
+ fun get_linked_inventory(prototype: String, link_id: uint): LuaInventory?
+ fun is_friend(other: String): Boolean
+ fun is_friend(other: LuaForce): Boolean
+ fun is_enemy(other: String): Boolean
+ fun is_enemy(other: LuaForce): Boolean
+ var name: String
+ var technologies: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var recipes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var manual_mining_speed_modifier: double
+ var manual_crafting_speed_modifier: double
+ var laboratory_speed_modifier: double
+ var laboratory_productivity_bonus: double
+ var worker_robots_speed_modifier: double
+ var worker_robots_battery_modifier: double
+ var worker_robots_storage_bonus: double
+ var current_research: LuaTechnology?
+ var research_progress: double
+ var previous_research: LuaTechnology
+ var inserter_stack_size_bonus: double
+ var stack_inserter_capacity_bonus: uint
+ var character_trash_slot_count: double
+ var maximum_following_robot_count: uint
+ var following_robots_lifetime_modifier: double
+ var ghost_time_to_live: uint
+ var players: Array
+ var ai_controllable: Boolean
+ var logistic_networks: Record>
+ var item_production_statistics: LuaFlowStatistics
+ var fluid_production_statistics: LuaFlowStatistics
+ var kill_count_statistics: LuaFlowStatistics
+ var entity_build_count_statistics: LuaFlowStatistics
+ var character_running_speed_modifier: double
+ var artillery_range_modifier: double
+ var character_build_distance_bonus: uint
+ var character_item_drop_distance_bonus: uint
+ var character_reach_distance_bonus: uint
+ var character_resource_reach_distance_bonus: double
+ var character_item_pickup_distance_bonus: double
+ var character_loot_pickup_distance_bonus: double
+ var character_inventory_slots_bonus: uint
+ var deconstruction_time_to_live: uint
+ var character_health_bonus: double
+ var max_successful_attempts_per_tick_per_construction_queue: uint
+ var max_failed_attempts_per_tick_per_construction_queue: uint
+ var zoom_to_world_enabled: Boolean
+ var zoom_to_world_ghost_building_enabled: Boolean
+ var zoom_to_world_blueprint_enabled: Boolean
+ var zoom_to_world_deconstruction_planner_enabled: Boolean
+ var zoom_to_world_selection_tool_enabled: Boolean
+ var character_logistic_requests: Boolean
+ var rockets_launched: uint
+ var items_launched: Record
+ var connected_players: Array
+ var mining_drill_productivity_bonus: double
+ var train_braking_force_bonus: double
+ var evolution_factor: double
+ var evolution_factor_by_pollution: double
+ var evolution_factor_by_time: double
+ var evolution_factor_by_killing_spawners: double
+ var friendly_fire: Boolean
+ var share_chart: Boolean
+ var research_queue_enabled: Boolean
+ var index: uint
+ var research_queue: Array?
+ var research_enabled: Boolean
+ var valid: Boolean
+ var object_name: String /* "LuaForce" */
+ fun help(): String
+}
+
+external interface LuaFuelCategoryPrototype {
+ var name: String
+ var order: String
+ var localised_name: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var localised_description: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var valid: Boolean
+ var object_name: String /* "LuaFuelCategoryPrototype" */
+ fun help(): String
+}
+
+external interface `T$36` {
+ var game_finished: Boolean
+ var player_won: Boolean
+ var next_level: String
+ var can_continue: Boolean
+ var victorious_force: dynamic /* String | LuaForce */
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$37` {
+ var text: dynamic /* JsTuple | String | Number */
+ get() = definedExternally
+ set(value) = definedExternally
+ var image: String?
+ get() = definedExternally
+ set(value) = definedExternally
+ var point_to: dynamic /* EntityGuiArrowSpecification? | PositionGuiArrowSpecification? | CraftingQueueGuiArrowSpecification? | ItemStackGuiArrowSpecification? | OtherGuiArrowSpecification? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var style: String?
+ get() = definedExternally
+ set(value) = definedExternally
+ var wrapper_frame_style: String?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$38` {
+ var player: dynamic /* uint? | String? | LuaPlayer? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var by_player: dynamic /* uint? | String? | LuaPlayer? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var surface: dynamic /* uint? | String? | LuaSurface? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var position: Position?
+ get() = definedExternally
+ set(value) = definedExternally
+ var resolution: Position?
+ get() = definedExternally
+ set(value) = definedExternally
+ var zoom: double?
+ get() = definedExternally
+ set(value) = definedExternally
+ var path: String?
+ get() = definedExternally
+ set(value) = definedExternally
+ var show_gui: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+ var show_entity_info: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+ var show_cursor_building_preview: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+ var anti_alias: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+ var quality: int?
+ get() = definedExternally
+ set(value) = definedExternally
+ var allow_in_replay: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+ var daytime: double?
+ get() = definedExternally
+ set(value) = definedExternally
+ var water_tick: uint?
+ get() = definedExternally
+ set(value) = definedExternally
+ var force_render: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$39` {
+ var force: dynamic /* String? | LuaForce? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var path: String?
+ get() = definedExternally
+ set(value) = definedExternally
+ var by_player: dynamic /* uint? | String? | LuaPlayer? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var selected_technology: dynamic /* String? | LuaTechnology? | LuaTechnologyPrototype? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var skip_disabled: Boolean?
+ get() = definedExternally
+ set(value) = definedExternally
+ var quality: int?
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface `T$40` {
+ var name: dynamic /* String? | Array? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var surface: dynamic /* uint? | String? | LuaSurface? */
+ get() = definedExternally
+ set(value) = definedExternally
+ var force: dynamic /* String? | LuaForce? */
+ get() = definedExternally
+ set(value) = definedExternally
+}
+
+external interface LuaGameScript {
+ fun set_game_state(params: `T$36`)
+ fun get_entity_by_tag(tag: String): LuaEntity
+ fun show_message_dialog(params: `T$37`)
+ fun is_demo(): Boolean
+ fun reload_script()
+ fun reload_mods()
+ fun save_atlas()
+ fun check_consistency()
+ fun regenerate_entity(entities: String)
+ fun regenerate_entity(entities: Array)
+ fun take_screenshot(params: `T$38`)
+ fun set_wait_for_screenshots_to_finish()
+ fun take_technology_screenshot(params: `T$39`)
+ fun table_to_json(data: table): String
+ fun json_to_table(json: String): dynamic /* String? | Number? | Boolean? | table? */
+ fun write_file(filename: String, data: Any /* JsTuple */, append: Boolean = definedExternally, for_player: uint = definedExternally)
+ fun write_file(filename: String, data: Any /* JsTuple */)
+ fun write_file(filename: String, data: Any /* JsTuple */, append: Boolean = definedExternally)
+ fun write_file(filename: String, data: String, append: Boolean = definedExternally, for_player: uint = definedExternally)
+ fun write_file(filename: String, data: String)
+ fun write_file(filename: String, data: String, append: Boolean = definedExternally)
+ fun write_file(filename: String, data: Number, append: Boolean = definedExternally, for_player: uint = definedExternally)
+ fun write_file(filename: String, data: Number)
+ fun write_file(filename: String, data: Number, append: Boolean = definedExternally)
+ fun remove_path(path: String)
+ fun remove_offline_players(players: Array = definedExternally)
+ fun force_crc()
+ fun create_force(force: String): LuaForce
+ fun merge_forces(source: String, destination: String)
+ fun merge_forces(source: String, destination: LuaForce)
+ fun merge_forces(source: LuaForce, destination: String)
+ fun merge_forces(source: LuaForce, destination: LuaForce)
+ fun create_surface(name: String, settings: MapGenSettings = definedExternally): LuaSurface
+ fun server_save(name: String = definedExternally)
+ fun auto_save(name: String = definedExternally)
+ fun delete_surface(surface: String)
+ fun delete_surface(surface: LuaSurface)
+ fun disable_replay()
+ fun disable_tutorial_triggers()
+ fun direction_to_string(direction: direction)
+ fun print(message: Any /* JsTuple */, color: ColorTable = definedExternally)
+ fun print(message: Any /* JsTuple */)
+ fun print(message: Any /* JsTuple */, color: Any /* JsTuple */ = definedExternally)
+ fun print(message: String, color: ColorTable = definedExternally)
+ fun print(message: String)
+ fun print(message: String, color: Any /* JsTuple */ = definedExternally)
+ fun print(message: Number, color: ColorTable = definedExternally)
+ fun print(message: Number)
+ fun print(message: Number, color: Any /* JsTuple */ = definedExternally)
+ fun create_random_generator(seed: uint = definedExternally): LuaRandomGenerator
+ fun check_prototype_translations()
+ fun play_sound(params: `T$34`)
+ fun is_valid_sound_path(sound_path: String): Boolean
+ fun is_valid_sound_path(sound_path: ): Boolean
+ fun is_valid_sprite_path(sprite_path: String): Boolean
+ fun is_valid_sprite_path(sprite_path: ): Boolean
+ fun kick_player(player: uint, reason: Any /* JsTuple */ = definedExternally)
+ fun kick_player(player: uint)
+ fun kick_player(player: uint, reason: String = definedExternally)
+ fun kick_player(player: uint, reason: Number = definedExternally)
+ fun kick_player(player: String, reason: Any /* JsTuple */ = definedExternally)
+ fun kick_player(player: String)
+ fun kick_player(player: String, reason: String = definedExternally)
+ fun kick_player(player: String, reason: Number = definedExternally)
+ fun kick_player(player: LuaPlayer, reason: Any /* JsTuple */ = definedExternally)
+ fun kick_player(player: LuaPlayer)
+ fun kick_player(player: LuaPlayer, reason: String = definedExternally)
+ fun kick_player(player: LuaPlayer, reason: Number = definedExternally)
+ fun ban_player(player: uint, reason: Any /* JsTuple */ = definedExternally)
+ fun ban_player(player: uint)
+ fun ban_player(player: uint, reason: String = definedExternally)
+ fun ban_player(player: uint, reason: Number = definedExternally)
+ fun ban_player(player: String, reason: Any /* JsTuple */ = definedExternally)
+ fun ban_player(player: String)
+ fun ban_player(player: String, reason: String = definedExternally)
+ fun ban_player(player: String, reason: Number = definedExternally)
+ fun ban_player(player: LuaPlayer, reason: Any /* JsTuple */ = definedExternally)
+ fun ban_player(player: LuaPlayer)
+ fun ban_player(player: LuaPlayer, reason: String = definedExternally)
+ fun ban_player(player: LuaPlayer, reason: Number = definedExternally)
+ fun unban_player(player: uint)
+ fun unban_player(player: String)
+ fun unban_player(player: LuaPlayer)
+ fun purge_player(player: uint)
+ fun purge_player(player: String)
+ fun purge_player(player: LuaPlayer)
+ fun mute_player(player: uint)
+ fun mute_player(player: String)
+ fun mute_player(player: LuaPlayer)
+ fun unmute_player(player: uint)
+ fun unmute_player(player: String)
+ fun unmute_player(player: LuaPlayer)
+ fun count_pipe_groups()
+ fun is_multiplayer(): Boolean
+ fun get_active_entities_count(surface: uint = definedExternally): uint
+ fun get_active_entities_count(): uint
+ fun get_active_entities_count(surface: String = definedExternally): uint
+ fun get_active_entities_count(surface: LuaSurface = definedExternally): uint
+ fun get_map_exchange_string(): String
+ fun parse_map_exchange_string(map_exchange_string: String): MapExchangeStringData
+ fun get_train_stops(params: `T$40` = definedExternally): Array
+ fun get_player(player: uint): LuaPlayer?
+ fun get_player(player: String): LuaPlayer?
+ fun get_surface(surface: uint): LuaSurface?
+ fun get_surface(surface: String): LuaSurface?
+ fun create_profiler(stopped: Boolean = definedExternally): LuaProfiler
+ fun evaluate_expression(expression: String, variables: Record = definedExternally): double
+ fun get_filtered_entity_prototypes(filters: Array): LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ fun get_filtered_item_prototypes(filters: Array): LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ fun get_filtered_equipment_prototypes(filters: Array): LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ fun get_filtered_mod_setting_prototypes(filters: Array): LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ fun get_filtered_achievement_prototypes(filters: Array): LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ fun get_filtered_tile_prototypes(filters: Array): LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ fun get_filtered_decorative_prototypes(filters: Array): LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ fun get_filtered_fluid_prototypes(filters: Array): LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ fun get_filtered_recipe_prototypes(filters: Array): LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ fun get_filtered_technology_prototypes(filters: Array): LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ fun create_inventory(size: uint16): LuaInventory
+ fun get_script_inventories(mod: String = definedExternally): Record>
+ fun reset_time_played()
+ fun encode_string(string: String): String?
+ fun decode_string(string: String): String?
+ var player: LuaPlayer?
+ var players: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var map_settings: MapSettings
+ var difficulty_settings: DifficultySettings
+ var difficulty: difficulty
+ var forces: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var entity_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var item_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var fluid_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var tile_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var equipment_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var damage_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var virtual_signal_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var equipment_grid_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var recipe_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var technology_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var decorative_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var particle_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var autoplace_control_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var noise_layer_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var mod_setting_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var custom_input_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var ammo_category_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var named_noise_expressions: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var item_subgroup_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var item_group_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var fuel_category_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var resource_category_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var achievement_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var module_category_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var equipment_category_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var trivial_smoke_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var shortcut_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var recipe_category_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var font_prototypes: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var map_gen_presets: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var styles: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var tick: uint
+ var ticks_played: uint
+ var tick_paused: Boolean
+ var ticks_to_run: uint
+ var finished: Boolean
+ var speed: float
+ var surfaces: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex */
+ var active_mods: Record
+ var connected_players: Array
+ var permissions: LuaPermissionGroups
+ var backer_names: LuaCustomTableMembers /* LuaCustomTableMembers & CustomTableIndex