Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Terrain to be included in projects without a classname #771

Merged
merged 3 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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])
Expand Down
5 changes: 5 additions & 0 deletions src/snapshot_middleware/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,11 @@ fn infer_class_name(name: &str, parent_class: Option<&str>) -> Option<Cow<'stati
if name == "StarterPlayerScripts" || name == "StarterCharacterScripts" {
return Some(Cow::Owned(name.to_owned()));
}
} else if parent_class == "Workspace" {
// Workspace has a special Terrain class inside it
if name == "Terrain" {
return Some(Cow::Owned(name.to_owned()));
}
}

None
Expand Down
Loading