conforms file names to consistant standard

This commit is contained in:
2026-02-21 04:24:04 +11:00
parent 6b67dd9755
commit 5a4ad8633a
1991 changed files with 3836 additions and 7976 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d0yfidlyfyxff"
path="res://.godot/imported/health-Sheet.png-c75114a0418676077927ea039928d1a4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://ui/shield_ui/health-Sheet.png"
dest_files=["res://.godot/imported/health-Sheet.png-c75114a0418676077927ea039928d1a4.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 779 B

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bv3alwpq8esky"
path="res://.godot/imported/health_border.png-598af6747e0115879e92784d0cdf1fb3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://ui/shield_ui/health_border.png"
dest_files=["res://.godot/imported/health_border.png-598af6747e0115879e92784d0cdf1fb3.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bifqfvhsu4c2f"
path="res://.godot/imported/health_hit-Sheet.png-e437351d48a228eb1b86f4e16bd69da8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://ui/shield_ui/health_hit-Sheet.png"
dest_files=["res://.godot/imported/health_hit-Sheet.png-e437351d48a228eb1b86f4e16bd69da8.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

85
ui/shield_ui/shield_ui.gd Normal file
View File

@@ -0,0 +1,85 @@
class_name ShieldUI
extends Control
@export var cells: Array[TextureRect] = []
@export var hit_glow: TextureRect
@export var fade_timer: Timer
const CELL_HEALTH: int = 9
var fading_enabled: bool = true
var health: int = 144
var current_cell_health: int = CELL_HEALTH
var fade_tween: Tween
var cell_tweens: Array[Tween] = []
func _ready() -> void:
for x: int in cells.size():
cell_tweens.append(null)
fade_ui()
func show_ui() -> void:
if fade_tween:
fade_tween.kill()
fade_tween = null
modulate = Color.WHITE
func fade_ui() -> void:
if !Data.preferences.always_show_shield_ui:
fade_timer.start()
func take_damage(damage: int) -> void:
show_ui()
var damage_to_deal_with: int = min(damage, current_cell_health)
var remaining_damage: int = damage - damage_to_deal_with
var current_cell: int = ceili(float(health) / CELL_HEALTH)
health -= damage_to_deal_with
current_cell_health -= damage_to_deal_with
var cell_level: int = health % 9
if remaining_damage > 0: ## This cell should be empty because the damage overran the cell
if cell_tweens[current_cell - 1]:
cell_tweens[current_cell - 1].kill()
cell_level = 3
current_cell_health = CELL_HEALTH
change_cell_color(current_cell - 1, cell_level)
take_damage(remaining_damage)
return
elif current_cell_health == 0:
cell_level = 3
current_cell_health = CELL_HEALTH
elif cell_level > 0 and cell_level <= 3: ## This cell should be low health
cell_level = 2
elif cell_level > 3 and cell_level <= 6: ## This cell should be half health
cell_level = 1
else: ## This cell should be full health
cell_level = 0
hit_glow.texture.region.position.x = 66.0 * (16 - current_cell)
if cell_tweens[current_cell - 1]:
cell_tweens[current_cell - 1].kill()
cell_tweens[current_cell - 1] = create_tween()
cell_tweens[current_cell - 1].tween_callback(func() -> void: hit_glow.visible = true)
cell_tweens[current_cell - 1].tween_interval(0.07)
cell_tweens[current_cell - 1].tween_callback(func() -> void: hit_glow.visible = false)
cell_tweens[current_cell - 1].tween_interval(0.07)
cell_tweens[current_cell - 1].tween_callback(func() -> void: hit_glow.visible = true)
cell_tweens[current_cell - 1].tween_callback(change_cell_color.bind(current_cell - 1, cell_level))
cell_tweens[current_cell - 1].tween_interval(0.07)
cell_tweens[current_cell - 1].tween_callback(func() -> void: hit_glow.visible = false)
func change_cell_color(cell: int, color: int) -> void:
var cell_to_change: int = 15 - cell
if cell_to_change >= 0 and cell_to_change < cells.size():
cells[15 - cell].texture.region.position.x = 66.0 * color
func fade_out() -> void:
if fade_tween:
fade_tween.kill()
if fading_enabled:
fade_tween = create_tween()
fade_tween.tween_property(self, "modulate", Color8(255, 255, 255, 0), 1.0)

View File

@@ -0,0 +1 @@
uid://kiivev1q63p0

217
ui/shield_ui/shield_ui.tscn Normal file
View File

@@ -0,0 +1,217 @@
[gd_scene format=3 uid="uid://cqslp83lf0ku0"]
[ext_resource type="Script" uid="uid://kiivev1q63p0" path="res://ui/shield_ui/shield_ui.gd" id="1_aa64g"]
[ext_resource type="Texture2D" uid="uid://bv3alwpq8esky" path="res://ui/shield_ui/health_border.png" id="2_lvnxo"]
[ext_resource type="Texture2D" uid="uid://d0yfidlyfyxff" path="res://ui/shield_ui/health-Sheet.png" id="3_uoync"]
[ext_resource type="Texture2D" uid="uid://bifqfvhsu4c2f" path="res://ui/shield_ui/health_hit-Sheet.png" id="4_yanml"]
[sub_resource type="AtlasTexture" id="AtlasTexture_5gv4u"]
resource_local_to_scene = true
atlas = ExtResource("3_uoync")
region = Rect2(0, 0, 66, 66)
[sub_resource type="AtlasTexture" id="AtlasTexture_ye2cs"]
resource_local_to_scene = true
atlas = ExtResource("3_uoync")
region = Rect2(0, 66, 66, 66)
[sub_resource type="AtlasTexture" id="AtlasTexture_gmtb0"]
resource_local_to_scene = true
atlas = ExtResource("3_uoync")
region = Rect2(0, 132, 66, 66)
[sub_resource type="AtlasTexture" id="AtlasTexture_ylmjw"]
resource_local_to_scene = true
atlas = ExtResource("3_uoync")
region = Rect2(0, 198, 66, 66)
[sub_resource type="AtlasTexture" id="AtlasTexture_ulao6"]
resource_local_to_scene = true
atlas = ExtResource("3_uoync")
region = Rect2(0, 264, 66, 66)
[sub_resource type="AtlasTexture" id="AtlasTexture_usluy"]
resource_local_to_scene = true
atlas = ExtResource("3_uoync")
region = Rect2(0, 330, 66, 66)
[sub_resource type="AtlasTexture" id="AtlasTexture_kgv6k"]
resource_local_to_scene = true
atlas = ExtResource("3_uoync")
region = Rect2(0, 396, 66, 66)
[sub_resource type="AtlasTexture" id="AtlasTexture_ymret"]
resource_local_to_scene = true
atlas = ExtResource("3_uoync")
region = Rect2(0, 462, 66, 66)
[sub_resource type="AtlasTexture" id="AtlasTexture_d35xv"]
resource_local_to_scene = true
atlas = ExtResource("3_uoync")
region = Rect2(0, 528, 66, 66)
[sub_resource type="AtlasTexture" id="AtlasTexture_yyjyl"]
resource_local_to_scene = true
atlas = ExtResource("3_uoync")
region = Rect2(0, 594, 66, 66)
[sub_resource type="AtlasTexture" id="AtlasTexture_p3fdm"]
resource_local_to_scene = true
atlas = ExtResource("3_uoync")
region = Rect2(0, 660, 66, 66)
[sub_resource type="AtlasTexture" id="AtlasTexture_2xxhe"]
resource_local_to_scene = true
atlas = ExtResource("3_uoync")
region = Rect2(0, 726, 66, 66)
[sub_resource type="AtlasTexture" id="AtlasTexture_8cwn3"]
resource_local_to_scene = true
atlas = ExtResource("3_uoync")
region = Rect2(0, 792, 66, 66)
[sub_resource type="AtlasTexture" id="AtlasTexture_q14re"]
resource_local_to_scene = true
atlas = ExtResource("3_uoync")
region = Rect2(0, 858, 66, 66)
[sub_resource type="AtlasTexture" id="AtlasTexture_nmmm8"]
resource_local_to_scene = true
atlas = ExtResource("3_uoync")
region = Rect2(0, 924, 66, 66)
[sub_resource type="AtlasTexture" id="AtlasTexture_vp71v"]
resource_local_to_scene = true
atlas = ExtResource("3_uoync")
region = Rect2(0, 990, 66, 66)
[sub_resource type="AtlasTexture" id="AtlasTexture_slxus"]
resource_local_to_scene = true
atlas = ExtResource("4_yanml")
region = Rect2(0, 0, 66, 66)
[node name="ShieldUI" type="Control" unique_id=1946009063 node_paths=PackedStringArray("cells", "hit_glow", "fade_timer")]
layout_mode = 3
anchors_preset = 0
script = ExtResource("1_aa64g")
cells = [NodePath("Border/Cell1"), NodePath("Border/Cell2"), NodePath("Border/Cell3"), NodePath("Border/Cell4"), NodePath("Border/Cell5"), NodePath("Border/Cell6"), NodePath("Border/Cell7"), NodePath("Border/Cell8"), NodePath("Border/Cell9"), NodePath("Border/Cell10"), NodePath("Border/Cell11"), NodePath("Border/Cell12"), NodePath("Border/Cell13"), NodePath("Border/Cell14"), NodePath("Border/Cell15"), NodePath("Border/Cell16")]
hit_glow = NodePath("HitGlow")
fade_timer = NodePath("Timer")
[node name="Border" type="TextureRect" parent="." unique_id=651498087]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = ExtResource("2_lvnxo")
stretch_mode = 5
[node name="Cell1" type="TextureRect" parent="Border" unique_id=1352923396]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = SubResource("AtlasTexture_5gv4u")
[node name="Cell2" type="TextureRect" parent="Border" unique_id=178252359]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = SubResource("AtlasTexture_ye2cs")
[node name="Cell3" type="TextureRect" parent="Border" unique_id=2035986493]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = SubResource("AtlasTexture_gmtb0")
[node name="Cell4" type="TextureRect" parent="Border" unique_id=1632897318]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = SubResource("AtlasTexture_ylmjw")
[node name="Cell5" type="TextureRect" parent="Border" unique_id=2049112546]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = SubResource("AtlasTexture_ulao6")
[node name="Cell6" type="TextureRect" parent="Border" unique_id=1572421605]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = SubResource("AtlasTexture_usluy")
[node name="Cell7" type="TextureRect" parent="Border" unique_id=1443129320]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = SubResource("AtlasTexture_kgv6k")
[node name="Cell8" type="TextureRect" parent="Border" unique_id=1552792867]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = SubResource("AtlasTexture_ymret")
[node name="Cell9" type="TextureRect" parent="Border" unique_id=922206820]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = SubResource("AtlasTexture_d35xv")
[node name="Cell10" type="TextureRect" parent="Border" unique_id=713969238]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = SubResource("AtlasTexture_yyjyl")
[node name="Cell11" type="TextureRect" parent="Border" unique_id=270182963]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = SubResource("AtlasTexture_p3fdm")
[node name="Cell12" type="TextureRect" parent="Border" unique_id=1000625727]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = SubResource("AtlasTexture_2xxhe")
[node name="Cell13" type="TextureRect" parent="Border" unique_id=1458233208]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = SubResource("AtlasTexture_8cwn3")
[node name="Cell14" type="TextureRect" parent="Border" unique_id=1026968401]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = SubResource("AtlasTexture_q14re")
[node name="Cell15" type="TextureRect" parent="Border" unique_id=295105060]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = SubResource("AtlasTexture_nmmm8")
[node name="Cell16" type="TextureRect" parent="Border" unique_id=1471825176]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = SubResource("AtlasTexture_vp71v")
[node name="HitGlow" type="TextureRect" parent="." unique_id=695465243]
visible = false
modulate = Color(1, 1, 1, 0.8)
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = SubResource("AtlasTexture_slxus")
stretch_mode = 5
[node name="Timer" type="Timer" parent="." unique_id=386916480]
wait_time = 2.0
one_shot = true
[connection signal="timeout" from="Timer" to="." method="fade_out"]