fix(M03): support cold rendered ground sample startup

This commit is contained in:
2026-07-16 00:51:52 +04:00
parent 0773de5977
commit 9408d887ba
5 changed files with 57 additions and 4 deletions
+6 -4
View File
@@ -20,15 +20,17 @@ var _is_available: bool
var _height_units: float
var _failure_code: StringName
const SCRIPT_PATH := "res://src/render/terrain/rendered_ground_sample.gd"
## Creates an available finite rendered-ground sample in Godot world units.
static func available(height_units_value: float) -> RenderedGroundSample:
return RenderedGroundSample.new(true, height_units_value, &"")
static func available(height_units_value: float) -> RefCounted:
return load(SCRIPT_PATH).new(true, height_units_value, &"")
## Creates an unavailable rendered-ground sample with a stable failure code.
static func unavailable(failure_code_value: StringName) -> RenderedGroundSample:
return RenderedGroundSample.new(false, 0.0, failure_code_value)
static func unavailable(failure_code_value: StringName) -> RefCounted:
return load(SCRIPT_PATH).new(false, 0.0, failure_code_value)
func _init(