diff --git a/index.toml b/index.toml index 99ccced..4caf48e 100644 --- a/index.toml +++ b/index.toml @@ -805,7 +805,7 @@ file = "config/yacl.json5" hash = "121b93764159be6fb7dab523b29a844e2bb78400ce8c48f52135a097e9b0006e" [[files]] -file = "kubejs/assets/computercraft/textures/gui/CREDITS.txt" +file = "kubejs/assets/computercraft/textures/gui/credits.txt" hash = "19b844245d03fcdd488a7a791e287447191a74acd0f14995209339d768c5e6ce" [[files]] @@ -814,7 +814,7 @@ hash = "db4c4a8ab49265f6e8e456f495800ea148b133b18a3242aabca30b98ab7f784f" [[files]] file = "kubejs/client_scripts/createrp_ponder.js" -hash = "4b02cc37446fd640ce308a6d3724c747fb6e26bd219d9bd202dede84440c4875" +hash = "15e39779356b37faa17b99f628de5c8f28651e26eccab4c6feb021f3ae97a33b" [[files]] file = "kubejs/startup_scripts/createrp_items.js" diff --git a/kubejs/assets/computercraft/textures/gui/CREDITS.txt b/kubejs/assets/computercraft/textures/gui/credits.txt similarity index 100% rename from kubejs/assets/computercraft/textures/gui/CREDITS.txt rename to kubejs/assets/computercraft/textures/gui/credits.txt diff --git a/kubejs/client_scripts/createrp_ponder.js b/kubejs/client_scripts/createrp_ponder.js index 79f3696..d24c2ba 100644 --- a/kubejs/client_scripts/createrp_ponder.js +++ b/kubejs/client_scripts/createrp_ponder.js @@ -26,8 +26,16 @@ function say(scene, ticks, text, pos, colour, keyframe) { scene.idle(ticks + 10) } +// Create's own kinetic helper; in KubeJS `world` is a property, not a method function setSpeed(scene, sel, speed) { - if (CreateScene) new CreateScene(scene).world().setKineticSpeed(sel, speed) + if (!CreateScene) return + try { + const cs = new CreateScene(scene) + const w = typeof cs.world === 'function' ? cs.world() : cs.world + w.setKineticSpeed(sel, speed) + } catch (e) { + console.warn('[createrp] setKineticSpeed: ' + e) + } } // ---- мережа ланцюгів (схематика Create «Transporting packages between Frogports», 9x9) -------- @@ -265,6 +273,69 @@ function jobsScene(scene, util) { say(scene, 80, 'Або наймися в бізнес: термінал → Бізнес', [2.5, 2.5, 2.5], null, true) } +// --------------------------------------------------------------------------------------------- +// 8. Вантажник + +function cargoScene(scene, util) { + scene.showBasePlate() + scene.world.setBlocks([0, 1, 3, 4, 1, 3], 'minecraft:rail[shape=east_west]') + scene.idle(10) + scene.world.createEntity('minecraft:villager', [1, 1, 1]) + scene.idle(10) + + say(scene, 70, 'Вантажник возить будматеріали на будови', [1, 2.5, 1], null, true) + scene.showControls(50, [1, 2.3, 1], 'down').rightClick() + scene.idle(20) + for (let i = 0; i < 5; i++) { + scene.world.createItemEntity([1.5, 2, 1.5], [0.04 * (i - 2), 0.25, 0.06], PACKAGE) + scene.idle(4) + } + scene.idle(10) + say(scene, 70, 'Диспетчер вантажів дасть від 4 до 8 ящиків', [1.5, 1.5, 1.5], PonderPalette.BLUE, true) + say(scene, 70, 'Ящики важкі: з ними ти ледве йдеш', [1.5, 1.5, 1.5], PonderPalette.RED) + + scene.world.showSection([0, 1, 3, 4, 1, 3], Direction.DOWN) + scene.world.createEntity('minecraft:minecart', [1.5, 1, 3.5]) + scene.idle(15) + say(scene, 70, 'Візьми візок, поїзд чи інший транспорт', [1.5, 1.5, 3.5], null, true) + + scene.world.createEntity('minecraft:villager', [4, 1, 1]) + scene.overlay.showBigLine(PonderPalette.OUTPUT, [1.5, 1.2, 3.5], [4, 1.2, 1.5], 100) + say(scene, 70, 'Компас веде до прораба на будові', [4, 2.5, 1], null, true) + say(scene, 70, 'Віддай йому всі ящики — і отримаєш гроші', [4, 2.5, 1], PonderPalette.GREEN) + say(scene, 70, 'Платять більше, ніж на пошті: за відстань і кожен ящик', [2.5, 2.5, 2.5], PonderPalette.GREEN) + say(scene, 60, 'На доставку — 3 ігрові дні', [2.5, 2.5, 2.5], PonderPalette.RED) +} + +// --------------------------------------------------------------------------------------------- +// 9. Дорожник + +function roadsScene(scene, util) { + const CORRIDOR = util.select.fromTo(0, 0, 1, 4, 0, 3) + scene.showBasePlate() + scene.idle(10) + scene.overlay.showOutline(PonderPalette.BLUE, 'corridor', CORRIDOR, 200) + say(scene, 70, 'Це транспортний коридор держави', [2.5, 1, 2], PonderPalette.BLUE, true) + say(scene, 70, 'Будувати й ламати тут може лише дорожник', [2.5, 1, 2], PonderPalette.RED) + + scene.world.createEntity('minecraft:villager', [0.5, 1, 0.5]) + scene.idle(10) + scene.showControls(50, [0.5, 2.3, 0.5], 'down').rightClick() + say(scene, 70, 'Стань дорожником: дорожній майстер або термінал → Робота', [0.5, 2.5, 0.5], null, true) + + for (let x = 0; x < 5; x++) { + scene.world.setBlocks([x, 1, 2], 'minecraft:stone_bricks') + scene.world.showSection([x, 1, 2], Direction.DOWN) + if (x === 0) scene.showControls(40, [0.5, 1.5, 2.5], 'down').rightClick().withItem('minecraft:stone_bricks') + scene.idle(8) + } + scene.idle(10) + 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]) +} + // --------------------------------------------------------------------------------------------- // 7. Продаж енергії державі: державна підстанція @@ -338,6 +409,8 @@ Ponder.registry(event => { .scene('guide_money', 'Гроші й банк', moneyScene) .scene('guide_land', 'Земля й надра', landScene) .scene('guide_jobs', 'Робота: ринок праці й пошта', jobsScene) + .scene('guide_cargo', 'Робота: вантажник', cargoScene) + .scene('guide_roads', 'Робота: дорожник', roadsScene) event.create('create:package_frogport') .scene('frogport_sell', 'Create RP: продаж державі', FROG_STRUCTURE, sellScene) diff --git a/pack.toml b/pack.toml index b19b4e9..f9caf47 100644 --- a/pack.toml +++ b/pack.toml @@ -1,12 +1,12 @@ name = "Create RP" author = "Pinecraft-CreateRP" -version = "0.6.2" +version = "0.7.0" pack-format = "packwiz:1.1.0" [index] file = "index.toml" hash-format = "sha256" -hash = "d6b7760ec72d74f166da2736ca9d0c70677727812d6e6dd7af80a685ee271b6c" +hash = "061b0574da762d2dd8b9d981a0d52be81db87fc54afee42aad118e4ed369dc1e" [versions] minecraft = "1.21.1"