- tidy up groupMapChunks.kt
- add ticks to all Kafkatorio Packets - add Kafka Streams test for groupMapChunks.kt
This commit is contained in:
parent
bfdee32d61
commit
b8ba8b7c9e
22 changed files with 271 additions and 98 deletions
|
|
@ -16,4 +16,5 @@ interface FactorioConfigurationUpdate extends KafkatorioPacket {
|
|||
factorioData: FactorioGameDataUpdate;
|
||||
modVersion: string;
|
||||
packetType: PacketType;
|
||||
tick: uint;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ interface FactorioPrototypes extends KafkatorioPacket {
|
|||
modVersion: string;
|
||||
packetType: PacketType;
|
||||
prototypes: FactorioPrototype[];
|
||||
tick: uint;
|
||||
}
|
||||
|
||||
interface MapTilePrototype extends FactorioPrototype {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ type PacketType = "EVENT" | "CONFIG" | "PROTOTYPES" | "UPDATE";
|
|||
interface KafkatorioPacket {
|
||||
modVersion: string;
|
||||
packetType: PacketType;
|
||||
tick: uint;
|
||||
}
|
||||
|
||||
interface FactorioEvent extends KafkatorioPacket {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ export function emitConfigurationUpdate(changeData: ConfigurationChangedData) {
|
|||
modVersion: global.MOD_VERSION,
|
||||
packetType: "CONFIG",
|
||||
allMods: allMods(changeData),
|
||||
factorioData: factorioData(changeData)
|
||||
factorioData: factorioData(changeData),
|
||||
tick: game.tick,
|
||||
})
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ export function emitPrototypes() {
|
|||
emitPacket<FactorioPrototypes>({
|
||||
modVersion: global.MOD_VERSION,
|
||||
packetType: "PROTOTYPES",
|
||||
prototypes: prototypes()
|
||||
prototypes: prototypes(),
|
||||
tick: game.tick,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ export function emitEvent<T extends FactorioObjectData>(eventData: T, tick: uint
|
|||
packetType: "EVENT",
|
||||
eventType: eventType,
|
||||
modVersion: global.MOD_VERSION,
|
||||
tick: tick
|
||||
tick: tick,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue