Marks and dig selection in each master's colour; imps dig only their master's marks; AI marks near its ground, acts calmer, re-summons imps; allies never claim each other's ground
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
010a6a8a12
commit
773be21455
5 files changed
+161
-37
No files matched your search
+5
-13
@@ -675,18 +675,10 @@ fn view_side() -> u8 {
|
||||
VIEW_SIDE.with(|v| v.get())
|
||||
}
|
||||
|
||||
// colour of a dig mark: own marks yellow, other masters' marks in their colour
|
||||
// colour of a dig mark: always the colour of the master who set it
|
||||
fn mark_rgb(by: u8) -> [u8; 3] {
|
||||
if by == view_side() {
|
||||
return [255, 205, 50];
|
||||
}
|
||||
match by {
|
||||
0 => [235, 90, 125], // the first master, seen by another one
|
||||
2 => [80, 240, 110], // green rival
|
||||
3 => [100, 150, 255], // blue rival
|
||||
4 => [255, 150, 50], // the fourth master
|
||||
_ => [255, 205, 50],
|
||||
}
|
||||
let c = master_rgb(by);
|
||||
[(c.x * 255.0) as u8, (c.y * 255.0) as u8, (c.z * 255.0) as u8]
|
||||
}
|
||||
|
||||
// Glowing box in the marker's colour around a block that is marked for digging
|
||||
@@ -768,9 +760,9 @@ fn build_chunk(map: &Map, amb: &[f32], glow: &[f32], cx: i32, cz: i32, atlas: &T
|
||||
let (xf, zf) = (x as f32, z as f32);
|
||||
if !map.shown(idx(x, z)) {
|
||||
// fog of war: a black block, with black sides towards known open ground;
|
||||
// tiles marked for digging glow dark yellow so the plan stays visible
|
||||
// own tiles marked for digging glow darkly in the master's colour so the plan stays visible
|
||||
let black = col(Vec3::splat(0.0), 1.0);
|
||||
let top = if t.marked && t.mark_by == view_side() { col(vec3(0.42, 0.33, 0.06), 1.0) } else { black };
|
||||
let top = if t.marked && t.mark_by == view_side() { col(master_rgb(t.mark_by) * 0.42, 1.0) } else { black };
|
||||
mb.quad([vec3(xf, WALL_H, zf), vec3(xf + 1.0, WALL_H, zf), vec3(xf + 1.0, WALL_H, zf + 1.0), vec3(xf, WALL_H, zf + 1.0)], [ua, ua, ua, ua], [top; 4], [Vec3::Y; 4]);
|
||||
for (d, &(dx, dz)) in DIR4.iter().enumerate() {
|
||||
let open = map.get(x + dx, z + dz).map_or(false, |o| !o.solid()) && map.shown(idx((x + dx).max(0), (z + dz).max(0)));
|
||||
|
||||
Reference in new issue
Block a user