Build production-ready editor authoring workflows
CI / Format, lint, test, build (push) Waiting to run

This commit is contained in:
Rbanh committed 2026-07-11 12:41:04 -04:00
1 parent cc1fa6ea3b
commit 0553a85220
163 files changed
+34547 -1565

No files matched your search

+35
View File
@@ -105,6 +105,12 @@ fn infer_kind_from_block(block: &str) -> &'static str {
{
return actor_kind_ron(ActorKind::PrefabAnchor);
}
if block.contains("\"shared::components::AudioSourceDesc\"") {
return actor_kind_ron(ActorKind::AudioSource);
}
if block.contains("\"shared::components::AudioListenerDesc\"") {
return actor_kind_ron(ActorKind::AudioListener);
}
actor_kind_ron(ActorKind::Empty)
}
@@ -122,6 +128,8 @@ fn actor_kind_ron(kind: ActorKind) -> &'static str {
ActorKind::PostProcessVolume => "PostProcessVolume",
ActorKind::TeamSpawn => "TeamSpawn",
ActorKind::Objective => "Objective",
ActorKind::AudioSource => "AudioSource",
ActorKind::AudioListener => "AudioListener",
}
}
@@ -233,6 +241,33 @@ mod tests {
assert!(migrated.contains("Brush"));
}
#[test]
fn backfills_actor_kind_for_audio_source_entity() {
let body = r#"(
resources: {},
entities: {
1: (
components: {
"shared::components::LevelObject": (),
"shared::components::AudioSourceDesc": (
clip: None,
gain_db: 0.0,
pitch: 1.0,
looping: false,
autoplay: true,
spatial_blend: 1.0,
attenuation: (min_distance: 1.0, max_distance: 25.0, rolloff: Inverse, rolloff_factor: 1.0),
bus: "sfx",
),
},
),
},
)"#;
let migrated = migrate_v1_to_v2(body);
assert!(migrated.contains("ActorKind"));
assert!(migrated.contains("AudioSource"));
}
#[test]
fn fixes_low_directional_lux() {
let body = r#"(