Advertisement
Archeia

Tiled Version MZ 1.7.x

Oct 31st, 2021
1,320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Game_TiledDoodad.prototype.setup = function (data) {
  2.     this._data = data;
  3.     this._id = data.id;
  4.  
  5.     let gid = data.gid;
  6.     gid &= ~(FLIPPED_HORIZONTALLY_FLAG | FLIPPED_VERTICALLY_FLAG);
  7.     this._gid = gid ? gid : undefined;
  8.  
  9.     this._textureId = VisuMZ.Utility.getTextureId(gid);
  10.  
  11.     const tileset = $gameMap.tiledData.tilesets[this._textureId];
  12.  
  13.     if (tileset.tiles === undefined) {
  14.       const tData = $gameMap.tiledData;
  15.       tileset.tiles = [{id: 0, image: tileset.image, imageheight: tileset.imageheight, imagewidth: tileset.imagewidth }]
  16.     }
  17.  
  18.    
  19.     const tile = (tileset) ? tileset.tiles[this._gid - tileset.firstgid] : 'undefined'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement