Skip to content

Commit c461693

Browse files
committed
Fix generator warnings
1 parent 04a9335 commit c461693

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

generator/input/manual-defs-prototype.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { AnyPrototype, CustomInputName } from "factorio:common"
2-
import { EmptyWidgetStyleSpecification } from "factorio:prototype"
32

4-
export type bool = boolean
53
export type double = number
64
export type float = number
75
export type int8 = number

generator/runtime/index.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -72,29 +72,7 @@ export class RuntimeGenerationContext extends GenerationContext<FactorioRuntimeA
7272
return this.docUrlBase() + relative_link
7373
}
7474

75-
private manualEdits() {
76-
if (this.apiDocs.application_version !== "2.0.39") {
77-
this.warning("FIXME: update manual edits for next version")
78-
return
79-
}
80-
const luaSchedule = this.apiDocs.classes.find((x) => x.name === "LuaSchedule")
81-
function fixMethod(methodName: string) {
82-
const method = luaSchedule!.methods.find((x) => x.name === methodName)!
83-
for (const param of method.parameters) {
84-
// someone did an oopsie and mixed up the type and name
85-
if (param.name === "uint" && param.type === "interrupt_index") {
86-
param.type = "uint"
87-
param.name = "interrupt_index"
88-
}
89-
}
90-
}
91-
fixMethod("get_records")
92-
fixMethod("set_records")
93-
fixMethod("clear_records")
94-
}
95-
9675
generateAll(): void {
97-
this.manualEdits()
9876
this.events = associateByName(preprocessTypesWithManualDefs(this, this.apiDocs.events, "events"))
9977
this.classes = associateByName(preprocessTypesWithManualDefs(this, this.apiDocs.classes, "classes"))
10078
const concepts = preprocessTypesWithManualDefs(

0 commit comments

Comments
 (0)