Skip to content

[FEATURE] onReadItem and onReadTile events #4

@gesior

Description

@gesior

Current version first read whole map into RAM (UP TO FEW GB RAM).
Then let me do some advanced operations on map.
Then I can save my modified map.

There are many functionalities for which I don't need whole map: read house tiles, find some item position
It would be nice, if I could run it with few MB RAM (remove 'tile' from memory just after it's loaded with items).

  1. After loading item:
(...)
const mapReader = new MapReader();
mapReader.on('readItem', function(tile, item)
{
  if(item.id == 1387) {
    console.log('found teleport', tile.pos);
  }
}
);
mapReader.process('input.otbm');
  1. After loading tile with items and properties:
mapReader.on('readTile', function(tile) {});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions