massive refactor to export entities (buildings and resources)

- minor version bumps
- new Factorio version
- use both prototype name and type to identify a prototype
- kxs-ts-gen: use BrandTyping, but exclude some identifiers
- kxs-ts-gen: manually create zip dist, so it can run after the project compiles
- mod: use typed-factorio strict types
- mod: refactor event handlers to be a little more consistent and object-oriented
This commit is contained in:
Adam 2022-07-05 23:44:23 +02:00
parent 88982d818a
commit 90dc520d22
62 changed files with 2629 additions and 713 deletions

View file

@ -18,12 +18,14 @@ fun Configuration.asProvider() {
isCanBeConsumed = true
}
fun Configuration.asConsumer() {
isVisible = false
isCanBeResolved = true
isCanBeConsumed = false
}
fun Configuration.factorioModAttributes(objects: ObjectFactory): Configuration =
attributes {
attribute(USAGE_ATTRIBUTE, objects.named("factorio"))
@ -32,6 +34,7 @@ fun Configuration.factorioModAttributes(objects: ObjectFactory): Configuration =
attribute(BUNDLING_ATTRIBUTE, objects.named(Bundling.EMBEDDED))
}
fun Configuration.typescriptAttributes(objects: ObjectFactory): Configuration =
attributes {
attribute(USAGE_ATTRIBUTE, objects.named("typescript"))

View file

@ -6,8 +6,10 @@ import org.gradle.api.file.FileSystemOperations
import org.gradle.api.tasks.JavaExec
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.TaskAction
import org.gradle.work.DisableCachingByDefault
@DisableCachingByDefault(because = "caching makes regenerating more difficult")
abstract class GenerateTypeScriptTask @Inject constructor(
private val fileOps: FileSystemOperations,
) : JavaExec() {