mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-21 05:06:29 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user