From f316a9bf0c3ca212a3115804c7b845e5b3d882ba Mon Sep 17 00:00:00 2001 From: heyshawtyy <108924601+heyshawtyy@users.noreply.github.com> Date: Mon, 2 Nov 2026 22:20:48 +0500 Subject: [PATCH] Fishing RBLXL --- README.md | 9 ++- build.ps1 | 58 +++++++++++++++++++ install/1_FishConfig_ReplicatedStorage.rbxmx | 11 +--- install/2_GameModels_ReplicatedStorage.rbxmx | 11 +--- .../3_MapBuilder_ServerScriptService.rbxmx | 11 +--- .../4_GameServer_ServerScriptService.rbxmx | 11 +--- ...5_FishingClient_StarterPlayerScripts.rbxmx | 11 +--- install/INSTALL.lua | 2 +- 8 files changed, 81 insertions(+), 43 deletions(-) create mode 100644 build.ps1 diff --git a/README.md b/README.md index 6e13359..1575da6 100644 --- a/README.md +++ b/README.md @@ -13,12 +13,17 @@ default.project.json проект Rojo С Rojo: `rojo serve` и подключиться плагином Rojo в Studio. -## Установка без Rojo +## Самый простой способ: готовый плейс + +Откройте `Fishing.rbxlx` в Roblox Studio (**File → Open from File…** или двойной клик) и нажмите **Play** (F5). +Файл собирается из `src/` командой `powershell -ExecutionPolicy Bypass -File build.ps1` (в git он не попадает — см. `.gitignore`). + +## Установка в свой плейс без Rojo 1. Откройте плейс в Roblox Studio (например, шаблон **Baseplate**). 2. Откройте `install/INSTALL.lua` Блокнотом → **Ctrl+A** → **Ctrl+C**. 3. Вставьте код в **Command Bar** (строка внизу Studio) → **Ctrl+Enter**. -4. В **Output** появится «ГОТОВО!». Нажмите **Play** (F5). +4. В **Output** появится «DONE!». Нажмите **Play** (F5). Запасной способ: правой кнопкой по папке в Explorer → **Insert from File…** → файлы из `install/` (в названии файла указано, в какую папку его вставлять). diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000..437b0d6 --- /dev/null +++ b/build.ps1 @@ -0,0 +1,58 @@ +# Builds Fishing.rbxlx (place file for Roblox Studio) and install/* from src/. +# Run: powershell -ExecutionPolicy Bypass -File build.ps1 + +$root = $PSScriptRoot +$enc = New-Object System.Text.UTF8Encoding($false) + +$scripts = @( + @{ Name = 'FishConfig'; Class = 'ModuleScript'; Service = 'ReplicatedStorage'; Path = 'src\ReplicatedStorage\FishConfig.lua'; Rbxmx = '1_FishConfig_ReplicatedStorage.rbxmx' }, + @{ Name = 'GameModels'; Class = 'ModuleScript'; Service = 'ReplicatedStorage'; Path = 'src\ReplicatedStorage\GameModels.lua'; Rbxmx = '2_GameModels_ReplicatedStorage.rbxmx' }, + @{ Name = 'MapBuilder'; Class = 'Script'; Service = 'ServerScriptService'; Path = 'src\ServerScriptService\MapBuilder.server.lua'; Rbxmx = '3_MapBuilder_ServerScriptService.rbxmx' }, + @{ Name = 'GameServer'; Class = 'Script'; Service = 'ServerScriptService'; Path = 'src\ServerScriptService\GameServer.server.lua'; Rbxmx = '4_GameServer_ServerScriptService.rbxmx' }, + @{ Name = 'FishingClient'; Class = 'LocalScript'; Service = 'StarterPlayerScripts'; Path = 'src\StarterPlayer\StarterPlayerScripts\FishingClient.client.lua'; Rbxmx = '5_FishingClient_StarterPlayerScripts.rbxmx' } +) + +$header = '' +$script:ref = 0 +function NextRef { $script:ref++; return "RBX$($script:ref)" } + +function ScriptItem($s) { + $src = [System.IO.File]::ReadAllText((Join-Path $root $s.Path), $enc) + if ($src.Contains(']]>')) { throw "CDATA conflict in $($s.Path)" } + return "$($s.Name)`n" +} + +function ServiceItem($class, $children) { + return "$class`n$children`n" +} + +# --- place file --- +$rs = ($scripts | Where-Object { $_.Service -eq 'ReplicatedStorage' } | ForEach-Object { ScriptItem $_ }) -join '' +$sss = ($scripts | Where-Object { $_.Service -eq 'ServerScriptService' } | ForEach-Object { ScriptItem $_ }) -join '' +$sps = ($scripts | Where-Object { $_.Service -eq 'StarterPlayerScripts' } | ForEach-Object { ScriptItem $_ }) -join '' + +$place = $header + "`n" + + (ServiceItem 'ReplicatedStorage' $rs) + + (ServiceItem 'ServerScriptService' $sss) + + (ServiceItem 'StarterPlayer' (ServiceItem 'StarterPlayerScripts' $sps)) + + "`n" +[System.IO.File]::WriteAllText((Join-Path $root 'Fishing.rbxlx'), $place, $enc) + +# --- install/*.rbxmx and install/INSTALL.lua --- +$installDir = Join-Path $root 'install' +New-Item -ItemType Directory -Force $installDir | Out-Null +$parents = @{ ReplicatedStorage = 'game.ReplicatedStorage'; ServerScriptService = 'game.ServerScriptService'; StarterPlayerScripts = 'game.StarterPlayer.StarterPlayerScripts' } +$sb = New-Object System.Text.StringBuilder +[void]$sb.Append("local function make(class, name, parent, src)`n local old = parent:FindFirstChild(name)`n if old then old:Destroy() end`n local s = Instance.new(class)`n s.Name = name`n s.Source = src`n s.Parent = parent`nend`nlocal oldMap = workspace:FindFirstChild('FishingMap')`nif oldMap then oldMap:Destroy() end`n") +foreach ($s in $scripts) { + $src = [System.IO.File]::ReadAllText((Join-Path $root $s.Path), $enc) + if ($src.Contains(']=====]')) { throw "Long-string conflict in $($s.Path)" } + [void]$sb.Append("make('$($s.Class)', '$($s.Name)', $($parents[$s.Service]), [=====[" + $src + "]=====])`n") + $script:ref = 0 + $xml = $header + "`n" + (ScriptItem $s) + "`n" + [System.IO.File]::WriteAllText((Join-Path $installDir $s.Rbxmx), $xml, $enc) +} +[void]$sb.Append("print('DONE! 5 scripts installed. Press Play (F5).')`n") +[System.IO.File]::WriteAllText((Join-Path $installDir 'INSTALL.lua'), $sb.ToString(), $enc) + +Write-Host "Built Fishing.rbxlx and install/" diff --git a/install/1_FishConfig_ReplicatedStorage.rbxmx b/install/1_FishConfig_ReplicatedStorage.rbxmx index e762c2a..cea6d36 100644 --- a/install/1_FishConfig_ReplicatedStorage.rbxmx +++ b/install/1_FishConfig_ReplicatedStorage.rbxmx @@ -1,8 +1,5 @@ - - -FishConfig - ReplicatedStorage +FishConfig ReplicatedStorage -- Все настройки игры. Меняй цифры здесь, чтобы настроить баланс. local Config = {} @@ -307,7 +304,5 @@ function Config.RodStats(rodId, upgradeLevel) end return Config -]]> - - - \ No newline at end of file +]]> + diff --git a/install/2_GameModels_ReplicatedStorage.rbxmx b/install/2_GameModels_ReplicatedStorage.rbxmx index 12aa9b9..b7d821e 100644 --- a/install/2_GameModels_ReplicatedStorage.rbxmx +++ b/install/2_GameModels_ReplicatedStorage.rbxmx @@ -1,8 +1,5 @@ - - -GameModels - ReplicatedStorage +GameModels ReplicatedStorage -- Строит 3D-модели из деталей: удочки, сумки, рыбу, поплавок. -- Используется сервером (инструмент, витрины, рыба в руках) и клиентом (иконки). @@ -561,7 +558,5 @@ function M.buildBobber() end return M -]]> - - - \ No newline at end of file +]]> + diff --git a/install/3_MapBuilder_ServerScriptService.rbxmx b/install/3_MapBuilder_ServerScriptService.rbxmx index f2b622d..4a5fdca 100644 --- a/install/3_MapBuilder_ServerScriptService.rbxmx +++ b/install/3_MapBuilder_ServerScriptService.rbxmx @@ -1,8 +1,5 @@ - - -MapBuilder - ServerScriptService +MapBuilder ServerScriptService -- Строит лобби и Мир 1 «Тихое озеро» при запуске игры, настраивает свет и воду. -- Если в Workspace уже есть папка "FishingMap", детали не строятся заново -- (террейн, свет и точка появления настраиваются всегда). @@ -1407,7 +1404,5 @@ do end end end -]]> - - - \ No newline at end of file +]]> + diff --git a/install/4_GameServer_ServerScriptService.rbxmx b/install/4_GameServer_ServerScriptService.rbxmx index 715beb6..9914731 100644 --- a/install/4_GameServer_ServerScriptService.rbxmx +++ b/install/4_GameServer_ServerScriptService.rbxmx @@ -1,8 +1,5 @@ - - -GameServer - ServerScriptService +GameServer ServerScriptService -- Логика игры: данные, удача, рыбалка с анимацией, сумка, магазин, улучшения, -- коллекция с наградами, задания, ежедневная награда, события, миры, донат. @@ -1288,7 +1285,5 @@ task.spawn(function() end end end) -]]> - - - \ No newline at end of file +]]> + diff --git a/install/5_FishingClient_StarterPlayerScripts.rbxmx b/install/5_FishingClient_StarterPlayerScripts.rbxmx index 41fb996..d0f7e80 100644 --- a/install/5_FishingClient_StarterPlayerScripts.rbxmx +++ b/install/5_FishingClient_StarterPlayerScripts.rbxmx @@ -1,8 +1,5 @@ - - -FishingClient - StarterPlayer > StarterPlayerScripts +FishingClient StarterPlayer > StarterPlayerScripts -- Интерфейс: HUD, сумка, коллекция с наградами, миры, задания, ежедневная награда, -- магазин, улучшения, удача, донат, событие, мини-игра, атмосфера миров. @@ -1281,7 +1278,5 @@ remote.OnClientEvent:Connect(function(action, a, b, c) end) remote:FireServer("RequestInventory") -]]> - - - \ No newline at end of file +]]> + diff --git a/install/INSTALL.lua b/install/INSTALL.lua index f4e72a0..698bd65 100644 --- a/install/INSTALL.lua +++ b/install/INSTALL.lua @@ -4847,4 +4847,4 @@ end) remote:FireServer("RequestInventory") ]=====]) -print('ГОТОВО! Все 5 скриптов установлены. Нажми Play (F5).') +print('DONE! 5 scripts installed. Press Play (F5).')