tiles from kafka -> image tiles... maybe???

This commit is contained in:
Adam 2022-01-13 00:00:59 +01:00
parent 9acce508ea
commit 49ad3654a3
21 changed files with 961 additions and 37 deletions

View file

@ -6,11 +6,11 @@ interface FactorioPrototype {
prototypeObjectName: PrototypeObjectName;
}
interface FactorioMapTilePrototype extends FactorioPrototype {
interface MapTilePrototype extends FactorioPrototype {
canBeMined: boolean;
collisionMasks: string[];
layer: uint;
mapColor: Colour;
mapColour: Colour;
name: string;
order: string;
prototypeObjectName: PrototypeObjectName;

View file

@ -8,18 +8,18 @@ export function convertPrototypes(): FactorioPrototype[] {
return prototypes
}
function getMapTilePrototypes(): FactorioMapTilePrototype[] {
let tiles: FactorioMapTilePrototype[] = []
function getMapTilePrototypes(): MapTilePrototype[] {
let tiles: MapTilePrototype[] = []
for (let [, tile] of pairs(game.tile_prototypes)) {
tiles.push(
<FactorioMapTilePrototype>{
<MapTilePrototype>{
prototypeObjectName: tile.object_name,
name: tile.name,
order: tile.order,
layer: tile.layer,
collisionMasks: convertCollisionMaskToNames(tile.collision_mask),
mapColor: Converters.mapColour(tile.map_color),
mapColour: Converters.mapColour(tile.map_color),
canBeMined: tile.mineable_properties.minable,
}
)