[MIRROR] [NO GBP] Trading card life and mana panels can be set to 0 life/mana [MDB IGNORE] (#18989)

[NO GBP] Trading card life and mana panels can be set to 0 life/mana (#72973)

## About The Pull Request

Setting the life or mana values in either of the panels to 0 would
trigger and if statement only meant to trigger if the value was set to
null, meaning that setting life or mana to 0 would be ignored.
## Why It's Good For The Game

Its possible to have 0 mana/life.
## Changelog
🆑
fix: You can now set life and mana panels to 0 life/mana.
/🆑

Co-authored-by: NamelessFairy <40036527+NamelessFairy@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-01-28 20:16:01 +00:00
committed by GitHub
co-authored by NamelessFairy
parent bf31be8946
commit bcbb7f6cad
+2 -2
View File
@@ -280,7 +280,7 @@ GLOBAL_LIST_EMPTY(tcgcard_mana_bar_radial_choices)
switch(choice)
if("Set Mana")
input_value = tgui_input_number(user, "Please input total mana", "Set mana", display_panel_ref.gems, display_panel_ref.gem_slots, 0)
if(input_value)
if(!isnull(input_value))
display_panel_ref.gems = input_value
if("Set Mana Slots")
input_value = tgui_input_number(user, "Please input total mana slots", "Set mana slots", display_panel_ref.gem_slots, 10, 1)
@@ -324,7 +324,7 @@ GLOBAL_LIST_EMPTY(tcgcard_health_bar_radial_choices)
switch(choice)
if("Set Life")
input_value = tgui_input_number(user, "Please input total life", "Set life", display_panel_ref.gems, display_panel_ref.gem_slots, 0)
if(input_value)
if(!isnull(input_value))
display_panel_ref.gems = input_value
if("Inflict Damage")
display_panel_ref.gems -= tgui_input_number(user, "Please input total damage", "Inflict damage", 1, display_panel_ref.gem_slots, 0)