Plot borders: state land is not flashed on entering; an unbuilt road is shown only to road builders and operators

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Fulldroper
2026-10-11 09:55:55 +03:00
co-authored by Claude Opus 5.5
parent 8dc71e8934
commit 689c04bbd5
3 changed files with 5 additions and 2 deletions
+3
View File
@@ -18,6 +18,8 @@ const WALL_HALF = 1 / 16 // пів товщини стіни: у пло
let rpPlots = [] // { id, kind, walls: [[x1, z1, x2, z2], …] }
let rpByChunk = {} // "cx,cz" -> індекс у rpPlots
// державну землю при вході не підсвічуємо — її видно лише з довідником у руці
const RP_QUIET = { reserved: true, road: true, road_built: true, state_mine: true, state: true }
let rpHere = ''
let rpShowUntil = 0
let rpTick = 0
@@ -78,6 +80,7 @@ function rpDraw () {
var here = ''
for (var n = 0; n < rpPlots.length && here === ''; n++) {
var cells = rpPlots[n].cells
if (RP_QUIET[rpPlots[n].kind]) continue
for (var k = 0; k < cells.length; k++) if (cells[k][0] == cx && cells[k][1] == cz) { here = rpPlots[n].id; break }
}
if (here !== rpHere) { rpHere = here; if (here !== '') rpShowUntil = rpTick + SHOW_TICKS }