Extensive work on virtually all of the visuals and the net code

This commit is contained in:
2026-03-01 21:26:31 -05:00
parent e7570c78c3
commit bed068eafc
180 changed files with 46533 additions and 913 deletions

24
scripts/hack_icon.gd Normal file
View File

@@ -0,0 +1,24 @@
class_name HackIcon extends Control
const hack_icons : Dictionary = {
Hack.Type.BOMB : preload("res://visuals/images/icons/bomb.png"),
Hack.Type.GAS : preload("res://visuals/images/icons/gas.png"),
Hack.Type.PITFALL : preload("res://visuals/images/icons/pitfall.png"),
Hack.Type.FORCE_PANEL : preload("res://visuals/images/icons/force_panel.png"),
Hack.Type.SWITCH : preload("res://visuals/images/icons/switch.png"),
Hack.Type.MINE : preload("res://visuals/images/icons/mine.png"),
}
@onready var icon_image : TextureRect = %Icon
@onready var qty_label : Label = %Label
func setup(type : Hack.Type, qty : int) -> void:
icon_image.texture = hack_icons[type]
set_quantity(qty)
func set_quantity(qty : int) -> void:
qty_label.text = str(qty)
if qty < 1:
icon_image.modulate = Color.DIM_GRAY
else:
icon_image.modulate = Color.WHITE