Skip to content

Instantly share code, notes, and snippets.

@Nercury
Created December 16, 2019 21:35
Show Gist options
  • Save Nercury/9f1df9205174e742bfb8fd78a4e50be8 to your computer and use it in GitHub Desktop.
Save Nercury/9f1df9205174e742bfb8fd78a4e50be8 to your computer and use it in GitHub Desktop.
Transport Fever 2 data function
-- renders map from 3x3 data pixels
local resolutionY = params.mapSizeY / (3 - 1)
local resolutionX = params.mapSizeX / (3 - 1)
self.layers:Data(outputLayer, {
size = {3, 3},
data = {1, 1, 1, 1, 0, 1, 1, 1, 1},
delta = {resolutionX, resolutionY} },
"BICUBIC")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment