Warming border added

This commit is contained in:
Kirill
2026-09-28 22:32:52 +03:00
parent 15ee7833ed
commit 2f0a3ee8d4
7 changed files with 46 additions and 2 deletions
+10
View File
@@ -45,6 +45,16 @@ static func density_display(density: float) -> Dictionary:
return {"mode": "DensityCrunch", "position": clampf((density - 0.9) * 10.0, 0.0, 1.0)}
return {"mode": "Density", "position": clampf(log(density * 1.0e5) / log(9.0e4), 0.0, 1.0)}
## Unity ApocalypseCheck thresholds and WarningUI colors; visual warning only.
static func density_warning_color(density: float) -> Color:
if density >= 1.0: return Color.html("00c0ffff")
if density >= 0.97: return Color.html("20b0dfbf")
if density >= 0.9: return Color.html("40a0c07f")
if density <= 1.0e-7: return Color.html("ff0000ff")
if density <= 1.0e-6: return Color.html("df2020bf")
if density <= 1.0e-5: return Color.html("c040407f")
return Color(0.0, 0.0, 0.0, 0.0)
## Integrate the population present at the start of the simulation interval.
## Thresholds use whole event counts; no per-year loop at high speeds.
static func advance(previous: Dictionary, target: Dictionary, rules: Dictionary, years: float) -> void:
+9
View File
@@ -65,6 +65,7 @@
[ext_resource type="Texture2D" uid="uid://c46h78ewwlafk" path="res://ui/credits/credits.en.png" id="62_vu83j"]
[ext_resource type="Texture2D" uid="uid://drvvkd724g8hy" path="res://ui/credits/kid_gp_light.png" id="64_rur7c"]
[ext_resource type="Texture2D" uid="uid://b33ji4mpyw4ks" path="res://ui/credits/kid_gp.png" id="65_y1rwn"]
[ext_resource type="Texture2D" uid="uid://dgt52qiyuirso" path="res://ui/indicators/density/warning_border.png" id="66_rur7c"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ifjjt"]
@@ -76,6 +77,14 @@
script = ExtResource("1_ifjjt")
STARRY_SKY_LAYER = ExtResource("2_behgl")
[node name="WarningBorder" type="TextureRect" parent="Background" unique_id=1892364212]
self_modulate = Color(0, 0, 0, 0)
z_index = 1
offset_right = 1080.0
offset_bottom = 1920.0
mouse_filter = 2
texture = ExtResource("66_rur7c")
[node name="Timer" type="Timer" parent="Background" unique_id=188844703]
autostart = true