Ammo label visibility is Weapon.ShowsAmmoReadout: the HUD's three AmmoType.IsSet() decisions move into Shared and are tested
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
036f75a0d8
commit
eee5f213bf
3 changed files with 11 additions and 4 deletions
|
|
@ -132,8 +132,8 @@ public class SchematicDisplay : MonoBehaviour
|
|||
//x.ListElement.Label.text = x.Item.EquippableItem.Name;
|
||||
if (!_enemy)
|
||||
{
|
||||
x.ListElement.InfiniteAmmoIcon.gameObject.SetActive(!x.Weapon.WeaponData.AmmoType.IsSet());
|
||||
x.ListElement.AmmoLabel.gameObject.SetActive(x.Weapon.WeaponData.AmmoType.IsSet());
|
||||
x.ListElement.InfiniteAmmoIcon.gameObject.SetActive(!x.Weapon.ShowsAmmoReadout);
|
||||
x.ListElement.AmmoLabel.gameObject.SetActive(x.Weapon.ShowsAmmoReadout);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -233,7 +233,7 @@ public class SchematicDisplay : MonoBehaviour
|
|||
if (x.Cooldown != null)
|
||||
x.ListElement.CooldownFill.anchorMax = new Vector2(x.Cooldown.Progress, 1);
|
||||
x.ListElement.DurabilityLabel.text = $"{(int)(x.Row.Item.EquippableItem.Durability / itemData.Durability * 100)}%";
|
||||
if (x.Weapon.WeaponData.AmmoType.IsSet())
|
||||
if (x.Weapon.ShowsAmmoReadout)
|
||||
x.ListElement.AmmoLabel.text = x.Weapon.AmmoReadout;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue