12
This commit is contained in:
1 parent
1d5300eb96
commit
306cbfcbef
15 files changed
+4645
-1157
No files matched your search
@@ -1,5 +1,9 @@
|
||||
# Builds Fishing.rbxlx (place file for Roblox Studio) and install/* from src/.
|
||||
# Run: powershell -ExecutionPolicy Bypass -File build.ps1
|
||||
# Fishing.rbxlx is created only if it does not exist yet: after the level is baked in Studio
|
||||
# (World1Builder) the place file holds the hand-edited map, and scripts reach it via Rojo.
|
||||
# Use -Force to recreate it from scratch (this DELETES the map built in Studio).
|
||||
param([switch]$Force)
|
||||
|
||||
$root = $PSScriptRoot
|
||||
$enc = New-Object System.Text.UTF8Encoding($false)
|
||||
@@ -9,6 +13,7 @@ $scripts = @(
|
||||
@{ 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 = 'World1Builder'; Class = 'ModuleScript'; Service = 'ServerScriptService'; Path = 'src\ServerScriptService\World1Builder.lua'; Rbxmx = '6_World1Builder_ServerScriptService.rbxmx' },
|
||||
@{ Name = 'FishingClient'; Class = 'LocalScript'; Service = 'StarterPlayerScripts'; Path = 'src\StarterPlayer\StarterPlayerScripts\FishingClient.client.lua'; Rbxmx = '5_FishingClient_StarterPlayerScripts.rbxmx' }
|
||||
)
|
||||
|
||||
@@ -36,7 +41,13 @@ $place = $header + "`n" +
|
||||
(ServiceItem 'ServerScriptService' $sss) +
|
||||
(ServiceItem 'StarterPlayer' (ServiceItem 'StarterPlayerScripts' $sps)) +
|
||||
"</roblox>`n"
|
||||
[System.IO.File]::WriteAllText((Join-Path $root 'Fishing.rbxlx'), $place, $enc)
|
||||
$placePath = Join-Path $root 'Fishing.rbxlx'
|
||||
if ($Force -or -not (Test-Path $placePath)) {
|
||||
[System.IO.File]::WriteAllText($placePath, $place, $enc)
|
||||
Write-Host "Built Fishing.rbxlx"
|
||||
} else {
|
||||
Write-Host "Fishing.rbxlx already exists - left untouched (it holds the map built in Studio; scripts come via Rojo). Use -Force to recreate."
|
||||
}
|
||||
|
||||
# --- install/*.rbxmx and install/INSTALL.lua ---
|
||||
$installDir = Join-Path $root 'install'
|
||||
@@ -52,7 +63,7 @@ foreach ($s in $scripts) {
|
||||
$xml = $header + "`n" + (ScriptItem $s) + "</roblox>`n"
|
||||
[System.IO.File]::WriteAllText((Join-Path $installDir $s.Rbxmx), $xml, $enc)
|
||||
}
|
||||
[void]$sb.Append("print('DONE! 5 scripts installed. Press Play (F5).')`n")
|
||||
[void]$sb.Append("print('DONE! $($scripts.Count) 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/"
|
||||
Write-Host "Built install/"
|
||||
Reference in new issue
Block a user