From bcbb7f6cad53e15eff59db2d53810683ca99fac1 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 28 Jan 2023 21:16:01 +0100 Subject: [PATCH] [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 :cl: fix: You can now set life and mana panels to 0 life/mana. /:cl: Co-authored-by: NamelessFairy <40036527+NamelessFairy@users.noreply.github.com> --- code/game/objects/items/tcg/tcg_machines.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/tcg/tcg_machines.dm b/code/game/objects/items/tcg/tcg_machines.dm index 57cd1706224..0c54f41e1e6 100644 --- a/code/game/objects/items/tcg/tcg_machines.dm +++ b/code/game/objects/items/tcg/tcg_machines.dm @@ -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)