fixed overlay
This commit is contained in:
1 parent
46409c8daa
commit
681d6ec9ee
1 file changed
+13
-14
@@ -12,7 +12,7 @@ global_renderers = m(
|
||||
l('active', false),
|
||||
l('handler', '__chunk_renderer'),
|
||||
l('tasks', m()),
|
||||
l('range', 4)
|
||||
l('range', 6)
|
||||
)),
|
||||
l('shapes', m(
|
||||
l('active', false),
|
||||
@@ -95,7 +95,7 @@ __structure_renderer(player_name) ->
|
||||
total_size = _euclidean(from, to);
|
||||
density = max(10, total_size/10);
|
||||
//particle_box('dust 0 1 1 2', from, to+1, density);
|
||||
draw_shape('box', 15, 'from', from, 'to', to+1, 'color', 0x00FFFFFF);
|
||||
draw_shape('box', 15, 'from', from, 'to', to+1, 'color', 0x00FFFFFF, 'width', 3);
|
||||
structure_pieces = slice(sort_key(structure_pieces, _euclidean_sq((_:2+_:3)/2,ppos)), 0, config:'max_pieces');
|
||||
for (structure_pieces, l(piece, direction, from, to) = _;
|
||||
//factor = 1- _i / config:'max_pieces' / 2;
|
||||
@@ -106,8 +106,8 @@ __structure_renderer(player_name) ->
|
||||
g = r;
|
||||
b = 255;
|
||||
a = 255;
|
||||
color = a+256*(b+256*(g+256*r));
|
||||
draw_shape('box', 15, 'from', from, 'to', to+1, 'color', color);
|
||||
color = 256*(b+256*(g+256*r)); // leaving out a
|
||||
draw_shape('box', 15, 'from', from, 'to', to+1, 'color', color+a, 'fill', color+a/6);
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -122,10 +122,9 @@ __chunk_renderer(player_name) ->
|
||||
// get lower corner of the chunk
|
||||
ppos = map(pos(p)/16, floor(_))*16;
|
||||
ppos:1 = 0;
|
||||
|
||||
r = config:'range';
|
||||
for(range(-r,r), cx =_;
|
||||
for (range(-r,r), cz = _;
|
||||
rang = config:'range';
|
||||
for(range(-rang,rang), cx =_;
|
||||
for (range(-rang,rang), cz = _;
|
||||
ref_pos = ppos + l(16*cx,0,16*cz);
|
||||
if(has(config:'tasks':'slime_chunks') && in_slime_chunk(ref_pos),
|
||||
player_distance = _euclidean(ppos, ref_pos);
|
||||
@@ -138,12 +137,12 @@ __chunk_renderer(player_name) ->
|
||||
b = 30;
|
||||
a = max(0, 255-player_distance);
|
||||
color = a+256*(b+256*(g+256*r));
|
||||
draw_shape('line', 15, 'from', top_00, 'to', top_10, 'color', color);
|
||||
draw_shape('line', 15, 'from', top_10, 'to', top_11, 'color', color);
|
||||
draw_shape('line', 15, 'from', top_11, 'to', top_01, 'color', color);
|
||||
draw_shape('line', 15, 'from', top_01, 'to', top_00, 'color', color);
|
||||
draw_shape('line', 15, 'from', top_00, 'to', top_11, 'color', color);
|
||||
draw_shape('line', 15, 'from', top_01, 'to', top_10, 'color', color);
|
||||
draw_shape('line', 15, 'from', top_00, 'to', top_10, 'color', color, 'width', 3);
|
||||
draw_shape('line', 15, 'from', top_10, 'to', top_11, 'color', color, 'width', 3);
|
||||
draw_shape('line', 15, 'from', top_11, 'to', top_01, 'color', color, 'width', 3);
|
||||
draw_shape('line', 15, 'from', top_01, 'to', top_00, 'color', color, 'width', 3);
|
||||
draw_shape('line', 15, 'from', top_00, 'to', top_11, 'color', color, 'width', 3);
|
||||
draw_shape('line', 15, 'from', top_01, 'to', top_10, 'color', color, 'width', 3);
|
||||
|
||||
//part = 'dust 0.2 0.8 0.2 2';
|
||||
//density = 2+player_distance/2;
|
||||
|
||||
Reference in new issue
Block a user