Differentiate ship lab upgrade icons
This commit is contained in:
parent
8219893cda
commit
1c9ac62e8c
3 changed files with 126 additions and 1 deletions
|
|
@ -865,7 +865,7 @@ func _refresh_lab() -> void:
|
|||
var level_note: String = "" if bool(option.unlock) else " %d/%d" % [
|
||||
GameState.upgrade_level(option.id), int(GameState.upgrade_def(option.id).max_level)]
|
||||
lab_upgrade_labels[i].text = "%s%s\n%s" % [option.name, level_note, price_text]
|
||||
lab_upgrade_buttons[i].icon = IconButton.Icon.SHIP_LAB
|
||||
lab_upgrade_buttons[i].icon = _upgrade_icon(option)
|
||||
lab_upgrade_buttons[i].glow_color = Color(1.0, 0.85, 0.4) if i == lab_choice else _vessel_colour(lab_vessel)
|
||||
lab_upgrade_buttons[i].enabled = true
|
||||
lab_upgrade_buttons[i].queue_redraw()
|
||||
|
|
@ -885,6 +885,21 @@ func _refresh_lab() -> void:
|
|||
lab_buy_button.queue_redraw()
|
||||
|
||||
|
||||
func _upgrade_icon(option: Dictionary) -> IconButton.Icon:
|
||||
if bool(option.unlock):
|
||||
return IconButton.Icon.UPGRADE_UNLOCK_SHIELD
|
||||
match String(option.id):
|
||||
"int_damage": return IconButton.Icon.UPGRADE_DAMAGE
|
||||
"int_rate": return IconButton.Icon.UPGRADE_RATE
|
||||
"int_range": return IconButton.Icon.UPGRADE_RANGE
|
||||
"int_speed", "shd_speed": return IconButton.Icon.UPGRADE_THRUSTERS
|
||||
"shd_hits": return IconButton.Icon.UPGRADE_SHIELD_HITS
|
||||
"shd_recharge": return IconButton.Icon.UPGRADE_SHIELD_RECHARGE
|
||||
"trn_capacity": return IconButton.Icon.UPGRADE_CARGO
|
||||
"trn_speed": return IconButton.Icon.UPGRADE_ENGINES
|
||||
_: return IconButton.Icon.SHIP_LAB
|
||||
|
||||
|
||||
func _on_craft_shield() -> void:
|
||||
if craft_building_id == 0:
|
||||
_say("No crafter selected - reopen this panel from the building")
|
||||
|
|
|
|||
Loading…
Reference in a new issue