Fixed an issue with wizard loadouts. (#24725)

This commit is contained in:
Charlie Nolan
2024-03-21 04:30:52 -07:00
committed by GitHub
parent 9eca2f5c6d
commit 34d4b936ea
+6
View File
@@ -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, "<span class='warning'>You can't afford that anymore!</span>")
return FALSE
to_chat(user, "<span class='notice'>[book] crumbles to ashes as you acquire its knowledge.</span>")
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, "<span class='warning'>You can't afford that anymore!</span>")
return FALSE
if(items_path.len)
var/obj/item/storage/box/wizard/B = new(src)
for(var/path in items_path)