Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c5846c5f4 | ||
|
|
9dcefdadd9 | ||
|
|
c10b6bf174 | ||
|
|
ac8683945d | ||
|
|
8a98e9a8d6 | ||
|
|
689c04bbd5 | ||
|
|
8dc71e8934 | ||
|
|
8ff1748271 | ||
|
|
3306c38450 | ||
|
|
bd0c405e26 |
@@ -0,0 +1,63 @@
|
|||||||
|
#Whether scripting is enabled or not
|
||||||
|
EnableScripting=true
|
||||||
|
|
||||||
|
#Arguments given to the Nashorn scripting library
|
||||||
|
NashorArguments=-strict
|
||||||
|
|
||||||
|
#Disable Chat Bubbles
|
||||||
|
EnableChatBubbles=true
|
||||||
|
|
||||||
|
#Navigation search range for NPCs. Not recommended to increase if you have a slow pc or on a server
|
||||||
|
NpcNavRange=32
|
||||||
|
|
||||||
|
#Limit too how many npcs can be in one chunk for natural spawning
|
||||||
|
NpcNaturalSpawningChunkLimit=4
|
||||||
|
|
||||||
|
#Set to true if you want the dialog command option to be able to use op commands like tp etc
|
||||||
|
NpcUseOpCommands=false
|
||||||
|
|
||||||
|
#If set to true only opped people can use the /noppes command
|
||||||
|
NoppesCommandOpOnly=false
|
||||||
|
|
||||||
|
InventoryGuiEnabled=true
|
||||||
|
|
||||||
|
SceneButtonsEnabled=true
|
||||||
|
|
||||||
|
#Enables CustomNpcs startup update message
|
||||||
|
EnableUpdateChecker=false
|
||||||
|
|
||||||
|
#Default interact line. Leave empty to not have one
|
||||||
|
DefaultInteractLine=Hello @p
|
||||||
|
|
||||||
|
#Number of chunk loading npcs that can be active at the same time
|
||||||
|
ChuckLoaders=20
|
||||||
|
|
||||||
|
#Enables leaves decay
|
||||||
|
LeavesDecayEnabled=true
|
||||||
|
|
||||||
|
#Enables Vine Growth
|
||||||
|
VineGrowthEnabled=true
|
||||||
|
|
||||||
|
#Enables Ice Melting
|
||||||
|
IceMeltsEnabled=true
|
||||||
|
|
||||||
|
#Normal players can use soulstone on animals
|
||||||
|
SoulStoneAnimals=true
|
||||||
|
|
||||||
|
#Normal players can use soulstone on all npcs
|
||||||
|
SoulStoneNPCs=false
|
||||||
|
|
||||||
|
#Type 0 = Normal, Type 1 = Solid
|
||||||
|
HeadWearType=1
|
||||||
|
|
||||||
|
#When set to Minecraft it will use minecrafts font, when Default it will use OpenSans. Can only use fonts installed on your PC
|
||||||
|
FontType=Default
|
||||||
|
|
||||||
|
#Font size for custom fonts (doesn't work with minecrafts font)
|
||||||
|
FontSize=18
|
||||||
|
|
||||||
|
#On some servers or with certain plugins, it doesnt work, so you can disable it here
|
||||||
|
EnableInvisibleNpcs=true
|
||||||
|
|
||||||
|
NpcSpeachTriggersChatEvent=false
|
||||||
|
|
||||||
@@ -206,7 +206,7 @@ _version = 4
|
|||||||
# If enabled, a chat message will be displayed if the garbage
|
# If enabled, a chat message will be displayed if the garbage
|
||||||
# collector Java is currently using is known
|
# collector Java is currently using is known
|
||||||
# to cause frame stuttering and/or other issues.
|
# to cause frame stuttering and/or other issues.
|
||||||
showGarbageCollectorWarning = true
|
showGarbageCollectorWarning = false
|
||||||
|
|
||||||
[common.worldGenerator]
|
[common.worldGenerator]
|
||||||
#
|
#
|
||||||
|
|||||||
+12
-4
@@ -172,13 +172,17 @@ hash = "059e6ce496843881834b3945373bbdf7e022c64f2e900f845603db3de16a9ea7"
|
|||||||
file = "config/curios-server.toml"
|
file = "config/curios-server.toml"
|
||||||
hash = "3c34cf9f7918c6a9ec15b14a87aa4570a751c1688f8ac01cb2e9acfb9392a734"
|
hash = "3c34cf9f7918c6a9ec15b14a87aa4570a751c1688f8ac01cb2e9acfb9392a734"
|
||||||
|
|
||||||
|
[[files]]
|
||||||
|
file = "config/CustomNpcs.cfg"
|
||||||
|
hash = "2727c506472169739fc547b275d1dd484e8b11a20db01c6f08f973594aeae956"
|
||||||
|
|
||||||
[[files]]
|
[[files]]
|
||||||
file = "config/cutthrough-client.toml"
|
file = "config/cutthrough-client.toml"
|
||||||
hash = "16bc1f998738810cae793b1dc272122dde8b246bffa408f227357803e16ba692"
|
hash = "16bc1f998738810cae793b1dc272122dde8b246bffa408f227357803e16ba692"
|
||||||
|
|
||||||
[[files]]
|
[[files]]
|
||||||
file = "config/DistantHorizons.toml"
|
file = "config/DistantHorizons.toml"
|
||||||
hash = "5595378793a6c500e675dfd74e03de88b7e5c36bae78f3fc78880a951af5458e"
|
hash = "9bb187e00a7f21f06d2cca2451831dd3d62fe8aa02b5531cf7c6ed044e040d0c"
|
||||||
|
|
||||||
[[files]]
|
[[files]]
|
||||||
file = "config/dynamic_fps.json"
|
file = "config/dynamic_fps.json"
|
||||||
@@ -814,15 +818,19 @@ hash = "db4c4a8ab49265f6e8e456f495800ea148b133b18a3242aabca30b98ab7f784f"
|
|||||||
|
|
||||||
[[files]]
|
[[files]]
|
||||||
file = "kubejs/client_scripts/createrp_plots.js"
|
file = "kubejs/client_scripts/createrp_plots.js"
|
||||||
hash = "9d7545f3d7ec5dba135363bdf05661aa898916b3cd23a4f185d7299415caaf9b"
|
hash = "2a4686d252bd289fd99bde461bdfe3e2215cf35640f36e0610737730016ca2a0"
|
||||||
|
|
||||||
[[files]]
|
[[files]]
|
||||||
file = "kubejs/client_scripts/createrp_ponder.js"
|
file = "kubejs/client_scripts/createrp_ponder.js"
|
||||||
hash = "be6bfeaee29fda398f69a2b9dcfa8e8ff22de9629fe1f73e496ef7a81390c9e9"
|
hash = "00aa4354ec8457245260ba25a2dba4b2605d1df108d7c2dbbbccf6c0449e382d"
|
||||||
|
|
||||||
|
[[files]]
|
||||||
|
file = "kubejs/client_scripts/createrp_survey.js"
|
||||||
|
hash = "5c170dc3cca31ab560eec9ca326116ee4f666ccd800a79a1c044c4b90f4f8288"
|
||||||
|
|
||||||
[[files]]
|
[[files]]
|
||||||
file = "kubejs/startup_scripts/createrp_items.js"
|
file = "kubejs/startup_scripts/createrp_items.js"
|
||||||
hash = "58100f02cf749b138c2a91567df37afce4b2ef494738268963e8443a3e603036"
|
hash = "05f1daa03e00a7429c51a7d8239c8fde894f7faff64cbb6ca978956ca1810497"
|
||||||
|
|
||||||
[[files]]
|
[[files]]
|
||||||
file = "mods/3dskinlayers.pw.toml"
|
file = "mods/3dskinlayers.pw.toml"
|
||||||
|
|||||||
@@ -7,13 +7,19 @@ const RpOutliner = Java.loadClass('net.createmod.catnip.outliner.Outliner')
|
|||||||
const RpAABB = Java.loadClass('net.minecraft.world.phys.AABB')
|
const RpAABB = Java.loadClass('net.minecraft.world.phys.AABB')
|
||||||
const RpTextures = Java.loadClass('com.simibubi.create.AllSpecialTextures')
|
const RpTextures = Java.loadClass('com.simibubi.create.AllSpecialTextures')
|
||||||
|
|
||||||
const PLOT_COLOR = { mine: 0x4FC3F7, free: 0x66DD66, auction: 0xFFD54F, taken: 0xB0B0B0, frozen: 0xE05050, state: 0xFF9800 }
|
// своя — блакитна, вільна (лот) — зелена, чужа — сіра, аукціон — жовта, заморожена — фіолетова;
|
||||||
|
// державна: резерв — червона, дорога — помаранчева (не збудована) і синя (збудована), шахта — коричнева
|
||||||
|
const PLOT_COLOR = { mine: 0x4FC3F7, free: 0x66DD66, auction: 0xFFD54F, taken: 0xB0B0B0, frozen: 0x9C27B0,
|
||||||
|
reserved: 0xE53935, road: 0xFF9800, road_built: 0x2F6BFF, state_mine: 0x8D6E63, state: 0xE53935 }
|
||||||
const SHOW_TICKS = 100 // 5 секунд після входу на ділянку
|
const SHOW_TICKS = 100 // 5 секунд після входу на ділянку
|
||||||
const WALL_BOTTOM = -64 // стіна межі стоїть на всю висоту світу й не рухається разом із гравцем
|
const WALL_BOTTOM = -64 // стіна межі стоїть на всю висоту світу й не рухається разом із гравцем
|
||||||
const WALL_TOP = 320
|
const WALL_TOP = 320
|
||||||
|
const WALL_HALF = 1 / 16 // пів товщини стіни: у плоскої рамки Create не малює площину
|
||||||
|
|
||||||
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
|
||||||
@@ -60,7 +66,7 @@ NetworkEvents.dataReceived('createrp_plots', event => {
|
|||||||
cells.push([Number(xz[0]), Number(xz[1])])
|
cells.push([Number(xz[0]), Number(xz[1])])
|
||||||
byChunk[Number(xz[0]) + ',' + Number(xz[1])] = plots.length
|
byChunk[Number(xz[0]) + ',' + Number(xz[1])] = plots.length
|
||||||
}
|
}
|
||||||
plots.push({ id: f[0], kind: f[1], walls: rpWalls(cells) })
|
plots.push({ id: f[0], kind: f[1], cells: cells, walls: rpWalls(cells) })
|
||||||
}
|
}
|
||||||
rpPlots = plots; rpByChunk = byChunk
|
rpPlots = plots; rpByChunk = byChunk
|
||||||
})
|
})
|
||||||
@@ -70,8 +76,13 @@ function rpDraw () {
|
|||||||
var player = Client.player
|
var player = Client.player
|
||||||
if (!player) return
|
if (!player) return
|
||||||
rpTick++
|
rpTick++
|
||||||
var idx = rpByChunk[Math.floor(player.x / 16) + ',' + Math.floor(player.z / 16)]
|
var cx = Math.floor(player.x / 16); var cz = Math.floor(player.z / 16)
|
||||||
var here = idx === undefined ? '' : rpPlots[idx].id
|
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 }
|
if (here !== rpHere) { rpHere = here; if (here !== '') rpShowUntil = rpTick + SHOW_TICKS }
|
||||||
var holding = String(player.mainHandItem.id) === 'kubejs:citizen_guide' || String(player.offHandItem.id) === 'kubejs:citizen_guide'
|
var holding = String(player.mainHandItem.id) === 'kubejs:citizen_guide' || String(player.offHandItem.id) === 'kubejs:citizen_guide'
|
||||||
if (!holding && rpTick >= rpShowUntil) return
|
if (!holding && rpTick >= rpShowUntil) return
|
||||||
@@ -82,7 +93,7 @@ function rpDraw () {
|
|||||||
var colour = PLOT_COLOR[plot.kind] || PLOT_COLOR.taken
|
var colour = PLOT_COLOR[plot.kind] || PLOT_COLOR.taken
|
||||||
for (var w = 0; w < plot.walls.length; w++) {
|
for (var w = 0; w < plot.walls.length; w++) {
|
||||||
var wall = plot.walls[w]
|
var wall = plot.walls[w]
|
||||||
outliner.showAABB('createrp_plot_' + plot.id + '_' + w, new RpAABB(wall[0], WALL_BOTTOM, wall[1], wall[2], WALL_TOP, wall[3])).colored(colour).lineWidth(1 / 16).withFaceTexture(RpTextures.THIN_CHECKERED).disableCull()
|
outliner.showAABB('createrp_plot_' + plot.id + '_' + w, new RpAABB(wall[0] - WALL_HALF, WALL_BOTTOM, wall[1] - WALL_HALF, wall[2] + WALL_HALF, WALL_TOP, wall[3] + WALL_HALF)).colored(colour).lineWidth(1 / 16).withFaceTexture(RpTextures.CHECKERED)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,33 +227,47 @@ function moneyScene(scene, util) {
|
|||||||
|
|
||||||
function landScene(scene, util) {
|
function landScene(scene, util) {
|
||||||
scene.showBasePlate()
|
scene.showBasePlate()
|
||||||
scene.world.setBlocks([1, 1, 1], 'minecraft:oak_fence')
|
scene.world.setBlocks([0, 1, 0, 4, 1, 4], 'minecraft:grass_block')
|
||||||
scene.world.setBlocks([3, 1, 1], 'minecraft:oak_fence')
|
scene.world.setBlocks([2, 2, 2], 'computercraft:computer_advanced')
|
||||||
scene.world.setBlocks([1, 1, 3], 'minecraft:oak_fence')
|
|
||||||
scene.world.setBlocks([3, 1, 3], 'minecraft:oak_fence')
|
|
||||||
scene.world.setBlocks([2, 1, 2], 'minecraft:iron_ore')
|
|
||||||
scene.idle(10)
|
scene.idle(10)
|
||||||
|
scene.world.showSection([0, 1, 0, 4, 2, 4], Direction.DOWN)
|
||||||
|
scene.idle(15)
|
||||||
|
|
||||||
say(scene, 70, 'Нічия земля належить державі', [2.5, 1, 2.5], null, true)
|
say(scene, 70, 'Уся земля належить державі', [2.5, 2.5, 2.5], PonderPalette.BLUE, true)
|
||||||
|
say(scene, 70, 'Будь-який вільний чанк можна орендувати чи купити', [2.5, 2.5, 2.5], PonderPalette.GREEN)
|
||||||
|
say(scene, 70, 'Окрім державних: будівлі, дороги, шахта', [2.5, 2.5, 2.5], PonderPalette.RED)
|
||||||
|
|
||||||
scene.overlay.showOutline(PonderPalette.GREEN, 'plot', util.select.fromTo(0, 0, 0, 4, 0, 4), 150)
|
scene.showControls(50, [2.5, 3, 2.5], 'down').rightClick()
|
||||||
scene.world.showSection([1, 1, 1, 3, 1, 3], Direction.DOWN)
|
say(scene, 70, 'Постав на чанку комп\'ютер і набери rp', [2.5, 2.5, 2.5], null, true)
|
||||||
say(scene, 70, 'Будуй на своїй ділянці', [2.5, 1.5, 2.5], PonderPalette.GREEN, true)
|
say(scene, 70, 'Земля → Ціна цього чанка', [2.5, 2.5, 2.5])
|
||||||
say(scene, 70, 'Орендуй або купи її в терміналі: Земля', [2.5, 1.5, 2.5])
|
say(scene, 70, 'Береш на себе або на свій бізнес', [2.5, 2.5, 2.5])
|
||||||
say(scene, 70, 'На ділянці над хотбаром видно її назву', [2.5, 1.5, 2.5])
|
scene.showControls(60, [2.5, 2.5, 0.5], 'down').rightClick().withItem('kubejs:land_survey')
|
||||||
say(scene, 70, 'Чужі тут не ламають, а твої працівники — можуть', [2.5, 1.5, 2.5])
|
say(scene, 70, 'Або планшетом землеміра: ПКМ — перший кут', [2.5, 2.5, 0.5], PonderPalette.BLUE, true)
|
||||||
|
say(scene, 70, 'ПКМ ще раз — другий кут, рамка покаже територію', [2.5, 2.5, 4.5])
|
||||||
|
say(scene, 70, 'Третій ПКМ — кнопки оренди й купівлі в чаті', [2.5, 2.5, 2.5], PonderPalette.GREEN)
|
||||||
|
say(scene, 70, 'До 16 чанків за раз. Shift+ПКМ — скинути', [2.5, 2.5, 2.5])
|
||||||
|
say(scene, 70, 'Планшет дає реєстратор у ратуші', [2.5, 2.5, 2.5])
|
||||||
|
|
||||||
|
say(scene, 70, 'Біля спавну земля втричі дорожча', [2.5, 2.5, 2.5], PonderPalette.RED, true)
|
||||||
|
say(scene, 70, 'Біля готової дороги — теж дорожча', [2.5, 2.5, 2.5])
|
||||||
|
say(scene, 70, 'Біля шахти — дешевша', [2.5, 2.5, 2.5], PonderPalette.GREEN)
|
||||||
|
scene.world.setBlocks([1, 2, 1, 1, 3, 1], 'minecraft:bricks')
|
||||||
|
scene.idle(10)
|
||||||
|
say(scene, 70, 'Забудував чанк — це вже житло, воно дорожче', [1.5, 3, 1.5], null, true)
|
||||||
|
say(scene, 80, 'Оренду платиш наперед, за куплену землю — податок щодня', [2.5, 2.5, 2.5])
|
||||||
|
say(scene, 70, 'Не платив 3 дні — землю забирають', [2.5, 2.5, 2.5], PonderPalette.RED)
|
||||||
|
|
||||||
|
scene.world.setBlocks([3, 1, 3], 'minecraft:iron_ore')
|
||||||
|
scene.idle(10)
|
||||||
|
say(scene, 70, 'Руду копають лише з дозволом на видобуток', [3.5, 2, 3.5], PonderPalette.BLUE, true)
|
||||||
|
say(scene, 70, 'Дозвіл робить твою ділянку приватною шахтою', [3.5, 2, 3.5])
|
||||||
|
say(scene, 70, 'Будь-яка руда, без ліміту', [3.5, 2, 3.5], PonderPalette.GREEN)
|
||||||
|
say(scene, 70, 'Біля спавну й доріг дозволу не дають', [3.5, 2, 3.5], PonderPalette.RED)
|
||||||
|
say(scene, 70, 'Бури Create теж копають лише з дозволом', [3.5, 2, 3.5])
|
||||||
|
|
||||||
scene.overlay.showOutline(PonderPalette.RED, 'ore', util.select.position(2, 1, 2), 150)
|
|
||||||
say(scene, 70, 'Руду копають лише з концесією', [2.5, 1.5, 2.5], PonderPalette.RED, true)
|
|
||||||
say(scene, 70, 'Купи її в терміналі: Земля → Купити концесію', [2.5, 1.5, 2.5])
|
|
||||||
say(scene, 70, 'Бури Create теж копають лише за концесією', [2.5, 1.5, 2.5])
|
|
||||||
say(scene, 70, 'Найкращі ділянки держава продає на аукціоні', [2.5, 2.5, 2.5], PonderPalette.BLUE, true)
|
|
||||||
say(scene, 70, 'Ставки — в терміналі: Земля → Аукціони', [2.5, 2.5, 2.5])
|
|
||||||
say(scene, 80, 'За землю платиш щодня. Не платив 3 дні — ділянку забирають', [2.5, 2.5, 2.5])
|
|
||||||
say(scene, 70, 'Візьми довідник у руку — побачиш межі ділянок', [2.5, 2.5, 2.5], PonderPalette.BLUE, true)
|
say(scene, 70, 'Візьми довідник у руку — побачиш межі ділянок', [2.5, 2.5, 2.5], PonderPalette.BLUE, true)
|
||||||
say(scene, 70, 'Зелена рамка — вільна, блакитна — твоя', [2.5, 2.5, 2.5], PonderPalette.GREEN)
|
say(scene, 70, 'Блакитна межа — твоя, сіра — чужа, червона — державна', [2.5, 2.5, 2.5])
|
||||||
say(scene, 70, 'Сіра — чужа, жовта — аукціон, помаранчева — державна', [2.5, 2.5, 2.5])
|
say(scene, 70, 'Дорога: помаранчева — ще будується, синя — готова', [2.5, 2.5, 2.5])
|
||||||
say(scene, 70, 'Зайшов на ділянку — рамка блимне на кілька секунд', [2.5, 2.5, 2.5])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------------------------
|
||||||
@@ -344,9 +358,11 @@ function roadsScene(scene, util) {
|
|||||||
}
|
}
|
||||||
scene.idle(10)
|
scene.idle(10)
|
||||||
say(scene, 70, 'Кожен новий блок дороги — 0,3 ¤', [2.5, 1.5, 2.5], PonderPalette.GREEN, true)
|
say(scene, 70, 'Кожен новий блок дороги — 0,3 ¤', [2.5, 1.5, 2.5], PonderPalette.GREEN, true)
|
||||||
say(scene, 70, 'Гроші — в кінці ігрового дня, до 300 блоків на день', [2.5, 1.5, 2.5])
|
|
||||||
say(scene, 70, 'Перекласти той самий блок вдруге — не оплачується', [2.5, 1.5, 2.5], PonderPalette.RED)
|
|
||||||
say(scene, 80, 'Покриття: кам\'яна цегла, гладкий камінь, андезит, плитка Create', [2.5, 1.5, 2.5])
|
say(scene, 80, 'Покриття: кам\'яна цегла, гладкий камінь, андезит, плитка Create', [2.5, 1.5, 2.5])
|
||||||
|
say(scene, 70, 'Недобудовані дороги видно з довідником у руці', [2.5, 2.5, 2.5], PonderPalette.BLUE, true)
|
||||||
|
say(scene, 70, 'Помаранчева межа — тут ще треба мостити', [2.5, 2.5, 2.5])
|
||||||
|
say(scene, 80, 'Гроші за всі твої блоки — коли дорогу приймуть', [2.5, 2.5, 2.5], PonderPalette.GREEN)
|
||||||
|
say(scene, 70, 'Готова дорога стає синьою', [2.5, 2.5, 2.5])
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------------------------
|
||||||
@@ -435,7 +451,7 @@ function officialsScene(scene, util) {
|
|||||||
say(scene, 70, 'Міністерство: тендери й частки ринку', [4.5, 2.5, 0.5])
|
say(scene, 70, 'Міністерство: тендери й частки ринку', [4.5, 2.5, 0.5])
|
||||||
say(scene, 70, 'Банк: рахунок, кредити, вклад', [0.5, 2.5, 4.5])
|
say(scene, 70, 'Банк: рахунок, кредити, вклад', [0.5, 2.5, 4.5])
|
||||||
say(scene, 70, 'Центр зайнятості: робота й допомога', [4.5, 2.5, 4.5])
|
say(scene, 70, 'Центр зайнятості: робота й допомога', [4.5, 2.5, 4.5])
|
||||||
say(scene, 80, 'Відповідь службовця приходить у чат', [2.5, 2.5, 2.5], PonderPalette.BLUE, true)
|
say(scene, 80, 'Службовець відповідає в тій самій розмові', [2.5, 2.5, 2.5], PonderPalette.BLUE, true)
|
||||||
say(scene, 80, 'Щоб щось оформити — іди до термінала', [2.5, 2.5, 2.5])
|
say(scene, 80, 'Щоб щось оформити — іди до термінала', [2.5, 2.5, 2.5])
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -555,8 +571,7 @@ function boardScene(scene, util) {
|
|||||||
say(scene, 70, 'Це дошка оголошень держави', [2.5, 3, 3], PonderPalette.BLUE, true)
|
say(scene, 70, 'Це дошка оголошень держави', [2.5, 3, 3], PonderPalette.BLUE, true)
|
||||||
say(scene, 70, 'Розділи змінюються самі', [2.5, 3, 3])
|
say(scene, 70, 'Розділи змінюються самі', [2.5, 3, 3])
|
||||||
say(scene, 70, 'Тендери: що держава замовляє і до якої ціни', [2.5, 3, 3], null, true)
|
say(scene, 70, 'Тендери: що держава замовляє і до якої ціни', [2.5, 3, 3], null, true)
|
||||||
say(scene, 70, 'Ділянки: вільна земля, оренда й ціна купівлі', [2.5, 3, 3])
|
say(scene, 70, 'Земля: як узяти чанк і що впливає на ціну', [2.5, 3, 3])
|
||||||
say(scene, 70, 'Центр міста дорожчий за околиці', [2.5, 3, 3], PonderPalette.RED)
|
|
||||||
say(scene, 70, 'Аукціони: ставки й день закриття', [2.5, 3, 3])
|
say(scene, 70, 'Аукціони: ставки й день закриття', [2.5, 3, 3])
|
||||||
say(scene, 70, 'Робота: державні роботи й вакансії бізнесів', [2.5, 3, 3], PonderPalette.GREEN, true)
|
say(scene, 70, 'Робота: державні роботи й вакансії бізнесів', [2.5, 3, 3], PonderPalette.GREEN, true)
|
||||||
say(scene, 80, 'Власник бізнесу вивішує вакансію в терміналі', [2.5, 1.5, 2.5])
|
say(scene, 80, 'Власник бізнесу вивішує вакансію в терміналі', [2.5, 1.5, 2.5])
|
||||||
@@ -567,7 +582,7 @@ function boardScene(scene, util) {
|
|||||||
Ponder.tags(event => {
|
Ponder.tags(event => {
|
||||||
event.createTag('kubejs:createrp', 'kubejs:citizen_guide', 'Держава Create RP',
|
event.createTag('kubejs:createrp', 'kubejs:citizen_guide', 'Держава Create RP',
|
||||||
'Як жити й заробляти в державній економіці',
|
'Як жити й заробляти в державній економіці',
|
||||||
['kubejs:citizen_guide', 'create:package_frogport', 'computercraft:computer_advanced', 'computercraft:computer_normal', 'computercraft:monitor_advanced', 'create:stressometer', 'ars_nouveau:source_gem', 'hexcasting:amethyst_dust'])
|
['kubejs:citizen_guide', 'create:package_frogport', 'computercraft:computer_advanced', 'computercraft:computer_normal', 'computercraft:monitor_advanced', 'create:stressometer', 'kubejs:land_survey', 'ars_nouveau:source_gem', 'hexcasting:amethyst_dust'])
|
||||||
})
|
})
|
||||||
|
|
||||||
Ponder.registry(event => {
|
Ponder.registry(event => {
|
||||||
|
|||||||
@@ -0,0 +1,90 @@
|
|||||||
|
// Create RP — «Планшет землеміра»: реєстрація території так, як «Креслення і перо» у Create обводить споруду.
|
||||||
|
// ПКМ — перший кут (чанк під прицілом), ПКМ ще раз — другий кут, третій ПКМ — кнопки оформлення в чаті.
|
||||||
|
// Shift+ПКМ — скинути. Поки обрано лише перший кут, рамка тягнеться за прицілом.
|
||||||
|
// Рамку малює той самий Outliner, що й виділення Create. Територія — цілі чанки на всю висоту світу.
|
||||||
|
// Rhino: без const/let усередині циклів і try — лише var.
|
||||||
|
|
||||||
|
const SvOutliner = Java.loadClass('net.createmod.catnip.outliner.Outliner')
|
||||||
|
const SvAABB = Java.loadClass('net.minecraft.world.phys.AABB')
|
||||||
|
const SvTextures = Java.loadClass('com.simibubi.create.AllSpecialTextures')
|
||||||
|
|
||||||
|
const SV_ITEM = 'kubejs:land_survey'
|
||||||
|
const SV_MAX = 16 // чанків за одну реєстрацію (те саме обмеження на сервері)
|
||||||
|
const SV_MAX_ADMIN = 256 // адміністратор відводить державну землю більшими шматками
|
||||||
|
const SV_REACH = 96 // як далеко бере приціл
|
||||||
|
|
||||||
|
let svA = null // [cx, cz] першого кута
|
||||||
|
let svB = null // [cx, cz] другого кута
|
||||||
|
let svBroken = false
|
||||||
|
|
||||||
|
function svHolding (player) {
|
||||||
|
return String(player.mainHandItem.id) === SV_ITEM || String(player.offHandItem.id) === SV_ITEM
|
||||||
|
}
|
||||||
|
|
||||||
|
// чанк під прицілом; якщо приціл у небо — чанк, де стоїть гравець
|
||||||
|
function svAim (player) {
|
||||||
|
var hit = null
|
||||||
|
try { hit = player.rayTrace(SV_REACH) } catch (e) { hit = null }
|
||||||
|
if (hit && hit.block) return [Math.floor(hit.block.x / 16), Math.floor(hit.block.z / 16)]
|
||||||
|
return [Math.floor(player.x / 16), Math.floor(player.z / 16)]
|
||||||
|
}
|
||||||
|
|
||||||
|
function svMax (player) { return player.hasPermissions(3) ? SV_MAX_ADMIN : SV_MAX }
|
||||||
|
|
||||||
|
function svCount (a, b) { return (Math.abs(a[0] - b[0]) + 1) * (Math.abs(a[1] - b[1]) + 1) }
|
||||||
|
|
||||||
|
function svSend (op) {
|
||||||
|
Client.player.sendData('createrp_survey', { op: op, x1: svA[0], z1: svA[1], x2: svB[0], z2: svB[1] })
|
||||||
|
}
|
||||||
|
|
||||||
|
ItemEvents.rightClicked(SV_ITEM, event => {
|
||||||
|
var player = event.player
|
||||||
|
if (player.shiftKeyDown || player.crouching) {
|
||||||
|
svA = null; svB = null
|
||||||
|
player.setStatusMessage(Text.gray('Обведення скинуто'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var c = svAim(player)
|
||||||
|
if (!svA) {
|
||||||
|
svA = c
|
||||||
|
player.setStatusMessage(Text.yellow('Перший кут: чанк ' + c[0] + ' ' + c[1] + '. Наведи на другий кут і ПКМ'))
|
||||||
|
} else if (!svB) {
|
||||||
|
if (svCount(svA, c) > svMax(player)) {
|
||||||
|
player.setStatusMessage(Text.red('Забагато: ' + svCount(svA, c) + ' чанків, можна до ' + svMax(player)))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
svB = c
|
||||||
|
player.setStatusMessage(Text.green('Обрано ' + svCount(svA, svB) + ' чанк. Ціна — в чаті. ПКМ ще раз — оформити'))
|
||||||
|
svSend('price')
|
||||||
|
} else {
|
||||||
|
svSend('menu')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
function svDraw () {
|
||||||
|
var player = Client.player
|
||||||
|
if (!player || !svA) return
|
||||||
|
if (!svHolding(player)) return
|
||||||
|
var b = svB || svAim(player)
|
||||||
|
var x1 = Math.min(svA[0], b[0]) * 16; var x2 = (Math.max(svA[0], b[0]) + 1) * 16
|
||||||
|
var z1 = Math.min(svA[1], b[1]) * 16; var z2 = (Math.max(svA[1], b[1]) + 1) * 16
|
||||||
|
var tooBig = svCount(svA, b) > svMax(player)
|
||||||
|
var colour = tooBig ? 0xE05050 : svB ? 0x6FE7A0 : 0xFFFFFF
|
||||||
|
SvOutliner.getInstance().showAABB('createrp_survey', new SvAABB(x1, -64, z1, x2, 320, z2))
|
||||||
|
.colored(colour).lineWidth(1 / 8).withFaceTexture(SvTextures.CHECKERED)
|
||||||
|
if (!svB && player.tickCount % 10 === 0) {
|
||||||
|
player.setStatusMessage(Text.of((tooBig ? '§c' : '§f') + svCount(svA, b) + ' чанк. (' + (Math.abs(svA[0] - b[0]) + 1) + '×' + (Math.abs(svA[1] - b[1]) + 1) + ')' + (tooBig ? ' — забагато' : ' · ПКМ — другий кут')))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ClientEvents.tick(event => {
|
||||||
|
if (svBroken) return
|
||||||
|
try { svDraw() } catch (e) { svBroken = true; console.error('[createrp] land survey outline switched off: ' + e) }
|
||||||
|
})
|
||||||
|
|
||||||
|
// щойно сервер показав на цьому місці ділянку — територію зареєстровано, обведення більше не потрібне
|
||||||
|
NetworkEvents.dataReceived('createrp_plots', event => {
|
||||||
|
if (!svA || !svB) return
|
||||||
|
var text = String(event.data.getString('plots'))
|
||||||
|
if (text.indexOf(svA[0] + ',' + svA[1]) >= 0 && text.indexOf(svB[0] + ',' + svB[1]) >= 0) { svA = null; svB = null }
|
||||||
|
})
|
||||||
@@ -9,4 +9,12 @@ StartupEvents.registry('item', event => {
|
|||||||
.maxStackSize(1)
|
.maxStackSize(1)
|
||||||
.glow(true)
|
.glow(true)
|
||||||
.tooltip('§7Наведи в інвентарі й затисни §fW§7 — як у Create')
|
.tooltip('§7Наведи в інвентарі й затисни §fW§7 — як у Create')
|
||||||
|
|
||||||
|
// «Планшет землеміра»: обвести територію по чанках і зареєструвати її (client_scripts/createrp_survey.js)
|
||||||
|
event.create('land_survey')
|
||||||
|
.displayName('Планшет землеміра')
|
||||||
|
.texture('create:item/schematic_and_quill')
|
||||||
|
.maxStackSize(1)
|
||||||
|
.tooltip('§7ПКМ по землі — кут території, ще раз — другий кут')
|
||||||
|
.tooltip('§7Третій ПКМ — оформити · Shift+ПКМ — скинути')
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
name = "Create RP"
|
name = "Create RP"
|
||||||
author = "Pinecraft-CreateRP"
|
author = "Pinecraft-CreateRP"
|
||||||
version = "0.12.5"
|
version = "0.13.3"
|
||||||
pack-format = "packwiz:1.1.0"
|
pack-format = "packwiz:1.1.0"
|
||||||
|
|
||||||
[index]
|
[index]
|
||||||
file = "index.toml"
|
file = "index.toml"
|
||||||
hash-format = "sha256"
|
hash-format = "sha256"
|
||||||
hash = "ecd5e7dbaa2f81ecac5cfb80cf6ccd9d4fd6af38fe6735ed313a5662c8ecedf1"
|
hash = "be7ef7cb105f8ee2823f2d6b956c50568936471700b6923b7a1d0d8938694137"
|
||||||
|
|
||||||
[versions]
|
[versions]
|
||||||
minecraft = "1.21.1"
|
minecraft = "1.21.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user