forked from erle/xmaps
Fix variable naming
The variable “color” was not holding a color, but a pixel.
This commit is contained in:
parent
13789550e8
commit
741f9ede21
4
init.lua
4
init.lua
|
@ -141,8 +141,8 @@ xmaps.create_map_item = function(pos, properties)
|
||||||
if pixels[z][x][1] >= 3 then
|
if pixels[z][x][1] >= 3 then
|
||||||
pixels[z][x] = { 3 + ( z % 2 ) } -- stripes
|
pixels[z][x] = { 3 + ( z % 2 ) } -- stripes
|
||||||
if pixels[z][x][1] == 4 then
|
if pixels[z][x][1] == 4 then
|
||||||
local color = { 4 + ( ( math.floor( x / 7 ) + math.floor( 1.3 * z * z ) ) % 4 ) }
|
local color = 4 + ( ( math.floor( x / 7 ) + math.floor( 1.3 * z * z ) ) % 4 )
|
||||||
pixels[z][x] = color
|
pixels[z][x] = { color }
|
||||||
end
|
end
|
||||||
if z > 1 and pixels[z-1][x][1] < 3 then
|
if z > 1 and pixels[z-1][x][1] < 3 then
|
||||||
pixels[z-1][x] = { 2 }
|
pixels[z-1][x] = { 2 }
|
||||||
|
|
Loading…
Reference in New Issue