From a37658d79b83c86196a3e6df20da63ccddb72930 Mon Sep 17 00:00:00 2001 From: astrid Date: Sun, 13 Oct 2024 11:54:30 +0200 Subject: [PATCH] Terrain:Clear() and task.wait between chunks --- README.md | 20 ++++++------ package.json | 74 ++++++++++++++++++++++---------------------- src/shared/load.luau | 4 +++ 3 files changed, 51 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 49a248d..b0a556b 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# terrain-region-plugin - -Alternative to [@sleitnick's terrain save and load plugin](https://create.roblox.com/store/asset/148042198/Terrain-Save-and-Load). Saves terrain into multiple regions. - -For the Luau module, see [load.luau](https://github.com/grand-hawk/terrain-region-plugin/blob/main/src/shared/load.luau). - -See [releases](https://github.com/grand-hawk/terrain-region-plugin/releases) tab or install from [the creator hub](https://create.roblox.com/store/asset/91863372715067). - -![RobloxStudioBeta_vXqEP1ws2f](https://github.com/user-attachments/assets/ad2fcbd8-7cbd-4c66-a25b-180c1f8927b2) -![image](https://github.com/user-attachments/assets/b9a7a545-2add-4f09-8c0a-07f3c2e05c82) +# terrain-region-plugin + +Alternative to [@sleitnick's terrain save and load plugin](https://create.roblox.com/store/asset/148042198/Terrain-Save-and-Load). Saves terrain into multiple regions. + +For the Luau module, see [load.luau](https://github.com/grand-hawk/terrain-region-plugin/blob/main/src/shared/load.luau). + +See [releases](https://github.com/grand-hawk/terrain-region-plugin/releases) tab or install from [the creator hub](https://create.roblox.com/store/asset/91863372715067). + +![RobloxStudioBeta_vXqEP1ws2f](https://github.com/user-attachments/assets/ad2fcbd8-7cbd-4c66-a25b-180c1f8927b2) +![image](https://github.com/user-attachments/assets/b9a7a545-2add-4f09-8c0a-07f3c2e05c82) diff --git a/package.json b/package.json index 34df81e..4a4d0a8 100644 --- a/package.json +++ b/package.json @@ -1,37 +1,37 @@ -{ - "name": "terrain-region-plugin", - "version": "0.2.0", - "license": "MIT", - "scripts": { - "build": "rbxtsc", - "build:rbxm": "rojo build -o plugin.rbxm", - "build:plugin": "rojo build -p terrain-region-plugin.rbxm", - "watch": "npm run build -- -w", - "format": "prettier -w .", - "lint": "eslint ." - }, - "author": "Astrid ", - "devDependencies": { - "@rbxts/compiler-types": "2.3.0-types.1", - "@rbxts/types": "^1.0.809", - "@typescript-eslint/eslint-plugin": "^7.18.0", - "@typescript-eslint/parser": "^7.18.0", - "eslint": "^8.57.1", - "eslint-config-airbnb": "^19.0.4", - "eslint-config-prettier": "^9.1.0", - "eslint-import-resolver-typescript": "^3.6.3", - "eslint-plugin-prettier": "^5.2.1", - "eslint-plugin-react": "^7.36.1", - "eslint-plugin-roblox-ts": "^0.0.36", - "prettier": "^3.3.3", - "prettier-eslint": "^16.3.0", - "roblox-ts": "3.0.0-dev-371f97c", - "typescript": "^5.6.2" - }, - "dependencies": { - "@grand-hawk/ui-components": "^0.3.0", - "@rbxts/react": "^0.4.0", - "@rbxts/react-roblox": "^0.4.0", - "@rbxts/services": "^1.5.5" - } -} +{ + "name": "terrain-region-plugin", + "version": "0.2.1", + "license": "MIT", + "scripts": { + "build": "rbxtsc", + "build:rbxm": "rojo build -o plugin.rbxm", + "build:plugin": "rojo build -p terrain-region-plugin.rbxm", + "watch": "npm run build -- -w", + "format": "prettier -w .", + "lint": "eslint ." + }, + "author": "Astrid ", + "devDependencies": { + "@rbxts/compiler-types": "2.3.0-types.1", + "@rbxts/types": "^1.0.809", + "@typescript-eslint/eslint-plugin": "^7.18.0", + "@typescript-eslint/parser": "^7.18.0", + "eslint": "^8.57.1", + "eslint-config-airbnb": "^19.0.4", + "eslint-config-prettier": "^9.1.0", + "eslint-import-resolver-typescript": "^3.6.3", + "eslint-plugin-prettier": "^5.2.1", + "eslint-plugin-react": "^7.36.1", + "eslint-plugin-roblox-ts": "^0.0.36", + "prettier": "^3.3.3", + "prettier-eslint": "^16.3.0", + "roblox-ts": "3.0.0-dev-371f97c", + "typescript": "^5.6.2" + }, + "dependencies": { + "@grand-hawk/ui-components": "^0.3.0", + "@rbxts/react": "^0.4.0", + "@rbxts/react-roblox": "^0.4.0", + "@rbxts/services": "^1.5.5" + } +} diff --git a/src/shared/load.luau b/src/shared/load.luau index d4a13ce..2ea81e8 100644 --- a/src/shared/load.luau +++ b/src/shared/load.luau @@ -49,8 +49,12 @@ function module.load(folder: Folder) end end + workspace.Terrain:Clear() + for _, terrainRegion in terrainRegions do module.loadRegion(terrainRegion) + + task.wait() end end