Warming border added
This commit is contained in:
@@ -155,6 +155,25 @@ func run() -> void:
|
||||
stage.owniverse.state.world_parameters.Bur = 19.0
|
||||
stage.owniverse.state.trends.Integration = 0.75
|
||||
stage.world_indicators.update(stage.owniverse)
|
||||
var warning: TextureRect = scene.get_node("Background/WarningBorder")
|
||||
check(warning.mouse_filter == Control.MOUSE_FILTER_IGNORE, "Warning overlay does not block input")
|
||||
var environments: Array = [
|
||||
[1.0e-7, "ff0000ff"], [1.0e-6, "df2020bf"], [1.0e-5, "c040407f"],
|
||||
[0.1, "00000000"], [0.9, "40a0c07f"], [0.97, "20b0dfbf"], [1.0, "00c0ffff"],
|
||||
[0.1, "00000000"],
|
||||
]
|
||||
for sample in environments:
|
||||
check(Parameters.density_warning_color(sample[0]).is_equal_approx(Color.html(sample[1])), "Unity warning threshold: " + str(sample[0]))
|
||||
stage.owniverse.state.amount.H = 1e14
|
||||
stage.world_indicators.update(stage.owniverse)
|
||||
check(warning.self_modulate.is_equal_approx(Color.html("00c0ffff")), "Compression warning uses current universe density")
|
||||
stage.owniverse.state.amount.H = 0.0
|
||||
stage.owniverse.state.amount.S = 1e24
|
||||
stage.world_indicators.update(stage.owniverse)
|
||||
check(warning.self_modulate.is_equal_approx(Color.html("ff0000ff")), "Rip warning replaces compression warning")
|
||||
stage.owniverse.state.amount.S = 0.0
|
||||
stage.world_indicators.update(stage.owniverse)
|
||||
check(warning.self_modulate.a == 0.0, "Warning clears when density returns to normal")
|
||||
for bar in stage.world_indicators.energy_bars:
|
||||
check(bar.scale.x == 0.25, "Energy fill is synchronized on both pages")
|
||||
var pointer: Control = stage.world_indicators.pointers.Bur
|
||||
|
||||
Reference in New Issue
Block a user