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:
co-authored by
Claude Opus 5.5
parent
8dc71e8934
commit
689c04bbd5
+1
-1
@@ -814,7 +814,7 @@ hash = "db4c4a8ab49265f6e8e456f495800ea148b133b18a3242aabca30b98ab7f784f"
|
|||||||
|
|
||||||
[[files]]
|
[[files]]
|
||||||
file = "kubejs/client_scripts/createrp_plots.js"
|
file = "kubejs/client_scripts/createrp_plots.js"
|
||||||
hash = "4efdcd2dca1e5c3baa1ac523803ecbe86b93079d56be93f86c96a070a1d29c5f"
|
hash = "2a4686d252bd289fd99bde461bdfe3e2215cf35640f36e0610737730016ca2a0"
|
||||||
|
|
||||||
[[files]]
|
[[files]]
|
||||||
file = "kubejs/client_scripts/createrp_ponder.js"
|
file = "kubejs/client_scripts/createrp_ponder.js"
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ const WALL_HALF = 1 / 16 // пів товщини стіни: у пло
|
|||||||
|
|
||||||
let rpPlots = [] // { id, kind, walls: [[x1, z1, x2, z2], …] }
|
let rpPlots = [] // { id, kind, walls: [[x1, z1, x2, z2], …] }
|
||||||
let rpByChunk = {} // "cx,cz" -> індекс у rpPlots
|
let rpByChunk = {} // "cx,cz" -> індекс у rpPlots
|
||||||
|
// державну землю при вході не підсвічуємо — її видно лише з довідником у руці
|
||||||
|
const RP_QUIET = { reserved: true, road: true, road_built: true, state_mine: true, state: true }
|
||||||
let rpHere = ''
|
let rpHere = ''
|
||||||
let rpShowUntil = 0
|
let rpShowUntil = 0
|
||||||
let rpTick = 0
|
let rpTick = 0
|
||||||
@@ -78,6 +80,7 @@ function rpDraw () {
|
|||||||
var here = ''
|
var here = ''
|
||||||
for (var n = 0; n < rpPlots.length && here === ''; n++) {
|
for (var n = 0; n < rpPlots.length && here === ''; n++) {
|
||||||
var cells = rpPlots[n].cells
|
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 }
|
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 }
|
if (here !== rpHere) { rpHere = here; if (here !== '') rpShowUntil = rpTick + SHOW_TICKS }
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0"
|
|||||||
[index]
|
[index]
|
||||||
file = "index.toml"
|
file = "index.toml"
|
||||||
hash-format = "sha256"
|
hash-format = "sha256"
|
||||||
hash = "f3e15d8ad0a056c06329546314d374d165bb6cb3218c1e2de8e1cb62badcda5b"
|
hash = "254c541987e989c7e0e7ee02b0a7719151f1a5c83b2d57af518551f47ddaf969"
|
||||||
|
|
||||||
[versions]
|
[versions]
|
||||||
minecraft = "1.21.1"
|
minecraft = "1.21.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user