fix: audit STEP-057 weather runtime facade
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled

This commit is contained in:
OpenAI Codex
2026-09-07 11:42:28 +08:00
parent efaa3e61c9
commit dad6876c72
20 changed files with 183 additions and 23 deletions

View File

@@ -534,8 +534,20 @@ class ParticleCoreLayerValidationActivity : AppCompatActivity() {
}
private fun setParticleFloat(property: String, value: Float): Boolean {
return weatherRuntime?.setParticleVisual(property, value) == WeatherRuntime.CommandResult.ACCEPTED ||
(weatherRuntime == null && maplibreMap.setStyleLayerFloatProperty(PARTICLE_LAYER_ID, property, value))
val runtimeResult = weatherRuntime?.let { runtime ->
when (property) {
"raster-particle-particle-count" -> runtime.setParticleCount(value.toInt())
"raster-particle-line-width" -> runtime.setParticleLineWidth(value)
"raster-particle-particle-length" -> runtime.setParticleLength(value)
"raster-particle-particle-opacity" -> runtime.setParticleOpacity(value)
"raster-particle-trail-opacity" -> runtime.setTrailOpacity(value)
"raster-particle-trail-fade" -> runtime.setTrailFade(value)
"raster-particle-speed-color-enabled" -> runtime.setParticleSpeedColorEnabled(value > 0.5f)
else -> null // Test-only direct entry retains fixture diagnostics such as time-mix.
}
}
return runtimeResult == WeatherRuntime.CommandResult.ACCEPTED ||
(runtimeResult == null && maplibreMap.setStyleLayerFloatProperty(PARTICLE_LAYER_ID, property, value))
}
private fun resetVisualDefaults() {