From 066a0b1668d6d37f02021ebb33a6bf2b1aaea5ff Mon Sep 17 00:00:00 2001 From: Micah Date: Tue, 15 Aug 2023 05:41:49 -0700 Subject: [PATCH] Allow `Terrain` to be included in projects without a classname (#771) Services, `StarterPlayerScripts`, and `StarterCharacterScripts` are currently special-cased to allow them to be specified in project files without a classname. This does the same to `Terrain` since it's a singleton in the same style as those. --- CHANGELOG.md | 2 ++ src/snapshot_middleware/project.rs | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c8f4bbe..2079b061 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ * Fix PatchTree performance issues ([#755]) * Don't override the initial enabled state for source diffing ([#760]) * Added support for `Terrain.MaterialColors` ([#770]) +* Allow `Terrain` to be specified without a classname ([#771]) [#761]: https://github.com/rojo-rbx/rojo/pull/761 [#745]: https://github.com/rojo-rbx/rojo/pull/745 @@ -52,6 +53,7 @@ [#755]: https://github.com/rojo-rbx/rojo/pull/755 [#760]: https://github.com/rojo-rbx/rojo/pull/760 [#770]: https://github.com/rojo-rbx/rojo/pull/770 +[#771]: https://github.com/rojo-rbx/rojo/pull/771 ## [7.3.0] - April 22, 2023 * Added `$attributes` to project format. ([#574]) diff --git a/src/snapshot_middleware/project.rs b/src/snapshot_middleware/project.rs index 2d54a179..a451abc9 100644 --- a/src/snapshot_middleware/project.rs +++ b/src/snapshot_middleware/project.rs @@ -301,6 +301,11 @@ fn infer_class_name(name: &str, parent_class: Option<&str>) -> Option