From 34d4b936eaeab7d31d2cddc784de7a07bafeb87d Mon Sep 17 00:00:00 2001 From: Charlie Nolan Date: Thu, 21 Mar 2024 04:30:52 -0700 Subject: [PATCH] Fixed an issue with wizard loadouts. (#24725) --- code/game/gamemodes/wizard/spellbook.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index fb930166953..c35fb06081a 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -658,12 +658,18 @@ var/response = tgui_alert(user, "The [src] loadout cannot be refunded once bought. Are you sure this is what you want?", "No refunds!", list("No", "Yes")) if(response != "Yes") return FALSE + if(!CanBuy(user, book)) + to_chat(user, "You can't afford that anymore!") + return FALSE to_chat(user, "[book] crumbles to ashes as you acquire its knowledge.") qdel(book) else if(items_path.len) var/response = tgui_alert(user, "The [src] loadout contains items that will not be refundable if bought. Are you sure this is what you want?", "No refunds!", list("No", "Yes")) if(response != "Yes") return FALSE + if(!CanBuy(user, book)) + to_chat(user, "You can't afford that anymore!") + return FALSE if(items_path.len) var/obj/item/storage/box/wizard/B = new(src) for(var/path in items_path)