This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

source: ps/trunk/binaries/data/mods/public/maps/random/rmgen/painter/TileClassPainter.js

Last change on this file was 28036, checked in by marder, 11 months ago

rmgen: var -> let -> const

One should always use the variable declaration with the least possible scope.
This patch cleans up many (but not all) of the var in rmgen and replaces them with let or const.
The same is done for let -> const.

comments by: @sera @Stan

Differential revision: https://code.wildfiregames.com/D5214

  • Property svn:eol-style set to native
File size: 255 bytes
Line 
1/**
2 * Marks the affected area with the given tileclass.
3 */
4function TileClassPainter(tileClass)
5{
6 this.tileClass = tileClass;
7}
8
9TileClassPainter.prototype.paint = function(area)
10{
11 for (const point of area.getPoints())
12 this.tileClass.add(point);
13};
Note: See TracBrowser for help on using the repository browser.