fix typescript after updates
This commit is contained in:
parent
4d94e2f395
commit
4d2f574827
5 changed files with 20 additions and 20 deletions
|
|
@ -6,14 +6,6 @@ interface FactorioObjectData {
|
|||
objectName: ObjectName;
|
||||
}
|
||||
|
||||
interface FactorioEvent<T extends FactorioObjectData> extends KafkatorioPacket {
|
||||
data: T;
|
||||
eventType: string;
|
||||
modVersion: string;
|
||||
packetType: PacketType;
|
||||
tick: uint;
|
||||
}
|
||||
|
||||
interface PlayerData extends FactorioObjectData {
|
||||
associatedCharactersUnitNumbers: uint[];
|
||||
characterUnitNumber: uint | null;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
type PrototypeObjectName = "LuaTilePrototype";
|
||||
|
||||
interface FactorioPrototype {
|
||||
objectName: PrototypeObjectName;
|
||||
prototypeObjectName: PrototypeObjectName;
|
||||
}
|
||||
|
||||
interface FactorioMapTilePrototype extends FactorioPrototype {
|
||||
|
|
@ -12,6 +12,6 @@ interface FactorioMapTilePrototype extends FactorioPrototype {
|
|||
layer: uint;
|
||||
mapColor: Colour;
|
||||
name: string;
|
||||
objectName: PrototypeObjectName;
|
||||
order: string;
|
||||
prototypeObjectName: PrototypeObjectName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,14 @@ interface KafkatorioPacket {
|
|||
packetType: PacketType;
|
||||
}
|
||||
|
||||
interface FactorioEvent extends KafkatorioPacket {
|
||||
data: FactorioObjectData;
|
||||
eventType: string;
|
||||
modVersion: string;
|
||||
packetType: PacketType;
|
||||
tick: uint;
|
||||
}
|
||||
|
||||
interface Colour {
|
||||
alpha: float;
|
||||
blue: float;
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ export function convertPrototypes(): FactorioPrototype[] {
|
|||
|
||||
function getMapTilePrototypes(): FactorioMapTilePrototype[] {
|
||||
let tiles: FactorioMapTilePrototype[] = []
|
||||
for (let [_, tile] of pairs(game.tile_prototypes)) {
|
||||
for (let [, tile] of pairs(game.tile_prototypes)) {
|
||||
tiles.push(
|
||||
<FactorioMapTilePrototype>{
|
||||
objectName: tile.object_name,
|
||||
prototypeObjectName: tile.object_name,
|
||||
|
||||
name: tile.name,
|
||||
order: tile.order,
|
||||
|
|
@ -29,7 +29,7 @@ function getMapTilePrototypes(): FactorioMapTilePrototype[] {
|
|||
|
||||
function convertCollisionMaskToNames(cm: CollisionMask): string[] {
|
||||
let masks: string[] = []
|
||||
for (let [name, _] of pairs(cm)) {
|
||||
for (let [name] of pairs(cm)) {
|
||||
masks.push(name)
|
||||
}
|
||||
return masks
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue