forked from erle/xmaps
Improve treasure map water depiction
This commit is contained in:
parent
70e3c534e4
commit
0882a48751
23
init.lua
23
init.lua
|
@ -79,8 +79,11 @@ maps.create_map = function(pos, player_name)
|
||||||
local colormap = {
|
local colormap = {
|
||||||
{ 195, 175, 140 }, -- background
|
{ 195, 175, 140 }, -- background
|
||||||
{ 60, 35, 16 }, -- dark line
|
{ 60, 35, 16 }, -- dark line
|
||||||
{ 135, 90, 40 }, -- liquid dark
|
|
||||||
{ 210, 170, 130 }, -- liquid light
|
{ 210, 170, 130 }, -- liquid light
|
||||||
|
{ 135, 90, 40 }, -- liquid dark
|
||||||
|
{ 150, 105, 55 }, -- more liquid
|
||||||
|
{ 165, 120, 70 }, -- more liquid
|
||||||
|
{ 150, 105, 55 }, -- more liquid
|
||||||
}
|
}
|
||||||
for x = 1,size,1 do
|
for x = 1,size,1 do
|
||||||
for z = 1,size,1 do
|
for z = 1,size,1 do
|
||||||
|
@ -104,26 +107,26 @@ maps.create_map = function(pos, player_name)
|
||||||
-- draw coastline
|
-- draw coastline
|
||||||
for x = 1,size,1 do
|
for x = 1,size,1 do
|
||||||
for z = 1,size,1 do
|
for z = 1,size,1 do
|
||||||
if (
|
if pixels[z][x][1] >= 2 then
|
||||||
pixels[z][x][1] == 2 or
|
pixels[z][x] = { 2 + ( z % 2 ) } -- stripes
|
||||||
pixels[z][x][1] == 3
|
if pixels[z][x][1] == 3 then
|
||||||
) then
|
pixels[z][x] = { 3 + ( ( math.floor( x / 7 ) + math.floor( 1.3 * z * z ) ) % 4 ) }
|
||||||
pixels[z][x] = { 2 + z % 2 } -- stripes
|
end
|
||||||
if z > 1 and pixels[z-1][x][1] < 2 then
|
if z > 1 and pixels[z-1][x][1] < 2 then
|
||||||
pixels[z-1][x] = { 1 }
|
pixels[z-1][x] = { 1 }
|
||||||
pixels[z][x] = { 2 }
|
pixels[z][x] = { 3 }
|
||||||
end
|
end
|
||||||
if z < size and pixels[z+1][x][1] < 2 then
|
if z < size and pixels[z+1][x][1] < 2 then
|
||||||
pixels[z+1][x] = { 1 }
|
pixels[z+1][x] = { 1 }
|
||||||
pixels[z][x] = { 2 }
|
pixels[z][x] = { 3 }
|
||||||
end
|
end
|
||||||
if x > 1 and pixels[z][x-1][1] < 2 then
|
if x > 1 and pixels[z][x-1][1] < 2 then
|
||||||
pixels[z][x-1] = { 1 }
|
pixels[z][x-1] = { 1 }
|
||||||
pixels[z][x] = { 2 }
|
pixels[z][x] = { 3 }
|
||||||
end
|
end
|
||||||
if x < size and pixels[z][x+1][1] < 2 then
|
if x < size and pixels[z][x+1][1] < 2 then
|
||||||
pixels[z][x+1] = { 1 }
|
pixels[z][x+1] = { 1 }
|
||||||
pixels[z][x] = { 2 }
|
pixels[z][x] = { 3 }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue